@@ -158,6 +158,12 @@ enum PartTypes {
158158 kPhysPrim = BIT (22 )
159159};
160160
161+ enum TracksCharge {
162+ kAll = 0 ,
163+ kNegative = 1 ,
164+ kPositive = 2
165+ };
166+
161167struct EbyeMaker {
162168 Produces<aod::CollEbyeTable> collisionEbyeTable;
163169 Produces<aod::MiniCollTable> miniCollTable;
@@ -201,7 +207,7 @@ struct EbyeMaker {
201207 Configurable<float > etaMaxV0dau{" etaMaxV0dau" , 0 .8f , " maximum eta V0 daughters" };
202208 Configurable<float > outerPIDMin{" outerPIDMin" , -4 .f , " minimum outer PID" };
203209
204- Configurable<bool > countOnlyNegTrk{ " countOnlyNegTrk " , false , " count only negative tracks in Ntracks" };
210+ Configurable<uint8_t > countOnlyLSTrk{ " countOnlyLSTrk " , 0 , " count only like sign tracks in Ntracks: 0 -> +ve and -ve; 1 -> -ve; 2 -> +ve " };
205211 Configurable<bool > useAllEvSel{" useAllEvSel" , false , " use additional event selections fo run 3 analyses" };
206212 Configurable<uint8_t > triggerCut{" triggerCut" , 0x0 , " trigger cut to select" };
207213 Configurable<bool > kINT7Intervals {" kINT7Intervals" , false , " toggle kINT7 trigger selection in the 10-30% and 50-90% centrality intervals (2018 Pb-Pb)" };
@@ -571,7 +577,7 @@ struct EbyeMaker {
571577 continue ;
572578 }
573579 histos.fill (HIST (" QA/tpcSignal" ), track.tpcInnerParam (), track.tpcSignal ());
574- if (trackPt > ptMin[0 ] && trackPt < ptMax[0 ] && ((track.sign () < 0 && countOnlyNegTrk ) || !countOnlyNegTrk ))
580+ if (trackPt > ptMin[0 ] && trackPt < ptMax[0 ] && ((track.sign () < 0 && countOnlyLSTrk == TracksCharge:: kNegative ) || (track. sign () > 0 && countOnlyLSTrk == TracksCharge:: kPositive ) || (countOnlyLSTrk == TracksCharge:: kAll ) ))
575581 nTracksColl++;
576582
577583 for (int iP{0 }; iP < kNpart ; ++iP) {
@@ -856,7 +862,7 @@ struct EbyeMaker {
856862 auto genPt = std::hypot (mcPart.px (), mcPart.py ());
857863 if ((std::abs (pdgCode) == PDG_t::kPiPlus || std::abs (pdgCode) == PDG_t::kElectron || std::abs (pdgCode) == PDG_t::kMuonMinus || std::abs (pdgCode) == PDG_t::kKPlus || std::abs (pdgCode) == PDG_t::kProton ) && mcPart.isPhysicalPrimary () && genPt > ptMin[0 ] && genPt < ptMax[0 ]) {
858864 int ch = (pdgCode == PDG_t::kPiPlus || pdgCode == -PDG_t::kElectron || pdgCode == -PDG_t::kMuonMinus || pdgCode == PDG_t::kKPlus || pdgCode == PDG_t::kProton ) ? 1 : -1 ;
859- if ((ch < 0 && countOnlyNegTrk ) || !countOnlyNegTrk )
865+ if ((ch < 0 && countOnlyLSTrk == TracksCharge:: kNegative ) || (ch > 0 && countOnlyLSTrk == TracksCharge:: kPositive ) || (countOnlyLSTrk == TracksCharge:: kAll ) )
860866 nChPartGen++;
861867 }
862868 if (std::abs (pdgCode) == PDG_t::kLambda0 ) {
0 commit comments