Skip to content

Commit bd55e03

Browse files
committed
fix const ref
1 parent 8d89679 commit bd55e03

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,14 @@ struct ebyeMaker {
324324
template <class P>
325325
int getPartTypeMother(P const& mcPart)
326326
{
327-
for (auto& const mother : mcPart.template mothers_as<aod::McParticles>()) {
327+
for (const auto& mother : mcPart.template mothers_as<aod::McParticles>()) {
328328
if (!mother.isPhysicalPrimary())
329329
return -1;
330330
int pdgCode = mother.pdgCode();
331331
switch (std::abs(pdgCode)) {
332332
case 3122: {
333333
int foundPi = 0;
334-
for (auto& const mcDaught : mother.template daughters_as<aod::McParticles>()) {
334+
for (const auto& mcDaught : mother.template daughters_as<aod::McParticles>()) {
335335
if (std::abs(mcDaught.pdgCode()) == 211) {
336336
foundPi = mcDaught.pdgCode();
337337
break;
@@ -915,7 +915,7 @@ struct ebyeMaker {
915915
fillRecoEvent<C, T>(collision, tracks, V0s, centrality);
916916

917917
for (int iP{0}; iP < kNpart; ++iP) {
918-
for (auto& const candidateTrack : candidateTracks[iP]) {
918+
for (const auto& candidateTrack : candidateTracks[iP]) {
919919
candidateTrack.isreco = true;
920920

921921
auto mcLab = mcLabels.rawIteratorAt(candidateTrack.globalIndex);
@@ -945,7 +945,7 @@ struct ebyeMaker {
945945
}
946946
}
947947
}
948-
for (auto& const candidateV0 : candidateV0s) {
948+
for (const auto& candidateV0 : candidateV0s) {
949949
candidateV0.isreco = true;
950950
auto mcLabPos = mcLabels.rawIteratorAt(candidateV0.globalIndexPos);
951951
auto mcLabNeg = mcLabels.rawIteratorAt(candidateV0.globalIndexNeg);
@@ -954,8 +954,8 @@ struct ebyeMaker {
954954
auto mcTrackPos = mcLabPos.template mcParticle_as<aod::McParticles>();
955955
auto mcTrackNeg = mcLabNeg.template mcParticle_as<aod::McParticles>();
956956
if (mcTrackPos.has_mothers() && mcTrackNeg.has_mothers()) {
957-
for (auto& const negMother : mcTrackNeg.template mothers_as<aod::McParticles>()) {
958-
for (auto& const posMother : mcTrackPos.template mothers_as<aod::McParticles>()) {
957+
for (const auto& negMother : mcTrackNeg.template mothers_as<aod::McParticles>()) {
958+
for (const auto& posMother : mcTrackPos.template mothers_as<aod::McParticles>()) {
959959
if (posMother.globalIndex() != negMother.globalIndex())
960960
continue;
961961
if (!((mcTrackPos.pdgCode() == 2212 && mcTrackNeg.pdgCode() == -211) || (mcTrackPos.pdgCode() == 211 && mcTrackNeg.pdgCode() == -2212)))
@@ -983,7 +983,7 @@ struct ebyeMaker {
983983
void fillMcGen(aod::McParticles const& mcParticles, aod::McTrackLabels const& /*mcLab*/, uint64_t const& collisionId)
984984
{
985985
auto mcParticles_thisCollision = mcParticles.sliceBy(perCollisionMcParts, collisionId);
986-
for (auto& const mcPart : mcParticles_thisCollision) {
986+
for (const auto& mcPart : mcParticles_thisCollision) {
987987
auto genEta = mcPart.eta();
988988
if (std::abs(genEta) > etaMax) {
989989
continue;
@@ -995,7 +995,7 @@ struct ebyeMaker {
995995
if (!mcPart.isPhysicalPrimary() && !mcPart.has_mothers())
996996
continue;
997997
bool foundPr = false;
998-
for (auto& const mcDaught : mcPart.daughters_as<aod::McParticles>()) {
998+
for (const auto& mcDaught : mcPart.daughters_as<aod::McParticles>()) {
999999
if (std::abs(mcDaught.pdgCode()) == 2212) {
10001000
foundPr = true;
10011001
break;
@@ -1073,7 +1073,7 @@ struct ebyeMaker {
10731073

10741074
collisionEbyeTable(centrality, collision.posZ());
10751075

1076-
for (auto& const candidateV0 : candidateV0s) {
1076+
for (const auto& candidateV0 : candidateV0s) {
10771077
lambdaEbyeTable(
10781078
collisionEbyeTable.lastIndex(),
10791079
candidateV0.pt,
@@ -1091,7 +1091,7 @@ struct ebyeMaker {
10911091
}
10921092

10931093
for (int iP{0}; iP < kNpart; ++iP) {
1094-
for (auto& const candidateTrack : candidateTracks[iP]) { // deuterons + protons
1094+
for (const auto& candidateTrack : candidateTracks[iP]) { // deuterons + protons
10951095
nucleiEbyeTable(
10961096
collisionEbyeTable.lastIndex(),
10971097
candidateTrack.pt,
@@ -1158,7 +1158,7 @@ struct ebyeMaker {
11581158

11591159
collisionEbyeTable(cV0M, collision.posZ());
11601160

1161-
for (auto& const candidateV0 : candidateV0s) {
1161+
for (const auto& candidateV0 : candidateV0s) {
11621162
lambdaEbyeTable(
11631163
collisionEbyeTable.lastIndex(),
11641164
candidateV0.pt,
@@ -1176,7 +1176,7 @@ struct ebyeMaker {
11761176
}
11771177

11781178
for (int iP{0}; iP < kNpart; ++iP) {
1179-
for (auto& const candidateTrack : candidateTracks[iP]) { // deuterons + protons
1179+
for (const auto& candidateTrack : candidateTracks[iP]) { // deuterons + protons
11801180
nucleiEbyeTable(
11811181
collisionEbyeTable.lastIndex(),
11821182
candidateTrack.pt,
@@ -1226,7 +1226,7 @@ struct ebyeMaker {
12261226
fillRecoEvent(collision, tracks, V0Table_thisCollision, cV0M);
12271227

12281228
uint8_t trigger = collision.alias_bit(kINT7) ? 0x1 : 0x0;
1229-
for (auto& const classId : classIds) {
1229+
for (const auto& classId : classIds) {
12301230
if (bc.triggerMask() & BIT(classId)) {
12311231
trigger |= 0x2;
12321232
cV0M = cV0M < 104.f ? cV0M * 100. : cV0M;
@@ -1241,7 +1241,7 @@ struct ebyeMaker {
12411241
}
12421242
miniCollTable(static_cast<int8_t>(collision.posZ() * 10), trigger, storeTracksNum ? nTracksColl : nTrackletsColl, cV0M);
12431243

1244-
for (auto& const candidateTrack : candidateTracks[0]) { // protons
1244+
for (const auto& candidateTrack : candidateTracks[0]) { // protons
12451245
auto tk = tracks.rawIteratorAt(candidateTrack.globalIndex);
12461246
float outerPID = getOuterPID(tk);
12471247
auto [itsSignal, nSigmaITS] = getITSSignal(tk, trackExtraRun2);
@@ -1264,7 +1264,7 @@ struct ebyeMaker {
12641264

12651265
void processMcRun3(soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Cs> const& collisions, aod::McCollisions const& /*mcCollisions*/, TracksFullIU const& tracks, aod::V0s const& V0s, aod::McParticles const& mcParticles, aod::McTrackLabels const& mcLab, aod::BCsWithTimestamps const&)
12661266
{
1267-
for (auto& const collision : collisions) {
1267+
for (const auto& collision : collisions) {
12681268
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
12691269
initCCDB(bc);
12701270

@@ -1290,7 +1290,7 @@ struct ebyeMaker {
12901290

12911291
collisionEbyeTable(centrality, collision.posZ());
12921292

1293-
for (auto& const candidateV0 : candidateV0s) {
1293+
for (const auto& candidateV0 : candidateV0s) {
12941294
mcLambdaEbyeTable(
12951295
collisionEbyeTable.lastIndex(),
12961296
candidateV0.pt,
@@ -1312,7 +1312,7 @@ struct ebyeMaker {
13121312
}
13131313

13141314
for (int iP{0}; iP < kNpart; ++iP) {
1315-
for (auto& const candidateTrack : candidateTracks[iP]) { // deuterons + protons
1315+
for (const auto& candidateTrack : candidateTracks[iP]) { // deuterons + protons
13161316
mcNucleiEbyeTable(
13171317
collisionEbyeTable.lastIndex(),
13181318
candidateTrack.pt,
@@ -1334,7 +1334,7 @@ struct ebyeMaker {
13341334

13351335
void processMcRun2(soa::Join<aod::Collisions, aod::McCollisionLabels> const& collisions, aod::McCollisions const& /*mcCollisions*/, TracksFull const& tracks, aod::V0s const& V0s, aod::FV0As const& fv0as, aod::FV0Cs const& fv0cs, aod::McParticles const& mcParticles, aod::McTrackLabels const& mcLab, BCsWithRun2Info const&)
13361336
{
1337-
for (auto& const collision : collisions) {
1337+
for (const auto& collision : collisions) {
13381338
auto bc = collision.bc_as<BCsWithRun2Info>();
13391339
initCCDB(bc);
13401340

@@ -1361,7 +1361,7 @@ struct ebyeMaker {
13611361

13621362
collisionEbyeTable(cV0M, collision.posZ());
13631363

1364-
for (auto& const candidateV0 : candidateV0s) {
1364+
for (const auto& candidateV0 : candidateV0s) {
13651365
mcLambdaEbyeTable(
13661366
collisionEbyeTable.lastIndex(),
13671367
candidateV0.pt,
@@ -1383,7 +1383,7 @@ struct ebyeMaker {
13831383
}
13841384

13851385
for (int iP{0}; iP < kNpart; ++iP) {
1386-
for (auto& const candidateTrack : candidateTracks[iP]) { // deuterons + protons
1386+
for (const auto& candidateTrack : candidateTracks[iP]) { // deuterons + protons
13871387
mcNucleiEbyeTable(
13881388
collisionEbyeTable.lastIndex(),
13891389
candidateTrack.pt,
@@ -1433,7 +1433,7 @@ struct ebyeMaker {
14331433

14341434
miniCollTable(static_cast<int8_t>(collision.posZ() * 10), 0x0, storeTracksNum ? nTracksColl : nTrackletsColl, cV0M);
14351435

1436-
for (auto& const candidateTrack : candidateTracks[0]) { // protons
1436+
for (const auto& candidateTrack : candidateTracks[0]) { // protons
14371437
int selMask = -1;
14381438
if (candidateTrack.isreco) {
14391439
auto tk = tracks.rawIteratorAt(candidateTrack.globalIndex);

0 commit comments

Comments
 (0)