From dc59c7be941b914cd2f0a2f2c0992fd45aa87e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Wed, 9 Sep 2026 18:19:16 +0200 Subject: [PATCH 1/3] Add histograms for protons and neutrons in h-d corr. --- .../Tasks/Nuspex/hadronnucleicorrelation.cxx | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index a3462b9ed52..7b227fe257a 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -269,7 +269,7 @@ struct HadronNucleiCorrelation { } registry.add("hMult", "multiplicity", {HistType::kTH1D, {{200, 0.f, 200.f, "N_{ch}"}}}); - if (doQA) { + if (doQA && (doprocessSameEvent || doprocessSameEventEvSel || doprocessMC)) { // Track QA registryQa.add("QA/hVtxZ_trk", "#it{z}_{vtx}", {HistType::kTH1D, {{150, -15.f, 15.f, "#it{z}_{vtx} (cm)"}}}); registryQa.add("QA/hTPCnClusters", "N TPC Clusters; N TPC Clusters", {HistType::kTH1D, {{200, 0.f, 200.f}}}); @@ -428,8 +428,10 @@ struct HadronNucleiCorrelation { registry.addClone("Generated/hQADeuterons", "Generated/hQAAntiDeuterons"); const AxisSpec ptAxisGen = {100, 0.f, 10.f, "#it{p}_{T} GeV/#it{c}"}; - registry.add("Generated/hDeuteronsVsPt", "hDeuteronsVsPt;", {HistType::kTH1D, {ptAxisGen}}); - registry.add("Generated/hAntiDeuteronsVsPt", "hAntiDeuteronsVsPt;", {HistType::kTH1D, {ptAxisGen}}); + registry.add("Generated/hDeuteronsVsPt", "hDeuteronsVsPt", {HistType::kTH1D, {ptAxisGen}}); + registry.add("Generated/hAntiDeuteronsVsPt", "hAntiDeuteronsVsPt", {HistType::kTH1D, {ptAxisGen}}); + registry.add("Generated/hProtonsVsPt", "hProtonsVsPt", {HistType::kTH1D, {ptAxisGen}}); + registry.add("Generated/hAntiProtonsVsPt", "hAntiProtonsVsPt", {HistType::kTH1D, {ptAxisGen}}); } } @@ -1843,6 +1845,12 @@ struct HadronNucleiCorrelation { case -PDG_t::kProton: registry.fill(HIST("Generated/hQAAntiProtons"), binPosition); return true; + case o2::constants::physics::Pdg::kNeutron: + registry.fill(HIST("Generated/hQANeutrons"), binPosition); + return true; + case -o2::constants::physics::Pdg::kNeutron: + registry.fill(HIST("Generated/hQAAntiNeutrons"), binPosition); + return true; case o2::constants::physics::Pdg::kDeuteron: registry.fill(HIST("Generated/hQADeuterons"), binPosition); return true; @@ -1864,6 +1872,12 @@ struct HadronNucleiCorrelation { if (std::abs(particle.y()) < yRap) { switch (particle.pdgCode()) { + case o2::constants::physics::Pdg::kProton: + registry.fill(HIST("Generated/hProtonsVsPt"), particle.pt()); + break; + case -o2::constants::physics::Pdg::kProton: + registry.fill(HIST("Generated/hAntiProtonsVsPt"), particle.pt()); + break; case o2::constants::physics::Pdg::kDeuteron: registry.fill(HIST("Generated/hDeuteronsVsPt"), particle.pt()); break; From d0a32f24a14cbe26da11ebf299cd0e3335a4831c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Thu, 10 Sep 2026 08:04:14 +0200 Subject: [PATCH 2/3] Update particle PDG code handling in correlation function --- PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index 7b227fe257a..c774cf38281 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -1842,13 +1842,13 @@ struct HadronNucleiCorrelation { case PDG_t::kProton: registry.fill(HIST("Generated/hQAProtons"), binPosition); return true; - case -PDG_t::kProton: + case PDG_t::kProtonBar: registry.fill(HIST("Generated/hQAAntiProtons"), binPosition); return true; - case o2::constants::physics::Pdg::kNeutron: + case PDG_t::kNeutron: registry.fill(HIST("Generated/hQANeutrons"), binPosition); return true; - case -o2::constants::physics::Pdg::kNeutron: + case PDG_t::kNeutronBar: registry.fill(HIST("Generated/hQAAntiNeutrons"), binPosition); return true; case o2::constants::physics::Pdg::kDeuteron: From d47dda11929849724bbbc9b33ed4f7916d16fef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Thu, 10 Sep 2026 10:57:53 +0200 Subject: [PATCH 3/3] Update hadronnucleicorrelation.cxx --- PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index c774cf38281..d516e1e7a64 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -1872,10 +1872,10 @@ struct HadronNucleiCorrelation { if (std::abs(particle.y()) < yRap) { switch (particle.pdgCode()) { - case o2::constants::physics::Pdg::kProton: + case PDG_t::kProton: registry.fill(HIST("Generated/hProtonsVsPt"), particle.pt()); break; - case -o2::constants::physics::Pdg::kProton: + case -PDG_t::kProton: registry.fill(HIST("Generated/hAntiProtonsVsPt"), particle.pt()); break; case o2::constants::physics::Pdg::kDeuteron: