Skip to content

Commit 720506d

Browse files
EloviyoShirajum Monira
andauthored
[PWGCF] FemtoUniverse Cascade Task -- updated track NSigma PID to address hasTOF (#15607)
Co-authored-by: Shirajum Monira <shirajum.monira@cern.ch>
1 parent ae55c21 commit 720506d

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ struct femtoUniversePairTaskTrackCascadeExtended {
5858
Configurable<float> confCascInvMassLowLimit{"confCascInvMassLowLimit", 1.315, "Lower limit of the Casc invariant mass"};
5959
Configurable<float> confCascInvMassUpLimit{"confCascInvMassUpLimit", 1.325, "Upper limit of the Casc invariant mass"};
6060

61-
// TODO: Add seperate selection for daughter particles
62-
// Configurable<float> confNSigmaTPCPion{"confNSigmaTPCPion", 4, "NSigmaTPCPion"};
63-
// Configurable<float> confNSigmaTPCProton{"confNSigmaTPCProton", 4, "NSigmaTPCProton"};
64-
6561
/// applying narrow cut
6662
Configurable<float> confZVertexCut{"confZVertexCut", 10.f, "Event sel: Maximum z-Vertex (cm)"};
6763
Configurable<float> confEta{"confEta", 0.8, "Eta cut for the global track"};
@@ -200,10 +196,24 @@ struct femtoUniversePairTaskTrackCascadeExtended {
200196

201197
bool isNSigmaCombined(float mom, float nsigmaTPCParticle, float nsigmaTOFParticle, bool hasTOF)
202198
{
203-
if (mom <= confmom || hasTOF == 0) {
199+
if (mom <= confmom) {
204200
return (std::abs(nsigmaTPCParticle) < confNsigmaTPCParticle);
205-
} else {
201+
} else if (hasTOF == 1) {
206202
return (TMath::Hypot(nsigmaTOFParticle, nsigmaTPCParticle) < confNsigmaCombinedParticle);
203+
} else {
204+
return false;
205+
}
206+
}
207+
208+
template <typename T>
209+
bool isNSigmaCombinedBitmask(float mom, const T& part)
210+
{
211+
if (mom <= confmom) {
212+
return ((part.pidCut() & (1u << confTrackChoicePartOne)) != 0);
213+
} else if ((part.pidCut() & 512u) != 0) {
214+
return ((part.pidCut() & (64u << confTrackChoicePartOne)) != 0);
215+
} else {
216+
return false;
207217
}
208218
}
209219

@@ -481,10 +491,7 @@ struct femtoUniversePairTaskTrackCascadeExtended {
481491
trackHistoPartOneNeg.fillQA<false, false>(part);
482492
}
483493
} else {
484-
if ((part.pidCut() & 512u) != 0) {
485-
if ((part.pidCut() & (64u << confTrackChoicePartOne)) == 0)
486-
continue;
487-
} else if ((part.pidCut() & (1u << confTrackChoicePartOne)) == 0) {
494+
if (!isNSigmaCombinedBitmask(part.p(), part)) {
488495
continue;
489496
}
490497
if (part.mAntiLambda() > 0) {
@@ -504,10 +511,7 @@ struct femtoUniversePairTaskTrackCascadeExtended {
504511
if (!isParticleCombined(p1, confTrackChoicePartOne))
505512
continue;
506513
} else {
507-
if ((p1.pidCut() & 512u) != 0) {
508-
if ((p1.pidCut() & (64u << confTrackChoicePartOne)) == 0)
509-
continue;
510-
} else if ((p1.pidCut() & (1u << confTrackChoicePartOne)) == 0) {
514+
if (!isNSigmaCombinedBitmask(p1.p(), p1)) {
511515
continue;
512516
}
513517
}
@@ -751,10 +755,7 @@ struct femtoUniversePairTaskTrackCascadeExtended {
751755
if (!isParticleCombined(p1, confTrackChoicePartOne))
752756
continue;
753757
} else {
754-
if ((p1.pidCut() & 512u) != 0) {
755-
if ((p1.pidCut() & (64u << confTrackChoicePartOne)) == 0)
756-
continue;
757-
} else if ((p1.pidCut() & (1u << confTrackChoicePartOne)) == 0) {
758+
if (!isNSigmaCombinedBitmask(p1.p(), p1)) {
758759
continue;
759760
}
760761
}
@@ -1168,10 +1169,7 @@ struct femtoUniversePairTaskTrackCascadeExtended {
11681169
if (!isNSigmaCombined(part.p(), aod::pidtpc_tiny::binning::unPackInTable(part.tpcNSigmaStorePr()), aod::pidtof_tiny::binning::unPackInTable(part.tofNSigmaStorePr()), (part.pidCut() & 512u) != 0))
11691170
continue;
11701171
} else {
1171-
if ((part.pidCut() & 512u) != 0) {
1172-
if ((part.pidCut() & 64u) == 0)
1173-
continue;
1174-
} else if ((part.pidCut() & 1u) == 0) {
1172+
if (!isNSigmaCombinedBitmask(part.p(), part)) {
11751173
continue;
11761174
}
11771175
}
@@ -1185,10 +1183,7 @@ struct femtoUniversePairTaskTrackCascadeExtended {
11851183
if (!isNSigmaCombined(part.p(), aod::pidtpc_tiny::binning::unPackInTable(part.tpcNSigmaStorePr()), aod::pidtof_tiny::binning::unPackInTable(part.tofNSigmaStorePr()), (part.pidCut() & 512u) != 0))
11861184
continue;
11871185
} else {
1188-
if ((part.pidCut() & 512u) != 0) {
1189-
if ((part.pidCut() & 64u) == 0)
1190-
continue;
1191-
} else if ((part.pidCut() & 1u) == 0) {
1186+
if (!isNSigmaCombinedBitmask(part.p(), part)) {
11921187
continue;
11931188
}
11941189
}

0 commit comments

Comments
 (0)