From fa43b013bf578526b21283304eda92244c40ba12 Mon Sep 17 00:00:00 2001 From: Fabrizio Date: Thu, 28 Apr 2022 19:20:51 +0200 Subject: [PATCH] Revert AliceO2Group/O2Physics#668 (#695) --- Common/Core/RecoDecay.h | 26 +++++++------------ EventFiltering/PWGHF/HFFilter.cxx | 4 +-- .../HFCandidateCreator2Prong.cxx | 4 +-- .../HFCandidateCreator3Prong.cxx | 8 +++--- .../HFCandidateCreatorCascade.cxx | 2 +- .../TableProducer/HFCandidateCreatorChic.cxx | 10 +++---- PWGHF/TableProducer/HFCandidateCreatorX.cxx | 6 ++--- PWGHF/Tasks/HFMCValidation.cxx | 6 ++--- PWGHF/Tasks/taskBPlus.cxx | 2 +- PWGHF/Tasks/taskChic.cxx | 2 +- PWGHF/Tasks/taskD0.cxx | 2 +- PWGHF/Tasks/taskDPlus.cxx | 2 +- PWGHF/Tasks/taskJpsi.cxx | 2 +- PWGHF/Tasks/taskLb.cxx | 2 +- PWGHF/Tasks/taskLc.cxx | 2 +- PWGHF/Tasks/taskLcCentrality.cxx | 2 +- PWGHF/Tasks/taskLcK0sP.cxx | 2 +- PWGHF/Tasks/taskX.cxx | 2 +- PWGHF/Tasks/taskXic.cxx | 2 +- PWGHF/Tasks/taskXicc.cxx | 2 +- 20 files changed, 41 insertions(+), 49 deletions(-) diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index 7274f89bbd7..bc8a93efa5c 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -562,7 +562,6 @@ class RecoDecay } /// Finds the mother of an MC particle by looking for the expected PDG code in the mother chain. - /// \param particlesMC table with MC particles /// \param particle MC particle /// \param PDGMother expected mother PDG code /// \param acceptAntiParticles switch to accept the antiparticle of the expected mother @@ -570,8 +569,7 @@ class RecoDecay /// \param depthMax maximum decay tree level to check; Mothers up to this level will be considered. If -1, all levels are considered. /// \return index of the mother particle if found, -1 otherwise template - static int getMother(const T& particlesMC, - const typename T::iterator& particle, + static int getMother(const T& particle, int PDGMother, bool acceptAntiParticles = false, int8_t* sign = nullptr, @@ -588,8 +586,8 @@ class RecoDecay if (depthMax > -1 && -stage >= depthMax) { // Maximum depth has been reached. return -1; } - auto indexMotherTmp = particleMother.mothersIds().front(); - particleMother = particlesMC.rawIteratorAt(indexMotherTmp - particlesMC.offset()); + particleMother = particleMother.template mothers_first_as::parent_t>(); // get mother 0 + auto indexMotherTmp = particleMother.globalIndex(); // Check mother's PDG code. auto PDGParticleIMother = particleMother.pdgCode(); // PDG code of the mother //printf("getMother: "); @@ -614,7 +612,6 @@ class RecoDecay } /// Gets the complete list of indices of final-state daughters of an MC particle. - /// \param particlesMC table with MC particles /// \param particle MC particle /// \param list vector where the indices of final-state daughters will be added /// \param arrPDGFinal array of PDG codes of particles to be considered final if found @@ -623,8 +620,7 @@ class RecoDecay /// \note Final state is defined as particles from arrPDGFinal plus final daughters of any other decay branch. /// \note Antiparticles of particles in arrPDGFinal are accepted as well. template - static void getDaughters(const T& particlesMC, - const typename T::iterator& particle, + static void getDaughters(const T& particle, std::vector* list, const array& arrPDGFinal, int8_t depthMax = -1, @@ -675,12 +671,8 @@ class RecoDecay //printf("Stage %d: %d (PDG %d) -> %d-%d\n", stage, index, PDGParticle, indexDaughterFirst, indexDaughterLast); // Call itself to get daughters of daughters recursively. stage++; - if (particle.daughtersIds().front() != particle.daughtersIds().back()) { - for (auto& idxDau : particle.daughtersIds()) { - getDaughters(particlesMC, particlesMC.rawIteratorAt(idxDau - particlesMC.offset()), list, arrPDGFinal, depthMax, stage); - } - } else { - getDaughters(particlesMC, particlesMC.rawIteratorAt(particle.daughtersIds().front() - particlesMC.offset()), list, arrPDGFinal, depthMax, stage); + for (auto& dau : particle.template daughters_as::parent_t>()) { + getDaughters(dau, list, arrPDGFinal, depthMax, stage); } } @@ -721,7 +713,7 @@ class RecoDecay if (iProng == 0) { // Get the mother index and its sign. // PDG code of the first daughter's mother determines whether the expected mother is a particle or antiparticle. - indexMother = getMother(particlesMC, particleI, PDGMother, acceptAntiParticles, &sgn, depthMax); + indexMother = getMother(particleI, PDGMother, acceptAntiParticles, &sgn, depthMax); // Check whether mother was found. if (indexMother <= -1) { //Printf("MC Rec: Rejected: bad mother index or PDG"); @@ -740,7 +732,7 @@ class RecoDecay return -1; } // Get the list of actual final daughters. - getDaughters(particlesMC, particleMother, &arrAllDaughtersIndex, arrPDGDaughters, depthMax); + getDaughters(particleMother, &arrAllDaughtersIndex, arrPDGDaughters, depthMax); //printf("MC Rec: Mother %d has %d final daughters:", indexMother, arrAllDaughtersIndex.size()); //for (auto i : arrAllDaughtersIndex) { // printf(" %d", i); @@ -858,7 +850,7 @@ class RecoDecay return false; } // Get the list of actual final daughters. - getDaughters(particlesMC, candidate, &arrAllDaughtersIndex, arrPDGDaughters, depthMax); + getDaughters(candidate, &arrAllDaughtersIndex, arrPDGDaughters, depthMax); //printf("MC Gen: Mother %ld has %ld final daughters:", candidate.globalIndex(), arrAllDaughtersIndex.size()); //for (auto i : arrAllDaughtersIndex) { // printf(" %d", i); diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index 37d6edfde0e..f48ea863205 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -978,7 +978,7 @@ struct HfFilter { // Main struct for HF triggers auto indexRec = RecoDecay::getMatchedMCRec(particlesMC, std::array{trackPos, trackNeg}, pdg::Code::kD0, array{+kPiPlus, -kKPlus}, true, &sign); if (indexRec > -1) { auto particle = particlesMC.rawIteratorAt(indexRec); - origin = (RecoDecay::getMother(particlesMC, particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); + origin = (RecoDecay::getMother(particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); if (origin == OriginType::NonPrompt) { flag = kNonPrompt; } else { @@ -1037,7 +1037,7 @@ struct HfFilter { // Main struct for HF triggers if (indexRec > -1) { auto particle = particlesMC.rawIteratorAt(indexRec); - origin = (RecoDecay::getMother(particlesMC, particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); + origin = (RecoDecay::getMother(particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); if (origin == OriginType::NonPrompt) { flag = kNonPrompt; } else { diff --git a/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx b/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx index 5d79fab7cda..968984cd33c 100644 --- a/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx @@ -185,7 +185,7 @@ struct HFCandidateCreator2ProngExpressions { // Check whether the particle is non-prompt (from a b quark). if (flag != 0) { auto particle = particlesMC.rawIteratorAt(indexRec); - origin = (RecoDecay::getMother(particlesMC, particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); + origin = (RecoDecay::getMother(particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); } rowMCMatchRec(flag, origin); @@ -221,7 +221,7 @@ struct HFCandidateCreator2ProngExpressions { // Check whether the particle is non-prompt (from a b quark). if (flag != 0) { - origin = (RecoDecay::getMother(particlesMC, particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); + origin = (RecoDecay::getMother(particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); } rowMCMatchGen(flag, origin); diff --git a/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx b/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx index b03364bbc54..9027031c3e6 100644 --- a/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx @@ -195,7 +195,7 @@ struct HFCandidateCreator3ProngExpressions { if (arrayDaughters[0].has_mcParticle()) { swapping = int8_t(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus); } - RecoDecay::getDaughters(particlesMC, particlesMC.rawIteratorAt(indexRec), &arrDaughIndex, array{0}, 1); + RecoDecay::getDaughters(particlesMC.rawIteratorAt(indexRec), &arrDaughIndex, array{0}, 1); if (arrDaughIndex.size() == 2) { for (auto iProng = 0u; iProng < arrDaughIndex.size(); ++iProng) { auto daughI = particlesMC.rawIteratorAt(arrDaughIndex[iProng]); @@ -224,7 +224,7 @@ struct HFCandidateCreator3ProngExpressions { // Check whether the particle is non-prompt (from a b quark). if (flag != 0) { auto particle = particlesMC.rawIteratorAt(indexRec); - origin = (RecoDecay::getMother(particlesMC, particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); + origin = (RecoDecay::getMother(particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); } rowMCMatchRec(flag, origin, swapping, channel); @@ -251,7 +251,7 @@ struct HFCandidateCreator3ProngExpressions { flag = sign * (1 << DecayType::LcToPKPi); //Printf("Flagging the different Λc± → p± K∓ π± decay channels"); - RecoDecay::getDaughters(particlesMC, particle, &arrDaughIndex, array{0}, 1); + RecoDecay::getDaughters(particle, &arrDaughIndex, array{0}, 1); if (arrDaughIndex.size() == 2) { for (auto jProng = 0u; jProng < arrDaughIndex.size(); ++jProng) { auto daughJ = particlesMC.rawIteratorAt(arrDaughIndex[jProng]); @@ -278,7 +278,7 @@ struct HFCandidateCreator3ProngExpressions { // Check whether the particle is non-prompt (from a b quark). if (flag != 0) { - origin = (RecoDecay::getMother(particlesMC, particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); + origin = (RecoDecay::getMother(particle, kBottom, true) > -1 ? OriginType::NonPrompt : OriginType::Prompt); } rowMCMatchGen(flag, origin, channel); diff --git a/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx b/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx index c8efbd32eab..fe1cdc1319c 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx @@ -275,7 +275,7 @@ struct HFCandidateCreatorCascadeMC { MY_DEBUG_MSG(sign, LOG(info) << "Lc in K0S p"); arrDaughLcIndex.clear(); // checking that the final daughters (decay depth = 3) are p, pi+, pi- - RecoDecay::getDaughters(particlesMC, particle, &arrDaughLcIndex, arrDaughLcPDGRef, 3); // best would be to check the K0S daughters + RecoDecay::getDaughters(particle, &arrDaughLcIndex, arrDaughLcPDGRef, 3); // best would be to check the K0S daughters if (arrDaughLcIndex.size() == 3) { for (std::size_t iProng = 0; iProng < arrDaughLcIndex.size(); ++iProng) { auto daughI = particlesMC.rawIteratorAt(arrDaughLcIndex[iProng]); diff --git a/PWGHF/TableProducer/HFCandidateCreatorChic.cxx b/PWGHF/TableProducer/HFCandidateCreatorChic.cxx index 0ca705dac2e..74d2d7f72f6 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorChic.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorChic.cxx @@ -231,15 +231,15 @@ struct HFCandidateCreatorChicMC { if (indexRec > -1) { hMassJpsiToMuMuMatched->Fill(InvMassJpsiToMuMu(candidate.index0())); - int indexMother = RecoDecay::getMother(particlesMC, particlesMC.rawIteratorAt(indexRec), pdg::Code::kChic1); - int indexMotherGamma = RecoDecay::getMother(particlesMC, particlesMC.rawIteratorAt(candidate.index1().mcparticleId()), pdg::Code::kChic1); + int indexMother = RecoDecay::getMother(particlesMC.rawIteratorAt(indexRec), pdg::Code::kChic1); + int indexMotherGamma = RecoDecay::getMother(particlesMC.rawIteratorAt(candidate.index1().mcparticleId()), pdg::Code::kChic1); if (indexMother > -1 && indexMotherGamma == indexMother && candidate.index1().mcparticle().pdgCode() == kGamma) { auto particleMother = particlesMC.rawIteratorAt(indexMother); hEphotonMatched->Fill(candidate.index1().e()); hMassEMatched->Fill(sqrt(candidate.index1().px() * candidate.index1().px() + candidate.index1().py() * candidate.index1().py() + candidate.index1().pz() * candidate.index1().pz())); if (particleMother.has_daughters()) { std::vector arrAllDaughtersIndex; - RecoDecay::getDaughters(particlesMC, particleMother, &arrAllDaughtersIndex, array{(int)(kGamma), (int)(pdg::Code::kJpsi)}, 1); + RecoDecay::getDaughters(particleMother, &arrAllDaughtersIndex, array{(int)(kGamma), (int)(pdg::Code::kJpsi)}, 1); if (arrAllDaughtersIndex.size() == 2) { flag = 1 << hf_cand_chic::DecayType::ChicToJpsiToMuMuGamma; hMassChicToJpsiToMuMuGammaMatched->Fill(InvMassChicToJpsiGamma(candidate)); @@ -249,7 +249,7 @@ struct HFCandidateCreatorChicMC { } if (flag != 0) { auto particle = particlesMC.rawIteratorAt(indexRec); - origin = (RecoDecay::getMother(particlesMC, particle, kBottom, true) > -1 ? NonPrompt : Prompt); + origin = (RecoDecay::getMother(particle, kBottom, true) > -1 ? NonPrompt : Prompt); } rowMCMatchRec(flag, origin, channel); } @@ -265,7 +265,7 @@ struct HFCandidateCreatorChicMC { if (RecoDecay::isMatchedMCGen(particlesMC, particle, pdg::Code::kChic1, array{(int)(pdg::Code::kJpsi), (int)(kGamma)}, true)) { // Match J/psi --> e+e- std::vector arrDaughter; - RecoDecay::getDaughters(particlesMC, particle, &arrDaughter, array{(int)(pdg::Code::kJpsi)}, 1); + RecoDecay::getDaughters(particle, &arrDaughter, array{(int)(pdg::Code::kJpsi)}, 1); auto jpsiCandMC = particlesMC.rawIteratorAt(arrDaughter[0]); if (RecoDecay::isMatchedMCGen(particlesMC, jpsiCandMC, pdg::Code::kJpsi, array{+kElectron, -kElectron}, true)) { flag = 1 << hf_cand_chic::DecayType::ChicToJpsiToEEGamma; diff --git a/PWGHF/TableProducer/HFCandidateCreatorX.cxx b/PWGHF/TableProducer/HFCandidateCreatorX.cxx index 9ee545dd299..cdf0ceeada1 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorX.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorX.cxx @@ -305,7 +305,7 @@ struct HFCandidateCreatorXMC { // Check whether the particle is non-prompt (from a b quark). if (flag != 0) { auto particle = particlesMC.rawIteratorAt(indexRec); - origin = (RecoDecay::getMother(particlesMC, particle, 5, true) > -1 ? NonPrompt : Prompt); + origin = (RecoDecay::getMother(particle, 5, true) > -1 ? NonPrompt : Prompt); } rowMCMatchRec(flag, origin, channel); @@ -323,7 +323,7 @@ struct HFCandidateCreatorXMC { if (RecoDecay::isMatchedMCGen(particlesMC, particle, pdgCodeX, array{pdgCodeJpsi, +kPiPlus, -kPiPlus}, true)) { // Match J/psi --> e+e- std::vector arrDaughter; - RecoDecay::getDaughters(particlesMC, particle, &arrDaughter, array{pdgCodeJpsi}, 1); + RecoDecay::getDaughters(particle, &arrDaughter, array{pdgCodeJpsi}, 1); auto jpsiCandMC = particlesMC.rawIteratorAt(arrDaughter[0]); if (RecoDecay::isMatchedMCGen(particlesMC, jpsiCandMC, pdgCodeJpsi, array{+kElectron, -kElectron}, true)) { flag = 1 << hf_cand_x::DecayType::XToJpsiToEEPiPi; @@ -338,7 +338,7 @@ struct HFCandidateCreatorXMC { // Check whether the particle is non-prompt (from a b quark). if (flag != 0) { - origin = (RecoDecay::getMother(particlesMC, particle, 5, true) > -1 ? NonPrompt : Prompt); + origin = (RecoDecay::getMother(particle, 5, true) > -1 ? NonPrompt : Prompt); } rowMCMatchGen(flag, origin, channel); diff --git a/PWGHF/Tasks/HFMCValidation.cxx b/PWGHF/Tasks/HFMCValidation.cxx index 26da362b07d..8bcd83a6793 100644 --- a/PWGHF/Tasks/HFMCValidation.cxx +++ b/PWGHF/Tasks/HFMCValidation.cxx @@ -133,7 +133,7 @@ struct ValidationGenLevel { int whichHadron = -1; if (std::abs(particlePdgCode) == PDGArrayParticle[iD]) { whichHadron = iD; - RecoDecay::getDaughters(particlesMC, particle, &listDaughters, arrPDGFinal[iD], -1); + RecoDecay::getDaughters(particle, &listDaughters, arrPDGFinal[iD], -1); std::size_t arrayPDGsize = arrPDGFinal[iD].size() - std::count(arrPDGFinal[iD].begin(), arrPDGFinal[iD].end(), 0); if (listDaughters.size() == arrayPDGsize) { counter[iD]++; @@ -232,7 +232,7 @@ struct ValidationRecLevel { if (whichHad >= 0) { int indexParticle = 0; if (cand2Prong.index0_as().has_mcParticle()) { - indexParticle = RecoDecay::getMother(particlesMC, cand2Prong.index0_as().mcParticle(), PDGArrayParticle[whichHad], true); + indexParticle = RecoDecay::getMother(cand2Prong.index0_as().mcParticle(), PDGArrayParticle[whichHad], true); } auto mother = particlesMC.rawIteratorAt(indexParticle); histPt[whichHad]->Fill(cand2Prong.pt() - mother.pt()); @@ -278,7 +278,7 @@ struct ValidationRecLevel { if (whichHad >= 0) { int indexParticle = 0; if (cand3Prong.index0_as().has_mcParticle()) { - indexParticle = RecoDecay::getMother(particlesMC, cand3Prong.index0_as().mcParticle(), PDGArrayParticle[whichHad], true); + indexParticle = RecoDecay::getMother(cand3Prong.index0_as().mcParticle(), PDGArrayParticle[whichHad], true); } auto mother = particlesMC.rawIteratorAt(indexParticle); histPt[whichHad]->Fill(cand3Prong.pt() - mother.pt()); diff --git a/PWGHF/Tasks/taskBPlus.cxx b/PWGHF/Tasks/taskBPlus.cxx index 209d9284ce7..0226b56c5d9 100644 --- a/PWGHF/Tasks/taskBPlus.cxx +++ b/PWGHF/Tasks/taskBPlus.cxx @@ -182,7 +182,7 @@ struct HfTaskBplusMc { } if (std::abs(candidate.flagMCMatchRec()) == 1 << hf_cand_bplus::DecayType::BPlusToD0Pi) { - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index1_as().mcParticle_as>(), pdg::Code::kBPlus, true); + auto indexMother = RecoDecay::getMother(candidate.index1_as().mcParticle_as>(), pdg::Code::kBPlus, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); registry.fill(HIST("hPtRecSig"), candidate.pt()); diff --git a/PWGHF/Tasks/taskChic.cxx b/PWGHF/Tasks/taskChic.cxx index 4383b84280d..ea91ef2afd0 100644 --- a/PWGHF/Tasks/taskChic.cxx +++ b/PWGHF/Tasks/taskChic.cxx @@ -165,7 +165,7 @@ struct TaskChicMC { } if (candidate.flagMCMatchRec() == 1 << decayMode) { //FIXME the access to the MC particle gen not yet functional - //int indexMother = RecoDecay::getMother(particlesMC, particlesMC.rawIteratorAt(candidate.index1().mcParticle_as().globalIndex()), 20443); + //int indexMother = RecoDecay::getMother(particlesMC.rawIteratorAt(candidate.index1().mcParticle_as().globalIndex()), 20443); //auto particleMother = particlesMC.rawIteratorAt(indexMother); //registry.fill(HIST("hPtGenSig"), particleMother.pt()); registry.fill(HIST("hPtRecSig"), candidate.pt()); diff --git a/PWGHF/Tasks/taskD0.cxx b/PWGHF/Tasks/taskD0.cxx index ffaf2a3faca..8db11efdded 100644 --- a/PWGHF/Tasks/taskD0.cxx +++ b/PWGHF/Tasks/taskD0.cxx @@ -182,7 +182,7 @@ struct TaskD0 { } if (std::abs(candidate.flagMCMatchRec()) == 1 << DecayType::D0ToPiK) { // Get the corresponding MC particle. - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as().mcParticle_as>(), pdg::Code::kD0, true); + auto indexMother = RecoDecay::getMother(candidate.index0_as().mcParticle_as>(), pdg::Code::kD0, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); // gen. level pT auto ptRec = candidate.pt(); diff --git a/PWGHF/Tasks/taskDPlus.cxx b/PWGHF/Tasks/taskDPlus.cxx index efa8951e9a0..76787c2c2ad 100644 --- a/PWGHF/Tasks/taskDPlus.cxx +++ b/PWGHF/Tasks/taskDPlus.cxx @@ -144,7 +144,7 @@ struct TaskDPlus { } if (std::abs(candidate.flagMCMatchRec()) == 1 << DecayType::DPlusToPiKPi) { // Get the corresponding MC particle. - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as().mcParticle_as>(), pdg::Code::kDPlus, true); + auto indexMother = RecoDecay::getMother(candidate.index0_as().mcParticle_as>(), pdg::Code::kDPlus, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); // gen. level pT auto ptRec = candidate.pt(); diff --git a/PWGHF/Tasks/taskJpsi.cxx b/PWGHF/Tasks/taskJpsi.cxx index ade04e77120..d0d67329ca0 100644 --- a/PWGHF/Tasks/taskJpsi.cxx +++ b/PWGHF/Tasks/taskJpsi.cxx @@ -231,7 +231,7 @@ struct TaskJpsiMC { } if (candidate.flagMCMatchRec() == 1 << decayMode) { //Get the corresponding MC particle. - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as().mcParticle_as(), pdg::Code::kJpsi, true); + auto indexMother = RecoDecay::getMother(candidate.index0_as().mcParticle_as(), pdg::Code::kJpsi, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); // gen. level pT registry.fill(HIST("hPtRecSig"), candidate.pt()); // rec. level pT diff --git a/PWGHF/Tasks/taskLb.cxx b/PWGHF/Tasks/taskLb.cxx index 917574a48c3..80055203894 100644 --- a/PWGHF/Tasks/taskLb.cxx +++ b/PWGHF/Tasks/taskLb.cxx @@ -188,7 +188,7 @@ struct HfTaskLbMc { auto candLc = candidate.index0_as(); if (std::abs(candidate.flagMCMatchRec()) == 1 << hf_cand_lb::DecayType::LbToLcPi) { - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index1_as().mcParticle_as>(), pdg::Code::kLambdaB0, true); + auto indexMother = RecoDecay::getMother(candidate.index1_as().mcParticle_as>(), pdg::Code::kLambdaB0, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); registry.fill(HIST("hPtRecSig"), candidate.pt()); diff --git a/PWGHF/Tasks/taskLc.cxx b/PWGHF/Tasks/taskLc.cxx index 92da66507cc..1a3c2f19456 100644 --- a/PWGHF/Tasks/taskLc.cxx +++ b/PWGHF/Tasks/taskLc.cxx @@ -146,7 +146,7 @@ struct TaskLc { } if (std::abs(candidate.flagMCMatchRec()) == 1 << DecayType::LcToPKPi) { // Get the corresponding MC particle. - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as().mcParticle_as>(), pdg::Code::kLambdaCPlus, true); + auto indexMother = RecoDecay::getMother(candidate.index0_as().mcParticle_as>(), pdg::Code::kLambdaCPlus, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); // gen. level pT auto ptRec = candidate.pt(); diff --git a/PWGHF/Tasks/taskLcCentrality.cxx b/PWGHF/Tasks/taskLcCentrality.cxx index 478e197a069..34f35360ca8 100644 --- a/PWGHF/Tasks/taskLcCentrality.cxx +++ b/PWGHF/Tasks/taskLcCentrality.cxx @@ -155,7 +155,7 @@ struct TaskLcCentralityMC { } if (std::abs(candidate.flagMCMatchRec()) == 1 << DecayType::LcToPKPi) { // Get the corresponding MC particle. - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as().mcParticle_as>(), pdg::Code::kLambdaCPlus, true); + auto indexMother = RecoDecay::getMother(candidate.index0_as().mcParticle_as>(), pdg::Code::kLambdaCPlus, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); // gen. level pT auto ptRec = candidate.pt(); diff --git a/PWGHF/Tasks/taskLcK0sP.cxx b/PWGHF/Tasks/taskLcK0sP.cxx index 9470a6ff31f..0b0f1e8356b 100644 --- a/PWGHF/Tasks/taskLcK0sP.cxx +++ b/PWGHF/Tasks/taskLcK0sP.cxx @@ -115,7 +115,7 @@ struct TaskLcK0SpMC { } if (std::abs(candidate.flagMCMatchRec()) == 1) { // Get the corresponding MC particle. - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as().mcParticle_as>(), pdg::Code::kLambdaCPlus, true); + auto indexMother = RecoDecay::getMother(candidate.index0_as().mcParticle_as>(), pdg::Code::kLambdaCPlus, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); // gen. level pT registry.fill(HIST("hPtRecSig"), candidate.pt()); // rec. level pT diff --git a/PWGHF/Tasks/taskX.cxx b/PWGHF/Tasks/taskX.cxx index b08631b6b38..f2ba5fd5d4b 100644 --- a/PWGHF/Tasks/taskX.cxx +++ b/PWGHF/Tasks/taskX.cxx @@ -167,7 +167,7 @@ struct TaskXMC { continue; } if (candidate.flagMCMatchRec() == 1 << decayMode) { - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index1_as().mcParticle_as>(), 9920443, true); + auto indexMother = RecoDecay::getMother(candidate.index1_as().mcParticle_as>(), 9920443, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); registry.fill(HIST("hPtRecSig"), candidate.pt()); diff --git a/PWGHF/Tasks/taskXic.cxx b/PWGHF/Tasks/taskXic.cxx index 7a3533d8a87..820f38ffc35 100644 --- a/PWGHF/Tasks/taskXic.cxx +++ b/PWGHF/Tasks/taskXic.cxx @@ -175,7 +175,7 @@ struct HfTaskXicMc { if (std::abs(candidate.flagMCMatchRec()) == 1 << DecayType::XicToPKPi) { // Signal - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as().mcParticle_as>(), pdg::Code::kXiCPlus, true); + auto indexMother = RecoDecay::getMother(candidate.index0_as().mcParticle_as>(), pdg::Code::kXiCPlus, true); auto particleMother = particlesMC.rawIteratorAt(indexMother); registry.fill(HIST("hPtGenSig"), particleMother.pt()); // gen. level pT diff --git a/PWGHF/Tasks/taskXicc.cxx b/PWGHF/Tasks/taskXicc.cxx index 47534b9f8ab..22dd2cc6eff 100644 --- a/PWGHF/Tasks/taskXicc.cxx +++ b/PWGHF/Tasks/taskXicc.cxx @@ -185,7 +185,7 @@ struct HfTaskXiccMc { } if (std::abs(candidate.flagMCMatchRec()) == 1 << DecayType::XiccToXicPi) { // Get the corresponding MC particle. - auto indexMother = RecoDecay::getMother(particlesMC, candidate.index1_as().mcParticle_as>(), 4422, true); + auto indexMother = RecoDecay::getMother(candidate.index1_as().mcParticle_as>(), 4422, true); auto particleXicc = particlesMC.rawIteratorAt(indexMother); auto particleXic = particlesMC.rawIteratorAt(particleXicc.daughtersIds().front()); /*