From 71292db76caccea56148c05d1dfaaaf8b40f91b9 Mon Sep 17 00:00:00 2001 From: Mario Ciacco Date: Tue, 16 Sep 2025 17:18:41 +0200 Subject: [PATCH 1/4] enable LS counting for +ve and -ve --- PWGLF/TableProducer/Nuspex/ebyeMaker.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx index 8c1c58e272a..eb35203c082 100644 --- a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx +++ b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx @@ -201,7 +201,7 @@ struct EbyeMaker { Configurable etaMaxV0dau{"etaMaxV0dau", 0.8f, "maximum eta V0 daughters"}; Configurable outerPIDMin{"outerPIDMin", -4.f, "minimum outer PID"}; - Configurable countOnlyNegTrk{"countOnlyNegTrk", false, "count only negative tracks in Ntracks"}; + Configurable countOnlyLSTrk{"countOnlyLSTrk", 0, "count only like sign tracks in Ntracks: 0 -> +ve and -ve; 1 -> -ve; 2 -> +ve"}; Configurable useAllEvSel{"useAllEvSel", false, "use additional event selections fo run 3 analyses"}; Configurable triggerCut{"triggerCut", 0x0, "trigger cut to select"}; Configurable kINT7Intervals{"kINT7Intervals", false, "toggle kINT7 trigger selection in the 10-30% and 50-90% centrality intervals (2018 Pb-Pb)"}; @@ -571,7 +571,7 @@ struct EbyeMaker { continue; } histos.fill(HIST("QA/tpcSignal"), track.tpcInnerParam(), track.tpcSignal()); - if (trackPt > ptMin[0] && trackPt < ptMax[0] && ((track.sign() < 0 && countOnlyNegTrk) || !countOnlyNegTrk)) + if (trackPt > ptMin[0] && trackPt < ptMax[0] && ((track.sign() < 0 && countOnlyLSTrk == 1) || (track.sign() > 0 && countOnlyLSTrk == 2) || (countOnlyLSTrk == 0))) nTracksColl++; for (int iP{0}; iP < kNpart; ++iP) { @@ -856,7 +856,7 @@ struct EbyeMaker { auto genPt = std::hypot(mcPart.px(), mcPart.py()); 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]) { int ch = (pdgCode == PDG_t::kPiPlus || pdgCode == -PDG_t::kElectron || pdgCode == -PDG_t::kMuonMinus || pdgCode == PDG_t::kKPlus || pdgCode == PDG_t::kProton) ? 1 : -1; - if ((ch < 0 && countOnlyNegTrk) || !countOnlyNegTrk) + if ((ch < 0 && countOnlyLSTrk == 1) || (ch > 0 && countOnlyLSTrk == 2) || (countOnlyLSTrk == 0)) nChPartGen++; } if (std::abs(pdgCode) == PDG_t::kLambda0) { From 3f97ab062185b6ae04770f37b99613fce96a5c07 Mon Sep 17 00:00:00 2001 From: Mario Ciacco Date: Tue, 16 Sep 2025 17:24:14 +0200 Subject: [PATCH 2/4] fix magic number issue --- PWGLF/TableProducer/Nuspex/ebyeMaker.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx index eb35203c082..ec8d2594bbf 100644 --- a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx +++ b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx @@ -158,6 +158,12 @@ enum PartTypes { kPhysPrim = BIT(22) }; +enum TrackCharge { + kAll = 0, + kNegative = 1, + kPositive = 2 +} + struct EbyeMaker { Produces collisionEbyeTable; Produces miniCollTable; @@ -571,7 +577,7 @@ struct EbyeMaker { continue; } histos.fill(HIST("QA/tpcSignal"), track.tpcInnerParam(), track.tpcSignal()); - if (trackPt > ptMin[0] && trackPt < ptMax[0] && ((track.sign() < 0 && countOnlyLSTrk == 1) || (track.sign() > 0 && countOnlyLSTrk == 2) || (countOnlyLSTrk == 0))) + if (trackPt > ptMin[0] && trackPt < ptMax[0] && ((track.sign() < 0 && countOnlyLSTrk == TrackCharge::kNegative) || (track.sign() > 0 && countOnlyLSTrk == TrackCharge::kPositive) || (countOnlyLSTrk == TrackCharge::kAll))) nTracksColl++; for (int iP{0}; iP < kNpart; ++iP) { @@ -856,7 +862,7 @@ struct EbyeMaker { auto genPt = std::hypot(mcPart.px(), mcPart.py()); 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]) { int ch = (pdgCode == PDG_t::kPiPlus || pdgCode == -PDG_t::kElectron || pdgCode == -PDG_t::kMuonMinus || pdgCode == PDG_t::kKPlus || pdgCode == PDG_t::kProton) ? 1 : -1; - if ((ch < 0 && countOnlyLSTrk == 1) || (ch > 0 && countOnlyLSTrk == 2) || (countOnlyLSTrk == 0)) + if ((ch < 0 && countOnlyLSTrk == TrackCharge::kNegative) || (ch > 0 && countOnlyLSTrk == TrackCharge::kPositive) || (countOnlyLSTrk == TrackCharge::kAll)) nChPartGen++; } if (std::abs(pdgCode) == PDG_t::kLambda0) { From cba6dbc26990ed9d3b600180362830e6ae32215f Mon Sep 17 00:00:00 2001 From: Mario Ciacco Date: Wed, 17 Sep 2025 10:33:11 +0200 Subject: [PATCH 3/4] fix enum --- PWGLF/TableProducer/Nuspex/ebyeMaker.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx index ec8d2594bbf..d898c8ab476 100644 --- a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx +++ b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx @@ -162,7 +162,7 @@ enum TrackCharge { kAll = 0, kNegative = 1, kPositive = 2 -} +}; struct EbyeMaker { Produces collisionEbyeTable; From ecad288dc5ac3256c752a22ea6a6322a990c4e9b Mon Sep 17 00:00:00 2001 From: Mario Ciacco Date: Wed, 17 Sep 2025 16:14:01 +0200 Subject: [PATCH 4/4] fix multiple declaration --- PWGLF/TableProducer/Nuspex/ebyeMaker.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx index d898c8ab476..c7f015fce80 100644 --- a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx +++ b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx @@ -158,7 +158,7 @@ enum PartTypes { kPhysPrim = BIT(22) }; -enum TrackCharge { +enum TracksCharge { kAll = 0, kNegative = 1, kPositive = 2 @@ -577,7 +577,7 @@ struct EbyeMaker { continue; } histos.fill(HIST("QA/tpcSignal"), track.tpcInnerParam(), track.tpcSignal()); - if (trackPt > ptMin[0] && trackPt < ptMax[0] && ((track.sign() < 0 && countOnlyLSTrk == TrackCharge::kNegative) || (track.sign() > 0 && countOnlyLSTrk == TrackCharge::kPositive) || (countOnlyLSTrk == TrackCharge::kAll))) + if (trackPt > ptMin[0] && trackPt < ptMax[0] && ((track.sign() < 0 && countOnlyLSTrk == TracksCharge::kNegative) || (track.sign() > 0 && countOnlyLSTrk == TracksCharge::kPositive) || (countOnlyLSTrk == TracksCharge::kAll))) nTracksColl++; for (int iP{0}; iP < kNpart; ++iP) { @@ -862,7 +862,7 @@ struct EbyeMaker { auto genPt = std::hypot(mcPart.px(), mcPart.py()); 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]) { int ch = (pdgCode == PDG_t::kPiPlus || pdgCode == -PDG_t::kElectron || pdgCode == -PDG_t::kMuonMinus || pdgCode == PDG_t::kKPlus || pdgCode == PDG_t::kProton) ? 1 : -1; - if ((ch < 0 && countOnlyLSTrk == TrackCharge::kNegative) || (ch > 0 && countOnlyLSTrk == TrackCharge::kPositive) || (countOnlyLSTrk == TrackCharge::kAll)) + if ((ch < 0 && countOnlyLSTrk == TracksCharge::kNegative) || (ch > 0 && countOnlyLSTrk == TracksCharge::kPositive) || (countOnlyLSTrk == TracksCharge::kAll)) nChPartGen++; } if (std::abs(pdgCode) == PDG_t::kLambda0) {