@@ -127,7 +127,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
127127
128128 template <typename T, typename U>
129129 void fillTablesCandidate (const T& candidate, const U& prong0, const U& prong1, const U& prongSoftPi, int candFlag, double invMass,
130- double y, int8_t flagMc, int8_t origin, const std::vector<float >& mlScores)
130+ double y, int8_t flagMc, int8_t flagMcD0, int8_t origin, int8_t nTracksDecayed, double ptBhad, int pdgBhad , const std::vector<float >& mlScores)
131131 {
132132 rowsCommon.fillTablesCandidate (candidate, invMass, y);
133133 if (fillCandidatePar) {
@@ -196,7 +196,11 @@ struct HfDerivedDataCreatorDstarToD0Pi {
196196 if (fillCandidateMc) {
197197 rowCandidateMc (
198198 flagMc,
199- origin);
199+ flagMcD0,
200+ origin,
201+ ptBhad,
202+ pdgBhad,
203+ nTracksDecayed);
200204 }
201205 }
202206
@@ -242,7 +246,9 @@ struct HfDerivedDataCreatorDstarToD0Pi {
242246 if constexpr (isMc) {
243247 reserveTable (rowCandidateMc, fillCandidateMc, sizeTableCand);
244248 }
245- int8_t flagMcRec = 0 , origin = 0 ;
249+ int8_t flagMcRec = 0 , flagMcRecD0 = 0 , origin = 0 , nTracksDecayed = 0 ;
250+ double ptBhadMotherPart = 0 ;
251+ int pdgBhadMotherPart = 0 ;
246252 for (const auto & candidate : candidatesThisColl) {
247253 if constexpr (isMl) {
248254 if (!TESTBIT (candidate.isSelDstarToD0Pi (), aod::SelectionStep::RecoMl)) {
@@ -251,7 +257,11 @@ struct HfDerivedDataCreatorDstarToD0Pi {
251257 }
252258 if constexpr (isMc) {
253259 flagMcRec = candidate.flagMcMatchRec ();
260+ flagMcRecD0 = candidate.flagMcMatchRecD0 ();
254261 origin = candidate.originMcRec ();
262+ nTracksDecayed = candidate.nTracksDecayed ();
263+ ptBhadMotherPart = candidate.ptBhadMotherPart ();
264+ pdgBhadMotherPart = candidate.pdgBhadMotherPart ();
255265 if constexpr (onlyBkg) {
256266 if (std::abs (flagMcRec) == hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi) {
257267 continue ;
@@ -279,7 +289,12 @@ struct HfDerivedDataCreatorDstarToD0Pi {
279289 if constexpr (isMl) {
280290 std::copy (candidate.mlProbDstarToD0Pi ().begin (), candidate.mlProbDstarToD0Pi ().end (), std::back_inserter (mlScoresDstarToD0Pi));
281291 }
282- fillTablesCandidate (candidate, prong0, prong1, prongSoftPi, isD0 ? 0 : 1 , y, massDstar, flagMcRec, origin, mlScoresDstarToD0Pi);
292+ if (candidate.signSoftPi () > 0 ){
293+ fillTablesCandidate (candidate, prong0, prong1, prongSoftPi, 0 , massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi);
294+ } else {
295+ fillTablesCandidate (candidate, prong1, prong0, prongSoftPi, 1 , massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi);
296+ }
297+
283298 }
284299 }
285300 }
0 commit comments