@@ -120,7 +120,8 @@ enum DecayChannel { DplusToPiKPi = 0,
120120 LcToPiKP,
121121 XicToPKPi,
122122 XicToPiKP,
123- Xic0ToXiPi
123+ Xic0ToXiPi,
124+ DstarToD0Pi
124125};
125126
126127enum RunMode {
@@ -182,6 +183,7 @@ struct HfTaskFlowCharmHadrons {
182183 using CandXic0Data = soa::Filtered<soa::Join<aod::HfCandToXiPiKf, aod::HfSelToXiPiKf>>;
183184 using CandXic0DataWMl = soa::Filtered<soa::Join<aod::HfCandToXiPiKf, aod::HfSelToXiPiKf, aod::HfMlToXiPi>>;
184185 using CandD0DataWMl = soa::Filtered<soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfMlD0>>;
186+ using CandDstarDataWMl = soa::Filtered<soa::Join<aod::HfCandDstars, aod::HfSelDstarToD0Pi, aod::HfMlDstarToD0Pi>>;
185187 using CollsWithSPQvecs = soa::Join<aod::Collisions, aod::EvSels, aod::PVMults, aod::QvectorFT0Cs, aod::QvectorFT0As, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::QvectorBPoss, aod::QvectorBNegs, aod::QvectorBTots, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFT0CVariant2s>;
186188 using CollsWithEsEQvecs = soa::Join<aod::Collisions, aod::EvSels, aod::PVMults, aod::EseQvecPercs, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFT0CVariant2s>;
187189 using CollsWithSPEsEQvecs = soa::Join<aod::Collisions, aod::EvSels, aod::PVMults, aod::EseQvecPercs, aod::QvectorFT0Cs, aod::QvectorFT0As, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::QvectorBPoss, aod::QvectorBNegs, aod::QvectorBTots, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFT0CVariant2s>;
@@ -190,6 +192,7 @@ struct HfTaskFlowCharmHadrons {
190192 Filter filterSelectDsCandidates = aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlag || aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlag;
191193 Filter filterSelectDplusCandidates = aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlag;
192194 Filter filterSelectD0Candidates = aod::hf_sel_candidate_d0::isSelD0 >= selectionFlag || aod::hf_sel_candidate_d0::isSelD0bar >= selectionFlag;
195+ Filter filterSelectDstarCandidates = aod::hf_sel_candidate_dstar::isSelDstarToD0Pi == true ;
193196 Filter filterSelectLcCandidates = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlag || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlag;
194197 Filter filterSelectXicCandidates = aod::hf_sel_candidate_xic::isSelXicToPKPi >= selectionFlag || aod::hf_sel_candidate_xic::isSelXicToPiKP >= selectionFlag;
195198 Filter filterSelectXic0Candidates = aod::hf_sel_toxipi::resultSelections == true ;
@@ -198,6 +201,7 @@ struct HfTaskFlowCharmHadrons {
198201 Partition<CandDsDataWMl> selectedDsToPiKKWMl = aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlag;
199202 Partition<CandD0DataWMl> selectedD0ToPiKWMl = aod::hf_sel_candidate_d0::isSelD0 >= selectionFlag;
200203 Partition<CandD0DataWMl> selectedD0ToKPiWMl = aod::hf_sel_candidate_d0::isSelD0bar >= selectionFlag;
204+ Partition<CandDstarDataWMl> selectedDstarToD0PiWMl = aod::hf_sel_candidate_dstar::isSelDstarToD0Pi == true ;
201205 Partition<CandLcDataWMl> selectedLcToPKPiWMl = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlag;
202206 Partition<CandLcDataWMl> selectedLcToPiKPWMl = aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlag;
203207 Partition<CandXicDataWMl> selectedXicToPKPiWMl = aod::hf_sel_candidate_xic::isSelXicToPKPi >= selectionFlag;
@@ -418,8 +422,10 @@ struct HfTaskFlowCharmHadrons {
418422 addProngIfInSubevent (cand.pxProng0 (), cand.pyProng0 (), cand.pzProng0 ());
419423 addProngIfInSubevent (cand.pxProng1 (), cand.pyProng1 (), cand.pzProng1 ());
420424
421- // 3-prong channels
422- if constexpr (Channel != DecayChannel::D0ToPiK && Channel != DecayChannel::D0ToKPi) {
425+ if constexpr (Channel == DecayChannel::DstarToD0Pi) {
426+ addProngIfInSubevent (cand.pxSoftPi (), cand.pySoftPi (), cand.pzSoftPi ());
427+ } else if constexpr (Channel != DecayChannel::D0ToPiK && Channel != DecayChannel::D0ToKPi) {
428+ // Other 3-prong channels
423429 addProngIfInSubevent (cand.pxProng2 (), cand.pyProng2 (), cand.pzProng2 ());
424430 }
425431 }
@@ -690,6 +696,13 @@ struct HfTaskFlowCharmHadrons {
690696 default :
691697 break ;
692698 }
699+ } else if constexpr (std::is_same_v<T1 , CandDstarDataWMl>) {
700+ // Use the soft-pion charge to select the D0 or D0bar mass hypothesis.
701+ signCand = candidate.signSoftPi ();
702+ massCand = signCand > 0 ? candidate.invMassDstar () - candidate.invMassD0 () : candidate.invMassAntiDstar () - candidate.invMassD0Bar ();
703+ for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
704+ outputMl[iclass] = candidate.mlProbDstarToD0Pi ()[classMl->at (iclass)];
705+ }
693706 } else if constexpr (std::is_same_v<T1 , CandLcDataWMl>) {
694707 switch (Channel) {
695708 case DecayChannel::LcToPKPi:
@@ -947,6 +960,15 @@ struct HfTaskFlowCharmHadrons {
947960 }
948961 PROCESS_SWITCH (HfTaskFlowCharmHadrons, processD0SPEsEMl, " Process D0 candidates with ML for SP and EsE information" , false );
949962
963+ // Dstar with ML
964+ void processDstarMl (CollsWithSPQvecs::iterator const & collision,
965+ CandDstarDataWMl const & candidatesDstar,
966+ TracksWithExtra const & tracks)
967+ {
968+ runFlowAnalysis<RunMode::kSP , DecayChannel::DstarToD0Pi>(collision, candidatesDstar, tracks);
969+ }
970+ PROCESS_SWITCH (HfTaskFlowCharmHadrons, processDstarMl, " Process Dstar candidates with ML" , false );
971+
950972 // Lc with ML
951973 void processLcMl (CollsWithSPQvecs::iterator const & collision,
952974 CandLcDataWMl const & /* candidatesLc*/ ,
0 commit comments