From 233aa670b7f1b2215d49d22295a56e2f7d16a5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Wed, 30 Jul 2025 17:18:59 +0200 Subject: [PATCH 1/7] Fix linter errors --- Common/Core/RecoDecay.h | 53 ++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index 5b4464e112a..683715c83db 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -47,7 +47,12 @@ struct RecoDecay { Prompt, NonPrompt }; - static constexpr int8_t StatusCodeAfterFlavourOscillation = 92; // decay products after B0(s) flavour oscillation + static constexpr int8_t StatusCodeAfterFlavourOscillation{92}; // decay products after B0(s) flavour oscillation + static constexpr int PdgQuarkMax{8}; // largest quark PDG code; o2-linter: disable=pdg/explicit-code (t' does not have a named constant.) + static constexpr int PdgBosonMin{PDG_t::kGluon}; // smallest boson PDG code + static constexpr int PdgBosonMax{37}; // largest boson PDG code; o2-linter: disable=pdg/explicit-code (H+ does not have a named constant.) + static constexpr int PdgDivisorMeson{100}; // order of magnitude of the meson PDG codes + static constexpr int PdgDivisorBaryon{1000}; // order of magnitude of the baryon PDG codes // Auxiliary functions @@ -445,7 +450,7 @@ struct RecoDecay { std::array momTotal{0., 0., 0.}; // candidate momentum vector double energyTot{0.}; // candidate energy for (std::size_t iProng = 0; iProng < N; ++iProng) { - for (std::size_t iMom = 0; iMom < 3; ++iMom) { + for (std::size_t iMom = 0; iMom < 3; ++iMom) { // o2-linter: disable=magic-number ({x, y, z} coordinates) momTotal[iMom] += arrMom[iProng][iMom]; } // loop over momentum components energyTot += e(arrMom[iProng], arrMass[iProng]); @@ -1014,7 +1019,7 @@ struct RecoDecay { arrayIds.push_back(initVec); // the first vector contains the index of the original particle auto pdgParticle = std::abs(particle.pdgCode()); bool couldBePrompt = false; - if (pdgParticle / 100 == kCharm || pdgParticle / 1000 == kCharm) { + if (pdgParticle / PdgDivisorMeson == kCharm || pdgParticle / PdgDivisorBaryon == kCharm) { couldBePrompt = true; } while (arrayIds[-stage].size() > 0) { @@ -1024,11 +1029,11 @@ struct RecoDecay { auto particleMother = particlesMC.rawIteratorAt(iPart - particlesMC.offset()); if (particleMother.has_mothers()) { - // we exit immediately if searchUpToQuark is false and the first mother is a parton (an hadron should never be the mother of a parton) + // we exit immediately if searchUpToQuark is false and the first mother is a quark or a boson (a hadron should never be the mother of a parton) if (!searchUpToQuark) { auto mother = particlesMC.rawIteratorAt(particleMother.mothersIds().front() - particlesMC.offset()); auto pdgParticleIMother = std::abs(mother.pdgCode()); // PDG code of the mother - if (pdgParticleIMother < 9 || (pdgParticleIMother > 20 && pdgParticleIMother < 38)) { + if (pdgParticleIMother <= PdgQuarkMax || (pdgParticleIMother >= PdgBosonMin && pdgParticleIMother <= PdgBosonMax)) { return OriginType::Prompt; } } @@ -1047,8 +1052,8 @@ struct RecoDecay { if (searchUpToQuark) { if (idxBhadMothers) { - if (pdgParticleIMother / 100 == kBottom || // b mesons - pdgParticleIMother / 1000 == kBottom) // b baryons + if (pdgParticleIMother / PdgDivisorMeson == kBottom || // b mesons + pdgParticleIMother / PdgDivisorBaryon == kBottom) // b baryons { idxBhadMothers->push_back(iMother); } @@ -1061,8 +1066,8 @@ struct RecoDecay { } } else { if ( - (pdgParticleIMother / 100 == kBottom || // b mesons - pdgParticleIMother / 1000 == kBottom) // b baryons + (pdgParticleIMother / PdgDivisorMeson == kBottom || // b mesons + pdgParticleIMother / PdgDivisorBaryon == kBottom) // b baryons ) { if (idxBhadMothers) { idxBhadMothers->push_back(iMother); @@ -1070,8 +1075,8 @@ struct RecoDecay { return OriginType::NonPrompt; } if ( - (pdgParticleIMother / 100 == kCharm || // c mesons - pdgParticleIMother / 1000 == kCharm) // c baryons + (pdgParticleIMother / PdgDivisorMeson == kCharm || // c mesons + pdgParticleIMother / PdgDivisorBaryon == kCharm) // c baryons ) { couldBePrompt = true; } @@ -1112,7 +1117,7 @@ struct RecoDecay { arrayIds.push_back(initVec); // the first vector contains the index of the original particle auto pdgParticle = std::abs(particle.pdgCode()); bool couldBeCharm = false; - if (pdgParticle / 100 == kCharm || pdgParticle / 1000 == kCharm) { + if (pdgParticle / PdgDivisorMeson == kCharm || pdgParticle / PdgDivisorBaryon == kCharm) { couldBeCharm = true; } while (arrayIds[-stage].size() > 0) { @@ -1122,21 +1127,21 @@ struct RecoDecay { auto particleMother = particlesMC.rawIteratorAt(iPart - particlesMC.offset()); if (particleMother.has_mothers()) { - // we break immediately if searchUpToQuark is false and the first mother is a parton (an hadron should never be the mother of a parton) + // we exit immediately if searchUpToQuark is false and the first mother is a quark or a boson (a hadron should never be the mother of a parton) if (!searchUpToQuark) { auto mother = particlesMC.rawIteratorAt(particleMother.mothersIds().front() - particlesMC.offset()); auto pdgParticleIMother = std::abs(mother.pdgCode()); // PDG code of the mother - if (pdgParticleIMother < 9 || (pdgParticleIMother > 20 && pdgParticleIMother < 38)) { + if (pdgParticleIMother <= PdgQuarkMax || (pdgParticleIMother >= PdgBosonMin && pdgParticleIMother <= PdgBosonMax)) { // auto PDGPaticle = std::abs(particleMother.pdgCode()); if ( - (pdgParticle / 100 == kBottom || // b mesons - pdgParticle / 1000 == kBottom) // b baryons + (pdgParticle / PdgDivisorMeson == kBottom || // b mesons + pdgParticle / PdgDivisorBaryon == kBottom) // b baryons ) { return OriginType::NonPrompt; // beauty } if ( - (pdgParticle / 100 == kCharm || // c mesons - pdgParticle / 1000 == kCharm) // c baryons + (pdgParticle / PdgDivisorMeson == kCharm || // c mesons + pdgParticle / PdgDivisorBaryon == kCharm) // c baryons ) { return OriginType::Prompt; // charm } @@ -1160,8 +1165,8 @@ struct RecoDecay { if (searchUpToQuark) { if (idxBhadMothers) { - if (pdgParticleIMother / 100 == kBottom || // b mesons - pdgParticleIMother / 1000 == kBottom) // b baryons + if (pdgParticleIMother / PdgDivisorMeson == kBottom || // b mesons + pdgParticleIMother / PdgDivisorBaryon == kBottom) // b baryons { idxBhadMothers->push_back(iMother); } @@ -1174,8 +1179,8 @@ struct RecoDecay { } } else { if ( - (pdgParticleIMother / 100 == kBottom || // b mesons - pdgParticleIMother / 1000 == kBottom) // b baryons + (pdgParticleIMother / PdgDivisorMeson == kBottom || // b mesons + pdgParticleIMother / PdgDivisorBaryon == kBottom) // b baryons ) { if (idxBhadMothers) { idxBhadMothers->push_back(iMother); @@ -1183,8 +1188,8 @@ struct RecoDecay { return OriginType::NonPrompt; // beauty } if ( - (pdgParticleIMother / 100 == kCharm || // c mesons - pdgParticleIMother / 1000 == kCharm) // c baryons + (pdgParticleIMother / PdgDivisorMeson == kCharm || // c mesons + pdgParticleIMother / PdgDivisorBaryon == kCharm) // c baryons ) { couldBeCharm = true; } From dce9bb6a8c52e973a5b1e9374558bd9ed6f3c1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Wed, 30 Jul 2025 17:19:40 +0200 Subject: [PATCH 2/7] Format --- Common/Core/RecoDecay.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index 683715c83db..9ade515c822 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -43,9 +43,11 @@ struct RecoDecay { // mapping of charm-hadron origin type - enum OriginType { None = 0, - Prompt, - NonPrompt }; + enum OriginType { + None = 0, + Prompt, + NonPrompt + }; static constexpr int8_t StatusCodeAfterFlavourOscillation{92}; // decay products after B0(s) flavour oscillation static constexpr int PdgQuarkMax{8}; // largest quark PDG code; o2-linter: disable=pdg/explicit-code (t' does not have a named constant.) From 0a2b0c8aac39c5351473821fad06989e3e1b2223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Wed, 30 Jul 2025 17:23:34 +0200 Subject: [PATCH 3/7] Use PDG_t prefix --- Common/Core/RecoDecay.h | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index 9ade515c822..3faa0337ffa 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -757,11 +757,11 @@ struct RecoDecay { auto motherI = particleI.template mothers_first_as(); auto pdgI = std::abs(particleI.pdgCode()); auto pdgMotherI = std::abs(motherI.pdgCode()); - if (pdgI == kMuonMinus && pdgMotherI == kPiPlus) { + if (pdgI == PDG_t::kMuonMinus && pdgMotherI == PDG_t::kPiPlus) { // π → μ nPiToMuLocal++; particleI = motherI; - } else if (pdgI == kPiPlus && pdgMotherI == kKPlus) { + } else if (pdgI == PDG_t::kPiPlus && pdgMotherI == PDG_t::kKPlus) { // K → π nKaToPiLocal++; particleI = motherI; @@ -1021,7 +1021,7 @@ struct RecoDecay { arrayIds.push_back(initVec); // the first vector contains the index of the original particle auto pdgParticle = std::abs(particle.pdgCode()); bool couldBePrompt = false; - if (pdgParticle / PdgDivisorMeson == kCharm || pdgParticle / PdgDivisorBaryon == kCharm) { + if (pdgParticle / PdgDivisorMeson == PDG_t::kCharm || pdgParticle / PdgDivisorBaryon == PDG_t::kCharm) { couldBePrompt = true; } while (arrayIds[-stage].size() > 0) { @@ -1054,22 +1054,22 @@ struct RecoDecay { if (searchUpToQuark) { if (idxBhadMothers) { - if (pdgParticleIMother / PdgDivisorMeson == kBottom || // b mesons - pdgParticleIMother / PdgDivisorBaryon == kBottom) // b baryons + if (pdgParticleIMother / PdgDivisorMeson == PDG_t::kBottom || // b mesons + pdgParticleIMother / PdgDivisorBaryon == PDG_t::kBottom) // b baryons { idxBhadMothers->push_back(iMother); } } - if (pdgParticleIMother == kBottom) { // b quark + if (pdgParticleIMother == PDG_t::kBottom) { // b quark return OriginType::NonPrompt; } - if (pdgParticleIMother == kCharm) { // c quark + if (pdgParticleIMother == PDG_t::kCharm) { // c quark return OriginType::Prompt; } } else { if ( - (pdgParticleIMother / PdgDivisorMeson == kBottom || // b mesons - pdgParticleIMother / PdgDivisorBaryon == kBottom) // b baryons + (pdgParticleIMother / PdgDivisorMeson == PDG_t::kBottom || // b mesons + pdgParticleIMother / PdgDivisorBaryon == PDG_t::kBottom) // b baryons ) { if (idxBhadMothers) { idxBhadMothers->push_back(iMother); @@ -1077,8 +1077,8 @@ struct RecoDecay { return OriginType::NonPrompt; } if ( - (pdgParticleIMother / PdgDivisorMeson == kCharm || // c mesons - pdgParticleIMother / PdgDivisorBaryon == kCharm) // c baryons + (pdgParticleIMother / PdgDivisorMeson == PDG_t::kCharm || // c mesons + pdgParticleIMother / PdgDivisorBaryon == PDG_t::kCharm) // c baryons ) { couldBePrompt = true; } @@ -1119,7 +1119,7 @@ struct RecoDecay { arrayIds.push_back(initVec); // the first vector contains the index of the original particle auto pdgParticle = std::abs(particle.pdgCode()); bool couldBeCharm = false; - if (pdgParticle / PdgDivisorMeson == kCharm || pdgParticle / PdgDivisorBaryon == kCharm) { + if (pdgParticle / PdgDivisorMeson == PDG_t::kCharm || pdgParticle / PdgDivisorBaryon == PDG_t::kCharm) { couldBeCharm = true; } while (arrayIds[-stage].size() > 0) { @@ -1136,14 +1136,14 @@ struct RecoDecay { if (pdgParticleIMother <= PdgQuarkMax || (pdgParticleIMother >= PdgBosonMin && pdgParticleIMother <= PdgBosonMax)) { // auto PDGPaticle = std::abs(particleMother.pdgCode()); if ( - (pdgParticle / PdgDivisorMeson == kBottom || // b mesons - pdgParticle / PdgDivisorBaryon == kBottom) // b baryons + (pdgParticle / PdgDivisorMeson == PDG_t::kBottom || // b mesons + pdgParticle / PdgDivisorBaryon == PDG_t::kBottom) // b baryons ) { return OriginType::NonPrompt; // beauty } if ( - (pdgParticle / PdgDivisorMeson == kCharm || // c mesons - pdgParticle / PdgDivisorBaryon == kCharm) // c baryons + (pdgParticle / PdgDivisorMeson == PDG_t::kCharm || // c mesons + pdgParticle / PdgDivisorBaryon == PDG_t::kCharm) // c baryons ) { return OriginType::Prompt; // charm } @@ -1167,22 +1167,22 @@ struct RecoDecay { if (searchUpToQuark) { if (idxBhadMothers) { - if (pdgParticleIMother / PdgDivisorMeson == kBottom || // b mesons - pdgParticleIMother / PdgDivisorBaryon == kBottom) // b baryons + if (pdgParticleIMother / PdgDivisorMeson == PDG_t::kBottom || // b mesons + pdgParticleIMother / PdgDivisorBaryon == PDG_t::kBottom) // b baryons { idxBhadMothers->push_back(iMother); } } - if (pdgParticleIMother == kBottom) { // b quark - return OriginType::NonPrompt; // beauty + if (pdgParticleIMother == PDG_t::kBottom) { // b quark + return OriginType::NonPrompt; // beauty } - if (pdgParticleIMother == kCharm) { // c quark - return OriginType::Prompt; // charm + if (pdgParticleIMother == PDG_t::kCharm) { // c quark + return OriginType::Prompt; // charm } } else { if ( - (pdgParticleIMother / PdgDivisorMeson == kBottom || // b mesons - pdgParticleIMother / PdgDivisorBaryon == kBottom) // b baryons + (pdgParticleIMother / PdgDivisorMeson == PDG_t::kBottom || // b mesons + pdgParticleIMother / PdgDivisorBaryon == PDG_t::kBottom) // b baryons ) { if (idxBhadMothers) { idxBhadMothers->push_back(iMother); @@ -1190,8 +1190,8 @@ struct RecoDecay { return OriginType::NonPrompt; // beauty } if ( - (pdgParticleIMother / PdgDivisorMeson == kCharm || // c mesons - pdgParticleIMother / PdgDivisorBaryon == kCharm) // c baryons + (pdgParticleIMother / PdgDivisorMeson == PDG_t::kCharm || // c mesons + pdgParticleIMother / PdgDivisorBaryon == PDG_t::kCharm) // c baryons ) { couldBeCharm = true; } From a896e6c26f03e88d728c7d4b290da764161c9581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Wed, 30 Jul 2025 17:24:34 +0200 Subject: [PATCH 4/7] Sort includes --- Common/Core/RecoDecay.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index 3faa0337ffa..25e680175f9 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -17,7 +17,11 @@ #ifndef COMMON_CORE_RECODECAY_H_ #define COMMON_CORE_RECODECAY_H_ -// C++ includes +#include + +#include // for VMC Particle Production Process +#include // for PDG codes + #include // std::find #include // std::array #include // std::abs, std::sqrt @@ -26,13 +30,6 @@ #include // std::move #include // std::vector -// ROOT includes -#include // for VMC Particle Production Process -#include // for PDG codes - -// O2 includes -#include "CommonConstants/MathConstants.h" - /// Base class for calculating properties of reconstructed decays /// /// Provides static helper functions for: From 3f3caf1f07d0355cb4cf6da8f241e9fa471c0351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Wed, 30 Jul 2025 17:34:18 +0200 Subject: [PATCH 5/7] Fix includes --- Common/Core/RecoDecay.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index 25e680175f9..2f67ab6a5f9 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -22,13 +22,15 @@ #include // for VMC Particle Production Process #include // for PDG codes -#include // std::find -#include // std::array -#include // std::abs, std::sqrt -#include -#include // std::apply -#include // std::move -#include // std::vector +#include // std::find +#include // std::array +#include // std::abs, std::sqrt +#include // std::size_t +#include // intX_t +#include // std::apply +#include // std::decay_t +#include // std::move +#include // std::vector /// Base class for calculating properties of reconstructed decays /// From fc899a299ae7bc4c20e76f11fbb02d413892894d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Wed, 30 Jul 2025 17:46:31 +0200 Subject: [PATCH 6/7] Improve documentation --- Common/Core/RecoDecay.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index 2f67ab6a5f9..ba2bd6ee47f 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -116,7 +116,7 @@ struct RecoDecay { /// Calculates scalar product of vectors. /// \note Promotes numbers to double to avoid precision loss in float multiplication. - /// \param N dimension + /// \tparam N dimension /// \param vec1,vec2 vectors /// \return scalar product template @@ -143,7 +143,7 @@ struct RecoDecay { } /// Calculates magnitude squared of a vector. - /// \param N dimension + /// \tparam N dimension /// \param vec vector /// \return magnitude squared template @@ -441,7 +441,7 @@ struct RecoDecay { } /// Calculates invariant mass squared from momenta and masses of several particles (prongs). - /// \param N number of prongs + /// \tparam N number of prongs /// \param arrMom array of N 3-momentum arrays /// \param arrMass array of N masses (in the same order as arrMom) /// \return invariant mass squared @@ -541,6 +541,7 @@ struct RecoDecay { } /// Finds the mother of an MC particle by looking for the expected PDG code in the mother chain. + /// \tparam acceptFlavourOscillation switch to accept decays where the mother oscillated (e.g. B0 -> B0bar) /// \param particlesMC table with MC particles /// \param particle MC particle /// \param pdgMother expected mother PDG code @@ -619,7 +620,7 @@ struct RecoDecay { } /// Gets the complete list of indices of final-state daughters of an MC particle. - /// \param checkProcess switch to accept only decay daughters by checking the production process of MC particles + /// \tparam checkProcess switch to accept only decay daughters by checking the production process of 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 @@ -692,7 +693,7 @@ struct RecoDecay { } /// Checks whether the reconstructed decay candidate is the expected decay. - /// \tparam acceptFlavourOscillation switch to accept flavour oscillastion (i.e. B0 -> B0bar -> D+pi-) + /// \tparam acceptFlavourOscillation switch to accept decays where the mother oscillated (e.g. B0 -> B0bar) /// \tparam checkProcess switch to accept only decay daughters by checking the production process of MC particles /// \tparam acceptIncompleteReco switch to accept candidates with only part of the daughters reconstructed /// \tparam acceptTrackDecay switch to accept candidates with daughter tracks of pions and kaons which decayed @@ -877,7 +878,8 @@ struct RecoDecay { } /// Checks whether the MC particle is the expected one. - /// \param checkProcess switch to accept only decay daughters by checking the production process of MC particles + /// \tparam acceptFlavourOscillation switch to accept decays where the mother oscillated (e.g. B0 -> B0bar) + /// \tparam checkProcess switch to accept only decay daughters by checking the production process of MC particles /// \param particlesMC table with MC particles /// \param candidate candidate MC particle /// \param pdgParticle expected particle PDG code @@ -896,7 +898,8 @@ struct RecoDecay { } /// Check whether the MC particle is the expected one and whether it decayed via the expected decay channel. - /// \param checkProcess switch to accept only decay daughters by checking the production process of MC particles + /// \tparam acceptFlavourOscillation switch to accept decays where the mother oscillated (e.g. B0 -> B0bar) + /// \tparam checkProcess switch to accept only decay daughters by checking the production process of MC particles /// \param particlesMC table with MC particles /// \param candidate candidate MC particle /// \param pdgParticle expected particle PDG code From 80901034a26c472e27bdd99e40fe6db8a091e811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Wed, 30 Jul 2025 18:05:16 +0200 Subject: [PATCH 7/7] Fixes --- Common/Core/RecoDecay.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index ba2bd6ee47f..fcc50d23bf8 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -50,8 +50,8 @@ struct RecoDecay { static constexpr int8_t StatusCodeAfterFlavourOscillation{92}; // decay products after B0(s) flavour oscillation static constexpr int PdgQuarkMax{8}; // largest quark PDG code; o2-linter: disable=pdg/explicit-code (t' does not have a named constant.) - static constexpr int PdgBosonMin{PDG_t::kGluon}; // smallest boson PDG code - static constexpr int PdgBosonMax{37}; // largest boson PDG code; o2-linter: disable=pdg/explicit-code (H+ does not have a named constant.) + static constexpr int PdgBosonMin{PDG_t::kGluon}; // smallest boson (gauge or H) PDG code + static constexpr int PdgBosonMax{37}; // largest boson (gauge or H) PDG code; o2-linter: disable=pdg/explicit-code (H+ does not have a named constant.) static constexpr int PdgDivisorMeson{100}; // order of magnitude of the meson PDG codes static constexpr int PdgDivisorBaryon{1000}; // order of magnitude of the baryon PDG codes @@ -1131,7 +1131,7 @@ struct RecoDecay { auto particleMother = particlesMC.rawIteratorAt(iPart - particlesMC.offset()); if (particleMother.has_mothers()) { - // we exit immediately if searchUpToQuark is false and the first mother is a quark or a boson (a hadron should never be the mother of a parton) + // we break immediately if searchUpToQuark is false and the first mother is a quark or a boson (a hadron should never be the mother of a parton) if (!searchUpToQuark) { auto mother = particlesMC.rawIteratorAt(particleMother.mothersIds().front() - particlesMC.offset()); auto pdgParticleIMother = std::abs(mother.pdgCode()); // PDG code of the mother