Skip to content

Commit 1df1a8e

Browse files
committed
replace magic number 2 with NDaughtersResonant
1 parent 6c8ff35 commit 1df1a8e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ struct HfCandidateCreator3Prong {
108108
double bz{0.};
109109

110110
constexpr static float UndefValueFloat{-999.f};
111+
constexpr std::size_t NDaughtersResonant{2u};
111112

112113
using FilteredHf3Prongs = soa::Filtered<aod::Hf3Prongs>;
113114
using FilteredPvRefitHf3Prongs = soa::Filtered<soa::Join<aod::Hf3Prongs, aod::HfPvRefit3Prong>>;
@@ -947,7 +948,7 @@ struct HfCandidateCreator3ProngExpressions {
947948
swapping = int8_t(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);
948949
}
949950
RecoDecay::getDaughters(mcParticles.rawIteratorAt(indexRec), &arrDaughIndex, std::array{0}, 1);
950-
if (arrDaughIndex.size() == 2) {
951+
if (arrDaughIndex.size() == NDaughtersResonant) {
951952
for (auto iProng = 0u; iProng < arrDaughIndex.size(); ++iProng) {
952953
auto daughI = mcParticles.rawIteratorAt(arrDaughIndex[iProng]);
953954
arrPDGDaugh[iProng] = std::abs(daughI.pdgCode());
@@ -993,7 +994,7 @@ struct HfCandidateCreator3ProngExpressions {
993994
swapping = int8_t(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);
994995
}
995996
RecoDecay::getDaughters(mcParticles.rawIteratorAt(indexRec), &arrDaughIndex, std::array{0}, 1);
996-
if (arrDaughIndex.size() == 2) {
997+
if (arrDaughIndex.size() == NDaughtersResonant) {
997998
for (auto iProng = 0u; iProng < arrDaughIndex.size(); ++iProng) {
998999
auto daughI = mcParticles.rawIteratorAt(arrDaughIndex[iProng]);
9991000
arrPDGDaugh[iProng] = std::abs(daughI.pdgCode());

0 commit comments

Comments
 (0)