From 611f4cdf006e651a8e87f4dbefa22db7ba7ac738 Mon Sep 17 00:00:00 2001 From: Francesca Ercolessi Date: Tue, 7 Oct 2025 17:03:52 +0200 Subject: [PATCH 1/2] add generated denominator and z vtx cut in gen collisins --- PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index ee383900901..424f61b8583 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -158,6 +158,9 @@ struct hadronnucleicorrelation { std::map, std::vector> mixbinsPID_antidantip; std::map> mixbinsMC_antidantip; std::map> mixbinsMC_dp; + std::map> mixbinsMC_antipantip; + std::map> mixbinsMC_pp; + std::map> mixbinsMC_antipp; std::unique_ptr> Pair = std::make_unique>(); std::unique_ptr> PairMC = std::make_unique>(); @@ -376,6 +379,9 @@ struct hadronnucleicorrelation { registry.add("hReco_Pt_Proton", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); registry.add("hReco_Pt_Deuteron", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); + registry.add("hGen_EtaPhiPt_Proton", "Gen (anti)protons in gen collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); + registry.add("hGen_EtaPhiPt_Deuteron", "Gen (anti)deuteron in gen collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); + registry.add("hSec_EtaPhiPt_Proton", "Secondary (anti)protons", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); registry.add("hPrimSec_EtaPhiPt_Proton", "Primary + Secondary (anti)protons", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); @@ -1739,8 +1745,12 @@ struct hadronnucleicorrelation { void processGen(SimCollisions const& mcCollisions, SimParticles const& mcParticles) { + for (auto particle : mcParticles) { + if (std::abs(particle.template singleCollSel_as().posZ()) > cutzvertex) + continue; + if (particle.pdgCode() == pdgProton) { registry.fill(HIST("Generated/hQAProtons"), 0.5); } @@ -1776,15 +1786,19 @@ struct hadronnucleicorrelation { } if (particle.pdgCode() == pdgDeuteron) { + registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), particle.eta(), particle.phi(), particle.pt()); selectedparticlesMC_d[particle.mcCollisionId()].push_back(std::make_shared(particle)); } if (particle.pdgCode() == -pdgDeuteron) { + registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), particle.eta(), particle.phi(), -1. * particle.pt()); selectedparticlesMC_antid[particle.mcCollisionId()].push_back(std::make_shared(particle)); } if (particle.pdgCode() == pdgProton) { + registry.fill(HIST("hGen_EtaPhiPt_Proton"), particle.eta(), particle.phi(), particle.pt()); selectedparticlesMC_p[particle.mcCollisionId()].push_back(std::make_shared(particle)); } if (particle.pdgCode() == -pdgProton) { + registry.fill(HIST("hGen_EtaPhiPt_Proton"), particle.eta(), particle.phi(), -1. * particle.pt()); selectedparticlesMC_antip[particle.mcCollisionId()].push_back(std::make_shared(particle)); } } @@ -1793,6 +1807,10 @@ struct hadronnucleicorrelation { registry.fill(HIST("Generated/hNEventsMC"), 0.5); + if (std::abs(collision1.posZ()) > cutzvertex) { + continue; + } + // anti-d - anti-p correlation if (selectedparticlesMC_antid.find(collision1.globalIndex()) != selectedparticlesMC_antid.end()) { if (selectedparticlesMC_antip.find(collision1.globalIndex()) != selectedparticlesMC_antip.end()) { From 877e777bf6bb5a0f10453280a00cd323259faece Mon Sep 17 00:00:00 2001 From: Francesca Ercolessi Date: Tue, 7 Oct 2025 17:10:20 +0200 Subject: [PATCH 2/2] fix --- PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index 424f61b8583..52dd7825f09 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -1748,7 +1748,7 @@ struct hadronnucleicorrelation { for (auto particle : mcParticles) { - if (std::abs(particle.template singleCollSel_as().posZ()) > cutzvertex) + if (std::abs(particle.template mcCollision_as().posZ()) > cutzvertex) continue; if (particle.pdgCode() == pdgProton) {