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
14 changes: 7 additions & 7 deletions PWGLF/Utils/strangenessBuilderHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@
//_______________________________________________________________________
// standard build V0 function. Populates ::v0 object
// ::v0 will be initialized to defaults if build fails
// --- useSelections: meant to maximize recovery, but beware high cost in CPU
// --- calculateProngDCAtoPV: optionally don't propagate prongs to PV, saves
// --- useSelections: meant to maximize recovery, but beware high cost in CPU
// --- calculateProngDCAtoPV: optionally don't propagate prongs to PV, saves
// CPU, of interest when dealing with de-duplication (variable not checked)
template <bool useSelections = true, bool calculateProngDCAtoPV = true, typename TTrack, typename TTrackParametrization>
bool buildV0Candidate(int collisionIndex,
Expand Down Expand Up @@ -314,8 +314,8 @@
std::array<float, 2> dcaInfo;

// do DCA to PV on TrackPar copies and not TrackParCov
// TrackPar preferred: don't calculate multiple scattering / CovMat changes
// Spares CPU since variables not checked
// TrackPar preferred: don't calculate multiple scattering / CovMat changes
// Spares CPU since variables not checked
o2::track::TrackPar positiveTrackParamCopy(positiveTrackParam);
o2::track::TrackPar negativeTrackParamCopy(negativeTrackParam);

Expand All @@ -338,7 +338,7 @@
return false;
}
}
}else{
} else {
v0.positiveDCAxy = 0.0f; // default invalid
v0.negativeDCAxy = 0.0f; // default invalid
}
Expand Down Expand Up @@ -376,14 +376,14 @@
negativeTrackParam.getPxPyPzGlo(v0.negativeMomentum);
positiveTrackParam.getXYZGlo(v0.positivePosition);
negativeTrackParam.getXYZGlo(v0.negativePosition);
for (int i = 0; i < 3; i++) {

Check failure on line 379 in PWGLF/Utils/strangenessBuilderHelper.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.
// avoids misuse if mixed with KF particle use
v0.momentum[i] = v0.positiveMomentum[i] + v0.negativeMomentum[i];
}

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

Check failure on line 386 in PWGLF/Utils/strangenessBuilderHelper.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.
v0.position[i] = vtx[i];
}

Expand All @@ -394,7 +394,7 @@
}
}

v0.daughterDCA = TMath::Sqrt(fitter.getChi2AtPCACandidate());

Check failure on line 397 in PWGLF/Utils/strangenessBuilderHelper.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

if constexpr (useSelections) {
if (v0.daughterDCA > v0selections.dcav0dau) {
Expand All @@ -414,7 +414,7 @@
}
}

v0.pointingAngle = TMath::ACos(cosPA);

Check failure on line 417 in PWGLF/Utils/strangenessBuilderHelper.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
v0.dcaToPV = CalculateDCAStraightToPV(
v0.position[0], v0.position[1], v0.position[2],
v0.positiveMomentum[0] + v0.negativeMomentum[0],
Expand Down Expand Up @@ -456,7 +456,7 @@
positiveTrackParam.getCovXYZPxPyPzGlo(covTpositive);
negativeTrackParam.getCovXYZPxPyPzGlo(covTnegative);
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 459 in PWGLF/Utils/strangenessBuilderHelper.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.
v0.momentumCovariance[i] = covTpositive[MomInd[i]] + covTnegative[MomInd[i]];
}
}
Expand Down Expand Up @@ -510,8 +510,8 @@
std::array<float, 2> dcaInfo;

// do DCA to PV on TrackPar copies and not TrackParCov
// TrackPar preferred: don't calculate multiple scattering / CovMat changes
// Spares CPU since variables not checked
// TrackPar preferred: don't calculate multiple scattering / CovMat changes
// Spares CPU since variables not checked
o2::track::TrackPar positiveTrackParamCopy(positiveTrackParam);
o2::track::TrackPar negativeTrackParamCopy(negativeTrackParam);

Expand Down Expand Up @@ -598,7 +598,7 @@
v0 = {};
return false;
}
v0.pointingAngle = TMath::ACos(cosPA);

Check failure on line 601 in PWGLF/Utils/strangenessBuilderHelper.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

v0.dcaToPV = CalculateDCAStraightToPV(
v0.position[0], v0.position[1], v0.position[2],
Expand Down Expand Up @@ -783,7 +783,7 @@
lBachelorTrack = fitter.getTrack(1);

// DCA between cascade daughters
cascade.cascadeDaughterDCA = TMath::Sqrt(fitter.getChi2AtPCACandidate());

Check failure on line 786 in PWGLF/Utils/strangenessBuilderHelper.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (cascade.cascadeDaughterDCA > cascadeselections.dcacascdau) {
cascade = {};
return false;
Expand All @@ -810,7 +810,7 @@
cascade = {};
return false;
}
cascade.pointingAngle = TMath::ACos(cosPA);

Check failure on line 813 in PWGLF/Utils/strangenessBuilderHelper.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

// Calculate DCAxy of the cascade (with bending)
auto lCascadeTrack = fitter.createParentTrackParCov();
Expand Down Expand Up @@ -1008,7 +1008,7 @@
return false;
}
// save classical DCA daughters
cascade.v0DaughterDCA = TMath::Sqrt(fitter.getChi2AtPCACandidate());

Check failure on line 1011 in PWGLF/Utils/strangenessBuilderHelper.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

// re-acquire from DCA fitter
posTrackParCov = fitter.getTrack(0);
Expand Down Expand Up @@ -1187,7 +1187,7 @@
cascade = {};
return false;
}
cascade.pointingAngle = TMath::ACos(cosPA);

Check failure on line 1190 in PWGLF/Utils/strangenessBuilderHelper.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

// Calculate masses a priori
float MLambda, SigmaLambda, MXi, SigmaXi, MOmega, SigmaOmega;
Expand Down
Loading