Skip to content

Commit cf15f54

Browse files
[PWGHF/D2H] fixing B mother of dstar particle in MC Rec process function (#16455)
1 parent 1c7b73f commit cf15f54

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

PWGHF/D2H/Tasks/taskDstarToD0Pi.cxx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,11 @@ struct HfTaskDstarToD0Pi {
534534
/// @tparam T1 type of the candidate table
535535
/// @tparam applyMl a boolean to apply ML or not
536536
/// @param candsMcRecSel reconstructed candidates with selection flag
537-
/// @param rowsMcPartilces generated particles table
537+
// /// @param rowsMcPartilces generated particles table
538538
template <bool ApplyMl, typename T1>
539-
void runMcRecTaskDstar(T1 const& candsMcRecSel, CandDstarMcGen const& rowsMcPartilces)
539+
void runMcRecTaskDstar(T1 const& candsMcRecSel /*, CandDstarMcGen const& rowsMcPartilces*/)
540540
{
541-
int8_t signDstar = 0;
541+
// int8_t signDstar = 0;
542542
// MC at Reconstruction level
543543
for (const auto& candDstarMcRec : candsMcRecSel) {
544544
auto ptDstarRecSig = candDstarMcRec.pt();
@@ -551,10 +551,11 @@ struct HfTaskDstarToD0Pi {
551551
auto nPVContributors = collision.numContrib(); // number of PV contributors
552552
if (std::abs(candDstarMcRec.flagMcMatchRec()) == hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi) { // if MC matching is successful at Reconstruction Level
553553
// get MC Mother particle
554-
auto prong0 = candDstarMcRec.template prong0_as<aod::TracksWMc>();
555-
auto indexMother = RecoDecay::getMother(rowsMcPartilces, prong0.template mcParticle_as<CandDstarMcGen>(), o2::constants::physics::Pdg::kDStar, true, &signDstar, 2);
556-
auto particleMother = rowsMcPartilces.rawIteratorAt(indexMother); // What is difference between rawIterator() or iteratorAt() methods?
557-
auto ptMother = particleMother.pt();
554+
// auto prong0 = candDstarMcRec.template prong0_as<aod::TracksWMc>();
555+
// auto indexMother = RecoDecay::getMother(rowsMcPartilces, prong0.template mcParticle_as<CandDstarMcGen>(), o2::constants::physics::Pdg::kDStar, true, &signDstar, 2);
556+
// auto particleMother = rowsMcPartilces.rawIteratorAt(indexMother); // What is difference between rawIterator() or iteratorAt() methods?
557+
// auto ptMother = particleMother.pt();
558+
auto ptMother = candDstarMcRec.ptBhadMotherPart();
558559
int const pdgBhadMother = candDstarMcRec.pdgBhadMotherPart();
559560
// For unknown reasons there are charm hadrons coming directly from beauty diquarks without an intermediate B-hadron which have an unreasonable correlation between the pT of the charm hadron and the beauty mother. We also remove charm hadrons from quarkonia.
560561
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::NonPrompt && (pdgBhadMother == 5101 || pdgBhadMother == 5103 || pdgBhadMother == 5201 || pdgBhadMother == 5203 || pdgBhadMother == 5301 || pdgBhadMother == 5303 || pdgBhadMother == 5401 || pdgBhadMother == 5403 || pdgBhadMother == 5503 || pdgBhadMother == 553 || pdgBhadMother == 555 || pdgBhadMother == 557)) { // o2-linter: disable=pdg/explicit-code, magic-number (constants not in the PDG header)
@@ -876,7 +877,7 @@ struct HfTaskDstarToD0Pi {
876877
aod::TracksWMc const&)
877878
{
878879
rowsSelectedCandDstarMcRec.bindExternalIndices(&collisions);
879-
runMcRecTaskDstar<false, Partition<CandDstarWSelFlagMcRec>>(rowsSelectedCandDstarMcRec, rowsMcPartilces);
880+
runMcRecTaskDstar<false, Partition<CandDstarWSelFlagMcRec>>(rowsSelectedCandDstarMcRec /*, rowsMcPartilces*/);
880881
runMcGenTaskDstar(collisions, rowsMcPartilces);
881882
}
882883
PROCESS_SWITCH(HfTaskDstarToD0Pi, processMcWoMl, "Process MC Data without ML", false);
@@ -887,7 +888,7 @@ struct HfTaskDstarToD0Pi {
887888
aod::TracksWMc const&)
888889
{
889890
rowsSelectedCandDstarMcRecWMl.bindExternalIndices(&collisions);
890-
runMcRecTaskDstar<true, Partition<CandDstarWSelFlagWMlMcRec>>(rowsSelectedCandDstarMcRecWMl, rowsMcPartilces);
891+
runMcRecTaskDstar<true, Partition<CandDstarWSelFlagWMlMcRec>>(rowsSelectedCandDstarMcRecWMl /*, rowsMcPartilces*/);
891892
runMcGenTaskDstar(collisions, rowsMcPartilces);
892893
}
893894
PROCESS_SWITCH(HfTaskDstarToD0Pi, processMcWML, "Process MC Data with ML", false);

0 commit comments

Comments
 (0)