@@ -583,8 +583,8 @@ struct hadronnucleicorrelation {
583583 template <int ME, typename Type>
584584 void mixTracks (Type const & tracks1, Type const & tracks2, bool isIdentical)
585585 { // last value: 0 -- SE; 1 -- ME
586- for (auto it1 : tracks1) {
587- for (auto it2 : tracks2) {
586+ for (auto const & it1 : tracks1) {
587+ for (auto const & it2 : tracks2) {
588588
589589 Pair->SetPair (it1, it2);
590590 Pair->SetIdentical (isIdentical);
@@ -658,8 +658,8 @@ struct hadronnucleicorrelation {
658658 template <int ME, typename Type>
659659 void mixTracksMC (Type const & tracks1, Type const & tracks2, bool isIdentical, bool isMCPID)
660660 { // last value: 0 -- SE; 1 -- ME
661- for (auto it1 : tracks1) {
662- for (auto it2 : tracks2) {
661+ for (auto const & it1 : tracks1) {
662+ for (auto const & it2 : tracks2) {
663663
664664 PairMC->SetPair (it1, it2);
665665 PairMC->SetIdentical (isIdentical);
@@ -715,8 +715,8 @@ struct hadronnucleicorrelation {
715715 template <int ME, typename Type>
716716 void mixMCParticles (Type const & particles1, Type const & particles2)
717717 {
718- for (auto it1 : particles1) {
719- for (auto it2 : particles2) {
718+ for (auto const & it1 : particles1) {
719+ for (auto const & it2 : particles2) {
720720 // Calculate Delta-eta Delta-phi (gen)
721721 float deltaEtaGen = it2->eta () - it1->eta ();
722722 float deltaPhiGen = RecoDecay::constrainAngle (it2->phi () - it1->phi (), -1 * o2::constants::math::PIHalf);
@@ -739,8 +739,8 @@ struct hadronnucleicorrelation {
739739 template <int ME, typename Type>
740740 void mixMCParticlesIdentical (Type const & particles1, Type const & particles2)
741741 {
742- for (auto it1 : particles1) {
743- for (auto it2 : particles2) {
742+ for (auto const & it1 : particles1) {
743+ for (auto const & it2 : particles2) {
744744 // Calculate Delta-eta Delta-phi (gen)
745745 float deltaEtaGen = it2->eta () - it1->eta ();
746746 float deltaPhiGen = RecoDecay::constrainAngle (it2->phi () - it1->phi (), -1 * o2::constants::math::PIHalf);
0 commit comments