@@ -123,7 +123,7 @@ struct Kstar892LightIon {
123123 Configurable<bool > isGoldenChi2{" isGoldenChi2" , false , " Apply golden chi2 cut" };
124124 Configurable<double > cfgDeepAngle{" cfgDeepAngle" , 0.04 , " Deep Angle cut value" };
125125 // Configurable<bool> cfgGlobalWoDCATrack{"cfgGlobalWoDCATrack", false, "Global track selection without DCA"}; // kQualityTracks (kTrackType | kTPCNCls | kTPCCrossedRows | kTPCCrossedRowsOverNCls | kTPCChi2NDF | kTPCRefit | kITSNCls | kITSChi2NDF | kITSRefit | kITSHits) | kInAcceptanceTracks (kPtRange | kEtaRange)
126- Configurable<float > cfgBetaCutTOF{ " cfgBetaCutTOF " , 0.0 , " cut TOF beta" };
126+ Configurable<float > cfgTOFBetaCut{ " cfgTOFBetaCut " , 0.0 , " cut TOF beta" };
127127
128128 Configurable<bool > isAvoidsplitrackMC{" isAvoidsplitrackMC" , true , " avoid split track in MC" };
129129
@@ -151,8 +151,12 @@ struct Kstar892LightIon {
151151 Configurable<float > nsigmaCutCombinedKa{" nsigmaCutCombinedKa" , 3.0 , " Combined Nsigma cut for kaon" };
152152 Configurable<float > nsigmaCutCombinedPi{" nsigmaCutCombinedPi" , 3.0 , " Combined Nsigma cut for pion" };
153153
154- Configurable<float > nsigmaCutCombinedMID{" nsigmaCutCombinedMID" , 3.0 , " Combined Nsigma cut for pion in MID" };
155- Configurable<float > nsigmaCutTPCMID{" nsigmaCutTPCMID" , 1.0 , " MID Nsigma cut for pion in TPC" };
154+ Configurable<float > nsigmaCutCombinedMID{" nsigmaCutCombinedMID" , 3.0 , " Combined Nsigma cut for pion and kaon in MID" };
155+ Configurable<float > nsigmaCutTPCMID{" nsigmaCutTPCMID" , 1.0 , " MID Nsigma cut for pion and kaon in TPC" };
156+
157+ Configurable<bool > isApplyFakeTrack{" isApplyFakeTrack" , false , " Fake track selection" };
158+ Configurable<float > cfgFakeTrackCutKa{" cfgFakeTrackCutKa" , 0.3 , " Cut based on momentum difference in global and TPC tracks for kaons" };
159+ Configurable<float > cfgFakeTrackCutPi{" cfgFakeTrackCutPi" , 0.3 , " Cut based on momentum difference in global and TPC tracks for pions" };
156160
157161 // Fixed variables
158162 float lowPtCutPID = 0.5 ;
@@ -256,6 +260,10 @@ struct Kstar892LightIon {
256260 if (cQAplots) {
257261 hOthers.add (" dE_by_dx_TPC" , " dE/dx signal in the TPC as a function of pT" , kTH2F , {axisPtfordEbydx, axisdEdx});
258262 hOthers.add (" hEta_after" , " Eta distribution" , kTH1F , {{200 , -1 .0f , 1 .0f }});
263+ hOthers.add (" hTOFBetaKa" , " Beta distribution from TOF" , kTH1F , {{50 , 0 .0f , 1 .0f }});
264+ hOthers.add (" hTOFBetaPi" , " Beta distribution from TOF" , kTH1F , {{50 , 0 .0f , 1 .0f }});
265+ hOthers.add (" hTPCpDiffKa" , " Momentum difference between global and TPC tracks for Kaons" , kTH2F , {{100 , -1 .0f , 1 .0f }, ptAxis});
266+ hOthers.add (" hTPCpDiffPi" , " Momentum difference between global and TPC tracks for Kaons" , kTH2F , {{100 , -1 .0f , 1 .0f }, ptAxis});
259267
260268 hOthers.add (" hKstar_rap_pt" , " Pair rapidity distribution; y; p_{T}; Counts" , kTH2F , {{400 , -2 .0f , 2 .0f }, ptAxis});
261269 hOthers.add (" hKstar_eta_pt" , " Pair eta distribution; #eta; p_{T}; Counts" , kTH2F , {{400 , -2 .0f , 2 .0f }, ptAxis});
@@ -606,16 +614,33 @@ struct Kstar892LightIon {
606614 return true ;
607615 }
608616
617+ template <typename T>
618+ bool isFakeTrack (const T& track, int PID)
619+ {
620+ const auto pglobal = track.p ();
621+ const auto ptpc = track.tpcInnerParam ();
622+ if (PID == PIDParticle::kPion ) {
623+ if (std::abs (pglobal - ptpc) > selectionConfig.cfgFakeTrackCutPi ) {
624+ return true ;
625+ }
626+ } else if (PID == PIDParticle::kKaon ) {
627+ if (std::abs (pglobal - ptpc) > selectionConfig.cfgFakeTrackCutKa ) {
628+ return true ;
629+ }
630+ }
631+ return false ;
632+ }
633+
609634 template <typename T>
610635 bool selectionPID (const T& candidate, int PID)
611636 {
612637 if (PID == PIDParticle::kPion ) {
613638 if (selectionConfig.onlyTOF ) {
614- if (candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < selectionConfig.nsigmaCutTOFPi && candidate.beta () > selectionConfig.cfgBetaCutTOF ) {
639+ if (candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < selectionConfig.nsigmaCutTOFPi && candidate.beta () > selectionConfig.cfgTOFBetaCut ) {
615640 return true ;
616641 }
617642 } else if (selectionConfig.onlyTOFHIT ) {
618- if (candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < selectionConfig.nsigmaCutTOFPi && candidate.beta () > selectionConfig.cfgBetaCutTOF ) {
643+ if (candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < selectionConfig.nsigmaCutTOFPi && candidate.beta () > selectionConfig.cfgTOFBetaCut ) {
619644 return true ;
620645 }
621646 if (!candidate.hasTOF () && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
@@ -626,7 +651,7 @@ struct Kstar892LightIon {
626651 return true ;
627652 }
628653 } else {
629- if (candidate.hasTOF () && (candidate.tofNSigmaPi () * candidate.tofNSigmaPi () + candidate.tpcNSigmaPi () * candidate.tpcNSigmaPi ()) < (selectionConfig.nsigmaCutCombinedPi * selectionConfig.nsigmaCutCombinedPi ) && candidate.beta () > selectionConfig.cfgBetaCutTOF ) {
654+ if (candidate.hasTOF () && (candidate.tofNSigmaPi () * candidate.tofNSigmaPi () + candidate.tpcNSigmaPi () * candidate.tpcNSigmaPi ()) < (selectionConfig.nsigmaCutCombinedPi * selectionConfig.nsigmaCutCombinedPi ) && candidate.beta () > selectionConfig.cfgTOFBetaCut ) {
630655 return true ;
631656 }
632657 if (!candidate.hasTOF () && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
@@ -635,11 +660,11 @@ struct Kstar892LightIon {
635660 }
636661 } else if (PID == PIDParticle::kKaon ) {
637662 if (selectionConfig.onlyTOF ) {
638- if (candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < selectionConfig.nsigmaCutTOFKa && candidate.beta () > selectionConfig.cfgBetaCutTOF ) {
663+ if (candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < selectionConfig.nsigmaCutTOFKa && candidate.beta () > selectionConfig.cfgTOFBetaCut ) {
639664 return true ;
640665 }
641666 } else if (selectionConfig.onlyTOFHIT ) {
642- if (candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < selectionConfig.nsigmaCutTOFKa && candidate.beta () > selectionConfig.cfgBetaCutTOF ) {
667+ if (candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < selectionConfig.nsigmaCutTOFKa && candidate.beta () > selectionConfig.cfgTOFBetaCut ) {
643668 return true ;
644669 }
645670 if (!candidate.hasTOF () && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa ) {
@@ -650,7 +675,7 @@ struct Kstar892LightIon {
650675 return true ;
651676 }
652677 } else {
653- if (candidate.hasTOF () && (candidate.tofNSigmaKa () * candidate.tofNSigmaKa () + candidate.tpcNSigmaKa () * candidate.tpcNSigmaKa ()) < (selectionConfig.nsigmaCutCombinedKa * selectionConfig.nsigmaCutCombinedKa ) && candidate.beta () > selectionConfig.cfgBetaCutTOF ) {
678+ if (candidate.hasTOF () && (candidate.tofNSigmaKa () * candidate.tofNSigmaKa () + candidate.tpcNSigmaKa () * candidate.tpcNSigmaKa ()) < (selectionConfig.nsigmaCutCombinedKa * selectionConfig.nsigmaCutCombinedKa ) && candidate.beta () > selectionConfig.cfgTOFBetaCut ) {
654679 return true ;
655680 }
656681 if (!candidate.hasTOF () && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa ) {
@@ -668,7 +693,7 @@ struct Kstar892LightIon {
668693 if (candidate.pt () < selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
669694 return true ;
670695 }
671- if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi && candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < selectionConfig.nsigmaCutTOFPi ) {
696+ if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi && candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < selectionConfig.nsigmaCutTOFPi && candidate. beta () > selectionConfig. cfgTOFBetaCut ) {
672697 return true ;
673698 }
674699 if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi && !candidate.hasTOF ()) {
@@ -678,7 +703,7 @@ struct Kstar892LightIon {
678703 if (candidate.pt () < selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa ) {
679704 return true ;
680705 }
681- if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa && candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < selectionConfig.nsigmaCutTOFKa ) {
706+ if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa && candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < selectionConfig.nsigmaCutTOFKa && candidate. beta () > selectionConfig. cfgTOFBetaCut ) {
682707 return true ;
683708 }
684709 if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa && !candidate.hasTOF ()) {
@@ -965,6 +990,9 @@ struct Kstar892LightIon {
965990 if (selectionConfig.isApplypTdepMIDComp && (selectionMIDPtDepComp (track1, 0 ) || selectionMIDPtDepComp (track2, 1 )))
966991 continue ;
967992
993+ if (selectionConfig.isApplyFakeTrack && (isFakeTrack (track1, 1 ) || isFakeTrack (track2, 0 )))
994+ continue ;
995+
968996 if (cQAplots) {
969997 hOthers.fill (HIST (" hEta_after" ), track1.eta ());
970998 hOthers.fill (HIST (" hDcaxyPi" ), track2.dcaXY ());
@@ -1002,6 +1030,15 @@ struct Kstar892LightIon {
10021030
10031031 hPID.fill (HIST (" After/hNsigma_TPC_TOF_Ka_pt" ), track1.tpcNSigmaKa (), track1.tofNSigmaKa (), track1.pt ());
10041032 hPID.fill (HIST (" After/hNsigma_TPC_TOF_Pi_pt" ), track2.tpcNSigmaPi (), track2.tofNSigmaPi (), track2.pt ());
1033+
1034+ if (track1.hasTOF ()) {
1035+ hOthers.fill (HIST (" hTOFBetaKa" ), track1.beta ());
1036+ }
1037+ if (track2.hasTOF ()) {
1038+ hOthers.fill (HIST (" hTOFBetaPi" ), track2.beta ());
1039+ }
1040+ hOthers.fill (HIST (" hTPCpDiffKa" ), track1.p () - track1.tpcInnerParam (), track1.pt ());
1041+ hOthers.fill (HIST (" hTPCpDiffPi" ), track2.p () - track2.tpcInnerParam (), track2.pt ());
10051042 }
10061043
10071044 daughter1 = ROOT::Math::PxPyPzMVector (track1.px (), track1.py (), track1.pz (), massKa);
@@ -1125,6 +1162,9 @@ struct Kstar892LightIon {
11251162 if (selectionConfig.isApplypTdepMIDComp && (selectionMIDPtDepComp (track1, 0 ) || selectionMIDPtDepComp (track2, 1 )))
11261163 continue ;
11271164
1165+ if (selectionConfig.isApplyFakeTrack && (isFakeTrack (track1, 1 ) || isFakeTrack (track2, 0 )))
1166+ continue ;
1167+
11281168 if (cQAplots) {
11291169 hOthers.fill (HIST (" hEta_after" ), track1.eta ());
11301170 hOthers.fill (HIST (" hDcaxyPi" ), track2.dcaXY ());
@@ -1162,6 +1202,15 @@ struct Kstar892LightIon {
11621202
11631203 hPID.fill (HIST (" After/hNsigma_TPC_TOF_Ka_pt" ), track1.tpcNSigmaKa (), track1.tofNSigmaKa (), track1.pt ());
11641204 hPID.fill (HIST (" After/hNsigma_TPC_TOF_Pi_pt" ), track2.tpcNSigmaPi (), track2.tofNSigmaPi (), track2.pt ());
1205+
1206+ if (track1.hasTOF ()) {
1207+ hOthers.fill (HIST (" hTOFBetaKa" ), track1.beta ());
1208+ }
1209+ if (track2.hasTOF ()) {
1210+ hOthers.fill (HIST (" hTOFBetaPi" ), track2.beta ());
1211+ }
1212+ hOthers.fill (HIST (" hTPCpDiffKa" ), track1.p () - track1.tpcInnerParam (), track1.pt ());
1213+ hOthers.fill (HIST (" hTPCpDiffPi" ), track2.p () - track2.tpcInnerParam (), track2.pt ());
11651214 }
11661215 daughter1 = ROOT::Math::PxPyPzMVector (track1.px (), track1.py (), track1.pz (), massKa);
11671216 daughter2 = ROOT::Math::PxPyPzMVector (track2.px (), track2.py (), track2.pz (), massPi);
@@ -1241,6 +1290,9 @@ struct Kstar892LightIon {
12411290 if (selectionConfig.isApplypTdepMIDComp && (selectionMIDPtDepComp (t1, 0 ) || selectionMIDPtDepComp (t2, 1 )))
12421291 continue ;
12431292
1293+ if (selectionConfig.isApplyFakeTrack && (isFakeTrack (t1, 1 ) || isFakeTrack (t2, 0 )))
1294+ continue ;
1295+
12441296 daughter1 = ROOT::Math::PxPyPzMVector (t1.px (), t1.py (), t1.pz (), massKa);
12451297 daughter2 = ROOT::Math::PxPyPzMVector (t2.px (), t2.py (), t2.pz (), massPi);
12461298 mother = daughter1 + daughter2;
@@ -1321,6 +1373,9 @@ struct Kstar892LightIon {
13211373 if (selectionConfig.isApplypTdepMIDComp && (selectionMIDPtDepComp (t1, 0 ) || selectionMIDPtDepComp (t2, 1 )))
13221374 continue ;
13231375
1376+ if (selectionConfig.isApplyFakeTrack && (isFakeTrack (t1, 1 ) || isFakeTrack (t2, 0 )))
1377+ continue ;
1378+
13241379 if (!t1.has_mcParticle () || !t2.has_mcParticle ()) {
13251380 continue ; // skip if no MC particle associated
13261381 }
@@ -1621,6 +1676,9 @@ struct Kstar892LightIon {
16211676 if (selectionConfig.isApplypTdepMIDComp && (selectionMIDPtDepComp (track1, 1 ) || selectionMIDPtDepComp (track2, 0 )))
16221677 continue ;
16231678
1679+ if (selectionConfig.isApplyFakeTrack && (isFakeTrack (track1, 0 ) || isFakeTrack (track2, 1 )))
1680+ continue ;
1681+
16241682 if (cQAplots) {
16251683 if (track1.sign () < 0 && track2.sign () > 0 ) {
16261684 hPID.fill (HIST (" After/hTPCnsigPi_Neg_mult_pt" ), track1.tpcNSigmaPi (), centrality, track1.pt ());
@@ -1643,6 +1701,15 @@ struct Kstar892LightIon {
16431701 hPID.fill (HIST (" After/hTPCnsigKa_Neg_mult_p" ), track2.tpcNSigmaKa (), centrality, track2.p ());
16441702 hPID.fill (HIST (" After/hTOFnsigKa_Neg_mult_p" ), track2.tofNSigmaKa (), centrality, track2.p ());
16451703 }
1704+
1705+ if (track1.hasTOF ()) {
1706+ hOthers.fill (HIST (" hTOFBetaPi" ), track1.beta ());
1707+ }
1708+ if (track2.hasTOF ()) {
1709+ hOthers.fill (HIST (" hTOFBetaKa" ), track2.beta ());
1710+ }
1711+ hOthers.fill (HIST (" hTPCpDiffPi" ), track1.p () - track1.tpcInnerParam (), track1.pt ());
1712+ hOthers.fill (HIST (" hTPCpDiffKa" ), track2.p () - track2.tpcInnerParam (), track2.pt ());
16461713 }
16471714
16481715 } else if (track1PDG == PDG_t::kKPlus ) {
@@ -1663,6 +1730,9 @@ struct Kstar892LightIon {
16631730 if (selectionConfig.isApplypTdepMIDComp && (selectionMIDPtDepComp (track1, 0 ) || selectionMIDPtDepComp (track2, 1 )))
16641731 continue ;
16651732
1733+ if (selectionConfig.isApplyFakeTrack && (isFakeTrack (track1, 1 ) || isFakeTrack (track2, 0 )))
1734+ continue ;
1735+
16661736 if (cQAplots) {
16671737 if (track1.sign () < 0 && track2.sign () > 0 ) {
16681738 hPID.fill (HIST (" After/hTPCnsigKa_Neg_mult_pt" ), track1.tpcNSigmaKa (), centrality, track1.pt ());
@@ -1685,6 +1755,15 @@ struct Kstar892LightIon {
16851755 hPID.fill (HIST (" After/hTPCnsigPi_Neg_mult_p" ), track2.tpcNSigmaPi (), centrality, track2.p ());
16861756 hPID.fill (HIST (" After/hTOFnsigPi_Neg_mult_p" ), track2.tofNSigmaPi (), centrality, track2.p ());
16871757 }
1758+
1759+ if (track1.hasTOF ()) {
1760+ hOthers.fill (HIST (" hTOFBetaKa" ), track1.beta ());
1761+ }
1762+ if (track2.hasTOF ()) {
1763+ hOthers.fill (HIST (" hTOFBetaPi" ), track2.beta ());
1764+ }
1765+ hOthers.fill (HIST (" hTPCpDiffKa" ), track1.p () - track1.tpcInnerParam (), track1.pt ());
1766+ hOthers.fill (HIST (" hTPCpDiffPi" ), track2.p () - track2.tpcInnerParam (), track2.pt ());
16881767 }
16891768 }
16901769
0 commit comments