Skip to content

Commit aad8452

Browse files
committed
Address Oleksii comments
1 parent 15c3db0 commit aad8452

1 file changed

Lines changed: 18 additions & 21 deletions

File tree

‎PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx‎

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ struct HfCandidateCreatorXic0Omegac0Qa {
9797
// Options for internal cascade building - DCAFitter settings
9898
// ...Initial vaules taken from PWGLF/Utils/strangenessBuilderHelper
9999
Configurable<bool> propagateToPCA{"propagateToPCA", true, "Create tracks version propagated to PCA"};
100-
Configurable<double> maxR{"maxR", 200., "Reject PCA's above this radius"};
101-
Configurable<double> maxDZIni{"maxDZIni", 1e9, "Reject (if>0) PCA candidate if tracks DZ exceeds this threshold"};
102-
Configurable<double> maxDXYIni{"maxDXYIni", 4.0f, "Reject (if>0) PCA candidate if tracks DXY exceeds this threshold"};
103-
Configurable<double> minParamChange{"minParamChange", 1.e-3, "Stop iteration if largest change of any X is smaller than this"};
104-
Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "Stop iteration if Chi2/Chi2old > this"};
105-
Configurable<double> maxChi2{"maxChi2", 1e9, "Discard vertices with Chi2/Nprongs > this(or sum {DCAi^2}/Nprongs for abs. distance minimization)"};
100+
Configurable<float> maxR{"maxR", 200., "Reject PCA's above this radius"};
101+
Configurable<float> maxDZIni{"maxDZIni", 1e9, "Reject (if>0) PCA candidate if tracks DZ exceeds this threshold"};
102+
Configurable<float> maxDXYIni{"maxDXYIni", 4.0f, "Reject (if>0) PCA candidate if tracks DXY exceeds this threshold"};
103+
Configurable<float> minParamChange{"minParamChange", 1.e-3, "Stop iteration if largest change of any X is smaller than this"};
104+
Configurable<float> minRelChi2Change{"minRelChi2Change", 0.9, "Stop iteration if Chi2/Chi2old > this"};
105+
Configurable<float> maxChi2{"maxChi2", 1e9, "Discard vertices with Chi2/Nprongs > this(or sum {DCAi^2}/Nprongs for abs. distance minimization)"};
106106
Configurable<bool> useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"};
107107
Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariance, effective only if useAbsDCA is true"};
108108
Configurable<bool> refitWithMaterialCorrection{"refitWithMaterialCorrection", false, "Do refit after material correction applied"};
@@ -112,7 +112,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
112112
Configurable<int> minCrossedRows{"minCrossedRows", 50, "minimun TPC crossed rows for daughter tracks. Used for internal V0 Building"};
113113
Configurable<float> dcanegtopv{"dcanegtopv", .1, "DCV Neg to PV"};
114114
Configurable<float> dcapostopv{"dcapostopv", .1, "DCV Pos To PV"};
115-
Configurable<double> v0cospa{"v0cospa", 0.95, "V0 CosPA"};
115+
Configurable<float> v0cospa{"v0cospa", 0.95, "V0 CosPA"};
116116
Configurable<float> dcav0dau{"dcav0dau", 1.0, "DCA V0 Daughters"};
117117
Configurable<float> v0radius{"v0radius", 0.9, "v0radius"};
118118
Configurable<float> maxDaughterEta{"maxDaughterEta", 5.0, "Maximun daughter eta (in abs value)"};
@@ -126,8 +126,8 @@ struct HfCandidateCreatorXic0Omegac0Qa {
126126
Configurable<float> lambdaMassWindow{"lambdaMassWindow", 0.01, "Distance from Lambda mass(does not apply to KF path)"};
127127
// Options for internal cascade building - KF Building specifics
128128
// ...Initial values taken from PWGLF/Utiles/strangenessBuilderModule.h
129-
Configurable<bool> kfTuneForOmega{"kfTuneForOmega", false, "if enabled, take main cascade properties from omega fit instread of Xi fit(=default)"};
130-
Configurable<int> kfConstructMethod{"kfConstructMethod", 2, "2 : Daughter particle masses stay fixed in construction process"};
129+
Configurable<bool> kfTuneForOmega{"kfTuneForOmega", false, "if enabled, take main cascade properties from omega fit instead of Xi fit(=default)"};
130+
Configurable<int> kfConstructMethod{"kfConstructMethod", 2, "0: simplifyed fast mathematics ignoring constraint on fixed mass, 2 : daughter particle masses stay fixed in construction process"};
131131
Configurable<bool> kfUseV0MassConstraint{"kfUseV0MassConstraint", true, "KF : Use Lambda mass constraint"};
132132
Configurable<bool> kfUseCascadeMassConstraint{"kfUseCascadeMassConstraint", false, "KF : Use Cascade mass constraint - WARNING : Not adequate for inv mass analysis of Xi"};
133133
Configurable<bool> kfDoDCAFitterPreMinimV0{"kfDoDCAFitterPreMinimV0", true, "KF : do DCAFitter pre-optimization before KF fit to include material correction for V0"};
@@ -149,18 +149,18 @@ struct HfCandidateCreatorXic0Omegac0Qa {
149149
Configurable<bool> createOmegaCToOmegaK{"createOmegaCToOmegaK", false, "enable OmegaC0 -> Omega K candidate creation"};
150150
// Cascade pre selection
151151
Configurable<bool> doCascadePreselection{"doCascadePreselection", true, "Use invariant mass and dcaXY cuts to preselect cascade candidates"};
152-
Configurable<double> massToleranceCascade{"massToleranceCascade", 0.01, "Invariant mass tolerance for cascades"};
152+
Configurable<float> massToleranceCascade{"massToleranceCascade", 0.01, "Invariant mass tolerance for cascades"};
153153
Configurable<float> dcaXYToPVCascadeMax{"dcaXYToPVCascadeMax", 3, "Max cascade DCA to PV in XY plane"};
154154
Configurable<float> dcaV0DaughtersMax{"dcaV0DaughtersMax", 1.0, "Max DCA of V0 daughter"};
155155
Configurable<float> dcaCascDaughtersMax{"dcaCascDaughtersMax", 1.0, "Max DCA of cascade daughter"};
156156
// Options for DCAFitter
157157
Configurable<bool> propagateToPCA{"propagateToPCA", true, "Create tracks version propagated to PCA"};
158-
Configurable<double> maxR{"maxR", 200., "Reject PCA's above this radius"};
159-
Configurable<double> maxDZIni{"maxDZIni", 4., "Reject (if>0) PCA candidate if tracks DZ exceeds this threshold"};
160-
Configurable<double> maxDXYIni{"maxDXYIni", 4., "Reject (if>0) PCA candidate if tracks DXY exceeds this threshold"};
161-
Configurable<double> minParamChange{"minParamChange", 1.e-3, "Stop iteration if largest change of any X is smaller than this"};
162-
Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "Stop iteration if Chi2/Chi2old > this"};
163-
Configurable<double> maxChi2{"maxChi2", 100, "Discard vertices with Chi2/Nprongs > this(or sum {DCAi^2}/Nprongs for abs. distance minimization)"};
158+
Configurable<float> maxR{"maxR", 200., "Reject PCA's above this radius"};
159+
Configurable<float> maxDZIni{"maxDZIni", 4., "Reject (if>0) PCA candidate if tracks DZ exceeds this threshold"};
160+
Configurable<float> maxDXYIni{"maxDXYIni", 4., "Reject (if>0) PCA candidate if tracks DXY exceeds this threshold"};
161+
Configurable<float> minParamChange{"minParamChange", 1.e-3, "Stop iteration if largest change of any X is smaller than this"};
162+
Configurable<float> minRelChi2Change{"minRelChi2Change", 0.9, "Stop iteration if Chi2/Chi2old > this"};
163+
Configurable<float> maxChi2{"maxChi2", 100, "Discard vertices with Chi2/Nprongs > this(or sum {DCAi^2}/Nprongs for abs. distance minimization)"};
164164
Configurable<bool> useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"};
165165
Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", true, "Recalculate vertex position using track covariance, effective only if useAbsDCA is true"};
166166
// Options for KFParticle
@@ -613,7 +613,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
613613
int pdgIdOfCharmBaryon = kXiC0;
614614
double massOfCascade = o2::constants::physics::MassXiMinus;
615615

616-
if (decayChannel == hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi) {
616+
if constexpr (decayChannel == hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi) {
617617
pdgIdOfBach = kKMinus;
618618
pdgIdOfBachRej = kPiMinus;
619619
pdgIdOfCharmBach = kPiPlus;
@@ -622,7 +622,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
622622
massOfCascade = o2::constants::physics::MassOmegaMinus;
623623
}
624624

625-
if (decayChannel == hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaK) {
625+
if constexpr (decayChannel == hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaK) {
626626
pdgIdOfBach = kKMinus;
627627
pdgIdOfBachRej = kPiMinus;
628628
pdgIdOfCharmBach = kKPlus;
@@ -880,16 +880,13 @@ struct HfCandidateCreatorXic0Omegac0Qa {
880880
// Calculate normalised decay length using KFParticle
881881
float dlV0{}, errDlV0{};
882882
kfV0ToPv.GetDecayLength(dlV0, errDlV0);
883-
dlV0 = std::abs(dlV0); // KFParticle returns a signed decay length
884883

885884
float dlCasc{}, errDlCasc{};
886885
kfCascToPv.GetDecayLength(dlCasc, errDlCasc);
887-
dlCasc = std::abs(dlCasc);
888886

889887
float dlCharmBaryon{}, dlXYCharmBaryon{}, errDlCharmBaryon{}, errDlXYCharmBaryon{};
890888
kfCharmBaryonToPv.GetDecayLength(dlCharmBaryon, errDlCharmBaryon);
891889
kfCharmBaryonToPv.GetDecayLengthXY(dlXYCharmBaryon, errDlXYCharmBaryon);
892-
dlCharmBaryon = std::abs(dlCharmBaryon);
893890

894891
float cosPaCascToPv = RecoDecay::cpa(pvCoord, vertexCasc, pVecCasc);
895892
float cosPaXYCascToPv = RecoDecay::cpaXY(pvCoord, vertexCasc, pVecCasc);

0 commit comments

Comments
 (0)