@@ -123,15 +123,25 @@ bool passPIDSelection(Atrack const& track, SpeciesContainer const mPIDspecies,
123123 return true ; // Passed all checks
124124}
125125
126- // function to select candidate based on PDF and decay channels and their mass
127- template <bool isScCand, typename McParticle>
128- bool matchCandAndMass (McParticle const & particle, double & massCand)
126+ // / @brief Selects a candidate based on its PDG code, decay channel, and assigns the corresponding mass.
127+ // /
128+ // / @tparam isScCandidate Boolean template parameter:
129+ // / - `true` to check for Sigma_c candidates
130+ // / - `false` to check for Lambda_c candidates
131+ // / @tparam McParticleType Type representing the MC particle, must provide `pdgCode()` and `flagMcMatchGen()`
132+ // /
133+ // / @param[in] particle MC particle whose PDG code and decay flag are evaluated
134+ // / @param[out] massCand Mass of the matched candidate is set here, if a valid match is found
135+ // /
136+ // / @return `true` if candidate matches expected PDG and decay flag, and mass is set; `false` otherwise
137+ template <bool isScCandidate, typename McParticleType>
138+ bool matchCandAndMass (McParticleType const & particle, double & massCand)
129139{
130140 const auto pdgCand = std::abs (particle.pdgCode ());
131141 const auto matchGenFlag = std::abs (particle.flagMcMatchGen ());
132142
133143 // Validate PDG code based on candidate type
134- if (isScCand ) {
144+ if (isScCandidate ) {
135145 if (!(pdgCand == o2::constants::physics::Pdg::kSigmaC0 ||
136146 pdgCand == o2::constants::physics::Pdg::kSigmaCPlusPlus ||
137147 pdgCand == o2::constants::physics::Pdg::kSigmaCStar0 ||
0 commit comments