@@ -1665,6 +1665,39 @@ struct HfDataCreatorCharmHadPiReduced {
16651665 tables.rowHfLbMcGenReduced (flag, ptParticle, yParticle, etaParticle,
16661666 ptProngs[0 ], yProngs[0 ], etaProngs[0 ],
16671667 ptProngs[1 ], yProngs[1 ], etaProngs[1 ], hfRejMap, centFT0C, centFT0M);
1668+ } else if constexpr (decayChannel == DecayChannel::B0ToDstarPi) {
1669+ // B0 → D* π+
1670+ if (RecoDecay::isMatchedMCGen<true >(particlesMc, particle, Pdg::kB0 , std::array{+static_cast <int >(Pdg::kDStar ), -kPiPlus }, true )) {
1671+ // Match D- -> π- K+ π-
1672+ auto candCMC = particlesMc.rawIteratorAt (particle.daughtersIds ().front ());
1673+ // Printf("Checking D- -> π- K+ π-");
1674+ if (RecoDecay::isMatchedMCGen (particlesMc, candCMC, +static_cast <int >(Pdg::kDStar ), std::array{+kPiPlus , -kKPlus , +kPiPlus }, true , &sign, 3 )) {
1675+ flag = sign * BIT (hf_cand_b0::DecayType::B0ToDstarPi);
1676+ }
1677+ }
1678+
1679+ // save information for B0 task
1680+ if (!TESTBIT (std::abs (flag), hf_cand_b0::DecayType::B0ToDstarPi)) {
1681+ continue ;
1682+ }
1683+
1684+ auto ptParticle = particle.pt ();
1685+ auto yParticle = RecoDecay::y (particle.pVector (), massB);
1686+ auto etaParticle = particle.eta ();
1687+
1688+ std::array<float , 2 > ptProngs;
1689+ std::array<float , 2 > yProngs;
1690+ std::array<float , 2 > etaProngs;
1691+ int counter = 0 ;
1692+ for (const auto & daught : particle.daughters_as <aod::McParticles>()) {
1693+ ptProngs[counter] = daught.pt ();
1694+ etaProngs[counter] = daught.eta ();
1695+ yProngs[counter] = RecoDecay::y (daught.pVector (), pdg->Mass (daught.pdgCode ()));
1696+ counter++;
1697+ }
1698+ tables.rowHfB0McGenReduced (flag, -1 /* channel*/ , ptParticle, yParticle, etaParticle,
1699+ ptProngs[0 ], yProngs[0 ], etaProngs[0 ],
1700+ ptProngs[1 ], yProngs[1 ], etaProngs[1 ], hfRejMap, centFT0C, centFT0M);
16681701 }
16691702 } // gen
16701703 }
0 commit comments