Skip to content

Commit 9822dc7

Browse files
author
Prottay Das
committed
updated2 PID selections for phi meson v2
1 parent 8b3ef96 commit 9822dc7

3 files changed

Lines changed: 107 additions & 14 deletions

File tree

PWGCF/DataModel/CorrelationsDerived.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ enum ParticleDecay {
140140
JPsiToEE,
141141
JPsiToMuMu,
142142
Generic2Prong,
143-
PhiToKK,
143+
PhiToKKPID1,
144+
PhiToKKPID2,
145+
PhiToKKPID3,
144146
K0stoPiPi,
145147
LambdatoPPi,
146148
AntiLambdatoPiP

PWGCF/TableProducer/filter2Prong.cxx

Lines changed: 95 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ struct Filter2Prong {
102102
O2_DEFINE_CONFIGURABLE(cutTOFBeta, float, 0.5, "TOF beta");
103103
O2_DEFINE_CONFIGURABLE(confFakeKaonCut, float, 0.15, "Cut based on track from momentum difference");
104104
O2_DEFINE_CONFIGURABLE(removefaketrack, bool, true, "Flag to remove fake kaon");
105+
O2_DEFINE_CONFIGURABLE(applyTOF, bool, false, "Flag for applying TOF");
105106
} grpPhi;
106107

107108
HfHelper hfHelper;
@@ -432,6 +433,79 @@ struct Filter2Prong {
432433
return false;
433434
}
434435

436+
template <typename T>
437+
bool selectionPID2(const T& candidate)
438+
{
439+
double nsigmaTPC = candidate.tpcNSigmaKa();
440+
double nsigmaTOF = candidate.tofNSigmaKa();
441+
442+
if (grpPhi.applyTOF) {
443+
if (!candidate.hasTOF() && TMath::Abs(nsigmaTPC) < grpPhi.nsigmaCutTPC) {
444+
return true;
445+
}
446+
if (candidate.p() > 0.5 && candidate.hasTOF() && TMath::Abs(nsigmaTPC) < grpPhi.nsigmaCutTPC) {
447+
if (candidate.p() > 0.5 && candidate.p() < 1.6 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -5.0 && nsigmaTOF < 10.0) {
448+
return true;
449+
}
450+
if (candidate.p() >= 1.6 && candidate.p() < 2.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -3.0 && nsigmaTOF < 10.0) {
451+
return true;
452+
}
453+
if (candidate.p() >= 2.0 && candidate.p() < 2.5 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -3.0 && nsigmaTOF < 6.0) {
454+
return true;
455+
}
456+
if (candidate.p() >= 2.5 && candidate.p() < 4.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -2.5 && nsigmaTOF < 4.0) {
457+
return true;
458+
}
459+
if (candidate.p() >= 4.0 && candidate.p() < 5.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -4.0 && nsigmaTOF < 3.0) {
460+
return true;
461+
}
462+
if (candidate.p() >= 5.0 && candidate.p() < 6.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -4.0 && nsigmaTOF < 2.5) {
463+
return true;
464+
}
465+
if (candidate.p() >= 6.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -3.0 && nsigmaTOF < 3.0) {
466+
return true;
467+
}
468+
}
469+
} else if (TMath::Abs(nsigmaTPC) < grpPhi.nsigmaCutTPC) {
470+
return true;
471+
}
472+
return false;
473+
}
474+
475+
template <typename T>
476+
bool selectionPID3(const T& candidate)
477+
{
478+
double nsigmaTPC = candidate.tpcNSigmaKa();
479+
double nsigmaTOF = candidate.tofNSigmaKa();
480+
if (candidate.p() < 0.7 && TMath::Abs(nsigmaTPC) < grpPhi.nsigmaCutTPC) {
481+
return true;
482+
}
483+
if (candidate.p() > 0.7 && candidate.hasTOF() && TMath::Abs(nsigmaTPC) < grpPhi.nsigmaCutTPC) {
484+
if (candidate.p() > 0.7 && candidate.p() < 1.6 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -5.0 && nsigmaTOF < 10.0) {
485+
return true;
486+
}
487+
if (candidate.p() >= 1.6 && candidate.p() < 2.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -3.0 && nsigmaTOF < 10.0) {
488+
return true;
489+
}
490+
if (candidate.p() >= 2.0 && candidate.p() < 2.5 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -3.0 && nsigmaTOF < 6.0) {
491+
return true;
492+
}
493+
if (candidate.p() >= 2.5 && candidate.p() < 4.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -2.5 && nsigmaTOF < 4.0) {
494+
return true;
495+
}
496+
if (candidate.p() >= 4.0 && candidate.p() < 5.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -4.0 && nsigmaTOF < 3.0) {
497+
return true;
498+
}
499+
if (candidate.p() >= 5.0 && candidate.p() < 6.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -4.0 && nsigmaTOF < 2.5) {
500+
return true;
501+
}
502+
if (candidate.p() >= 6.0 && candidate.beta() > grpPhi.cutTOFBeta && nsigmaTOF > -3.0 && nsigmaTOF < 3.0) {
503+
return true;
504+
}
505+
}
506+
return false;
507+
}
508+
435509
// Generic 2-prong invariant mass method candidate finder. Only works for non-identical daughters of opposite charge for now.
436510
void processDataInvMass(aod::Collisions::iterator const&, aod::BCsWithTimestamps const&, aod::CFCollRefs const& cfcollisions, aod::CFTrackRefs const& cftracks, Filter2Prong::PIDTrack const& tracks)
437511
{
@@ -479,6 +553,10 @@ struct Filter2Prong {
479553
if (cfcollisions.size() <= 0)
480554
return; // rejected collision
481555

556+
LOG(info) << "****************************************";
557+
LOG(info) << "STARTING EVENT LOOP";
558+
LOG(info) << "****************************************";
559+
482560
// V0
483561
for (const auto& v0 : V0s) { // Loop over V0 candidates
484562
if (!isV0TrackSelected(v0)) { // Quality selection for V0 prongs
@@ -530,9 +608,9 @@ struct Filter2Prong {
530608
if (grpPhi.ITSPIDSelection && p1.p() < grpPhi.ITSPIDPthreshold.value && !(itsResponse.nSigmaITS<o2::track::PID::Kaon>(p1) > grpPhi.lowITSPIDNsigma.value && itsResponse.nSigmaITS<o2::track::PID::Kaon>(p1) < grpPhi.highITSPIDNsigma.value)) { // Check ITS PID condition
531609
continue;
532610
}
533-
if (!selectionPID(p1)) {
611+
/*if (!selectionPID(p1)) {
534612
continue;
535-
}
613+
}*/
536614
if (grpPhi.removefaketrack && isFakeTrack(p1)) { // Check if the track is a fake kaon
537615
continue;
538616
}
@@ -548,9 +626,9 @@ struct Filter2Prong {
548626
if (!selectionTrack(p2)) {
549627
continue;
550628
}
551-
if (!selectionPID(p2)) {
629+
/*if (!selectionPID(p2)) {
552630
continue;
553-
}
631+
}*/
554632
if (grpPhi.ITSPIDSelection && p2.p() < grpPhi.ITSPIDPthreshold.value && !(itsResponse.nSigmaITS<o2::track::PID::Kaon>(p2) > grpPhi.lowITSPIDNsigma.value && itsResponse.nSigmaITS<o2::track::PID::Kaon>(p2) < grpPhi.highITSPIDNsigma.value)) { // Check ITS PID condition
555633
continue;
556634
}
@@ -568,8 +646,18 @@ struct Filter2Prong {
568646
continue;
569647
}
570648
float phi = RecoDecay::constrainAngle(s.Phi(), 0.0f);
571-
output2ProngTracks(cfcollisions.begin().globalIndex(),
572-
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKK);
649+
if (selectionPID(p1) && selectionPID(p2)) {
650+
output2ProngTracks(cfcollisions.begin().globalIndex(),
651+
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKKPID1);
652+
}
653+
if (selectionPID2(p1) && selectionPID2(p2)) {
654+
output2ProngTracks(cfcollisions.begin().globalIndex(),
655+
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKKPID2);
656+
}
657+
if (selectionPID3(p1) && selectionPID3(p2)) {
658+
output2ProngTracks(cfcollisions.begin().globalIndex(),
659+
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKKPID3);
660+
}
573661
} // end of loop over second track
574662
} // end of loop over first track
575663
}
@@ -674,7 +762,7 @@ struct Filter2Prong {
674762
}
675763
float phi = RecoDecay::constrainAngle(s.Phi(), 0.0f);
676764
output2ProngTracks(cfcollisions.begin().globalIndex(),
677-
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKK);
765+
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKKPID1);
678766
} // end of loop over second track
679767
} // end of loop over first track
680768
}

PWGCF/Tasks/correlations.cxx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct CorrelationTask {
128128
Filter collisionVertexTypeFilter = (aod::collision::flags & static_cast<uint16_t>(aod::collision::CollisionFlagsRun2::Run2VertexerTracks)) == static_cast<uint16_t>(aod::collision::CollisionFlagsRun2::Run2VertexerTracks);
129129

130130
// Track filters
131-
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true));
131+
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true));
132132
Filter cfTrackFilter = (nabs(aod::cftrack::eta) < cfgCutEta) && (aod::cftrack::pt > cfgCutPt) && ((aod::track::trackType & (uint8_t)cfgTrackBitMask) == (uint8_t)cfgTrackBitMask);
133133

