@@ -87,6 +87,7 @@ struct v0ptinvmassplots {
8787 AxisSpec LambdaMassAxis = {nBins, 1 .085f , 1 .145f , " #it{M} p^{+}#pi^{-} [GeV/#it{c}^{2}]" };
8888 AxisSpec AntiLambdaMassAxis = {nBins, 1 .085f , 1 .145f , " #it{M} p^{-}#pi^{+} [GeV/#it{c}^{2}]" };
8989 AxisSpec ptAxis = {nBins, 0 .0f , 10 .0f , " #it{p}_{T} (GeV/#it{c})" };
90+ AxisSpec GenptAxis = {20 , 0 .0f , 10 .0f , " #it{p}_{T} (GeV/#it{c})" };
9091
9192 rPtAnalysis.add (" hV0PtAll" , " hV0PtAll" , {HistType::kTH1F , {{nBins, 0 .0f , 10 .0f }}});
9293
@@ -107,6 +108,9 @@ struct v0ptinvmassplots {
107108 rPtAnalysis.add (" hMassK0ShortAll" , " hMassK0ShortAll" , {HistType::kTH1F , {K0ShortMassAxis}});
108109 rPtAnalysis.add (" hK0ShortPtSpectrumBeforeCuts" , " hK0ShortPtSpectrumBeforeCuts" , {HistType::kTH1F , {ptAxis}});
109110 rPtAnalysis.add (" hMassK0ShortAllAfterCuts" , " hMassK0ShortAllAfterCuts" , {HistType::kTH1F , {K0ShortMassAxis}});
111+ rPtAnalysis.add (" hK0ShGeneratedPtSpectrum" , " hK0ShGeneratedPtSpectrum" , {HistType::kTH1F , {GenptAxis}});
112+ rPtAnalysis.add (" hLambdaGeneratedPtSpectrum" , " hLambdaGeneratedPtSpectrum" , {HistType::kTH1F , {GenptAxis}});
113+ rPtAnalysis.add (" hAntilambdaGeneratedPtSpectrum" , " hAntilambdaGeneratedPtSpectrum" , {HistType::kTH1F , {GenptAxis}});
110114 for (int i = 0 ; i < 20 ; i++) {
111115 pthistos::KaonPt[i] = rKaonshMassPlots_per_PtBin.add <TH1 >(fmt::format (" hPt_from_{0}_to_{1}" , pthistos::kaonptbins[i], pthistos::kaonptbins[i + 1 ]).data (), fmt::format (" hPt from {0} to {1}" , pthistos::kaonptbins[i], pthistos::kaonptbins[i + 1 ]).data (), {HistType::kTH1D , {{K0ShortMassAxis}}});
112116 }
@@ -156,6 +160,25 @@ struct v0ptinvmassplots {
156160 // Defining the type of the daughter tracks
157161 using DaughterTracks = soa::Join<aod::TracksIU, aod::TracksExtra, aod::McTrackLabels>;
158162
163+ // This is the Process for the MC Generated Data
164+ void GenMCprocess (const soa::SmallGroups<soa::Join<o2::aod::Collisions, o2::aod::McCollisionLabels, o2::aod::EvSels>>& collisions,
165+ aod::McParticles const & mcParticles)
166+ {
167+ for (const auto & mcParticle : mcParticles) {
168+ if (mcParticle.pdgCode () == 310 ) // kzero matched
169+ {
170+ rPtAnalysis.fill (HIST (" hK0ShGeneratedPtSpectrum" ), mcParticle.pt ());
171+ }
172+ if (mcParticle.pdgCode () == 3122 ) // lambda matched
173+ {
174+ rPtAnalysis.fill (HIST (" hLambdaGeneratedPtSpectrum" ), mcParticle.pt ());
175+ }
176+ if (mcParticle.pdgCode () == -3122 ) // antilambda matched
177+ {
178+ rPtAnalysis.fill (HIST (" hAntilambdaGeneratedPtSpectrum" ), mcParticle.pt ());
179+ }
180+ }
181+ }
159182 // This is the Process for the MC reconstructed Data
160183 void RecMCprocess (soa::Filtered<soa::Join<aod::Collisions, aod::EvSels>>::iterator const &,
161184 soa::Join<aod::V0Datas, aod::McV0Labels> const & V0s,
@@ -320,7 +343,8 @@ struct v0ptinvmassplots {
320343 }
321344 }
322345 }
323- PROCESS_SWITCH (v0ptinvmassplots, RecMCprocess, " Process Run 3 MC:Reconstructed" , false );
346+ PROCESS_SWITCH (v0ptinvmassplots, GenMCprocess, " Process Run 3 MC Generated" , false );
347+ PROCESS_SWITCH (v0ptinvmassplots, RecMCprocess, " Process Run 3 MC" , false );
324348 PROCESS_SWITCH (v0ptinvmassplots, Dataprocess, " Process Run 3 Data," , true );
325349};
326350
0 commit comments