@@ -267,6 +267,7 @@ struct alice3decayFinder {
267267 dmeson.mcTruth = 2 ; // D0bar
268268 }
269269 }
270+
270271 return true ;
271272 }
272273
@@ -362,7 +363,9 @@ struct alice3decayFinder {
362363
363364 if (doprocessFindDmesons) {
364365 histos.add (" h2dGenD" , " h2dGenD" , kTH2F , {axisPt, axisEta});
366+ histos.add (" h2dGenD_KpiOnly" , " h2dGenD_KpiOnly" , kTH2F , {axisPt, axisEta});
365367 histos.add (" h2dGenDbar" , " h2dGenDbar" , kTH2F , {axisPt, axisEta});
368+ histos.add (" h2dGenDbar_KpiOnly" , " h2dGenDbar_KpiOnly" , kTH2F , {axisPt, axisEta});
366369 histos.add (" h3dRecD" , " h3dRecD" , kTH3F , {axisPt, axisEta, axisDMass});
367370 histos.add (" h3dRecDSig" , " h3dRecDSig" , kTH3F , {axisPt, axisEta, axisDMass});
368371 histos.add (" h3dRecDRefl" , " h3dRecDRefl" , kTH3F , {axisPt, axisEta, axisDMass});
@@ -471,11 +474,35 @@ struct alice3decayFinder {
471474 if (doprocessFindDmesons) {
472475 for (auto const & mcParticle : trueD) {
473476 histos.fill (HIST (" h2dGenD" ), mcParticle.pt (), mcParticle.eta ());
474- histos.fill (HIST (" hDGenForEfficiency" ), mcParticle.pt (), mcParticle.y ()); // in common for D and Dbar
477+ auto daughters = mcParticle.template daughters_as <aod::McParticles>();
478+ if (daughters.size () != 2 )
479+ continue ;
480+ int daugID[2 ], daugPDG[2 ], i = 0 ;
481+ for (const auto & dau : daughters) {
482+ daugID[i] = dau.globalIndex ();
483+ daugPDG[i] = dau.pdgCode ();
484+ i++;
485+ }
486+ if ((std::fabs (daugPDG[0 ]) == 321 && std::fabs (daugPDG[1 ]) == 211 ) || (std::fabs (daugPDG[0 ]) == 211 && std::fabs (daugPDG[1 ]) == 321 )) {
487+ histos.fill (HIST (" h2dGenD_KpiOnly" ), mcParticle.pt (), mcParticle.eta ());
488+ histos.fill (HIST (" hDGenForEfficiency" ), mcParticle.pt (), mcParticle.y ()); // in common for D and Dbar
489+ }
475490 }
476491 for (auto const & mcParticle : trueDbar) {
477492 histos.fill (HIST (" h2dGenDbar" ), mcParticle.pt (), mcParticle.eta ());
478- histos.fill (HIST (" hDGenForEfficiency" ), mcParticle.pt (), mcParticle.y ()); // in common for D and Dbar
493+ auto daughters = mcParticle.template daughters_as <aod::McParticles>();
494+ if (daughters.size () != 2 )
495+ continue ;
496+ int daugID[2 ], daugPDG[2 ], i = 0 ;
497+ for (const auto & dau : daughters) {
498+ daugID[i] = dau.globalIndex ();
499+ daugPDG[i] = dau.pdgCode ();
500+ i++;
501+ }
502+ if ((std::fabs (daugPDG[0 ]) == 321 && std::fabs (daugPDG[1 ]) == 211 ) || (std::fabs (daugPDG[0 ]) == 211 && std::fabs (daugPDG[1 ]) == 321 )) {
503+ histos.fill (HIST (" h2dGenDbar_KpiOnly" ), mcParticle.pt (), mcParticle.eta ());
504+ histos.fill (HIST (" hDGenForEfficiency" ), mcParticle.pt (), mcParticle.y ()); // in common for D and Dbar
505+ }
479506 }
480507 }
481508 if (doprocessFindLcBaryons) {
@@ -509,6 +536,7 @@ struct alice3decayFinder {
509536 // D0 mesons
510537 for (auto const & posTrackRow : tracksPiPlusFromDgrouped) {
511538 for (auto const & negTrackRow : tracksKaMinusFromDgrouped) {
539+
512540 if (mcSameMotherCheck && !checkSameMother (posTrackRow, negTrackRow))
513541 continue ;
514542 if (!buildDecayCandidateTwoBody (posTrackRow, negTrackRow, o2::constants::physics::MassPionCharged, o2::constants::physics::MassKaonCharged, mcParticles))
@@ -651,9 +679,11 @@ struct alice3decayFinder {
651679 mcTruthOutcome (dmeson.mcTruth );
652680 }
653681 }
682+
654683 // D0bar mesons
655684 for (auto const & posTrackRow : tracksKaPlusFromDgrouped) {
656685 for (auto const & negTrackRow : tracksPiMinusFromDgrouped) {
686+
657687 if (mcSameMotherCheck && !checkSameMother (posTrackRow, negTrackRow))
658688 continue ;
659689 if (!buildDecayCandidateTwoBody (posTrackRow, negTrackRow, o2::constants::physics::MassKaonCharged, o2::constants::physics::MassPionCharged, mcParticles))
0 commit comments