Skip to content

Commit 5aed3db

Browse files
cleaning code and removing commented lines
1 parent ba947fd commit 5aed3db

File tree

2 files changed

+61
-60
lines changed

2 files changed

+61
-60
lines changed

PWGCF/TableProducer/filter2Prong.cxx

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -62,38 +62,37 @@ struct Filter2Prong {
6262
O2_DEFINE_CONFIGURABLE(cfgCutEtaPhiMeson, float, 0.8, "Maximum eta for phi meson track")
6363
O2_DEFINE_CONFIGURABLE(cfgCutPTPhiMeson, float, 0.15, "Maximum pt for phi meson track")
6464
O2_DEFINE_CONFIGURABLE(cfgDoV0, bool, true, "Store V0s candidates")
65-
// O2_DEFINE_CONFIGURABLE(tpcNClsCrossedRowsTrackMin, float, 70, "Minimum number of crossed rows in TPC") // already present in strangeness builder
66-
// dca pos and neg already prsent in strangeness builder
67-
// O2_DEFINE_CONFIGURABLE(etaTrackMax, float, 0.8, "Maximum pseudorapidity")
68-
O2_DEFINE_CONFIGURABLE(ptTrackMin, float, 0.1, "Minimum transverse momentum")
69-
O2_DEFINE_CONFIGURABLE(cMinV0DCAPr, float, 0.1, "Min V0 proton DCA")
70-
O2_DEFINE_CONFIGURABLE(cMinV0DCAPi, float, 0.1, "Min V0 pion DCA")
71-
O2_DEFINE_CONFIGURABLE(ITSPIDSelection, bool, true, "PID ITS")
72-
O2_DEFINE_CONFIGURABLE(ITSPIDPthreshold, float, 1.0, "Momentum threshold for ITS PID (GeV/c) (only used if ITSPIDSelection is true)")
73-
O2_DEFINE_CONFIGURABLE(lowITSPIDNsigma, float, 3.0, "lower cut on PID nsigma for ITS")
74-
O2_DEFINE_CONFIGURABLE(highITSPIDNsigma, float, 3.0, "higher cut on PID nsigma for ITS")
75-
O2_DEFINE_CONFIGURABLE(ConfDaughPIDCuts, float, 4.0, "PID nsigma for V0s")
76-
O2_DEFINE_CONFIGURABLE(massK0Min, float, 0.4, "Minimum mass for K0")
77-
O2_DEFINE_CONFIGURABLE(massK0Max, float, 0.6, "Maximum mass for K0")
78-
O2_DEFINE_CONFIGURABLE(massLambdaMin, float, 1.0, "Minimum mass for lambda")
79-
O2_DEFINE_CONFIGURABLE(massLambdaMax, float, 1.3, "Maximum mass for lambda")
80-
// O2_DEFINE_CONFIGURABLE(radiusMax, float, 2.3, "Maximum decay radius (cm)") // already present in strangeness builder
81-
// O2_DEFINE_CONFIGURABLE(radiusMin, float, 0.0, "Minimum decay radius (cm)") // already present in strangeness builder
82-
// O2_DEFINE_CONFIGURABLE(cosPaMin, float, 0.98, "Minimum cosine of pointing angle") // already present in strangeness builder
83-
// O2_DEFINE_CONFIGURABLE(dcaV0DaughtersMax, float, 0.2, "Maximum DCA among the V0 daughters (cm)") // already present in strangeness builder
84-
O2_DEFINE_CONFIGURABLE(dcaV0ToPvMax, float, 0.2, "Maximum DCA of the V0 from the primary vertex (cm)")
85-
O2_DEFINE_CONFIGURABLE(cosPaV0Min, float, 0.95, "Minimum cosine of pointing angle for V0 stemming from cascade decays")
86-
O2_DEFINE_CONFIGURABLE(qtArmenterosMinForK0, float, 0.12, "Minimum Armenteros' qt for K0")
87-
O2_DEFINE_CONFIGURABLE(ConfV0Rap, float, 0.5, "Store rapidity of v0")
88-
O2_DEFINE_CONFIGURABLE(cMaxLambdaLifeTime, float, 30, "Store Lambda lifetime")
89-
O2_DEFINE_CONFIGURABLE(cMaxK0sLifeTime, float, 30, "Store K0s lifetime")
90-
O2_DEFINE_CONFIGURABLE(isDeepAngle, bool, true, "flag for applying deep angle")
91-
O2_DEFINE_CONFIGURABLE(cfgDeepAngle, float, 0.04, "deep angle cut")
92-
O2_DEFINE_CONFIGURABLE(removefaketrack, bool, true, "flag to remove fake kaon")
93-
O2_DEFINE_CONFIGURABLE(ConfFakeKaonCut, float, 0.15, "Cut based on track from momentum difference")
94-
O2_DEFINE_CONFIGURABLE(nsigmaCutTPC, float, 2.5, "nsigma tpc")
95-
O2_DEFINE_CONFIGURABLE(nsigmaCutTOF, float, 2.5, "nsigma tof")
96-
O2_DEFINE_CONFIGURABLE(cfgCutTOFBeta, float, 0.5, "TOF beta")} grpphiV0;
65+
O2_DEFINE_CONFIGURABLE(tpcNClsCrossedRowsTrackMin, float, 70, "Minimum number of crossed rows in TPC")
66+
O2_DEFINE_CONFIGURABLE(etaTrackMax, float, 0.8, "Maximum pseudorapidity")
67+
O2_DEFINE_CONFIGURABLE(ptTrackMin, float, 0.1, "Minimum transverse momentum")
68+
O2_DEFINE_CONFIGURABLE(cMinV0DCAPr, float, 0.1, "Min V0 proton DCA")
69+
O2_DEFINE_CONFIGURABLE(cMinV0DCAPi, float, 0.1, "Min V0 pion DCA")
70+
O2_DEFINE_CONFIGURABLE(ITSPIDSelection, bool, true, "PID ITS")
71+
O2_DEFINE_CONFIGURABLE(ITSPIDPthreshold, float, 1.0, "Momentum threshold for ITS PID (GeV/c) (only used if ITSPIDSelection is true)")
72+
O2_DEFINE_CONFIGURABLE(lowITSPIDNsigma, float, 3.0, "lower cut on PID nsigma for ITS")
73+
O2_DEFINE_CONFIGURABLE(highITSPIDNsigma, float, 3.0, "higher cut on PID nsigma for ITS")
74+
O2_DEFINE_CONFIGURABLE(ConfDaughPIDCuts, float, 4.0, "PID nsigma for V0s")
75+
O2_DEFINE_CONFIGURABLE(massK0Min, float, 0.4, "Minimum mass for K0")
76+
O2_DEFINE_CONFIGURABLE(massK0Max, float, 0.6, "Maximum mass for K0")
77+
O2_DEFINE_CONFIGURABLE(massLambdaMin, float, 1.0, "Minimum mass for lambda")
78+
O2_DEFINE_CONFIGURABLE(massLambdaMax, float, 1.3, "Maximum mass for lambda")
79+
O2_DEFINE_CONFIGURABLE(radiusMax, float, 2.3, "Maximum decay radius (cm)")
80+
O2_DEFINE_CONFIGURABLE(radiusMin, float, 0.0, "Minimum decay radius (cm)")
81+
O2_DEFINE_CONFIGURABLE(cosPaMin, float, 0.98, "Minimum cosine of pointing angle")
82+
O2_DEFINE_CONFIGURABLE(dcaV0DaughtersMax, float, 0.2, "Maximum DCA among the V0 daughters (cm)")
83+
O2_DEFINE_CONFIGURABLE(dcaV0ToPvMax, float, 0.2, "Maximum DCA of the V0 from the primary vertex (cm)")
84+
O2_DEFINE_CONFIGURABLE(cosPaV0Min, float, 0.95, "Minimum cosine of pointing angle for V0 stemming from cascade decays")
85+
O2_DEFINE_CONFIGURABLE(qtArmenterosMinForK0, float, 0.12, "Minimum Armenteros' qt for K0")
86+
O2_DEFINE_CONFIGURABLE(ConfV0Rap, float, 0.5, "Store rapidity of v0")
87+
O2_DEFINE_CONFIGURABLE(cMaxLambdaLifeTime, float, 30, "Store Lambda lifetime")
88+
O2_DEFINE_CONFIGURABLE(cMaxK0sLifeTime, float, 30, "Store K0s lifetime")
89+
O2_DEFINE_CONFIGURABLE(isDeepAngle, bool, true, "flag for applying deep angle")
90+
O2_DEFINE_CONFIGURABLE(cfgDeepAngle, float, 0.04, "deep angle cut")
91+
O2_DEFINE_CONFIGURABLE(removefaketrack, bool, true, "flag to remove fake kaon")
92+
O2_DEFINE_CONFIGURABLE(ConfFakeKaonCut, float, 0.15, "Cut based on track from momentum difference")
93+
O2_DEFINE_CONFIGURABLE(nsigmaCutTPC, float, 2.5, "nsigma tpc")
94+
O2_DEFINE_CONFIGURABLE(nsigmaCutTOF, float, 2.5, "nsigma tof")
95+
O2_DEFINE_CONFIGURABLE(cfgCutTOFBeta, float, 0.5, "TOF beta")} grpphiV0;
9796

