@@ -130,28 +130,53 @@ class FemtoUniverseParticleHisto
130130 // / \param tempFitVarpTAxis axis object for the pT axis in the pT vs. tempFitVar plots
131131 // / \param tempFitVarAxis axis object for the tempFitVar axis
132132 template <typename T>
133- void init_MC (std::string folderName, std::string /* tempFitVarAxisTitle*/ , T& tempFitVarpTAxis, T& tempFitVarAxis) // o2-linter: disable=name/function-variable
133+ void init_MC (std::string folderName, std::string /* tempFitVarAxisTitle*/ , T& tempFitVarpTAxis, T& tempFitVarAxis, bool isDebug ) // o2-linter: disable=name/function-variable
134134 {
135135 // / Particle-type specific histograms
136136 std::string folderSuffix = static_cast <std::string>(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth ]).c_str ();
137137
138138 mHistogramRegistry ->add ((folderName + folderSuffix + " /hPt_ReconNoFake" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); Entries" , kTH1F , {tempFitVarpTAxis});
139- mHistogramRegistry ->add ((folderName + folderSuffix + " /hPt_Primary" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); Entries" , kTH1F , {tempFitVarpTAxis});
139+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hPDG" ).c_str (), " ; PDG; Entries" , kTH1I , {{6001 , -3000 , 3000 }});
140+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hOrigin_MC" ).c_str (), " ; Origin; Entries" , kTH1I , {{100 , 0 , 100 }});
141+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hNoMCtruthCounter" ).c_str (), " ; Counter; Entries" , kTH1I , {{1 , 0 , 1 }});
140142
141143 if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack ) {
142144 // / Track histograms
143- mHistogramRegistry ->add ((folderName + folderSuffix + " /hPDG" ).c_str (), " ; PDG; Entries" , kTH1I , {{6001 , -3000 , 3000 }});
144- mHistogramRegistry ->add ((folderName + folderSuffix + " /hOrigin_MC" ).c_str (), " ; Origin; Entries" , kTH1I , {{100 , 0 , 100 }});
145- mHistogramRegistry ->add ((folderName + folderSuffix + " /hNoMCtruthCounter" ).c_str (), " ; Counter; Entries" , kTH1I , {{1 , 0 , 1 }});
146- // DCA plots
147- mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Material" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
148- mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Fake" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
149- mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_DaughterLambda" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
150- mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_DaughterSigmaplus" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
151- mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Primary" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
152- mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Daughter" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
153- mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_NoMCTruthOrigin" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
154- mHistogramRegistry ->add ((folderName + folderSuffix + " /hMisidentification" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); Particle; Particle" , kTH3F , {{4 , 0 , 4 }, {4 , 0 , 4 }, tempFitVarpTAxis});
145+ if (isDebug) {
146+ mHistogramRegistry ->add ((folderName + folderSuffix + " /Debug/hPDGmother_Primary" ).c_str (), " ; PDG mother; Entries" , kTH1I , {{6001 , -3000.5 , 3000.5 }});
147+ mHistogramRegistry ->add ((folderName + folderSuffix + " /Debug/hPDGmother_Daughter" ).c_str (), " ; PDG mother; Entries" , kTH1I , {{6001 , -3000.5 , 3000.5 }});
148+ mHistogramRegistry ->add ((folderName + folderSuffix + " /Debug/hPDGmother_Material" ).c_str (), " ; PDG mother; Entries" , kTH1I , {{6001 , -3000.5 , 3000.5 }});
149+ mHistogramRegistry ->add ((folderName + folderSuffix + " /Debug/hPDGmother_WrongCollision" ).c_str (), " ; PDG mother; Entries" , kTH1I , {{6001 , -3000.5 , 3000.5 }});
150+ mHistogramRegistry ->add ((folderName + folderSuffix + " /Debug/hPDGmother_Fake" ).c_str (), " ; PDG mother; Entries" , kTH1I , {{6001 , -3000.5 , 3000.5 }});
151+ mHistogramRegistry ->add ((folderName + folderSuffix + " /Debug/hPDGmother_Else" ).c_str (), " ; PDG mother; Entries" , kTH1I , {{6001 , -3000.5 , 3000.5 }});
152+ mHistogramRegistry ->add ((folderName + folderSuffix + " /Debug/hPDGmother_DaughterLambda" ).c_str (), " ; PDG mother; Entries" , kTH1I , {{12001 , -6000.5 , 6000.5 }});
153+ mHistogramRegistry ->add ((folderName + folderSuffix + " /Debug/hPDGmother_DaughterSigmaplus" ).c_str (), " ; PDG mother; Entries" , kTH1I , {{12001 , -6000.5 , 6000.5 }});
154+
155+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Primary" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
156+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Daughter" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
157+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Material" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
158+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_WrongCollision" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
159+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Fake" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
160+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Else" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
161+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_DaughterLambda" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
162+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_DaughterSigmaplus" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
163+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_NoMCTruthOrigin" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
164+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hMisidentification" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); Particle; Particle" , kTH3F , {{4 , 0 , 4 }, {4 , 0 , 4 }, tempFitVarpTAxis});
165+
166+ } else {
167+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Primary" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
168+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Daughter" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
169+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Material" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
170+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_WrongCollision" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
171+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Fake" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
172+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_Else" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
173+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_NoMCTruthOrigin" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
174+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hMisidentification" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); Particle; Particle" , kTH3F , {{4 , 0 , 4 }, {4 , 0 , 4 }, tempFitVarpTAxis});
175+
176+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_DaughterLambda" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
177+ mHistogramRegistry ->add ((folderName + folderSuffix + " /hDCAxy_DaughterSigmaplus" ).c_str (), " ; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)" , kTH2F , {tempFitVarpTAxis, tempFitVarAxis});
178+ }
179+
155180 } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0 ) {
156181 // / V0 histograms
157182 // / to be implemented
@@ -160,8 +185,6 @@ class FemtoUniverseParticleHisto
160185 // / to be implemented
161186 } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kPhi ) {
162187 // Phi histograms
163- mHistogramRegistry ->add ((folderName + folderSuffix + " /hPDG" ).c_str (), " ; PDG; Entries" , kTH1I , {{6001 , -3000 , 3000 }});
164- mHistogramRegistry ->add ((folderName + folderSuffix + " /hOrigin_MC" ).c_str (), " ; Origin; Entries" , kTH1I , {{7 , 0 , 7 }});
165188
166189 } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kD0 ) {
167190 // D0/D0bar histograms
@@ -221,7 +244,7 @@ class FemtoUniverseParticleHisto
221244 }
222245 if (isMC) {
223246 init_base<o2::aod::femtouniverse_mc_particle::MCType::kTruth >(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis);
224- init_MC (folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis);
247+ init_MC (folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis, isDebug );
225248 }
226249 }
227250 }
@@ -307,7 +330,7 @@ class FemtoUniverseParticleHisto
307330 // / \param part Particle
308331 // / \param mctruthorigin Origin of the associated mc Truth particle
309332 // / \param pdgcode PDG of the associated mc Truth particle associated to the reconstructed particle part
310- template <typename T, typename H>
333+ template <bool isDebug, typename T, typename H>
311334 void fillQA_MC (T const & part, int mctruthorigin, int pdgcode, H const & histFolder) // o2-linter: disable=name/function-variable
312335 {
313336 if (mHistogramRegistry ) {
@@ -319,42 +342,75 @@ class FemtoUniverseParticleHisto
319342 }
320343
321344 if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack ) {
322- // / Track histograms
323- switch (mctruthorigin) {
324- case (o2::aod::femtouniverse_mc_particle::kPrimary ): {
325- if (pdgcode == mPDG ) {
326- mHistogramRegistry ->fill (histFolder + HIST (" _MC/hPt_Primary" ), part.pt ());
327- }
328- mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Primary" ),
329- part.pt (), part.tempFitVar ());
330- break ;
345+ if constexpr (isDebug) {
346+ switch (mctruthorigin) {
347+ case (o2::aod::femtouniverse_mc_particle::kPrimary ):
348+ // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Primary"), part.fdMCParticle().motherPDG());
349+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Primary" ), part.pt (), part.tempFitVar ());
350+ break ;
351+ case (o2::aod::femtouniverse_mc_particle::kDaughter ):
352+ // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Daughter"), part.fdMCParticle().motherPDG());
353+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Daughter" ), part.pt (), part.tempFitVar ());
354+ break ;
355+ case (o2::aod::femtouniverse_mc_particle::kMaterial ):
356+ // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Material"), part.fdMCParticle().motherPDG());
357+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Material" ), part.pt (), part.tempFitVar ());
358+ break ;
359+ case (o2::aod::femtouniverse_mc_particle::kWrongCollision ):
360+ // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_WrongCollision"), part.fdMCParticle().motherPDG());
361+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_WrongCollision" ), part.pt (), part.tempFitVar ());
362+ break ;
363+ case (o2::aod::femtouniverse_mc_particle::kFake ):
364+ // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Fake"), part.fdMCParticle().motherPDG());
365+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Fake" ), part.pt (), part.tempFitVar ());
366+ break ;
367+ case (o2::aod::femtouniverse_mc_particle::kDaughterLambda ):
368+ // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_DaughterLambda"), part.fdMCParticle().motherPDG());
369+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_DaughterLambda" ), part.pt (), part.tempFitVar ());
370+ break ;
371+ case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus ):
372+ // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_DaughterSigmaplus"), part.fdMCParticle().motherPDG());
373+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_DaughterSigmaplus" ), part.pt (), part.tempFitVar ());
374+ break ;
375+ case (o2::aod::femtouniverse_mc_particle::kElse ):
376+ // mHistogramRegistry->fill(histFolder + HIST("_MC/Debug/hPDGmother_Else"), part.fdMCParticle().motherPDG());
377+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Else" ), part.pt (), part.tempFitVar ());
378+ break ;
379+ default :
380+ LOGF (info, " femtodreamparticleMC: not known value for ParticleOriginMCTruth --- %d - please check. Quitting!" , mctruthorigin);
381+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_NoMCTruthOrigin" ), part.pt (), part.tempFitVar ());
382+ }
383+ } else {
384+ switch (mctruthorigin) {
385+ case (o2::aod::femtouniverse_mc_particle::kPrimary ):
386+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Primary" ), part.pt (), part.tempFitVar ());
387+ break ;
388+ case (o2::aod::femtouniverse_mc_particle::kDaughter ):
389+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Daughter" ), part.pt (), part.tempFitVar ());
390+ break ;
391+ case (o2::aod::femtouniverse_mc_particle::kMaterial ):
392+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Material" ), part.pt (), part.tempFitVar ());
393+ break ;
394+ case (o2::aod::femtouniverse_mc_particle::kWrongCollision ):
395+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_WrongCollision" ), part.pt (), part.tempFitVar ());
396+ break ;
397+ case (o2::aod::femtouniverse_mc_particle::kFake ):
398+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Fake" ), part.pt (), part.tempFitVar ());
399+ break ;
400+ case (o2::aod::femtouniverse_mc_particle::kDaughterLambda ):
401+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_DaughterLambda" ), part.pt (), part.tempFitVar ());
402+ break ;
403+ case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus ):
404+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_DaughterSigmaplus" ), part.pt (), part.tempFitVar ());
405+ break ;
406+ case (o2::aod::femtouniverse_mc_particle::kElse ):
407+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Else" ), part.pt (), part.tempFitVar ());
408+ break ;
409+
410+ default :
411+ LOGF (info, " femtodreamparticleMC: not known value for ParticleOriginMCTruth --- %d - please check. Quitting!" , mctruthorigin);
412+ mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_NoMCTruthOrigin" ), part.pt (), part.tempFitVar ());
331413 }
332- case (o2::aod::femtouniverse_mc_particle::kDaughter ):
333- mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Daughter" ),
334- part.pt (), part.tempFitVar ());
335- break ;
336- case (o2::aod::femtouniverse_mc_particle::kMaterial ):
337- mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Material" ),
338- part.pt (), part.tempFitVar ());
339- break ;
340- case (o2::aod::femtouniverse_mc_particle::kFake ):
341- mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_Fake" ),
342- part.pt (), part.tempFitVar ());
343- break ;
344- case (o2::aod::femtouniverse_mc_particle::kDaughterLambda ):
345- mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_DaughterLambda" ),
346- part.pt (), part.tempFitVar ());
347- break ;
348- case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus ):
349- mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_DaughterSigmaplus" ),
350- part.pt (), part.tempFitVar ());
351- break ;
352- case (99 ):
353- mHistogramRegistry ->fill (histFolder + HIST (" _MC/hDCAxy_NoMCTruthOrigin" ),
354- part.pt (), part.tempFitVar ());
355- break ;
356- default :
357- LOG (fatal) << " femtouniverseparticleMC: not known value for ParticleOriginMCTruth - please check. Quitting!" ;
358414 }
359415 } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0 ) {
360416 // / V0 histograms
@@ -427,7 +483,7 @@ class FemtoUniverseParticleHisto
427483 if constexpr (isMC) {
428484 if (part.has_fdMCParticle ()) {
429485 fillQA_base<o2::aod::femtouniverse_mc_particle::MCType::kTruth >(part.fdMCParticle (), histFolder);
430- fillQA_MC (part, (part.fdMCParticle ()).partOriginMCTruth (), (part.fdMCParticle ()).pdgMCTruth (), histFolder);
486+ fillQA_MC<isDebug> (part, (part.fdMCParticle ()).partOriginMCTruth (), (part.fdMCParticle ()).pdgMCTruth (), histFolder);
431487 } else {
432488 mHistogramRegistry ->fill (histFolder + HIST (" _MC/hNoMCtruthCounter" ), 0 );
433489 }
0 commit comments