@@ -84,53 +84,88 @@ struct nucleiFromHypertritonMap {
8484 registryMC.add (" he3SecPtRec_from_hypertriton" , " he3SecPtRec_from_hypertriton" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
8585 registryMC.add (" hyperHe4Ptgen" , " hyperHe4PtGen" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
8686 registryMC.add (" he3SecPtRec_from_hyperHe4" , " he3SecPtRec_from_hyperHe4" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
87+ registryMC.add (" he3PtRec" , " he3PtRec" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
88+ registryMC.add (" he3PtGen" , " he3PtGen" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
8789 } else {
8890 registryMC.add (" deutSecPtRec_from_hypertriton" , " deutSecPtRec_from_hypertriton" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
91+ registryMC.add (" deutPtRec" , " deutPtRec" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
92+ registryMC.add (" deutPtgen" , " deutPtGen" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
8993 }
9094 }
9195
92- void processMC (aod::McParticles const & /* mcParticles*/ , const MCTracks& tracks)
96+ void processMC (const aod::McParticles& mcParticles, const MCTracks& tracks)
9397 {
98+ int selectedPDG = 0 ;
99+ if (saveHelium) {
100+ selectedPDG = AntihePDG;
101+ } else {
102+ selectedPDG = AntideuteronPDG;
103+ }
104+
105+ for (const auto & mcparticle : mcParticles) {
106+ if (((mcparticle.pdgCode () == AntiHypertritonPDG || mcparticle.pdgCode () == AntiHyperHelium4PDG) && mcparticle.has_daughters ()) || mcparticle.pdgCode () == selectedPDG) {
107+ if (mcparticle.pdgCode () == AntiHypertritonPDG) {
108+ for (auto & daughter : mcparticle.daughters_as <aod::McParticles>()) {
109+ if (daughter.pdgCode () == selectedPDG) {
110+ registryMC.fill (HIST (" hypertritonPtgen" ), mcparticle.pt ());
111+ }
112+ }
113+ }
114+ if (mcparticle.pdgCode () == AntiHyperHelium4PDG) {
115+ for (auto & daughter : mcparticle.daughters_as <aod::McParticles>()) {
116+ if (daughter.pdgCode () == selectedPDG) {
117+ registryMC.fill (HIST (" hyperHe4Ptgen" ), mcparticle.pt ());
118+ }
119+ }
120+ }
121+ if (mcparticle.pdgCode () == AntihePDG) {
122+ registryMC.fill (HIST (" he3PtGen" ), mcparticle.pt ());
123+ }
124+ if (mcparticle.pdgCode () == AntideuteronPDG) {
125+ registryMC.fill (HIST (" deutPtGen" ), mcparticle.pt ());
126+ }
127+ }
128+ }
129+
94130 for (const auto & track : tracks) {
95131 if (!track.has_mcParticle ()) {
96132 continue ;
97133 }
98134 auto mcparticle = track.mcParticle ();
99- if (saveHelium) {
100- if (mcparticle.pdgCode () != AntihePDG || mcparticle.isPhysicalPrimary ()) {
101- continue ;
102- }
103- } else {
104- if (mcparticle.pdgCode () != AntideuteronPDG || mcparticle.isPhysicalPrimary ()) {
105- continue ;
106- }
135+ if (mcparticle.pdgCode () != selectedPDG) {
136+ continue ;
137+ }
138+
139+ if (track.itsNCls () < min_ITS_nClusters ||
140+ track.tpcNClsFound () < min_TPC_nClusters ||
141+ track.tpcNClsCrossedRows () < min_TPC_nCrossedRows ||
142+ track.tpcNClsCrossedRows () < 0.8 * track.tpcNClsFindable () ||
143+ track.tpcChi2NCl () > 4 .f ||
144+ track.tpcChi2NCl () < min_chi2_TPC ||
145+ track.eta () < min_eta || track.eta () > max_eta ||
146+ track.dcaXY () > max_dcaxy || track.dcaXY () < -max_dcaxy ||
147+ track.dcaZ () > max_dcaz || track.dcaZ () < -max_dcaz ||
148+ track.itsChi2NCl () > 36 .f ) {
149+ continue ;
150+ }
151+ if (mcparticle.pdgCode () == AntideuteronPDG) {
152+ registryMC.fill (HIST (" deutPtRec" ), track.pt ());
153+ }
154+ if (mcparticle.pdgCode () == AntihePDG) {
155+ registryMC.fill (HIST (" he3PtRec" ), 2 * track.pt ());
107156 }
108157
109158 for (auto & motherparticle : mcparticle.mothers_as <aod::McParticles>()) {
110159 if (motherparticle.pdgCode () == AntiHypertritonPDG || motherparticle.pdgCode () == AntiHyperHelium4PDG) {
111- if (track.itsNCls () < min_ITS_nClusters ||
112- track.tpcNClsFound () < min_TPC_nClusters ||
113- track.tpcNClsCrossedRows () < min_TPC_nCrossedRows ||
114- track.tpcNClsCrossedRows () < 0.8 * track.tpcNClsFindable () ||
115- track.tpcChi2NCl () > 4 .f ||
116- track.tpcChi2NCl () < min_chi2_TPC ||
117- track.eta () < min_eta || track.eta () > max_eta ||
118- track.dcaXY () > max_dcaxy || track.dcaXY () < -max_dcaxy ||
119- track.dcaZ () > max_dcaz || track.dcaZ () < -max_dcaz ||
120- track.itsChi2NCl () > 36 .f ) {
121- continue ;
122- }
123160 if (motherparticle.pdgCode () == AntiHypertritonPDG) {
124- registryMC.fill (HIST (" hypertritonPtgen" ), motherparticle.pt ());
125- if (saveHelium) {
161+ if (mcparticle.pdgCode () == AntihePDG) {
126162 registryMC.fill (HIST (" he3SecPtRec_from_hypertriton" ), 2 * track.pt ());
127163 } else {
128164 registryMC.fill (HIST (" deutSecPtRec_from_hypertriton" ), track.pt ());
129165 }
130166 }
131167 if (motherparticle.pdgCode () == AntiHyperHelium4PDG) {
132168 registryMC.fill (HIST (" he3SecPtRec_from_hyperHe4" ), 2 * track.pt ());
133- registryMC.fill (HIST (" hyperHe4Ptgen" ), motherparticle.pt ());
134169 }
135170 }
136171 }
0 commit comments