@@ -650,15 +650,27 @@ struct HfCandidateCreatorDstarExpressions {
650650 if (indexRecDstar > -1 ) {
651651 // D*± → D0(bar) π± π0
652652 auto motherParticleDstar = mcParticles.rawIteratorAt (indexRecDstar);
653- if (RecoDecay::isMatchedMCGen (mcParticles, motherParticleDstar, Pdg::kDStar , std::array{+kPiPlus , +kPiPlus , -kKPlus , +kPi0 }, true , &signDstar, 2 )) {
654- flagDstar = signDstar * (BIT (aod::hf_cand_dstar::DecayType::DstarToD0PiPi0));
653+ if (signDstar > 0 ) {
654+ if (RecoDecay::isMatchedMCGen (mcParticles, motherParticleDstar, Pdg::kDStar , std::array{+kPiPlus , +kPiPlus , -kKPlus , +kPi0 }, false , &signDstar, 2 )) {
655+ flagDstar = signDstar * (BIT (aod::hf_cand_dstar::DecayType::DstarToD0PiPi0));
656+ }
657+ } else {
658+ if (RecoDecay::isMatchedMCGen (mcParticles, motherParticleDstar, -Pdg::kDStar , std::array{-kPiPlus , -kPiPlus , +kKPlus , +kPi0 }, false , &signDstar, 2 )) {
659+ flagDstar = signDstar * (BIT (aod::hf_cand_dstar::DecayType::DstarToD0PiPi0));
660+ }
655661 }
656662 }
657663 if (indexRecD0 > -1 ) {
658664 // D0(bar) → π± K∓ π0
659665 auto motherParticleD0 = mcParticles.rawIteratorAt (indexRecD0);
660- if (RecoDecay::isMatchedMCGen (mcParticles, motherParticleD0, Pdg::kD0 , std::array{+kPiPlus , -kKPlus , +kPi0 }, true , &signD0)) {
661- flagD0 = signD0 * (BIT (aod::hf_cand_dstar::DecayType::D0ToPiKPi0));
666+ if (signD0 > 0 ) {
667+ if (RecoDecay::isMatchedMCGen (mcParticles, motherParticleD0, Pdg::kD0 , std::array{+kPiPlus , -kKPlus , +kPi0 }, false , &signD0)) {
668+ flagD0 = signD0 * (BIT (aod::hf_cand_dstar::DecayType::D0ToPiKPi0));
669+ }
670+ } else {
671+ if (RecoDecay::isMatchedMCGen (mcParticles, motherParticleD0, -Pdg::kD0 , std::array{-kPiPlus , +kKPlus , +kPi0 }, false , &signD0)) {
672+ flagD0 = signD0 * (BIT (aod::hf_cand_dstar::DecayType::D0ToPiKPi0));
673+ }
662674 }
663675 }
664676 }
0 commit comments