Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions PWGLF/Utils/strangenessBuilderHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@
fitter.setMaxChi2(1e9);
fitter.setUseAbsDCA(true);
fitter.setWeightedFinalPCA(false);
fitter.setOldMode(true); // enable old convariance matrix calculation until this has been fully tested

v0selections.minCrossedRows = -1;
v0selections.dcanegtopv = -1.0f;
Expand Down Expand Up @@ -390,14 +391,14 @@
negativeTrackParam.getPxPyPzGlo(v0.negativeMomentum);
positiveTrackParam.getXYZGlo(v0.positivePosition);
negativeTrackParam.getXYZGlo(v0.negativePosition);
for (int i = 0; i < 3; i++) {

Check failure on line 394 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 401 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 Down Expand Up @@ -470,7 +471,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 474 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 @@ -568,7 +569,7 @@
return false;
}

if (kfConstrainedMassValue > -1e-4) {

Check failure on line 572 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.
// photon constraint: this one's got no mass
KFV0.SetNonlinearMassConstraint(kfConstrainedMassValue);
}
Expand Down Expand Up @@ -597,7 +598,7 @@
}

// check radius
for (int i = 0; i < 3; i++) {

Check failure on line 601 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] = xyz_decay[i];
}
if (std::hypot(v0.position[0], v0.position[1]) < v0selections.v0radius) {
Expand Down Expand Up @@ -773,7 +774,7 @@
// Set up covariance matrices (should in fact be optional)
std::array<float, 21> covV = {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 777 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.
covV[MomInd[i]] = v0input.momentumCovariance[i];
covV[i] = v0input.positionCovariance[i];
}
Expand Down Expand Up @@ -811,7 +812,7 @@
lBachelorTrack.getPxPyPzGlo(cascade.bachelorMomentum);
// get decay vertex coordinates
const auto& vtx = fitter.getPCACandidate();
for (int i = 0; i < 3; i++) {

Check failure on line 815 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.
cascade.cascadePosition[i] = vtx[i];
}
if (std::hypot(cascade.cascadePosition[0], cascade.cascadePosition[1]) < cascadeselections.cascradius) {
Expand Down Expand Up @@ -901,10 +902,10 @@
lV0Track.getCovXYZPxPyPzGlo(covTv0);
lBachelorTrack.getCovXYZPxPyPzGlo(covTbachelor);
constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
for (int i = 0; i < 21; i++) {

Check failure on line 905 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.
cascade.covariance[i] = 0.0f;
}
for (int i = 0; i < 6; i++) {

Check failure on line 908 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.
cascade.covariance[i] = positionCovariance[i];
cascade.covariance[MomInd[i]] = covTv0[MomInd[i]] + covTbachelor[MomInd[i]];
}
Expand Down Expand Up @@ -1233,7 +1234,7 @@

// KF Cascade covariance matrix
std::array<float, 21> covCascKF;
for (int i = 0; i < 21; i++) { // get covariance matrix elements (lower triangle)

Check failure on line 1237 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.
covCascKF[i] = KFXi.GetCovariance(i);
cascade.covariance[i] = covCascKF[i];
}
Expand Down
6 changes: 6 additions & 0 deletions PWGLF/Utils/strangenessBuilderModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ struct coreConfigurables : o2::framework::ConfigurableGroup {

// test the possibility of refitting with material corrections (DCA Fitter option)
o2::framework::Configurable<bool> refitWithMaterialCorrection{"refitWithMaterialCorrection", false, "do refit after material corrections were applied"};

// enable old convariance matrix calculation until this has been fully tested
o2::framework::Configurable<bool> useOldModeDCAFitter{"useOldModeDCAFitter", true, "Use old mode for DCA fitter?"};
};

// strangenessBuilder: V0 building options
Expand Down Expand Up @@ -824,6 +827,9 @@ class BuilderModule
// Set option to refit with material corrections
straHelper.fitter.setRefitWithMatCorr(baseOpts.refitWithMaterialCorrection.value);

// set option to enabled the old mode
straHelper.fitter.setOldMode(baseOpts.useOldModeDCAFitter.value);

// Initialise the RCTFlagsChecker
if (eventSelectOpts.cfgApplyRCTrequirement) {
rctFlagsChecker.init(eventSelectOpts.cfgRCTLabel.value, eventSelectOpts.cfgCheckZDC, eventSelectOpts.cfgTreatLimitedAcceptanceAsBad);
Expand Down
Loading