@@ -336,14 +336,14 @@ struct EventSelectionQaTask {
336336 }
337337
338338 // bc-based event selection qa
339- for (auto & bc : bcs) {
339+ for (const auto & bc : bcs) {
340340 for (int iAlias = 0 ; iAlias < kNaliases ; iAlias++) {
341341 histos.fill (HIST (" hBcCounterAll" ), iAlias, bc.alias_bit (iAlias));
342342 }
343343 }
344344
345345 // collision-based event selection qa
346- for (auto & col : cols) {
346+ for (const auto & col : cols) {
347347 bool sel1 = col.selection_bit (kIsINT1 ) && col.selection_bit (kNoBGV0A ) && col.selection_bit (kNoBGV0C ) && col.selection_bit (kNoTPCLaserWarmUp ) && col.selection_bit (kNoTPCHVdip );
348348
349349 for (int iAlias = 0 ; iAlias < kNaliases ; iAlias++) {
@@ -367,7 +367,7 @@ struct EventSelectionQaTask {
367367 histos.fill (HIST (" hSelCounter" ), i, col.selection_bit (i));
368368 }
369369
370- auto bc = col.bc_as <BCsRun2>();
370+ const auto & bc = col.bc_as <BCsRun2>();
371371 uint64_t globalBC = bc.globalBC ();
372372 // uint64_t orbit = globalBC / nBCsPerOrbit;
373373 int localBC = globalBC % nBCsPerOrbit;
@@ -665,7 +665,7 @@ struct EventSelectionQaTask {
665665 std::vector<uint64_t > vGlobalBCs (nBCs, 0 );
666666
667667 // bc-based event selection qa
668- for (auto & bc : bcs) {
668+ for (const auto & bc : bcs) {
669669 if (!bc.has_ft0 ())
670670 continue ;
671671 float multT0A = bc.ft0 ().sumAmpA ();
@@ -684,7 +684,7 @@ struct EventSelectionQaTask {
684684 }
685685
686686 // bc-based event selection qa
687- for (auto & bc : bcs) {
687+ for (const auto & bc : bcs) {
688688 for (int iAlias = 0 ; iAlias < kNaliases ; iAlias++) {
689689 histos.fill (HIST (" hBcCounterAll" ), iAlias, bc.alias_bit (iAlias));
690690 }
@@ -810,7 +810,7 @@ struct EventSelectionQaTask {
810810
811811 // map for pileup checks
812812 std::vector<int > vCollisionsPerBc (bcs.size (), 0 );
813- for (auto & col : cols) {
813+ for (const auto & col : cols) {
814814 if (col.foundBCId () < 0 || col.foundBCId () >= bcs.size ())
815815 continue ;
816816 vCollisionsPerBc[col.foundBCId ()]++;
@@ -826,7 +826,7 @@ struct EventSelectionQaTask {
826826 // to be used for closest TVX (FT0-OR) searches
827827 std::map<int64_t , int32_t > mapGlobalBcWithTVX;
828828 std::map<int64_t , int32_t > mapGlobalBcWithTOR;
829- for (auto & bc : bcs) {
829+ for (const auto & bc : bcs) {
830830 int64_t globalBC = bc.globalBC ();
831831 // skip non-colliding bcs for data and anchored runs
832832 if (runNumber >= 500000 && bcPatternB[globalBC % o2::constants::lhc::LHCMaxBunches] == 0 ) {
@@ -859,7 +859,7 @@ struct EventSelectionQaTask {
859859 }
860860
861861 // collision-based event selection qa
862- for (auto & col : cols) {
862+ for (const auto & col : cols) {
863863 for (int iAlias = 0 ; iAlias < kNaliases ; iAlias++) {
864864 if (!col.alias_bit (iAlias)) {
865865 continue ;
@@ -893,7 +893,7 @@ struct EventSelectionQaTask {
893893 // count tracks of different types
894894 auto tracksGrouped = tracks.sliceBy (perCollision, col.globalIndex ());
895895 int nContributorsAfterEtaTPCCuts = 0 ;
896- for (auto & track : tracksGrouped) {
896+ for (const auto & track : tracksGrouped) {
897897 int trackBcDiff = bcDiff + track.trackTime () / o2::constants::lhc::LHCBunchSpacingNS;
898898 if (!track.isPVContributor ())
899899 continue ;
@@ -1078,7 +1078,7 @@ struct EventSelectionQaTask {
10781078
10791079 void processMCRun3 (aod::McCollisions const & mcCols, soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels> const & cols, BCsRun3 const &, aod::FT0s const &)
10801080 {
1081- for (auto & mcCol : mcCols) {
1081+ for (const auto & mcCol : mcCols) {
10821082 auto bc = mcCol.bc_as <BCsRun3>();
10831083 uint64_t globalBC = bc.globalBC ();
10841084 uint64_t orbit = globalBC / nBCsPerOrbit;
@@ -1094,7 +1094,7 @@ struct EventSelectionQaTask {
10941094 }
10951095
10961096 // check fraction of collisions matched to wrong bcs
1097- for (auto & col : cols) {
1097+ for (const auto & col : cols) {
10981098 if (!col.has_mcCollision ()) {
10991099 continue ;
11001100 }
0 commit comments