Skip to content

Commit 3e3a9af

Browse files
prottayCMTProttay Das
andauthored
[PWGCF] updating PID sel for phi v2 (#12870)
Co-authored-by: Prottay Das <prottay@alipap1.cern.ch>
1 parent a21d449 commit 3e3a9af

File tree

3 files changed

+102
-13
lines changed

3 files changed

+102
-13
lines changed

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: 91 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
{
@@ -530,9 +604,9 @@ struct Filter2Prong {
530604
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
531605
continue;
532606
}
533-
if (!selectionPID(p1)) {
607+
/*if (!selectionPID(p1)) {
534608
continue;
535-
}
609+
}*/
536610
if (grpPhi.removefaketrack && isFakeTrack(p1)) { // Check if the track is a fake kaon
537611
continue;
538612
}
@@ -548,9 +622,9 @@ struct Filter2Prong {
548622
if (!selectionTrack(p2)) {
549623
continue;
550624
}
551-
if (!selectionPID(p2)) {
625+
/*if (!selectionPID(p2)) {
552626
continue;
553-
}
627+
}*/
554628
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
555629
continue;
556630
}
@@ -568,8 +642,18 @@ struct Filter2Prong {
568642
continue;
569643
}
570644
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);
645+
if (selectionPID(p1) && selectionPID(p2)) {
646+
output2ProngTracks(cfcollisions.begin().globalIndex(),
647+
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKKPID1);
648+
}
649+
if (selectionPID2(p1) && selectionPID2(p2)) {
650+
output2ProngTracks(cfcollisions.begin().globalIndex(),
651+
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKKPID2);
652+
}
653+
if (selectionPID3(p1) && selectionPID3(p2)) {
654+
output2ProngTracks(cfcollisions.begin().globalIndex(),
655+
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKKPID3);
656+
}
573657
} // end of loop over second track
574658
} // end of loop over first track
575659
}
@@ -674,7 +758,7 @@ struct Filter2Prong {
674758
}
675759
float phi = RecoDecay::constrainAngle(s.Phi(), 0.0f);
676760
output2ProngTracks(cfcollisions.begin().globalIndex(),
677-
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKK);
761+
cftrack1.globalIndex(), cftrack2.globalIndex(), s.pt(), s.eta(), phi, s.M(), aod::cf2prongtrack::PhiToKKPID1);
678762
} // end of loop over second track
679763
} // end of loop over first track
680764
}

PWGCF/Tasks/correlations.cxx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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)