@@ -91,8 +91,7 @@ struct HfDerivedDataCreatorBplusToD0Pi {
9191 using SelectedCandidatesMcMl = soa::Filtered<soa::Join<aod::HfCandBplus, aod::HfCandBplusMcRec, aod::HfSelBplusToD0Pi, aod::HfMlBplusToD0Pi>>;
9292 using MatchedGenCandidatesMc = soa::Filtered<soa::Join<aod::McParticles, aod::HfCandBplusMcGen>>;
9393 using TypeMcCollisions = soa::Join<aod::McCollisions, aod::McCentFT0Ms>;
94- using THfCandDaughters = aod::HfCand2ProngWPid;
95- using THfCandDaughtersMl = soa::Join<THfCandDaughters, aod::HfMlD0>;
94+ using THfCandDaughtersMl = soa::Join<aod::HfCand2ProngWPid, aod::HfMlD0>;
9695
9796 Filter filterSelectCandidates = aod::hf_sel_candidate_bplus::isSelBplusToD0Pi >= 1 ;
9897 Filter filterMcGenMatching = nabs(aod::hf_cand_bplus::flagMcMatchGen) == static_cast <int8_t >(BIT(aod::hf_cand_bplus::DecayType::BplusToD0Pi));
@@ -300,14 +299,14 @@ struct HfDerivedDataCreatorBplusToD0Pi {
300299 float massBplusToD0Pi = hfHelper.invMassBplusToD0Pi (candidate);
301300 float mlScoreBplusToD0Pi{-1 .f };
302301 std::vector<float > mlScoresD0;
303- bool isD0 = prongBachelor.sign () < 0 ; // D0 or D0bar
302+ bool isD0 = prongBachelor.sign () < 0 ;
303+ if (isD0) { // is D0
304+ std::copy (prongCharm.mlProbD0 ().begin (), prongCharm.mlProbD0 ().end (), std::back_inserter (mlScoresD0));
305+ } else { // is D0bar
306+ std::copy (prongCharm.mlProbD0bar ().begin (), prongCharm.mlProbD0bar ().end (), std::back_inserter (mlScoresD0));
307+ }
304308 if constexpr (isMl) {
305309 mlScoreBplusToD0Pi = candidate.mlProbBplusToD0Pi ();
306- if (isD0) {
307- std::copy (prongCharm.mlProbD0 ().begin (), prongCharm.mlProbD0 ().end (), std::back_inserter (mlScoresD0));
308- } else {
309- std::copy (prongCharm.mlProbD0bar ().begin (), prongCharm.mlProbD0bar ().end (), std::back_inserter (mlScoresD0));
310- }
311310 }
312311 // flag = 0 for D0 pi-, flag = 1 for D0bar pi+
313312 fillTablesCandidate (candidate, prongCharm, prongBachelor, isD0 ? 0 : 1 , massBplusToD0Pi, ct, y, flagMcRec, origin, mlScoreBplusToD0Pi, mlScoresD0);
@@ -317,7 +316,7 @@ struct HfDerivedDataCreatorBplusToD0Pi {
317316
318317 void processData (CollisionsWCentMult const & collisions,
319318 SelectedCandidates const &,
320- THfCandDaughters const & candidatesDaughters,
319+ THfCandDaughtersMl const & candidatesDaughters,
321320 TracksWPid const & tracks,
322321 aod::BCs const & bcs)
323322 {
@@ -329,7 +328,7 @@ struct HfDerivedDataCreatorBplusToD0Pi {
329328 SelectedCandidatesMc const &,
330329 TypeMcCollisions const & mcCollisions,
331330 MatchedGenCandidatesMc const & mcParticles,
332- THfCandDaughters const & candidatesDaughters,
331+ THfCandDaughtersMl const & candidatesDaughters,
333332 TracksWPid const & tracks,
334333 aod::BCs const & bcs)
335334 {
@@ -343,7 +342,7 @@ struct HfDerivedDataCreatorBplusToD0Pi {
343342 SelectedCandidatesMc const &,
344343 TypeMcCollisions const & mcCollisions,
345344 MatchedGenCandidatesMc const & mcParticles,
346- THfCandDaughters const & candidatesDaughters,
345+ THfCandDaughtersMl const & candidatesDaughters,
347346 TracksWPid const & tracks,
348347 aod::BCs const & bcs)
349348 {
@@ -357,7 +356,7 @@ struct HfDerivedDataCreatorBplusToD0Pi {
357356 SelectedCandidatesMc const &,
358357 TypeMcCollisions const & mcCollisions,
359358 MatchedGenCandidatesMc const & mcParticles,
360- THfCandDaughters const & candidatesDaughters,
359+ THfCandDaughtersMl const & candidatesDaughters,
361360 TracksWPid const & tracks,
362361 aod::BCs const & bcs)
363362 {
0 commit comments