From 00b46deb47ed7f0730650d33891d502404d7d5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Mon, 25 May 2026 14:53:32 +0200 Subject: [PATCH 1/2] Correction for pT extrapolation When evaluating pT extrapolation, the generated counts were bin double-counted. This correction properly deals with this issue and also displays the count of tracks for debugging --- .../Tasks/GlobalEventProperties/studyPnch.cxx | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index 43e1d5dcce9..b69061f849f 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -113,6 +113,7 @@ struct StudyPnch { 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 cPrint{"cPrint", false, "Enable printing information for debugging"}; Configurable isApplyStrangenessSysUncert{"isApplyStrangenessSysUncert", false, "Enable the evaluation of systematics due to strange particle contribution"}; void init(InitContext const&) @@ -359,6 +360,7 @@ struct StudyPnch { float countTracksPtCut(countTrk const& tracks, McColType const& McCol) { float nTrk = 0.0; + auto count = 0; for (const auto& track : tracks) { if (!isGenTrackSelected(track)) { continue; @@ -366,14 +368,24 @@ struct StudyPnch { if (track.mcCollisionId() != McCol.mcCollisionId()) { continue; } - if (track.pt() > pTminCut) + if (track.pt() > pTminCut) { + count++; continue; + } if (isPtincrease) { - nTrk += 2 - 10 * track.pt(); + nTrk += 2 - 10 * track.pt() - 1; } else { - nTrk += 0.5 + 5 * track.pt(); + nTrk += 0.5 + 5 * track.pt() - 1; + } + if (cPrint) { + LOG(info) << "nTrk: " << nTrk; + LOG(info) << "low pT = " << track.pt(); } } + if (nTrk != 0 && cPrint) { + LOG(info) << "counts standard pT: " << count; + LOG(info) << "Result of the function: " << nTrk; + } return nTrk; } @@ -429,10 +441,13 @@ struct StudyPnch { auto multrec = countNTracksMcCol(recTracksPart, RecCol); histos.fill(HIST("hMultiplicityMCrec"), multrec); float multgen = countGenTracks(GenParticles, RecCol); + LOG(info) << "Generated Particles with standard pT:" << multgen; histos.fill(HIST("hMultiplicityMCgen"), multgen); histos.fill(HIST("hResponseMatrix"), multrec, multgen); float nTrkPtCut = countTracksPtCut(GenParticles, RecCol); nTrkPtCut = multgen + nTrkPtCut; + LOG(info) << "After Counting low pT: " << nTrkPtCut; + LOG(info) << "########################"; histos.fill(HIST("hMultiplicityMCgenPtCut"), nTrkPtCut); histos.fill(HIST("hResponseMatrixPtCut"), multrec, nTrkPtCut); if (isApplyStrangenessSysUncert) { From 6ad63ec4379af7137d14eeee461c01f945c342da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Mon, 25 May 2026 15:53:23 +0200 Subject: [PATCH 2/2] Addition for debugging --- PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index b69061f849f..8bf72d54a5a 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -441,13 +441,17 @@ struct StudyPnch { auto multrec = countNTracksMcCol(recTracksPart, RecCol); histos.fill(HIST("hMultiplicityMCrec"), multrec); float multgen = countGenTracks(GenParticles, RecCol); - LOG(info) << "Generated Particles with standard pT:" << multgen; + if (cPrint) { + LOG(info) << "Generated Particles with standard pT:" << multgen; + } histos.fill(HIST("hMultiplicityMCgen"), multgen); histos.fill(HIST("hResponseMatrix"), multrec, multgen); float nTrkPtCut = countTracksPtCut(GenParticles, RecCol); nTrkPtCut = multgen + nTrkPtCut; - LOG(info) << "After Counting low pT: " << nTrkPtCut; - LOG(info) << "########################"; + if (cPrint) { + LOG(info) << "After Counting low pT: " << nTrkPtCut; + LOG(info) << "########################"; + } histos.fill(HIST("hMultiplicityMCgenPtCut"), nTrkPtCut); histos.fill(HIST("hResponseMatrixPtCut"), multrec, nTrkPtCut); if (isApplyStrangenessSysUncert) {