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
6 changes: 3 additions & 3 deletions PWGEM/Dilepton/Utils/SemiCharmTag.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

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

Check failure on line 79 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 All @@ -88,7 +88,7 @@
pair.cospa = RecoDecay::cpa(vertex, svpos, pvecSum);
pair.dca2legs = std::sqrt(fitter.getChi2AtPCACandidate());
pair.lxy = std::sqrt(std::pow(svpos[0] - collision.posX(), 2) + std::pow(svpos[1] - collision.posY(), 2));
pair.lz = std::fabs(svpos[2] - collision.posZ());
pair.lz = svpos[2] - collision.posZ();
pair.lxyz = std::sqrt(std::pow(svpos[0] - collision.posX(), 2) + std::pow(svpos[1] - collision.posY(), 2) + std::pow(svpos[2] - collision.posZ(), 2));

auto primaryVertex = getPrimaryVertex(collision);
Expand Down Expand Up @@ -144,7 +144,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 147 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 @@ -173,7 +173,7 @@

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

Check failure on line 176 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); // electron
Expand All @@ -183,7 +183,7 @@
pair.cospa = RecoDecay::cpa(vertex, svpos, pvecSum);
pair.dca2legs = std::sqrt(fitter.getChi2AtPCACandidate());
pair.lxy = std::sqrt(std::pow(svpos[0] - collision.posX(), 2) + std::pow(svpos[1] - collision.posY(), 2));
pair.lz = std::fabs(svpos[2] - collision.posZ());
pair.lz = svpos[2] - collision.posZ();
pair.lxyz = std::sqrt(std::pow(svpos[0] - collision.posX(), 2) + std::pow(svpos[1] - collision.posY(), 2) + std::pow(svpos[2] - collision.posZ(), 2));

auto primaryVertex = getPrimaryVertex(collision);
Expand Down Expand Up @@ -241,7 +241,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 244 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 @@ -274,7 +274,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 277 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); // electron
Expand All @@ -284,7 +284,7 @@
pair.cospa = RecoDecay::cpa(vertex, svpos, pvecSum);
pair.dca2legs = std::sqrt(fitter.getChi2AtPCACandidate());
pair.lxy = std::sqrt(std::pow(svpos[0] - collision.posX(), 2) + std::pow(svpos[1] - collision.posY(), 2));
pair.lz = std::fabs(svpos[2] - collision.posZ());
pair.lz = svpos[2] - collision.posZ();
pair.lxyz = std::sqrt(std::pow(svpos[0] - collision.posX(), 2) + std::pow(svpos[1] - collision.posY(), 2) + std::pow(svpos[2] - collision.posZ(), 2));

auto primaryVertex = getPrimaryVertex(collision);
Expand Down
Loading