Skip to content

Commit d7ae9e1

Browse files
[PWGCF] Adjust systematic cut varations for V0s in flow studies
1 parent 1bdecfc commit d7ae9e1

File tree

1 file changed

+88
-49
lines changed

1 file changed

+88
-49
lines changed

PWGCF/TableProducer/filter2Prong.cxx

Lines changed: 88 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,68 @@ struct Filter2Prong {
5858
O2_DEFINE_CONFIGURABLE(cfgImSigmaFormula, std::string, "(([p] < 0.5 || [hasTOF] <= 0.0) && abs([sTPC]) < 3.0) || ([p] >= 0.5 && abs([sTPC]) < 2.5 && abs([sTOF]) < 3.0)", "pT dependent daughter track sigma pass condition. Parameters: [p] momentum, [sTPC] sigma TPC, [sTOF] sigma TOF, [hasTOF] has TOF.")
5959

6060
struct : ConfigurableGroup {
61-
O2_DEFINE_CONFIGURABLE(storeLooseTight, bool, false, "Store also loose and tight V0 candidates for systematics")
62-
O2_DEFINE_CONFIGURABLE(tpcNClsCrossedRowsTrackMin, std::vector<int>, {60, 70, 80}, "Minimum number of TPC crossed rows for daughter tracks (Loose, Default, Tight)");
63-
O2_DEFINE_CONFIGURABLE(etaTrackMax, std::vector<float>, {0.8, 0.8, 0.8}, "Maximum eta for daughter tracks (Loose, Default, Tight)");
64-
O2_DEFINE_CONFIGURABLE(ptTrackMin, std::vector<float>, {0.1, 0.1, 0.1}, "Minimum pT for daughter tracks (Loose, Default, Tight)");
65-
O2_DEFINE_CONFIGURABLE(minV0DCAPr, std::vector<float>, {0.06, 0.07, 0.0.08}, "Maximum DCAxy for daughter tracks (Loose, Default, Tight)");
66-
O2_DEFINE_CONFIGURABLE(minV0DCAPiLambda, std::vector<float>, {0.15, 0.2, 0.25}, "Min V0 pion DCA for lambda (Loose, Default, Tight)");
67-
O2_DEFINE_CONFIGURABLE(minV0DCAPiK0s, std::vector<float>, {0.05, 0.10, 0.15}, "Min V0 pion DCA for K0s (Loose, Default, Tight)");
68-
O2_DEFINE_CONFIGURABLE(daughPIDCuts, std::vector<float>, {3.0, 4.0, 5.0}, "PID nsigma for V0s (Loose, Default, Tight)");
69-
O2_DEFINE_CONFIGURABLE(massK0Min, std::vector<float>, {0.4, 0.4, 0.4}, "Minimum mass for K0 (Loose, Default, Tight)");
70-
O2_DEFINE_CONFIGURABLE(massK0Max, std::vector<float>, {0.6, 0.6, 0.6}, "Maximum mass for K0 (Loose, Default, Tight)");
71-
O2_DEFINE_CONFIGURABLE(massLambdaMin, std::vector<float>, {1.07, 1.07, 1.07}, "Minimum mass for lambda (Loose, Default, Tight)");
72-
O2_DEFINE_CONFIGURABLE(massLambdaMax, std::vector<float>, {1.17, 1.17, 1.17}, "Maximum mass for lambda (Loose, Default, Tight)");
73-
O2_DEFINE_CONFIGURABLE(radiusMaxLambda, std::vector<float>, {20, 30, 40}, "Maximum decay radius (cm) for lambda (Loose, Default, Tight)");
74-
O2_DEFINE_CONFIGURABLE(radiusMinLambda, std::vector<float>, {1.0, 1.2, 1.4}, "Minimum decay radius (cm) for lambda (Loose, Default, Tight)");
75-
O2_DEFINE_CONFIGURABLE(radiusMaxK0s, std::vector<float>, {1.2, 1.2, 1.2}, "Maximum decay radius (cm) for K0s (Loose, Default, Tight)");
76-
O2_DEFINE_CONFIGURABLE(radiusMinK0s, std::vector<float>, {1.0, 1.2, 1.5}, "Minimum decay radius (cm) for K0s (Loose, Default, Tight)");
77-
O2_DEFINE_CONFIGURABLE(cosPaMinLambda, std::vector<float>, {0.990, 0.993, 0.995}, "Minimum cosine of pointing angle for lambda (Loose, Default, Tight)");
78-
O2_DEFINE_CONFIGURABLE(cosPaMinK0s, std::vector<float>, {0.990, 0.993, 0.995}, "Minimum cosine of pointing angle for K0s (Loose, Default, Tight)");
79-
O2_DEFINE_CONFIGURABLE(dcaV0DaughtersMaxLambda, std::vector<float>, {0.7, 0.8, 0.9}, "Maximum DCA among the V0 daughters (cm) for lambda (Loose, Default, Tight)");
80-
O2_DEFINE_CONFIGURABLE(dcaV0DaughtersMaxK0s, std::vector<float>, {0.7, 0.8, 0.9}, "Maximum DCA among the V0 daughters (cm) for K0s (Loose, Default, Tight)");
81-
O2_DEFINE_CONFIGURABLE(qtArmenterosMinForK0s, std::vector<float>, {0.2, 0.2, 0.2}, "Minimum Armenteros' qt for K0s (Loose, Default, Tight)");
82-
O2_DEFINE_CONFIGURABLE(maxLambdaLifeTime, std::vector<float>, {40, 30, 25}, "Maximum lambda lifetime (in cm) (Loose, Default, Tight)");
83-
O2_DEFINE_CONFIGURABLE(maxK0sLifeTime, std::vector<float>, {15, 20, 25}, "Maximum K0s lifetime (in cm) (Loose, Default, Tight)");
61+
O2_DEFINE_CONFIGURABLE(storeLooseTight, bool, false, "Store also loose and tight V0 candidates for systematics");
62+
O2_DEFINE_CONFIGURABLE(tpcNClsCrossedRowsTrackMin, float, 70, "Minimum number of crossed rows in TPC");
63+
O2_DEFINE_CONFIGURABLE(etaTrackMax, float, 0.8, "Maximum pseudorapidity");
64+
O2_DEFINE_CONFIGURABLE(ptTrackMin, float, 0.15, "Minimum transverse momentum");
65+
O2_DEFINE_CONFIGURABLE(minV0DCAPr, std::vector<float>,
66+
(std::vector<float>{0.06f, 0.07f, 0.08f}),
67+
"Maximum DCAxy for daughter tracks (Loose, Default, Tight)");
68+
O2_DEFINE_CONFIGURABLE(minV0DCAPiLambda, std::vector<float>,
69+
(std::vector<float>{0.1f, 0.2f, 0.3f}),
70+
"Min V0 pion DCA for lambda (Loose, Default, Tight)");
71+
O2_DEFINE_CONFIGURABLE(minV0DCAPiK0s, std::vector<float>,
72+
(std::vector<float>{0.05f, 0.1f, 0.2f}),
73+
"Min V0 pion DCA for K0s (Loose, Default, Tight)");
74+
O2_DEFINE_CONFIGURABLE(daughPIDCuts, std::vector<float>,
75+
(std::vector<float>{3.0f, 4.0f, 5.0f}),
76+
"PID nsigma for V0s (Loose, Default, Tight)");
77+
O2_DEFINE_CONFIGURABLE(massK0Min, std::vector<float>,
78+
(std::vector<float>{0.4f, 0.4f, 0.4f}),
79+
"Minimum mass for K0 (Loose, Default, Tight)");
80+
O2_DEFINE_CONFIGURABLE(massK0Max, std::vector<float>,
81+
(std::vector<float>{0.6f, 0.6f, 0.6f}),
82+
"Maximum mass for K0 (Loose, Default, Tight)");
83+
O2_DEFINE_CONFIGURABLE(massLambdaMin, std::vector<float>,
84+
(std::vector<float>{1.07f, 1.07f, 1.07f}),
85+
"Minimum mass for lambda (Loose, Default, Tight)");
86+
O2_DEFINE_CONFIGURABLE(massLambdaMax, std::vector<float>,
87+
(std::vector<float>{1.17f, 1.17f, 1.17f}),
88+
"Maximum mass for lambda (Loose, Default, Tight)");
89+
O2_DEFINE_CONFIGURABLE(radiusMaxLambda, std::vector<float>,
90+
(std::vector<float>{20.f, 30.f, 40.f}),
91+
"Maximum decay radius (cm) for lambda (Loose, Default, Tight)");
92+
O2_DEFINE_CONFIGURABLE(radiusMinLambda, std::vector<float>,
93+
(std::vector<float>{1.0f, 1.2f, 1.4f}),
94+
"Minimum decay radius (cm) for lambda (Loose, Default, Tight)");
95+
O2_DEFINE_CONFIGURABLE(radiusMaxK0s, std::vector<float>,
96+
(std::vector<float>{1.0f, 1.2f, 1.4f}),
97+
"Maximum decay radius (cm) for K0s (Loose, Default, Tight)");
98+
O2_DEFINE_CONFIGURABLE(radiusMinK0s, std::vector<float>,
99+
(std::vector<float>{0.0f, 0.0f, 0.1f}),
100+
"Minimum decay radius (cm) for K0s (Loose, Default, Tight)");
101+
O2_DEFINE_CONFIGURABLE(cosPaMinLambda, std::vector<float>,
102+
(std::vector<float>{0.990f, 0.993f, 0.995f}),
103+
"Minimum cosine of pointing angle for lambda (Loose, Default, Tight)");
104+
O2_DEFINE_CONFIGURABLE(cosPaMinK0s, std::vector<float>,
105+
(std::vector<float>{0.990f, 0.993f, 0.995f}),
106+
"Minimum cosine of pointing angle for K0s (Loose, Default, Tight)");
107+
O2_DEFINE_CONFIGURABLE(dcaV0DaughtersMaxLambda, std::vector<float>,
108+
(std::vector<float>{0.7f, 0.8f, 0.9f}),
109+
"Maximum DCA among the V0 daughters (cm) for lambda (Loose, Default, Tight)");
110+
O2_DEFINE_CONFIGURABLE(dcaV0DaughtersMaxK0s, std::vector<float>,
111+
(std::vector<float>{0.7f, 0.8f, 0.9f}),
112+
"Maximum DCA among the V0 daughters (cm) for K0s (Loose, Default, Tight)");
113+
O2_DEFINE_CONFIGURABLE(qtArmenterosMinForK0s, std::vector<float>,
114+
(std::vector<float>{0.2f, 0.2f, 0.2f}),
115+
"Minimum Armenteros' qt for K0s (Loose, Default, Tight)");
116+
O2_DEFINE_CONFIGURABLE(maxLambdaLifeTime, std::vector<float>,
117+
(std::vector<float>{40.f, 30.f, 25.f}),
118+
"Maximum lambda lifetime (in cm) (Loose, Default, Tight)");
119+
O2_DEFINE_CONFIGURABLE(maxK0sLifeTime, std::vector<float>,
120+
(std::vector<float>{40.f, 30.f, 25.f}),
121+
"Maximum K0s lifetime (in cm) (Loose, Default, Tight)");
122+
84123
} grpV0;
85124

86125
struct : ConfigurableGroup {
@@ -323,28 +362,28 @@ struct Filter2Prong {
323362

324363
float CtauK0s = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0;
325364

326-
if (v0.mK0Short() < massK0min[indexCut] || v0.mK0Short() > massK0max[indexCut]) {
365+
if (v0.mK0Short() < grpV0.massK0Min.value[indexCut] || v0.mK0Short() > grpV0.massK0Max.value[indexCut]) {
327366
return false;
328367
}
329-
if ((v0.qtarm() / std::abs(v0.alpha())) < qtArmenterosMinForK0s[indexCut]) {
368+
if ((v0.qtarm() / std::abs(v0.alpha())) < grpV0.qtArmenterosMinForK0s.value[indexCut]) {
330369
return false;
331370
}
332-
if (v0.v0radius() > radiusMaxK0s[indexCut] || v0.v0radius() < radiusMinK0s[indexCut]) {
371+
if (v0.v0radius() > grpV0.radiusMaxK0s.value[indexCut] || v0.v0radius() < grpV0.radiusMinK0s.value[indexCut]) {
333372
return false;
334373
}
335-
if (v0.v0cosPA() < cosPaMinK0s[indexCut]) {
374+
if (v0.v0cosPA() < grpV0.cosPaMinK0s.value[indexCut]) {
336375
return false;
337376
}
338-
if (v0.dcaV0daughters() > dcaV0DaughtersMaxK0s[indexCut]) {
377+
if (v0.dcaV0daughters() > grpV0.dcaV0DaughtersMaxK0s.value[indexCut]) {
339378
return false;
340379
}
341-
if (std::abs(CtauK0s) > maxK0sLifeTime[indexCut]) {
380+
if (std::abs(CtauK0s) > grpV0.maxK0sLifeTime.value[indexCut]) {
342381
return false;
343382
}
344-
if (((std::abs(posTrack.tpcNSigmaPi()) > dughPIDCuts[indexCut]) || (std::abs(negTrack.tpcNSigmaPi()) > dughPIDCuts[indexCut]))) {
383+
if (((std::abs(posTrack.tpcNSigmaPi()) > grpV0.daughPIDCuts.value[indexCut]) || (std::abs(negTrack.tpcNSigmaPi()) > grpV0.daughPIDCuts.value[indexCut]))) {
345384
return false;
346385
}
347-
if ((TMath::Abs(v0.dcapostopv()) < minV0DCAPiK0s[indexCut]) || (TMath::Abs(v0.dcanegtopv()) < minV0DCAPiK0s[indexCut])) {
386+
if ((TMath::Abs(v0.dcapostopv()) < grpV0.minV0DCAPiK0s.value[indexCut]) || (TMath::Abs(v0.dcanegtopv()) < grpV0.minV0DCAPiK0s.value[indexCut])) {
348387
return false;
349388
}
350389
return true;
@@ -360,32 +399,32 @@ struct Filter2Prong {
360399

361400
float CtauLambda = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda;
362401

363-
if ((v0.mLambda() < massLambdaMin[indexCut] || v0.mLambda() > massLambdaMax[indexCut]) &&
364-
(v0.mAntiLambda() < massLambdaMin[indexCut] || v0.mAntiLambda() > massLambdaMax[indexCut])) {
402+
if ((v0.mLambda() < grpV0.massLambdaMin.value[indexCut] || v0.mLambda() > grpV0.massLambdaMax.value[indexCut]) &&
403+
(v0.mAntiLambda() < grpV0.massLambdaMin.value[indexCut] || v0.mAntiLambda() > grpV0.massLambdaMax.value[indexCut])) {
365404
return false;
366405
}
367-
if (v0.v0radius() > radiusMaxLambda[indexCut] || v0.v0radius() < radiusMinLambda[indexCut]) {
406+
if (v0.v0radius() > grpV0.radiusMaxLambda.value[indexCut] || v0.v0radius() < grpV0.radiusMinLambda.value[indexCut]) {
368407
return false;
369408
}
370-
if (v0.v0cosPA() < cosPaMinLambda[indexCut]) {
409+
if (v0.v0cosPA() < grpV0.cosPaMinLambda.value[indexCut]) {
371410
return false;
372411
}
373-
if (v0.dcaV0daughters() > dcaV0DaughtersMaxLambda[indexCut]) {
412+
if (v0.dcaV0daughters() > grpV0.dcaV0DaughtersMaxLambda.value[indexCut]) {
374413
return false;
375414
}
376-
if (pid == LambdaPid::kLambda && (TMath::Abs(v0.dcapostopv()) < minV0DCAPr[indexCut] || TMath::Abs(v0.dcanegtopv()) < minV0DCAPiLambda[indexCut])) {
415+
if (pid == LambdaPid::kLambda && (TMath::Abs(v0.dcapostopv()) < grpV0.minV0DCAPr.value[indexCut] || TMath::Abs(v0.dcanegtopv()) < grpV0.minV0DCAPiLambda.value[indexCut])) {
377416
return false;
378417
}
379-
if (pid == LambdaPid::kAntiLambda && (TMath::Abs(v0.dcapostopv()) < minV0DCAPiLambda[indexCut] || TMath::Abs(v0.dcanegtopv()) < minV0DCAPr[indexCut])) {
418+
if (pid == LambdaPid::kAntiLambda && (TMath::Abs(v0.dcapostopv()) < grpV0.minV0DCAPiLambda.value[indexCut] || TMath::Abs(v0.dcanegtopv()) < grpV0.minV0DCAPr.value[indexCut])) {
380419
return false;
381420
}
382-
if (pid == LambdaPid::kLambda && ((std::abs(posTrack.tpcNSigmaPr()) > daughPIDCuts[indexCut]) || (std::abs(negTrack.tpcNSigmaPi()) > daughPIDCuts[indexCut]))) {
421+
if (pid == LambdaPid::kLambda && ((std::abs(posTrack.tpcNSigmaPr()) > grpV0.daughPIDCuts.value[indexCut]) || (std::abs(negTrack.tpcNSigmaPi()) > grpV0.daughPIDCuts.value[indexCut]))) {
383422
return false;
384423
}
385-
if (pid == LambdaPid::kAntiLambda && ((std::abs(posTrack.tpcNSigmaPi()) > daughPIDCuts[indexCut]) || (std::abs(negTrack.tpcNSigmaPr()) > daughPIDCuts[indexCut]))) {
424+
if (pid == LambdaPid::kAntiLambda && ((std::abs(posTrack.tpcNSigmaPi()) > grpV0.daughPIDCuts.value[indexCut]) || (std::abs(negTrack.tpcNSigmaPr()) > grpV0.daughPIDCuts.value[indexCut]))) {
386425
return false;
387426
}
388-
if (std::abs(CtauLambda) > maxLambdaLifeTime[indexCut]) {
427+
if (std::abs(CtauLambda) > grpV0.maxLambdaLifeTime.value[indexCut]) {
389428
return false;
390429
}
391430
return true;
@@ -400,16 +439,16 @@ struct Filter2Prong {
400439
if (!posTrack.hasTPC() || !negTrack.hasTPC()) {
401440
return false;
402441
}
403-
if (posTrack.tpcNClsCrossedRows() < grpV0.tpcNClsCrossedRowsTrackMin[indexCut] || negTrack.tpcNClsCrossedRows() < grpV0.tpcNClsCrossedRowsTrackMin[indexCut]) {
442+
if (posTrack.tpcNClsCrossedRows() < grpV0.tpcNClsCrossedRowsTrackMin || negTrack.tpcNClsCrossedRows() < grpV0.tpcNClsCrossedRowsTrackMin) {
404443
return false;
405444
}
406445
if (posTrack.tpcCrossedRowsOverFindableCls() < 0.8 || negTrack.tpcCrossedRowsOverFindableCls() < 0.8) {
407446
return false;
408447
}
409-
if (std::abs(v0.positiveeta()) > grpV0.etaTrackMax[indexCut] || std::abs(v0.negativeeta()) > grpV0.etaTrackMax[indexCut]) {
448+
if (std::abs(v0.positiveeta()) > grpV0.etaTrackMax || std::abs(v0.negativeeta()) > grpV0.etaTrackMax) {
410449
return false;
411450
}
412-
if (v0.positivept() < grpV0.ptTrackMin[indexCut] || v0.negativept() < grpV0.ptTrackMin[indexCut]) {
451+
if (v0.positivept() < grpV0.ptTrackMin || v0.negativept() < grpV0.ptTrackMin) {
413452
return false;
414453
}
415454
return true;
@@ -574,7 +613,7 @@ struct Filter2Prong {
574613
posTrack.globalIndex(), negTrack.globalIndex(),
575614
v0.pt(), v0.eta(), v0.phi(), v0.mK0Short(), aod::cf2prongtrack::K0stoPiPi);
576615
}
577-
if (storeLooseTight) // store also loose and tight K0s
616+
if (grpV0.storeLooseTight) // store also loose and tight K0s
578617
{
579618
if (isSelectedV0AsK0s(collision, v0, true, false)) { // candidate is loose K0s
580619
output2ProngTracks(cfcollisions.begin().globalIndex(),
@@ -603,7 +642,7 @@ struct Filter2Prong {
603642
output2ProngTracks(cfcollisions.begin().globalIndex(), posTrack.globalIndex(), negTrack.globalIndex(),
604643
v0.pt(), v0.eta(), v0.phi(), massV0, aod::cf2prongtrack::AntiLambdatoPiP);
605644
}
606-
if (storeLooseTight) { // store also loose and tight Lambdas
645+
if (grpV0.storeLooseTight) { // store also loose and tight Lambdas
607646
bool LambdaLooseTag = isSelectedV0AsLambda<LambdaPid::kLambda>(collision, v0, true, false);
608647
bool aLambdaLooseTag = isSelectedV0AsLambda<LambdaPid::kAntiLambda>(collision, v0, true, false);
609648
bool LambdaTightTag = isSelectedV0AsLambda<LambdaPid::kLambda>(collision, v0, false, true);
@@ -720,15 +759,15 @@ struct Filter2Prong {
720759
double massV0 = 0.0;
721760

722761
// K0s
723-
if (isSelectedV0AsK0s(collision, v0)) { // candidate is K0s
762+
if (isSelectedV0AsK0s(collision, v0, false, false)) { // candidate is K0s
724763
output2ProngTracks(cfcollisions.begin().globalIndex(),
725764
posTrack.globalIndex(), negTrack.globalIndex(),
726765
v0.pt(), v0.eta(), v0.phi(), v0.mK0Short(), aod::cf2prongtrack::K0stoPiPi);
727766
}
728767

729768
// Lambda and Anti-Lambda
730-
bool LambdaTag = isSelectedV0AsLambda<LambdaPid::kLambda>(collision, v0);
731-
bool aLambdaTag = isSelectedV0AsLambda<LambdaPid::kAntiLambda>(collision, v0);
769+
bool LambdaTag = isSelectedV0AsLambda<LambdaPid::kLambda>(collision, v0, false, false);
770+
bool aLambdaTag = isSelectedV0AsLambda<LambdaPid::kAntiLambda>(collision, v0, false, false);
732771

733772
// Note: candidate compatible with Lambda and Anti-Lambda hypothesis are counted twice (once for each hypothesis)
734773
if (LambdaTag) { // candidate is Lambda

0 commit comments

Comments
 (0)