From bbe6cea8639cd293ac804ff78b84af861d69cd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Sun, 23 Aug 2026 18:03:05 +0200 Subject: [PATCH 1/4] Fix inelgt0 criteria Correction for counting tracks considering INEL > 0 --- .../Tasks/GlobalEventProperties/studyPnch.cxx | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index 20a27dce05a..3470077fdf7 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -401,7 +401,11 @@ struct StudyPnch { return; } auto mult = countNTracks(tracks); - if (mult > 0) { + if (isApplyInelgt0 && etaRange == 1.0f) { + if (mult > 0) { + histos.fill(HIST("hMultiplicityData"), mult); + } + } else { histos.fill(HIST("hMultiplicityData"), mult); } } @@ -438,14 +442,22 @@ struct StudyPnch { } auto recTracksPart = RecTracks.sliceBy(perCollision, RecCol.globalIndex()); auto multrec = countNTracksMcCol(recTracksPart, RecCol); - histos.fill(HIST("hMultiplicityMCrec"), multrec); float multgen = countGenTracks(GenParticles, RecCol); + float nTrkPtCut = countTracksPtCut(GenParticles, RecCol); + if (isApplyInelgt0 && etaRange == 1.0f) { + if (multrec == 0 || multgen == 0) { + if (nTrkPtCut == 0) { + continue; + } + continue; + } + } + histos.fill(HIST("hMultiplicityMCrec"), multrec); 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; if (cPrint) { LOG(info) << "After Counting low pT: " << nTrkPtCut; @@ -481,7 +493,11 @@ struct StudyPnch { } nTrk_multAll++; } - if (nTrk_multAll > 0) { + if (isApplyInelgt0 && etaRange == 1.0f) { + if (nTrk_multAll > 0) { + histos.fill(HIST("hMultiplicityMCgenAll"), nTrk_multAll); + } + } else { histos.fill(HIST("hMultiplicityMCgenAll"), nTrk_multAll); } @@ -508,7 +524,11 @@ struct StudyPnch { } nTrk_multSel++; } - if (nTrk_multSel > 0) { + if (isApplyInelgt0 && etaRange == 1.0f) { + if (nTrk_multSel > 0) { + histos.fill(HIST("hMultiplicityMCgenSel"), nTrk_multSel); + } + } else { histos.fill(HIST("hMultiplicityMCgenSel"), nTrk_multSel); } } From 3fa9a8691f22b95d961e5d347e4a31a2f246eadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Sun, 23 Aug 2026 18:19:30 +0200 Subject: [PATCH 2/4] Fix Megalinter error --- PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index 3470077fdf7..30ec6518089 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -171,8 +171,8 @@ struct StudyPnch { } if (doprocessEvtLossSigLossMC) { histos.add("MCEventHist", "MCEventHist", kTH1F, {axisEvent}, false); - auto hstat = histos.get(HIST("MCEventHist")); - auto* x = hstat->GetXaxis(); + auto hstatevloss = histos.get(HIST("MCEventHist")); + auto* x = hstatevloss->GetXaxis(); x->SetBinLabel(1, "All MC events"); x->SetBinLabel(2, "MC events with atleast one reco event"); histos.add("hMultiplicityMCgenAll", "hMultiplicityMCgenAll", kTH1F, {axisMult}, true); From 76dff967574f9689aac588d00df09d4f0c630e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Sun, 23 Aug 2026 18:26:39 +0200 Subject: [PATCH 3/4] Fix Megalinter error --- PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index 30ec6518089..b3fc20dbc12 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -172,9 +172,9 @@ struct StudyPnch { if (doprocessEvtLossSigLossMC) { histos.add("MCEventHist", "MCEventHist", kTH1F, {axisEvent}, false); auto hstatevloss = histos.get(HIST("MCEventHist")); - auto* x = hstatevloss->GetXaxis(); - x->SetBinLabel(1, "All MC events"); - x->SetBinLabel(2, "MC events with atleast one reco event"); + auto* xevloss = hstatevloss->Getevlossaxis(); + xevloss->SetBinLabel(1, "All MC events"); + xevloss->SetBinLabel(2, "MC events with atleast one reco event"); histos.add("hMultiplicityMCgenAll", "hMultiplicityMCgenAll", kTH1F, {axisMult}, true); histos.add("hMultiplicityMCgenSel", "hMultiplicityMCgenSel", kTH1F, {axisMult}, true); } From d73922e352dfdb4b2710e02adf421123ef724db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Jos=C3=A9?= <52935244+lucasjsilva@users.noreply.github.com> Date: Sun, 23 Aug 2026 18:40:44 +0200 Subject: [PATCH 4/4] Fix axis retrieval --- 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 b3fc20dbc12..2e7a2222d03 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -172,7 +172,7 @@ struct StudyPnch { if (doprocessEvtLossSigLossMC) { histos.add("MCEventHist", "MCEventHist", kTH1F, {axisEvent}, false); auto hstatevloss = histos.get(HIST("MCEventHist")); - auto* xevloss = hstatevloss->Getevlossaxis(); + auto* xevloss = hstatevloss->GetXaxis(); xevloss->SetBinLabel(1, "All MC events"); xevloss->SetBinLabel(2, "MC events with atleast one reco event"); histos.add("hMultiplicityMCgenAll", "hMultiplicityMCgenAll", kTH1F, {axisMult}, true);