@@ -60,11 +60,11 @@ void fillMcMatchGen2Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
6060 bool matched = false ;
6161
6262 for (const auto & [chn, finalState] : o2::hf_decay::hf_cand_2prong::daughtersD0Main) {
63- if (finalState.size () == 3 ) { // Partly Reco 3-prong decays
63+ if (finalState.size () == 3 ) { // Partly Reco 3-prong decays, o2-linter: disable=magic-number
6464 std::array<int , 3 > finalStateParts = std::array{finalState[0 ], finalState[1 ], finalState[2 ]};
65- o2::hf_decay::convertPi0ToAntiPi0 (particle.pdgCode (), finalStateParts);
65+ o2::hf_decay::changeFinalStatePdgSign (particle.pdgCode (), + kPi0 , finalStateParts);
6666 matched = RecoDecay::isMatchedMCGen (mcParticles, particle, Pdg::kD0 , finalStateParts, true , &sign, MaxDepth);
67- } else if (finalState.size () == 2 ) { // Fully Reco 2-prong decays
67+ } else if (finalState.size () == 2 ) { // Fully Reco 2-prong decays, o2-linter: disable=magic-number
6868 std::array<int , 2 > finalStateParts = std::array{finalState[0 ], finalState[1 ]};
6969 matched = RecoDecay::isMatchedMCGen (mcParticles, particle, Pdg::kD0 , finalStateParts, true , &sign, MaxDepth);
7070 } else {
@@ -164,17 +164,17 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
164164
165165 std::vector<int > arrAllDaughtersIndex;
166166 for (const auto & [chn, finalState] : finalStates) {
167- if (finalState.size () == 5 ) { // Partly Reco 3-prong decays from 5-prong decays
167+ if (finalState.size () == 5 ) { // Partly Reco 3-prong decays from 5-prong decays, o2-linter: disable=magic-number
168168 std::array<int , 5 > finalStateParts = std::array{finalState[0 ], finalState[1 ], finalState[2 ], finalState[3 ], finalState[4 ]};
169- o2::hf_decay::convertPi0ToAntiPi0 (particle.pdgCode (), finalStateParts);
169+ o2::hf_decay::changeFinalStatePdgSign (particle.pdgCode (), + kPi0 , finalStateParts);
170170 RecoDecay::getDaughters<false >(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
171171 matched = RecoDecay::isMatchedMCGen (mcParticles, particle, motherPdgCode, finalStateParts, true , &sign, -1 );
172- } else if (finalState.size () == 4 ) { // Partly Reco 3-prong decays from 4-prong decays
173- std::array<int , 4 > finalStateParts = std::array{finalState[0 ], finalState[1 ], finalState[2 ], finalState[3 ]};
174- o2::hf_decay::convertPi0ToAntiPi0 (particle.pdgCode (), finalStateParts);
172+ } else if (finalState.size () == 4 ) { // Partly Reco 3-prong decays from 4-prong decays, o2-linter: disable=magic-number
173+ std::array<int , 4 > finalStateParts = std::array{finalState[0 ], finalState[1 ], finalState[2 ], finalState[3 ]};
174+ o2::hf_decay::changeFinalStatePdgSign (particle.pdgCode (), + kPi0 , finalStateParts);
175175 RecoDecay::getDaughters<false >(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
176176 matched = RecoDecay::isMatchedMCGen (mcParticles, particle, motherPdgCode, finalStateParts, true , &sign, -1 );
177- } else if (finalState.size () == 3 ) { // Fully Reco 3-prong decays
177+ } else if (finalState.size () == 3 ) { // Fully Reco 3-prong decays, o2-linter: disable=magic-number
178178 std::array<int , 3 > finalStateParts = std::array{finalState[0 ], finalState[1 ], finalState[2 ]};
179179 RecoDecay::getDaughters<false >(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
180180 matched = RecoDecay::isMatchedMCGen (mcParticles, particle, motherPdgCode, finalStateParts, true , &sign, maxDepth);
@@ -207,7 +207,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
207207 auto daughI = mcParticles.rawIteratorAt (arrResoDaughIndex[iProng]);
208208 arrPDGDaugh[iProng] = daughI.pdgCode ();
209209 }
210- channel = o2::hf_decay::flagResonantDecay< true > (motherPdgCode, arrPDGDaugh);
210+ channel = o2::hf_decay::flagResonantDecay (motherPdgCode, arrPDGDaugh);
211211 }
212212 break ; // Exit loop if a match is found
213213 }
@@ -240,7 +240,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
240240 }
241241 if (flag != 0 ) {
242242 RecoDecay::getDaughters (particle, &arrDaughIndex, std::array{0 }, 1 );
243- if (arrDaughIndex.size () == 2 ) {
243+ if (arrDaughIndex.size () == NDaughtersResonant ) {
244244 for (auto jProng = 0u ; jProng < arrDaughIndex.size (); ++jProng) {
245245 auto daughJ = mcParticles.rawIteratorAt (arrDaughIndex[jProng]);
246246 arrPDGDaugh[jProng] = std::abs (daughJ.pdgCode ());
0 commit comments