@@ -46,7 +46,7 @@ using std::array;
4646
4747using MCTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TrackSelectionExtension, aod::TracksDCA, aod::McTrackLabels>;
4848
49- struct he3FromHypertritonMap {
49+ struct nucleiFromHypertritonMap {
5050 HistogramRegistry registryMC{
5151 " registryMC" ,
5252 {},
@@ -70,17 +70,23 @@ struct he3FromHypertritonMap {
7070 Configurable<float > max_pt{" max_pt" , 10 .0f , " maximum pt of the tracks" };
7171 Configurable<int > nbin_pt{" nbin_pt" , 50 , " number of pt bins" };
7272 Configurable<int > nbin_dca = {" nbin_dca" , 50 , " number of DCA bins" };
73+ Configurable<bool > saveHelium{" saveHelium" , false , " Save helium candidates" };
7374
75+ int AntideuteronPDG = -1000010020 ;
7476 int AntihePDG = -1000020030 ;
7577 int AntiHypertritonPDG = -1010010030 ;
7678 int AntiHyperHelium4PDG = -1010020040 ;
7779
7880 void init (InitContext const &)
7981 {
80- registryMC.add (" he3SecPtRec_from_hypertriton" , " he3SecPtRec_from_hypertriton" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
81- registryMC.add (" he3SecPtRec_from_hyperHe4" , " he3SecPtRec_from_hyperHe4" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
8282 registryMC.add (" hypertritonPtgen" , " hypertritonPtGen" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
83- registryMC.add (" hyperHe4Ptgen" , " hyperHe4PtGen" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
83+ if (saveHelium) {
84+ registryMC.add (" he3SecPtRec_from_hypertriton" , " he3SecPtRec_from_hypertriton" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
85+ registryMC.add (" hyperHe4Ptgen" , " hyperHe4PtGen" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
86+ registryMC.add (" he3SecPtRec_from_hyperHe4" , " he3SecPtRec_from_hyperHe4" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
87+ } else {
88+ registryMC.add (" deutSecPtRec_from_hypertriton" , " deutSecPtRec_from_hypertriton" , HistType::kTH1F , {{nbin_pt, min_pt, max_pt, " p_{T} (GeV/c)" }});
89+ }
8490 }
8591
8692 void processMC (aod::McParticles const & /* mcParticles*/ , const MCTracks& tracks)
@@ -90,8 +96,14 @@ struct he3FromHypertritonMap {
9096 continue ;
9197 }
9298 auto mcparticle = track.mcParticle ();
93- if (mcparticle.pdgCode () != AntihePDG || mcparticle.isPhysicalPrimary ()) {
94- continue ;
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+ }
95107 }
96108
97109 for (auto & motherparticle : mcparticle.mothers_as <aod::McParticles>()) {
@@ -109,8 +121,12 @@ struct he3FromHypertritonMap {
109121 continue ;
110122 }
111123 if (motherparticle.pdgCode () == AntiHypertritonPDG) {
112- registryMC.fill (HIST (" he3SecPtRec_from_hypertriton" ), 2 * track.pt ());
113124 registryMC.fill (HIST (" hypertritonPtgen" ), motherparticle.pt ());
125+ if (saveHelium) {
126+ registryMC.fill (HIST (" he3SecPtRec_from_hypertriton" ), 2 * track.pt ());
127+ } else {
128+ registryMC.fill (HIST (" deutSecPtRec_from_hypertriton" ), track.pt ());
129+ }
114130 }
115131 if (motherparticle.pdgCode () == AntiHyperHelium4PDG) {
116132 registryMC.fill (HIST (" he3SecPtRec_from_hyperHe4" ), 2 * track.pt ());
@@ -120,10 +136,10 @@ struct he3FromHypertritonMap {
120136 }
121137 }
122138 }
123- PROCESS_SWITCH (he3FromHypertritonMap , processMC, " Process MC" , false );
139+ PROCESS_SWITCH (nucleiFromHypertritonMap , processMC, " Process MC" , false );
124140};
125141
126142WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
127143{
128- return WorkflowSpec{adaptAnalysisTask<he3FromHypertritonMap >(cfgc)};
144+ return WorkflowSpec{adaptAnalysisTask<nucleiFromHypertritonMap >(cfgc)};
129145}
0 commit comments