@@ -163,37 +163,35 @@ inline std::unordered_map<DecayChannelMain, const std::vector<int>> getDecayChan
163163}
164164} // namespace hf_cand_3prong
165165
166- // / Perform the matching for a single resonant channel
167- // / \tparam N size of the array of daughter PDG codes
168- // / \param arrPdgResoChn array of daughter indices
169- // / \param arrPdgDaugs array of PDG codes for the resonant decay
170- // / \return true if the resonant channel is matched , false otherwise
166+ // / Compare an array of PDG codes with an expected array
167+ // / \tparam N size of the arrays to be compared
168+ // / \param arrPdgTested array of PDG codes to be tested
169+ // / \param arrPdgExpected array of the expected PDG codes
170+ // / \return true if the arrays are equal , false otherwise
171171template <std::size_t N>
172- inline bool checkDecayChannel (std::array<int , N> const & arrPdgResoChn , std::array<int , N> arrPdgDaugs )
172+ inline bool checkDecayChannel (std::array<int , N> const & arrPdgTested , std::array<int , N> arrPdgExpected )
173173{
174174 for (std::size_t i = 0 ; i < N; i++) {
175- bool findDaug = false ;
175+ bool foundPdg = false ;
176176 for (std::size_t j = 0 ; j < N; j++) {
177- if (std::abs (arrPdgResoChn [i]) == std::abs (arrPdgDaugs [j])) {
178- arrPdgDaugs [j] = -1 ; // Mark as found
179- findDaug = true ;
177+ if (std::abs (arrPdgTested [i]) == std::abs (arrPdgExpected [j])) {
178+ arrPdgExpected [j] = -1 ; // Mark as found
179+ foundPdg = true ;
180180 break ;
181181 }
182182 }
183- if (!findDaug ) {
183+ if (!foundPdg ) {
184184 return false ;
185185 }
186186 }
187187 return true ;
188188}
189189
190190// / Flag the resonant decays
191- // / Function documentation:
192- // / \tparam is3Prong bool to specify if the mother decays with a 3-prong decay
193191// / \tparam N size of the array of daughter PDG codes
194192// / \param motherPdg PDG code of the mother particle
195- // / \param channel decay channel flag to be set
196193// / \param arrDaughPdgs array of daughter PDG codes
194+ // / \return the flag for the matched resonant decay channel
197195template <std::size_t N>
198196inline int8_t flagResonantDecay (const int motherPdg, std::array<int , N> const & arrDaughPdgs)
199197{
@@ -248,16 +246,17 @@ inline int8_t flagResonantDecay(const int motherPdg, std::array<int, N> const& a
248246}
249247
250248// / Flip the sign of a specific PDG code in an array
251- // / of PDG codes representing either a final or a resonant state
249+ // / of PDG codes associated to an antiparticle.
252250// / \tparam N size of the array of PDG codes
253251// / \param motherPdgCode PDG code of the mother particle
254- // / \param partPdgCode PDG code of the target particle
252+ // / \param partPdgCode PDG code to be flipped
255253// / \param arrFinalStatePdgs array of PDG codes to be modified
256254template <std::size_t N>
257255inline void changeFinalStatePdgSign (const int motherPdgCode, const int partPdgCode, std::array<int , N>& arrFinalStatePdgs)
258256{
259- if (motherPdgCode >= 0 )
257+ if (motherPdgCode >= 0 ) {
260258 return ;
259+ }
261260 for (auto & part : arrFinalStatePdgs) { // o2-linter: disable=const-ref-in-for-loop (arrFinalStatePdgs entries are modified)
262261 if (part == partPdgCode) {
263262 part = -part;
0 commit comments