9897
HfHelper hfHelper;
9998
Produces<aod::CF2ProngTracks> output2ProngTracks;
@@ -266,15 +265,15 @@ struct Filter2Prong {
266265
if ((v0.qtarm() / std::abs(v0.alpha())) < grpphiV0.qtArmenterosMinForK0) {
267266
return false;
268267
}
269-
// if (v0.v0radius() > grpphiV0.radiusMax || v0.v0radius() < grpphiV0.radiusMin) {
270-
// return false;
271-
// }
272-
// if (v0.v0cosPA() < grpphiV0.cosPaMin) {
273-
// return false;
274-
//}
275-
// if (v0.dcaV0daughters() > grpphiV0.dcaV0DaughtersMax) {
276-
// return false;
277-
//}
268+
if (v0.v0radius() > grpphiV0.radiusMax || v0.v0radius() < grpphiV0.radiusMin) {
269+
return false;
270+
}
271+
if (v0.v0cosPA() < grpphiV0.cosPaMin) {
272+
return false;
273+
}
274+
if (v0.dcaV0daughters() > grpphiV0.dcaV0DaughtersMax) {
275+
return false;
276+
}
278277
if (v0.dcav0topv() > grpphiV0.dcaV0ToPvMax) {
279278
return false;
280279
}
@@ -305,15 +304,15 @@ struct Filter2Prong {
305304
(v0.mAntiLambda() < grpphiV0.massLambdaMin || v0.mAntiLambda() > grpphiV0.massLambdaMax)) {
306305
return false;
307306
}
308-
// if (v0.v0radius() > grpphiV0.radiusMax || v0.v0radius() < grpphiV0.radiusMin) {
309-
// return false;
310-
// }
311-
// if (v0.v0cosPA() < grpphiV0.cosPaMin) {
312-
// return false;
313-
//}
314-
// if (v0.dcaV0daughters() > grpphiV0.dcaV0DaughtersMax) {
315-
// return false;
316-
//}
307+
if (v0.v0radius() > grpphiV0.radiusMax || v0.v0radius() < grpphiV0.radiusMin) {
308+
return false;
309+
}
310+
if (v0.v0cosPA() < grpphiV0.cosPaMin) {
311+
return false;
312+
}
313+
if (v0.dcaV0daughters() > grpphiV0.dcaV0DaughtersMax) {
314+
return false;
315+
}
317316
if (v0.dcav0topv() > grpphiV0.dcaV0ToPvMax) {
318317
return false;
319318
}
@@ -347,15 +346,15 @@ struct Filter2Prong {
347346
if (!posTrack.hasTPC() || !negTrack.hasTPC()) {
348347
return false;
349348
}
350-
// if (posTrack.tpcNClsCrossedRows() < grpphiV0.tpcNClsCrossedRowsTrackMin || negTrack.tpcNClsCrossedRows() < grpphiV0.tpcNClsCrossedRowsTrackMin) {
351-
// return false;
352-
// }
349+
if (posTrack.tpcNClsCrossedRows() < grpphiV0.tpcNClsCrossedRowsTrackMin || negTrack.tpcNClsCrossedRows() < grpphiV0.tpcNClsCrossedRowsTrackMin) {
350+
return false;
351+
}
353352
if (posTrack.tpcCrossedRowsOverFindableCls() < 0.8 || negTrack.tpcCrossedRowsOverFindableCls() < 0.8) {
354353
return false;
355354
}
356-
// if (std::abs(v0.positiveeta()) > grpphiV0.etaTrackMax || std::abs(v0.negativeeta()) > grpphiV0.etaTrackMax) {
357-
// return false;
358-
// }
355+
if (std::abs(v0.positiveeta()) > grpphiV0.etaTrackMax || std::abs(v0.negativeeta()) > grpphiV0.etaTrackMax) {
356+
return false;
357+
}
359358
if (v0.positivept() < grpphiV0.ptTrackMin || v0.negativept() < grpphiV0.ptTrackMin) {
360359
return false;
361360
}

PWGCF/TableProducer/filterCorrelations.cxx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ struct FilterCF {
7979
O2_DEFINE_CONFIGURABLE(dcaselection, bool, false, "flag for applying dca selection on tracks")
8080
O2_DEFINE_CONFIGURABLE(dcaxymax, float, 0.1f, "dcaxy of tracks")
8181
O2_DEFINE_CONFIGURABLE(dcazmax, float, 0.1f, "dcaz of tracks")
82+
O2_DEFINE_CONFIGURABLE(itsnclusters, int, 5, "minimum number of ITS clusters for tracks")
83+
O2_DEFINE_CONFIGURABLE(tpcncrossedrows, int, 80, "minimum number of TPC crossed rows for tracks")
8284

8385
// Filters and input definitions
8486
Filter collisionZVtxFilter = nabs(aod::collision::posZ) < cfgCutVertex;
@@ -181,10 +183,10 @@ struct FilterCF {
181183
uint8_t trackType = 0;
182184
if (track.isGlobalTrack()) {
183185
trackType |= kTrackSelected;
184-
if (track.itsNCls() >= 5) {
186+
if (track.itsNCls() >= itsnclusters) {
185187
trackType |= kITS5Clusters;
186188
}
187-
if (track.tpcNClsCrossedRows() >= 90) {
189+
if (track.tpcNClsCrossedRows() >= tpcncrossedrows) {
188190
trackType |= kTPC90CrossedRows;
189191
}
190192
}
@@ -193,10 +195,10 @@ struct FilterCF {
193195
uint8_t trackType = 0;
194196
if (track.isGlobalTrack()) {
195197
trackType |= kTrackSelected;
196-
if (track.itsNCls() >= 5) {
198+
if (track.itsNCls() >= itsnclusters) {
197199
trackType |= kITS5Clusters;
198200
}
199-
if (track.tpcNClsCrossedRows() >= 90) {
201+
if (track.tpcNClsCrossedRows() >= tpcncrossedrows) {
200202
trackType |= kTPC90CrossedRows;
201203
}
202204
if (isprot) {

0 commit comments

Comments
 (0)