@@ -534,11 +534,11 @@ struct k892hadronphotonBkg {
534534 return ;
535535
536536 const float centrality = doPPAnalysis ? coll.centFT0M () : coll.centFT0C ();
537- for (int kIdx : kshortIndices) {
538- auto kshort = fullV0s.rawIteratorAt (kIdx );
537+ for (const int & kIdx : kshortIndices) {
538+ const auto & kshort = fullV0s.rawIteratorAt (kIdx );
539539
540- for (int pIdx : photonIndices) {
541- auto photon = fullV0s.rawIteratorAt (pIdx);
540+ for (const int & pIdx : photonIndices) {
541+ const auto & photon = fullV0s.rawIteratorAt (pIdx);
542542
543543 // photon as a massless 4-vector
544544 ROOT ::Math::PtEtaPhiMVector pGamma (photon.pt (),
@@ -631,7 +631,7 @@ struct k892hadronphotonBkg {
631631 // the framework applies JSON overrides), silently ignoring user configuration.
632632 BkgBinningType bkgColBinning{{axisVertexMixBkg, axisCentralityMixBkg}, true };
633633
634- for (auto & [coll1, coll2] : selfCombinations (bkgColBinning, kstarBkgConfig.nMix , -1 ,
634+ for (const auto & [coll1, coll2] : selfCombinations (bkgColBinning, kstarBkgConfig.nMix , -1 ,
635635 collisions, collisions)) {
636636 if (coll1.globalIndex () == coll2.globalIndex ())
637637 continue ;
@@ -651,17 +651,17 @@ struct k892hadronphotonBkg {
651651
652652 // K0s(coll1) × γ(coll2)
653653 if (!kshorts1.empty () && !photons2.empty ()) {
654- for (int kIdx : kshorts1) {
655- auto kshort = fullV0s.rawIteratorAt (kIdx );
654+ for (const int & kIdx : kshorts1) {
655+ const auto & kshort = fullV0s.rawIteratorAt (kIdx );
656656 float kP = std::hypot (kshort.px (), kshort.py (), kshort.pz ());
657657 ROOT ::Math::PxPyPzEVector fourMomKShort (
658658 kshort.px (), kshort.py (), kshort.pz (),
659659 std::sqrt (kP * kP +
660660 o2::constants::physics::MassK0Short *
661661 o2::constants::physics::MassK0Short));
662662
663- for (int pIdx : photons2) {
664- auto photon = fullV0s.rawIteratorAt (pIdx);
663+ for (const int & pIdx : photons2) {
664+ const auto & photon = fullV0s.rawIteratorAt (pIdx);
665665 float pP = std::hypot (photon.px (), photon.py (), photon.pz ());
666666 ROOT ::Math::PxPyPzEVector fourMomPhoton (
667667 photon.px (), photon.py (), photon.pz (), pP);
@@ -698,14 +698,14 @@ struct k892hadronphotonBkg {
698698
699699 // γ(coll1) × K0s(coll2)
700700 if (!photons1.empty () && !kshorts2.empty ()) {
701- for (int pIdx : photons1) {
702- auto photon = fullV0s.rawIteratorAt (pIdx);
701+ for (const int pIdx : photons1) {
702+ const auto & photon = fullV0s.rawIteratorAt (pIdx);
703703 float pP = std::hypot (photon.px (), photon.py (), photon.pz ());
704704 ROOT ::Math::PxPyPzEVector fourMomPhoton (
705705 photon.px (), photon.py (), photon.pz (), pP);
706706
707- for (int kIdx : kshorts2) {
708- auto kshort = fullV0s.rawIteratorAt (kIdx );
707+ for (const int kIdx : kshorts2) {
708+ const auto & kshort = fullV0s.rawIteratorAt (kIdx );
709709 float kP = std::hypot (kshort.px (), kshort.py (), kshort.pz ());
710710 ROOT ::Math::PxPyPzEVector fourMomKShort (
711711 kshort.px (), kshort.py (), kshort.pz (),
0 commit comments