Skip to content

Commit 611f4cd

Browse files
committed
add generated denominator and z vtx cut in gen collisins
1 parent d3378cd commit 611f4cd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ struct hadronnucleicorrelation {
158158
std::map<std::pair<int, float>, std::vector<colType>> mixbinsPID_antidantip;
159159
std::map<float, std::vector<MCcolType>> mixbinsMC_antidantip;
160160
std::map<float, std::vector<MCcolType>> mixbinsMC_dp;
161+
std::map<float, std::vector<MCcolType>> mixbinsMC_antipantip;
162+
std::map<float, std::vector<MCcolType>> mixbinsMC_pp;
163+
std::map<float, std::vector<MCcolType>> mixbinsMC_antipp;
161164

162165
std::unique_ptr<o2::aod::singletrackselector::FemtoPair<trkType>> Pair = std::make_unique<o2::aod::singletrackselector::FemtoPair<trkType>>();
163166
std::unique_ptr<o2::aod::singletrackselector::FemtoPair<trkTypeMC>> PairMC = std::make_unique<o2::aod::singletrackselector::FemtoPair<trkTypeMC>>();
@@ -376,6 +379,9 @@ struct hadronnucleicorrelation {
376379
registry.add("hReco_Pt_Proton", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}});
377380
registry.add("hReco_Pt_Deuteron", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {pTAxis_small}});
378381

382+
registry.add("hGen_EtaPhiPt_Proton", "Gen (anti)protons in gen collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}});
383+
registry.add("hGen_EtaPhiPt_Deuteron", "Gen (anti)deuteron in gen collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}});
384+
379385
registry.add("hSec_EtaPhiPt_Proton", "Secondary (anti)protons", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}});
380386
registry.add("hPrimSec_EtaPhiPt_Proton", "Primary + Secondary (anti)protons", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}});
381387

@@ -1739,8 +1745,12 @@ struct hadronnucleicorrelation {
17391745
void processGen(SimCollisions const& mcCollisions,
17401746
SimParticles const& mcParticles)
17411747
{
1748+
17421749
for (auto particle : mcParticles) {
17431750

1751+
if (std::abs(particle.template singleCollSel_as<SimCollisions>().posZ()) > cutzvertex)
1752+
continue;
1753+
17441754
if (particle.pdgCode() == pdgProton) {
17451755
registry.fill(HIST("Generated/hQAProtons"), 0.5);
17461756
}
@@ -1776,15 +1786,19 @@ struct hadronnucleicorrelation {
17761786
}
17771787

17781788
if (particle.pdgCode() == pdgDeuteron) {
1789+
registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), particle.eta(), particle.phi(), particle.pt());
17791790
selectedparticlesMC_d[particle.mcCollisionId()].push_back(std::make_shared<decltype(particle)>(particle));
17801791
}
17811792
if (particle.pdgCode() == -pdgDeuteron) {
1793+
registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), particle.eta(), particle.phi(), -1. * particle.pt());
17821794
selectedparticlesMC_antid[particle.mcCollisionId()].push_back(std::make_shared<decltype(particle)>(particle));
17831795
}
17841796
if (particle.pdgCode() == pdgProton) {
1797+
registry.fill(HIST("hGen_EtaPhiPt_Proton"), particle.eta(), particle.phi(), particle.pt());
17851798
selectedparticlesMC_p[particle.mcCollisionId()].push_back(std::make_shared<decltype(particle)>(particle));
17861799
}
17871800
if (particle.pdgCode() == -pdgProton) {
1801+
registry.fill(HIST("hGen_EtaPhiPt_Proton"), particle.eta(), particle.phi(), -1. * particle.pt());
17881802
selectedparticlesMC_antip[particle.mcCollisionId()].push_back(std::make_shared<decltype(particle)>(particle));
17891803
}
17901804
}
@@ -1793,6 +1807,10 @@ struct hadronnucleicorrelation {
17931807

17941808
registry.fill(HIST("Generated/hNEventsMC"), 0.5);
17951809

1810+
if (std::abs(collision1.posZ()) > cutzvertex) {
1811+
continue;
1812+
}
1813+
17961814
// anti-d - anti-p correlation
17971815
if (selectedparticlesMC_antid.find(collision1.globalIndex()) != selectedparticlesMC_antid.end()) {
17981816
if (selectedparticlesMC_antip.find(collision1.globalIndex()) != selectedparticlesMC_antip.end()) {

0 commit comments

Comments
 (0)