Skip to content

Commit 702fa95

Browse files
committed
Fix o2-linter: disable comments
1 parent 278d244 commit 702fa95

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ struct HfCandidateCreator2ProngExpressions {
783783
// D0(bar) → π+ K−, π+ K− π0, π+ π−, π+ π− π0, K+ K−
784784
for (const auto& [chn, finalState] : hf_cand_2prong::daughtersD0Main) {
785785
std::array<int, 2> finalStateParts2Prong = std::array{finalState[0], finalState[1]};
786-
if (finalState.size() == 3) { // Partly Reco 3-prong decays, o2-linter: disable=magic-number
786+
if (finalState.size() == 3) { // o2-linter: disable=magic-number (Partly Reco 3-prong decays)
787787
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
788788
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, FinalStateDepth, &nKinkedTracks, &nInteractionsWithMaterial);
789789
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
@@ -802,7 +802,7 @@ struct HfCandidateCreator2ProngExpressions {
802802
indexRec = -1; // Reset indexRec if the generated decay does not match the reconstructed one does not match the reconstructed one
803803
}
804804
}
805-
} else if (finalState.size() == 2) { // Fully Reco 2-prong decays, o2-linter: disable=magic-number
805+
} else if (finalState.size() == 2) { // o2-linter: disable=magic-number (Fully Reco 2-prong decays)
806806
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
807807
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, FinalStateDepth, &nKinkedTracks, &nInteractionsWithMaterial);
808808
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ struct HfCandidateCreator3ProngExpressions {
959959
auto finalStates = getDecayChannelMain(pdg);
960960
for (const auto& [chn, finalState] : finalStates) {
961961
std::array<int, 3> finalStateParts3Prong = std::array{finalState[0], finalState[1], finalState[2]};
962-
if (finalState.size() > 3) { // Partly Reco decays with 4 or 5 final state particles, o2-linter: disable=magic-number
962+
if (finalState.size() > 3) { // o2-linter: disable=magic-number (Partly Reco decays with 4 or 5 final state particles)
963963
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
964964
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
965965
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
@@ -972,21 +972,21 @@ struct HfCandidateCreator3ProngExpressions {
972972

973973
if (indexRec > -1) {
974974
auto motherParticle = mcParticles.rawIteratorAt(indexRec);
975-
if (finalState.size() == 4) { // Check if the final state has 4 particles, o2-linter: disable=magic-number
975+
if (finalState.size() == 4) { // o2-linter: disable=magic-number (Check if the final state has 4 particles)
976976
std::array<int, 4> finalStateParts3ProngAll = std::array{finalState[0], finalState[1], finalState[2], finalState[3]};
977977
changeFinalStatePdgSign(motherParticle.pdgCode(), +kPi0, finalStateParts3ProngAll);
978978
if (!RecoDecay::isMatchedMCGen(mcParticles, motherParticle, pdg, finalStateParts3ProngAll, true, &sign, depth)) {
979979
indexRec = -1; // Reset indexRec if the generated decay does not match the reconstructed one is not matched
980980
}
981-
} else if (finalState.size() == 5) { // Check if the final state has 5 particles, o2-linter: disable=magic-number
981+
} else if (finalState.size() == 5) { // o2-linter: disable=magic-number (Check if the final state has 5 particles)
982982
std::array<int, 5> finalStateParts3ProngAll = std::array{finalState[0], finalState[1], finalState[2], finalState[3], finalState[4]};
983983
changeFinalStatePdgSign(motherParticle.pdgCode(), +kPi0, finalStateParts3ProngAll);
984984
if (!RecoDecay::isMatchedMCGen(mcParticles, motherParticle, pdg, finalStateParts3ProngAll, true, &sign, depth)) {
985985
indexRec = -1; // Reset indexRec if the generated decay does not match the reconstructed one is not matched
986986
}
987987
}
988988
}
989-
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays, o2-linter: disable=magic-number
989+
} else if (finalState.size() == 3) { // o2-linter: disable=magic-number(Fully Reco 3-prong decays)
990990
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
991991
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
992992
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {

PWGHF/Utils/utilsMcGen.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ void fillMcMatchGen2Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
6060
bool matched = false;
6161

6262
for (const auto& [chn, finalState] : o2::hf_decay::hf_cand_2prong::daughtersD0Main) {
63-
if (finalState.size() == 3) { // Partly Reco 3-prong decays, o2-linter: disable=magic-number
63+
if (finalState.size() == 3) { // o2-linter: disable=magic-number (Partly Reco 3-prong decays)
6464
std::array<int, 3> finalStateParts = std::array{finalState[0], finalState[1], finalState[2]};
6565
o2::hf_decay::changeFinalStatePdgSign(particle.pdgCode(), +kPi0, finalStateParts);
6666
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kD0, finalStateParts, true, &sign, MaxDepth);
67-
} else if (finalState.size() == 2) { // Fully Reco 2-prong decays, o2-linter: disable=magic-number
67+
} else if (finalState.size() == 2) { // o2-linter: disable=magic-number (Fully Reco 2-prong decays)
6868
std::array<int, 2> finalStateParts = std::array{finalState[0], finalState[1]};
6969
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kD0, finalStateParts, true, &sign, MaxDepth);
7070
} else {
@@ -164,17 +164,17 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
164164

165165
std::vector<int> arrAllDaughtersIndex;
166166
for (const auto& [chn, finalState] : finalStates) {
167-
if (finalState.size() == 5) { // Partly Reco 3-prong decays from 5-prong decays, o2-linter: disable=magic-number
167+
if (finalState.size() == 5) { // o2-linter: disable=magic-number (Partly Reco 3-prong decays from 5-prong decays)
168168
std::array<int, 5> finalStateParts = std::array{finalState[0], finalState[1], finalState[2], finalState[3], finalState[4]};
169169
o2::hf_decay::changeFinalStatePdgSign(particle.pdgCode(), +kPi0, finalStateParts);
170170
RecoDecay::getDaughters<false>(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
171171
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, motherPdgCode, finalStateParts, true, &sign, -1);
172-
} else if (finalState.size() == 4) { // Partly Reco 3-prong decays from 4-prong decays, o2-linter: disable=magic-number
173-
std::array<int, 4> finalStateParts = std::array{finalState[0], finalState[1], finalState[2], finalState[3]};
172+
} else if (finalState.size() == 4) { // o2-linter: disable=magic-number (Partly Reco 3-prong decays from 4-prong decays)
173+
std::array<int, 4> finalStateParts = std::array{finalState[0], finalState[1], finalState[2], finalState[3]};
174174
o2::hf_decay::changeFinalStatePdgSign(particle.pdgCode(), +kPi0, finalStateParts);
175175
RecoDecay::getDaughters<false>(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
176176
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, motherPdgCode, finalStateParts, true, &sign, -1);
177-
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays, o2-linter: disable=magic-number
177+
} else if (finalState.size() == 3) { // o2-linter: disable=magic-number (Fully Reco 3-prong decays)
178178
std::array<int, 3> finalStateParts = std::array{finalState[0], finalState[1], finalState[2]};
179179
RecoDecay::getDaughters<false>(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
180180
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, motherPdgCode, finalStateParts, true, &sign, maxDepth);

0 commit comments

Comments
 (0)