From 0e68849b195bc9c9cd6df8402a68c6c368c7b53c Mon Sep 17 00:00:00 2001 From: abmodak <67369858+abmodak@users.noreply.github.com> Date: Thu, 27 Nov 2025 10:39:48 +0100 Subject: [PATCH 1/4] Fix bug in filling of histograms --- PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx b/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx index 804085b9682..7c91e73f9a9 100644 --- a/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx @@ -105,7 +105,6 @@ enum { enum { kRecTrkTypebegin = 0, kRecoAll = 1, - kRecoPrimary, kRecoPion, kRecoKaon, kRecoProton, @@ -997,7 +996,7 @@ struct HeavyionMultiplicity { histos.fill(HIST("hGenMCAssoRecdndeta"), mcCollision.posZ(), gencent, genoccu, particle.eta(), particle.phi(), static_cast(kGenAll), kGenpTup, -10.0 * particle.pt() + 2); histos.fill(HIST("hGenMCAssoRecdndeta"), mcCollision.posZ(), gencent, genoccu, particle.eta(), particle.phi(), static_cast(kGenAll), kGenpTdown, 5.0 * particle.pt() + 0.5); } else { - histos.fill(HIST("hGenMCAssoRecdndeta"), mcCollision.posZ(), gencent, genoccu, particle.eta(), particle.phi(), static_cast(kSpAll), kGenpTup); + histos.fill(HIST("hGenMCAssoRecdndeta"), mcCollision.posZ(), gencent, genoccu, particle.eta(), particle.phi(), static_cast(kGenAll), kGenpTup); histos.fill(HIST("hGenMCAssoRecdndeta"), mcCollision.posZ(), gencent, genoccu, particle.eta(), particle.phi(), static_cast(kGenAll), kGenpTdown); } int pid = 0; @@ -1043,7 +1042,6 @@ struct HeavyionMultiplicity { auto mcpart = Rectrack.mcParticle(); histos.fill(HIST("etaResolution"), Rectrack.eta(), Rectrack.eta() - mcpart.eta()); if (mcpart.isPhysicalPrimary()) { - pid = kRecoPrimary; switch (std::abs(mcpart.pdgCode())) { case PDG_t::kPiPlus: pid = kRecoPion; From 7714f35e15710c9b72e53fdaf33f9112777fb950 Mon Sep 17 00:00:00 2001 From: abmodak <67369858+abmodak@users.noreply.github.com> Date: Fri, 28 Nov 2025 20:33:21 +0100 Subject: [PATCH 2/4] Add histogram to fill MC events with zero reco events --- .../GlobalEventProperties/heavyionMultiplicity.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx b/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx index 7c91e73f9a9..d7c19489c03 100644 --- a/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx @@ -311,7 +311,9 @@ struct HeavyionMultiplicity { auto hstat = histos.get(HIST("MCEventHist")); auto* x = hstat->GetXaxis(); x->SetBinLabel(1, "All MC events"); - x->SetBinLabel(2, "MC events with atleast one reco event"); + x->SetBinLabel(2, "MC events with reco event after event selection"); + x->SetBinLabel(3, "MC events with no reco events"); + histos.add("hImpactParameterGenwithNoreco","hImpactParameterGenwithNoreco", "Impact parameter of generated MC events, with no recoevent", kTH1F, {impactParAxis}); histos.add("hImpactParameterGen", "Impact parameter of generated MC events", kTH1F, {impactParAxis}); histos.add("hImpactParameterRec", "Impact parameter of selected MC events", kTH1F, {impactParAxis}); histos.add("hImpactParvsCentrRec", "Impact parameter of selected MC events vs centrality", kTH2F, {axisCent, impactParAxis}); @@ -915,10 +917,15 @@ struct HeavyionMultiplicity { histos.fill(HIST("MCEventHist"), 1); histos.fill(HIST("hImpactParameterGen"), mcCollision.impactParameter()); + if(RecCols.size()==0) { + histos.fill(HIST("MCEventHist"), 3); + histos.fill(HIST("hImpactParameterGenwithNoreco"), mcCollision.impactParameter()); + } + bool atLeastOne = false; auto centrality = -999.; - auto numcontributors = -999; - for (const auto& RecCol : RecCols) { + auto numcontributors = -999; + for (const auto& RecCol : RecCols) { if (!isEventSelected(RecCol)) { continue; } From 00cc783c9a88a4b5209a13baff34b5d27bddad58 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Fri, 28 Nov 2025 19:35:09 +0000 Subject: [PATCH 3/4] Please consider the following formatting changes --- .../GlobalEventProperties/heavyionMultiplicity.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx b/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx index d7c19489c03..6d7af06b4cc 100644 --- a/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx @@ -313,7 +313,7 @@ struct HeavyionMultiplicity { x->SetBinLabel(1, "All MC events"); x->SetBinLabel(2, "MC events with reco event after event selection"); x->SetBinLabel(3, "MC events with no reco events"); - histos.add("hImpactParameterGenwithNoreco","hImpactParameterGenwithNoreco", "Impact parameter of generated MC events, with no recoevent", kTH1F, {impactParAxis}); + histos.add("hImpactParameterGenwithNoreco", "hImpactParameterGenwithNoreco", "Impact parameter of generated MC events, with no recoevent", kTH1F, {impactParAxis}); histos.add("hImpactParameterGen", "Impact parameter of generated MC events", kTH1F, {impactParAxis}); histos.add("hImpactParameterRec", "Impact parameter of selected MC events", kTH1F, {impactParAxis}); histos.add("hImpactParvsCentrRec", "Impact parameter of selected MC events vs centrality", kTH2F, {axisCent, impactParAxis}); @@ -917,15 +917,15 @@ struct HeavyionMultiplicity { histos.fill(HIST("MCEventHist"), 1); histos.fill(HIST("hImpactParameterGen"), mcCollision.impactParameter()); - if(RecCols.size()==0) { + if (RecCols.size() == 0) { histos.fill(HIST("MCEventHist"), 3); histos.fill(HIST("hImpactParameterGenwithNoreco"), mcCollision.impactParameter()); } - + bool atLeastOne = false; auto centrality = -999.; - auto numcontributors = -999; - for (const auto& RecCol : RecCols) { + auto numcontributors = -999; + for (const auto& RecCol : RecCols) { if (!isEventSelected(RecCol)) { continue; } From 31597cf48482905387e6e4fb28b17de538355ecf Mon Sep 17 00:00:00 2001 From: abmodak <67369858+abmodak@users.noreply.github.com> Date: Fri, 28 Nov 2025 23:08:58 +0100 Subject: [PATCH 4/4] Fix o2 building error --- PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx b/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx index 6d7af06b4cc..9a496f78016 100644 --- a/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx @@ -313,7 +313,7 @@ struct HeavyionMultiplicity { x->SetBinLabel(1, "All MC events"); x->SetBinLabel(2, "MC events with reco event after event selection"); x->SetBinLabel(3, "MC events with no reco events"); - histos.add("hImpactParameterGenwithNoreco", "hImpactParameterGenwithNoreco", "Impact parameter of generated MC events, with no recoevent", kTH1F, {impactParAxis}); + histos.add("hImpactParameterGenwithNoreco", "Impact parameter of generated MC events, with no recoevent", kTH1F, {impactParAxis}); histos.add("hImpactParameterGen", "Impact parameter of generated MC events", kTH1F, {impactParAxis}); histos.add("hImpactParameterRec", "Impact parameter of selected MC events", kTH1F, {impactParAxis}); histos.add("hImpactParvsCentrRec", "Impact parameter of selected MC events vs centrality", kTH2F, {axisCent, impactParAxis});