@@ -137,6 +137,7 @@ struct Kstar892LightIon {
137137 // PID selections
138138 Configurable<bool > onlyTOF{" onlyTOF" , false , " only TOF tracks" };
139139 Configurable<bool > onlyTOFHIT{" onlyTOFHIT" , false , " accept only TOF hit tracks at high pt" };
140+ Configurable<bool > onlyTOFVeto{" onlyTOFVeto" , false , " only select TOF tracks with TOF and TPC cuts" };
140141 Configurable<bool > onlyTPC{" onlyTPC" , false , " only TPC tracks" };
141142 Configurable<bool > isApplypTdepPID{" isApplypTdepPID" , false , " Apply pT dependent PID" };
142143 Configurable<bool > isApplypTdepPIDwTOF{" isApplypTdepPIDwTOF" , false , " Apply pT dependent PID with compulsory TOF condition in a pT range" };
@@ -158,6 +159,11 @@ struct Kstar892LightIon {
158159 Configurable<float > cfgFakeTrackCutKa{" cfgFakeTrackCutKa" , 0.3 , " Cut based on momentum difference in global and TPC tracks for kaons" };
159160 Configurable<float > cfgFakeTrackCutPi{" cfgFakeTrackCutPi" , 0.3 , " Cut based on momentum difference in global and TPC tracks for pions" };
160161
162+ Configurable<float > pionMIDpTLow{" pionMIDpTLow" , 1.0 , " Low pT cut for pion in MID" };
163+ Configurable<float > pionMIDpTHigh{" pionMIDpTHigh" , 2.5 , " High pT cut for pion in MID" };
164+ Configurable<float > kaonMIDpTLow{" kaonMIDpTLow" , 0.7 , " Low pT cut for kaon in MID" };
165+ Configurable<float > kaonMIDpTHigh{" kaonMIDpTHigh" , 2.5 , " High pT cut for kaon in MID" };
166+
161167 // Fixed variables
162168 float lowPtCutPID = 0.5 ;
163169
@@ -211,7 +217,7 @@ struct Kstar892LightIon {
211217
212218 int noOfDaughters = 2 ;
213219
214- double pionPIDpTlow = 1.0 , pionPIDpThigh = 2.5 , kaonPIDpTlow = 0.7 , kaonPIDpThigh = 2.5 ;
220+ double pionPIDpTLow = 1.0 , pionPIDpTHigh = 2.5 , kaonPIDpTLow = 0.7 , kaonPIDpTHigh = 2.5 ;
215221
216222 TRandom* rn = new TRandom();
217223
@@ -646,6 +652,10 @@ struct Kstar892LightIon {
646652 if (!candidate.hasTOF () && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
647653 return true ;
648654 }
655+ } else if (selectionConfig.onlyTOFVeto ) {
656+ if (candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < selectionConfig.nsigmaCutTOFPi && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
657+ return true ;
658+ }
649659 } else if (selectionConfig.onlyTPC ) {
650660 if (std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
651661 return true ;
@@ -670,6 +680,10 @@ struct Kstar892LightIon {
670680 if (!candidate.hasTOF () && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa ) {
671681 return true ;
672682 }
683+ } else if (selectionConfig.onlyTOFVeto ) {
684+ if (candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < selectionConfig.nsigmaCutTOFKa && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa ) {
685+ return true ;
686+ }
673687 } else if (selectionConfig.onlyTPC ) {
674688 if (std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa ) {
675689 return true ;
@@ -717,7 +731,7 @@ struct Kstar892LightIon {
717731 bool selectionPIDpTdepTOF (const T& candidate, int PID)
718732 {
719733 if (PID == PIDParticle::kPion ) {
720- if (candidate.pt () < pionPIDpTlow || candidate.pt () > pionPIDpThigh ) {
734+ if (candidate.pt () < pionPIDpTLow || candidate.pt () > pionPIDpTHigh ) {
721735 if (candidate.pt () < selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
722736 return true ;
723737 }
@@ -733,7 +747,7 @@ struct Kstar892LightIon {
733747 }
734748 }
735749 } else if (PID == PIDParticle::kKaon ) {
736- if (candidate.pt () < kaonPIDpTlow || candidate.pt () > kaonPIDpThigh ) {
750+ if (candidate.pt () < kaonPIDpTLow || candidate.pt () > kaonPIDpTHigh ) {
737751 if (candidate.pt () < selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa ) {
738752 return true ;
739753 }
@@ -797,11 +811,11 @@ struct Kstar892LightIon {
797811 bool selectionMIDpTdep (const T& candidate, int PID)
798812 {
799813 if (PID == PIDParticle::kPion ) {
800- if (candidate.pt () >= pionPIDpTlow && candidate.pt () < pionPIDpThigh && !candidate.hasTOF () && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCMID ) {
814+ if (candidate.pt () >= selectionConfig. pionMIDpTLow && candidate.pt () < selectionConfig. pionMIDpTHigh && !candidate.hasTOF () && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCMID ) {
801815 return true ;
802816 }
803817 } else if (PID == PIDParticle::kKaon ) {
804- if (candidate.pt () >= kaonPIDpTlow && candidate.pt () < kaonPIDpThigh && !candidate.hasTOF () && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCMID ) {
818+ if (candidate.pt () >= selectionConfig. kaonMIDpTLow && candidate.pt () < selectionConfig. kaonMIDpTHigh && !candidate.hasTOF () && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCMID ) {
805819 return true ;
806820 }
807821 }
@@ -812,11 +826,11 @@ struct Kstar892LightIon {
812826 bool selectionMIDPtDepComp (const T& candidate, int PID)
813827 {
814828 if (PID == PIDParticle::kPion ) {
815- if (candidate.pt () >= pionPIDpTlow && candidate.pt () < pionPIDpThigh && !candidate.hasTOF () && std::abs (candidate.tpcNSigmaPi ()) < std::abs (candidate.tpcNSigmaKa ())) {
829+ if (candidate.pt () >= selectionConfig. pionMIDpTLow && candidate.pt () < selectionConfig. pionMIDpTHigh && !candidate.hasTOF () && std::abs (candidate.tpcNSigmaPi ()) < std::abs (candidate.tpcNSigmaKa ())) {
816830 return true ;
817831 }
818832 } else if (PID == PIDParticle::kKaon ) {
819- if (candidate.pt () >= kaonPIDpTlow && candidate.pt () < kaonPIDpThigh && !candidate.hasTOF () && std::abs (candidate.tpcNSigmaKa ()) < std::abs (candidate.tpcNSigmaPi ())) {
833+ if (candidate.pt () >= selectionConfig. kaonMIDpTLow && candidate.pt () < selectionConfig. kaonMIDpTHigh && !candidate.hasTOF () && std::abs (candidate.tpcNSigmaKa ()) < std::abs (candidate.tpcNSigmaPi ())) {
820834 return true ;
821835 }
822836 }
0 commit comments