@@ -367,18 +367,21 @@ class FemtoDreamContainer
367367 if constexpr (isMC) {
368368 if constexpr (isHF) {
369369 // calculate the femto observable and the mT with MC truth information
370- if constexpr (mFemtoObs == femtoDreamContainer::Observable::kstar) {
371- femtoObsMC = FemtoDreamMath::getkstar (part1.fdMCParticle (), mMassOne , part2, mMassTwo );
372- }
373- const float mTMC = FemtoDreamMath::getmT (part1.fdMCParticle (), mMassOne , part2, mMassTwo );
374-
375- if (std::abs (part1.fdMCParticle ().pdgMCTruth ()) == mPDGOne ) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates
376- setPair_base<o2::aod::femtodreamMCparticle::MCType::kTruth >(femtoObsMC, mTMC , part1.fdMCParticle (), part2, mult, multPercentile, use4dplots, extendedplots);
377- setPair_MC (femtoObsMC, femtoObs, mT , mult, part1.fdMCParticle ().partOriginMCTruth (), part2.flagMc (), smearingByOrigin);
370+ if (part1.has_fdMCParticle ()) {
371+ if constexpr (mFemtoObs == femtoDreamContainer::Observable::kstar) {
372+ femtoObsMC = FemtoDreamMath::getkstar (part1.fdMCParticle (), mMassOne , part2, mMassTwo );
373+ }
374+ const float mTMC = FemtoDreamMath::getmT (part1.fdMCParticle (), mMassOne , part2, mMassTwo );
375+
376+ if (std::abs (part1.fdMCParticle ().pdgMCTruth ()) == mPDGOne ) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates
377+ setPair_base<o2::aod::femtodreamMCparticle::MCType::kTruth >(femtoObsMC, mTMC , part1.fdMCParticle (), part2, mult, multPercentile, use4dplots, extendedplots);
378+ setPair_MC (femtoObsMC, femtoObs, mT , mult, part1.fdMCParticle ().partOriginMCTruth (), part2.flagMc (), smearingByOrigin);
379+ } else {
380+ mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (o2::aod::femtodreamMCparticle::MCTypeName[o2::aod::femtodreamMCparticle::MCType::kTruth ]) + HIST (" /hFakePairsCounter" ), 0 );
381+ }
378382 } else {
379- mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (o2::aod::femtodreamMCparticle::MCTypeName[o2::aod::femtodreamMCparticle::MCType::kTruth ]) + HIST (" /hFakePairsCounter " ), 0 );
383+ mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (o2::aod::femtodreamMCparticle::MCTypeName[o2::aod::femtodreamMCparticle::MCType::kTruth ]) + HIST (" /hNoMCtruthPairsCounter " ), 0 );
380384 }
381-
382385 } else if (part1.has_fdMCParticle () && part2.has_fdMCParticle ()) {
383386 // calculate the femto observable and the mT with MC truth information
384387 if constexpr (mFemtoObs == femtoDreamContainer::Observable::kstar) {
0 commit comments