134134
// MC filters
@@ -487,7 +487,7 @@ struct CorrelationTask {
487487
mass = o2::constants::physics::MassK0Short;
488488
} else if (decayType == aod::cf2prongtrack::LambdatoPPi || decayType == aod::cf2prongtrack::AntiLambdatoPiP) {
489489
mass = o2::constants::physics::MassLambda;
490-
} else if (decayType == aod::cf2prongtrack::PhiToKK) {
490+
} else if (decayType == aod::cf2prongtrack::PhiToKKPID1 || decayType == aod::cf2prongtrack::PhiToKKPID2 || decayType == aod::cf2prongtrack::PhiToKKPID3) {
491491
mass = o2::constants::physics::MassPhi;
492492
} else {
493493
return {false, 0.0f}; // unsupported decay type, return dummy rapidity
@@ -640,11 +640,14 @@ struct CorrelationTask {
640640
if (cfgDecayParticleMask != 0 && (cfgDecayParticleMask & (1u << static_cast<uint32_t>(track2.decay()))) == 0u) {
641641
continue; // skip particles that do not match the decay mask
642642
}
643-
if (cfgV0RapidityMax > 0) {
643+
644+
// track2 here is charged hadron so we don't need rapidity cut for this track...this rapidity is only needed for V0
645+
/*
646+
if (cfgV0RapidityMax > 0) {
644647
auto [t, y] = getV0Rapidity(track2);
645-
if (t && std::abs(y) > cfgV0RapidityMax)
646-
continue; // V0s are not allowed to be outside the rapidity range
647-
}
648+
if (t && std::abs(y) > cfgV0RapidityMax)
649+
continue;
650+
}*/
648651
}
649652

650653
if constexpr (std::experimental::is_detected<HasDecay, typename TTracks1::iterator>::value && std::experimental::is_detected<HasDecay, typename TTracks2::iterator>::value) {

0 commit comments

Comments
 (0)