Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions PWGEM/Dilepton/Utils/SemiCharmTag.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

// fitter.propagateTracksToVertex();
const auto& vtx = fitter.getPCACandidate();
for (int i = 0; i < 3; i++) {

Check failure on line 105 in PWGEM/Dilepton/Utils/SemiCharmTag.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
svpos[i] = vtx[i];
}
// const std::array<float, 3> coordVtxLK = df.getPCACandidatePos();
Expand Down Expand Up @@ -175,8 +175,8 @@
pair.mass = v12.M();
pair.pt = v12.Pt();
pair.p = v12.P();
pair.deta = v1.Eta() - v2.Eta(); // lepton - hadron
pair.dphi = RecoDecay::constrainAngle(RecoDecay::constrainAngle(v1.Phi(), 0, 1U) - RecoDecay::constrainAngle(v2.Phi(), 0, 1U), -M_PI/2, 1U); // lepton - hadron
pair.deta = v1.Eta() - v2.Eta(); // lepton - hadron
pair.dphi = RecoDecay::constrainAngle(RecoDecay::constrainAngle(v1.Phi(), 0, 1U) - RecoDecay::constrainAngle(v2.Phi(), 0, 1U), -M_PI / 2, 1U); // lepton - hadron
pair.isOK = true;
return pair;
}
Expand All @@ -194,7 +194,7 @@
std::array<float, 21> covV0 = {0.f};

constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
for (int i = 0; i < 6; i++) {

Check failure on line 197 in PWGEM/Dilepton/Utils/SemiCharmTag.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
covV0[MomInd[i]] = v0.momentumCovMat()[i];
covV0[i] = v0.positionCovMat()[i];
}
Expand Down Expand Up @@ -223,7 +223,7 @@

fitter.propagateTracksToVertex();
const auto& vtx = fitter.getPCACandidate();
for (int i = 0; i < 3; i++) {

Check failure on line 226 in PWGEM/Dilepton/Utils/SemiCharmTag.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
svpos[i] = vtx[i];
}
fitter.getTrack(0).getPxPyPzGlo(pvec0); // lepton
Expand Down Expand Up @@ -302,8 +302,8 @@
pair.mass = v12.M();
pair.pt = v12.Pt();
pair.p = v12.P();
pair.deta = v1.Eta() - v2.Eta(); // lepton - hadron
pair.dphi = RecoDecay::constrainAngle(RecoDecay::constrainAngle(v1.Phi(), 0, 1U) - RecoDecay::constrainAngle(v2.Phi(), 0, 1U), -M_PI/2, 1U); // lepton - hadron
pair.deta = v1.Eta() - v2.Eta(); // lepton - hadron
pair.dphi = RecoDecay::constrainAngle(RecoDecay::constrainAngle(v1.Phi(), 0, 1U) - RecoDecay::constrainAngle(v2.Phi(), 0, 1U), -M_PI / 2, 1U); // lepton - hadron
pair.isOK = true;

return pair;
Expand All @@ -322,7 +322,7 @@

std::array<float, 21> covCasc = {0.};
constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
for (int i = 0; i < 6; i++) {

Check failure on line 325 in PWGEM/Dilepton/Utils/SemiCharmTag.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
covCasc[MomInd[i]] = cascade.momentumCovMat()[i];
covCasc[i] = cascade.positionCovMat()[i];
}
Expand Down Expand Up @@ -355,7 +355,7 @@

fitter.propagateTracksToVertex(); // propagate e and Xi/Omega to decay vertex of charm baryon
const auto& vtx = fitter.getPCACandidate();
for (int i = 0; i < 3; i++) {

Check failure on line 358 in PWGEM/Dilepton/Utils/SemiCharmTag.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
svpos[i] = vtx[i];
}
fitter.getTrack(0).getPxPyPzGlo(pvec0); // lepton
Expand Down Expand Up @@ -434,8 +434,8 @@
pair.mass = v12.M();
pair.pt = v12.Pt();
pair.p = v12.P();
pair.deta = v1.Eta() - v2.Eta(); // lepton - hadron
pair.dphi = RecoDecay::constrainAngle(RecoDecay::constrainAngle(v1.Phi(), 0, 1U) - RecoDecay::constrainAngle(v2.Phi(), 0, 1U), -M_PI/2, 1U); // lepton - hadron
pair.deta = v1.Eta() - v2.Eta(); // lepton - hadron
pair.dphi = RecoDecay::constrainAngle(RecoDecay::constrainAngle(v1.Phi(), 0, 1U) - RecoDecay::constrainAngle(v2.Phi(), 0, 1U), -M_PI / 2, 1U); // lepton - hadron
pair.isOK = true;

return pair;
Expand Down
Loading