Skip to content

Commit 11452d7

Browse files
committed
Fix linter errors
1 parent 1f27e11 commit 11452d7

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

PWGHF/Core/DecayChannels.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <array>
2525
#include <cstdint>
2626
#include <unordered_map>
27+
#include <vector>
2728

2829
using namespace o2::constants::physics;
2930

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ struct HfCandidateCreator2ProngExpressions {
795795
auto motherParticle = mcParticles.rawIteratorAt(indexRec);
796796
std::array<int, 3> finalStateParts2ProngAll = std::array{finalState[0], finalState[1], finalState[2]};
797797
if (motherParticle.pdgCode() < 0) {
798-
for (auto& part : finalStateParts2ProngAll) {
798+
for (const auto& part : finalStateParts2ProngAll) {
799799
if (part == kPi0) {
800800
part = -part; // The Pi0 pdg code does not change between particle and antiparticle
801801
}

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ struct HfCandidateCreator3ProngExpressions {
973973
if (finalState.size() == 4) { // Check if the final state has 4 particles
974974
std::array<int, 4> finalStateParts3ProngAll = std::array{finalState[0], finalState[1], finalState[2], finalState[3]};
975975
if (sign < 0) {
976-
for (auto& part : finalStateParts3ProngAll) {
976+
for (const auto& part : finalStateParts3ProngAll) {
977977
if (part == kPi0) {
978978
part = -part; // The Pi0 pdg code does not change between particle and antiparticle
979979
}
@@ -985,7 +985,7 @@ struct HfCandidateCreator3ProngExpressions {
985985
} else if (finalState.size() == 5) { // Check if the final state has 5 particles
986986
std::array<int, 5> finalStateParts3ProngAll = std::array{finalState[0], finalState[1], finalState[2], finalState[3], finalState[4]};
987987
if (sign < 0) {
988-
for (auto& part : finalStateParts3ProngAll) {
988+
for (const auto& part : finalStateParts3ProngAll) {
989989
if (part == kPi0) {
990990
part = -part; // The Pi0 pdg code does not change between particle and antiparticle
991991
}

PWGHF/Utils/utilsMcGen.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ void fillMcMatchGen2Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
6464
if (finalState.size() == 3) { // Partly Reco 3-prong decays
6565
std::array<int, 3> finalStateParts = std::array{finalState[0], finalState[1], finalState[2]};
6666
if (particle.pdgCode() < 0) {
67-
for (auto& part : finalStateParts) {
67+
for (const auto& part : finalStateParts) {
6868
if (part == kPi0) {
6969
part = -part; // The Pi0 pdg code does not change between particle and antiparticle
7070
}
7171
}
7272
}
7373
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kD0, finalStateParts, true, &sign, maxDepth);
74-
} else if (finalState.size() == 2) { // Fully Reco 3-prong decays
74+
} else if (finalState.size() == 2) { // Fully Reco 2-prong decays
7575
std::array<int, 2> finalStateParts = std::array{finalState[0], finalState[1]};
7676
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kD0, finalStateParts, true, &sign, maxDepth);
7777
} else {
@@ -173,7 +173,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
173173
if (finalState.size() == 5) { // Partly Reco 3-prong decays
174174
std::array<int, 5> finalStateParts = std::array{finalState[0], finalState[1], finalState[2], finalState[3], finalState[4]};
175175
if (particle.pdgCode() < 0) {
176-
for (auto& part : finalStateParts) {
176+
for (const auto& part : finalStateParts) {
177177
if (part == kPi0) {
178178
part = -part; // The Pi0 pdg code does not change between particle and antiparticle
179179
}
@@ -184,7 +184,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
184184
} else if (finalState.size() == 4) { // Partly Reco 3-prong decays
185185
std::array<int, 4> finalStateParts = std::array{finalState[0], finalState[1], finalState[2], finalState[3]};
186186
if (particle.pdgCode() < 0) {
187-
for (auto& part : finalStateParts) {
187+
for (const auto& part : finalStateParts) {
188188
if (part == kPi0) {
189189
part = -part; // The Pi0 pdg code does not change between particle and antiparticle
190190
}

0 commit comments

Comments
 (0)