From b1eff012299ad7cadcdef8917ba4a1f3f81276d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Mon, 11 May 2026 16:47:49 +0200 Subject: [PATCH 1/3] Corrections for systematic uncertainties Corrections for both the pT extrapolation to 0 and the influence of strange decay particles --- .../Tasks/GlobalEventProperties/studyPnch.cxx | 89 ++++++++----------- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index 0d56f859b1f..dab4905181d 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -15,6 +15,8 @@ /// \author Abhi Modak (abhi.modak@cern.ch), Lucas José (lucas.jose.franco.da.silva@cern.ch) /// \since September 10, 2025 +#include "PWGLF/DataModel/LFStrangenessTables.h" + #include "Common/CCDB/EventSelectionParams.h" #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/McCollisionExtra.h" @@ -35,7 +37,6 @@ #include #include -#include #include #include @@ -75,7 +76,7 @@ AxisSpec axisEta{40, -2, 2, "#eta", "EtaAxis"}; AxisSpec axisPhi{629, 0, o2::constants::math::TwoPI, "#phi"}; AxisSpec axisCollSel{5, 0.5, 5.5, "#Event", "CollSelAxis"}; auto static constexpr kMinCharge = 3.f; -auto static constexpr kMinPtCut = 0.1f; +auto static constexpr pTminCut = 0.1f; struct StudyPnch { @@ -110,8 +111,8 @@ struct StudyPnch { Configurable isApplyPhiSelection{"isApplyPhiSelection", false, "Select tracks in specific phi range"}; Configurable minPhi{"minPhi", 0.f, "Minimum phi value for track selection"}; Configurable maxPhi{"maxPhi", 6.283185f, "Maximum phi value for track selection"}; - Configurable ispTincrease{"ispTincrease", false, "Varies low pT particles by a conservative amount of +100%"}; - Configurable ispTdecrease{"ispTdecrease", false, "Varies low pT particles by a conservative amount of -50%"}; + Configurable isPtincrease{"isPtincrease", false, "Varies low pT particles by a conservative amount of +100%"}; + Configurable isPtdecrease{"isPtdecrease", false, "Varies low pT particles by a conservative amount of -50%"}; Configurable isApplyStrangenessSysUncert{"isApplyStrangenessSysUncert", false, "Enable the evaluation of systematics due to strange particle contribution"}; void init(InitContext const&) @@ -122,7 +123,6 @@ struct StudyPnch { AxisSpec axisFt0aMult = {ft0aMultHistBin, "ft0a", "FT0AMultAxis"}; AxisSpec axisFt0cMult = {ft0cMultHistBin, "ft0c", "FT0CMultAxis"}; AxisSpec axisPt = {ptHistBin, "pT", "pTAxis"}; - AxisSpec axisCountNumberTracks = {countNumberTracks, "Count", "CountAxis"}; AxisSpec dcaAxis = {binsDCA, "DCA vs PV"}; histos.add("EventHist", "EventHist", kTH1D, {axisEvent}, false); @@ -138,13 +138,6 @@ struct StudyPnch { x->SetBinLabel(6, "INEL > 0"); x->SetBinLabel(7, "|vz| < 10"); - histos.add("SelCollsHist", "SelCollsHist", kTH1D, {axisCollSel}, false); - auto hstat_colls = histos.get(HIST("SelCollsHist")); - auto* xColls = hstat_colls->GetXaxis(); - xColls->SetBinLabel(1, "All collisions"); - xColls->SetBinLabel(2, "Best Collision Selection"); - xColls->SetBinLabel(3, "Has MC Collision Selection"); - if (doprocessData || doprocessCorrelation || doprocessMonteCarlo) { histos.add("PhiVsEtaHist", "PhiVsEtaHist", kTH2F, {axisPhi, axisEta}, false); histos.add("EtaHist", "EtaHist", kTH1D, {axisEta}, false); @@ -169,17 +162,14 @@ struct StudyPnch { histos.add("hMultiplicityMCrec", "hMultiplicityMCrec", kTH1F, {axisMult}, true); histos.add("hMultiplicityMCgen", "hMultiplicityMCgen", kTH1F, {axisMult}, true); histos.add("hResponseMatrix", "hResponseMatrix", kTH2F, {axisMult, axisMult}, true); - histos.add("hCountNTracks", "hCountNTracks", kTH1F, {axisCountNumberTracks}, true); } - if (ispTincrease || ispTdecrease) { + if (isPtincrease || isPtdecrease) { histos.add("hMultiplicityMCgenPtCut", "hMultiplicityMCgenPtCut", kTH1F, {axisMult}, true); histos.add("hResponseMatrixPtCut", "hResponseMatrixPtCut", kTH2F, {axisMult, axisMult}, true); } if (isApplyStrangenessSysUncert) { - histos.add("hMultiplicityMCStangeDecay", "hMultiplicityMCStangeDecay", kTH1F, {axisMult}, true); - histos.add("hMultiplicityMCSubtractionSDecay", "hMultiplicityMCSubtractionSDecay", kTH1F, {axisMult}, true); - histos.add("hResponseMatrixStrangeDecay", "hResponseMatrixStrangeDecay", kTH2F, {axisMult, axisMult}, true); - histos.add("hResponseMatrixSubtractionSDecay", "hResponseMatrixSubtractionSDecay", kTH2F, {axisMult, axisMult}, true); + histos.add("hMultiplicityMCSubStrDecay", "hMultiplicityMCSubStrDecay", kTH1F, {axisMult}, true); + histos.add("hResponseMatrixSubStrDecay", "hResponseMatrixSubStrDecay", kTH2F, {axisMult, axisMult}, true); } if (doprocessEvtLossSigLossMC) { histos.add("MCEventHist", "MCEventHist", kTH1F, {axisEvent}, false); @@ -339,7 +329,8 @@ struct StudyPnch { template int countStrangeTracksMcCol(countTrk const& tracks, McColType const& McCol) { - auto nTrk_strange = 0; + auto nTrkStrange = 0; + auto nTrk = 0; std::vector mcRecIDs; for (const auto& track : tracks) { if (!isTrackSelected(track)) { @@ -356,21 +347,20 @@ struct StudyPnch { mcRecIDs.push_back(particle.globalIndex()); if (particle.has_mothers()) { auto mcMother = particle.template mothers_as().front(); - if (mcMother.pdgCode() == PDG_t::kK0Short || std::abs(mcMother.pdgCode()) == PDG_t::kLambda0) { - nTrk_strange++; + if (mcMother.pdgCode() == PDG_t::kK0Short || std::abs(mcMother.pdgCode() == PDG_t::kLambda0)) { + nTrkStrange++; } } + nTrk++; } } - return nTrk_strange; + return nTrk - nTrkStrange; } template - int countTracksPtCut(countTrk const& tracks, McColType const& McCol) + float countTracksPtCut(countTrk const& tracks, McColType const& McCol) { - auto nTrk_lowpT = 0; - auto nTrk_highpT = 0; - auto nTrk = 0; + auto nTrk = 0.0; for (const auto& track : tracks) { if (!isGenTrackSelected(track)) { continue; @@ -378,20 +368,14 @@ struct StudyPnch { if (track.mcCollisionId() != McCol.mcCollisionId()) { continue; } - // Evaluate low pT extrapolation - if (track.pt() < kMinPtCut) { - // nTrk_lowpT++; - if (ispTincrease) { - nTrk_lowpT += 2 - 10 * track.pt(); - } - if (ispTdecrease) { - nTrk_lowpT += 0.5 + 5 * track.pt(); - } + if (track.pt() > pTminCut) + continue; + if (isPtincrease) { + nTrk += 2 - 10 * track.pt(); } else { - nTrk_highpT++; + nTrk += 0.5 + 5 * track.pt(); } } - nTrk = nTrk_lowpT + nTrk_highpT; return nTrk; } @@ -426,47 +410,44 @@ struct StudyPnch { histos.fill(HIST("NPVtracks_vs_GlobalMult"), cols.multNTracksPV(), mult); } - void processMonteCarlo(soa::Join::iterator const& mcCollision, ColMCRecTable const& RecCols, TrackMCTrueTable const& GenParticles, FilTrackMCRecTable const& RecTracks) + void processMonteCarlo(soa::Join::iterator const& mcCollision, ColMCRecTable const& RecCols, TrackMCTrueTable const& GenParticles, FilTrackMCRecTable const& RecTracks) { + if (isApplyInelgt0 && !mcCollision.isInelGt0()) { + return; + } + for (const auto& RecCol : RecCols) { if (!isEventSelected(RecCol)) { continue; } - histos.fill(HIST("SelCollsHist"), 1); // Evaluation of reconstructed collisions with more than 1 contributor if (RecCol.globalIndex() != mcCollision.bestCollisionIndex()) { continue; } - histos.fill(HIST("SelCollsHist"), 2); if (!RecCol.has_mcCollision()) { continue; } - histos.fill(HIST("SelCollsHist"), 3); auto recTracksPart = RecTracks.sliceBy(perCollision, RecCol.globalIndex()); auto multrec = countNTracksMcCol(recTracksPart, RecCol); if (multrec > 0) { histos.fill(HIST("hMultiplicityMCrec"), multrec); } - auto multgen = countGenTracks(GenParticles, RecCol); + float multgen = countGenTracks(GenParticles, RecCol); if (multgen > 0 && multrec > 0) { histos.fill(HIST("hMultiplicityMCgen"), multgen); histos.fill(HIST("hResponseMatrix"), multrec, multgen); } - if (ispTincrease || ispTdecrease) { - auto nTrkPtCut = countTracksPtCut(GenParticles, RecCol); - if (nTrkPtCut > 0) { - histos.fill(HIST("hMultiplicityMCgenPtCut"), nTrkPtCut); - histos.fill(HIST("hResponseMatrixPtCut"), multrec, nTrkPtCut); - } + if (isPtincrease || isPtdecrease) { + float nTrkPtCut = countTracksPtCut(GenParticles, RecCol); + multgen = multgen + nTrkPtCut; + histos.fill(HIST("hMultiplicityMCgenPtCut"), multgen); + histos.fill(HIST("hResponseMatrixPtCut"), multrec, multgen); } if (isApplyStrangenessSysUncert) { - auto nTrk_strange = countStrangeTracksMcCol(recTracksPart, RecCol); - auto nSubtract_strange = multrec - nTrk_strange; + auto nSubtractStrange = countStrangeTracksMcCol(recTracksPart, RecCol); if (multrec > 0) { - histos.fill(HIST("hMultiplicityMCStangeDecay"), nTrk_strange); - histos.fill(HIST("hMultiplicityMCSubtractionSDecay"), nSubtract_strange); - histos.fill(HIST("hResponseMatrixStrangeDecay"), nTrk_strange, multgen); - histos.fill(HIST("hResponseMatrixSubtractionSDecay"), nSubtract_strange, multgen); + histos.fill(HIST("hMultiplicityMCSubStrDecay"), nSubtractStrange); + histos.fill(HIST("hResponseMatrixSubStrDecay"), nSubtractStrange, multgen); } } } From 3d3c880e966e4560b492dd4223887aa5ca950ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Tue, 12 May 2026 10:31:18 +0200 Subject: [PATCH 2/3] Corrections for systematic uncertainties Corrections for both the pT extrapolation to 0 and the influence of strange decay particles and exclusion of not needed processes --- .../Tasks/GlobalEventProperties/studyPnch.cxx | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index dab4905181d..b23c2c49ce0 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -162,8 +162,6 @@ struct StudyPnch { histos.add("hMultiplicityMCrec", "hMultiplicityMCrec", kTH1F, {axisMult}, true); histos.add("hMultiplicityMCgen", "hMultiplicityMCgen", kTH1F, {axisMult}, true); histos.add("hResponseMatrix", "hResponseMatrix", kTH2F, {axisMult, axisMult}, true); - } - if (isPtincrease || isPtdecrease) { histos.add("hMultiplicityMCgenPtCut", "hMultiplicityMCgenPtCut", kTH1F, {axisMult}, true); histos.add("hResponseMatrixPtCut", "hResponseMatrixPtCut", kTH2F, {axisMult, axisMult}, true); } @@ -360,7 +358,7 @@ struct StudyPnch { template float countTracksPtCut(countTrk const& tracks, McColType const& McCol) { - auto nTrk = 0.0; + float nTrk = 0.0; for (const auto& track : tracks) { if (!isGenTrackSelected(track)) { continue; @@ -429,26 +427,18 @@ struct StudyPnch { } auto recTracksPart = RecTracks.sliceBy(perCollision, RecCol.globalIndex()); auto multrec = countNTracksMcCol(recTracksPart, RecCol); - if (multrec > 0) { - histos.fill(HIST("hMultiplicityMCrec"), multrec); - } + histos.fill(HIST("hMultiplicityMCrec"), multrec); float multgen = countGenTracks(GenParticles, RecCol); - if (multgen > 0 && multrec > 0) { - histos.fill(HIST("hMultiplicityMCgen"), multgen); - histos.fill(HIST("hResponseMatrix"), multrec, multgen); - } - if (isPtincrease || isPtdecrease) { - float nTrkPtCut = countTracksPtCut(GenParticles, RecCol); - multgen = multgen + nTrkPtCut; - histos.fill(HIST("hMultiplicityMCgenPtCut"), multgen); - histos.fill(HIST("hResponseMatrixPtCut"), multrec, multgen); - } + histos.fill(HIST("hMultiplicityMCgen"), multgen); + histos.fill(HIST("hResponseMatrix"), multrec, multgen); + float nTrkPtCut = countTracksPtCut(GenParticles, RecCol); + nTrkPtCut = multgen + nTrkPtCut; + histos.fill(HIST("hMultiplicityMCgenPtCut"), nTrkPtCut); + histos.fill(HIST("hResponseMatrixPtCut"), multrec, nTrkPtCut); if (isApplyStrangenessSysUncert) { auto nSubtractStrange = countStrangeTracksMcCol(recTracksPart, RecCol); - if (multrec > 0) { - histos.fill(HIST("hMultiplicityMCSubStrDecay"), nSubtractStrange); - histos.fill(HIST("hResponseMatrixSubStrDecay"), nSubtractStrange, multgen); - } + histos.fill(HIST("hMultiplicityMCSubStrDecay"), nSubtractStrange); + histos.fill(HIST("hResponseMatrixSubStrDecay"), nSubtractStrange, multgen); } } } From 6c64926abc39badee0003094e79d5319d4a6c57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Tue, 12 May 2026 10:43:09 +0200 Subject: [PATCH 3/3] Fix strange decay counter --- PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index b23c2c49ce0..43e1d5dcce9 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -345,7 +345,7 @@ struct StudyPnch { mcRecIDs.push_back(particle.globalIndex()); if (particle.has_mothers()) { auto mcMother = particle.template mothers_as().front(); - if (mcMother.pdgCode() == PDG_t::kK0Short || std::abs(mcMother.pdgCode() == PDG_t::kLambda0)) { + if (mcMother.pdgCode() == PDG_t::kK0Short || std::abs(mcMother.pdgCode()) == PDG_t::kLambda0) { nTrkStrange++; } }