@@ -521,7 +521,7 @@ struct NucleitpcPbPb {
521521 flags |= kIsPhysicalPrimary ;
522522 decayType = 0 ;
523523 if (mcParticle.has_mothers ()) {
524- for (auto & motherparticle : mcParticle.mothers_as <aod::McParticles>()) {
524+ for (const auto & motherparticle : mcParticle.mothers_as <aod::McParticles>()) {
525525 if (std::find (hfMothCodes.begin (), hfMothCodes.end (),
526526 std::abs (motherparticle.pdgCode ())) != hfMothCodes.end ()) {
527527 flags |= kIsSecondaryFromWeakDecay ;
@@ -617,7 +617,7 @@ struct NucleitpcPbPb {
617617 flags |= kIsPhysicalPrimary ;
618618 decayType = 0 ;
619619 if (mcParticle.has_mothers ()) {
620- for (auto & motherparticle : mcParticle.mothers_as <aod::McParticles>()) {
620+ for (const auto & motherparticle : mcParticle.mothers_as <aod::McParticles>()) {
621621 if (std::find (hfMothCodes.begin (), hfMothCodes.end (),
622622 std::abs (motherparticle.pdgCode ())) != hfMothCodes.end ()) {
623623 flags |= kIsSecondaryFromWeakDecay ;
@@ -736,7 +736,7 @@ struct NucleitpcPbPb {
736736 flags |= kIsPhysicalPrimary ;
737737 decayType = 0 ;
738738 if (matchedMCParticle.has_mothers ()) {
739- for (auto & motherparticle : matchedMCParticle.mothers_as <aod::McParticles>()) {
739+ for (const auto & motherparticle : matchedMCParticle.mothers_as <aod::McParticles>()) {
740740 if (std::find (hfMothCodes.begin (), hfMothCodes.end (),
741741 std::abs (motherparticle.pdgCode ())) != hfMothCodes.end ()) {
742742 flags |= kIsSecondaryFromWeakDecay ;
0 commit comments