diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index ee383900901..52dd7825f09 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 mcCollision_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()) {