Skip to content

Commit 7a0b012

Browse files
Merge pull request #16 from alibuild/alibot-cleanup-11418
Please consider the following formatting changes to AliceO2Group#11418
2 parents 3d0fa61 + 9d31bf4 commit 7a0b012

File tree

6 files changed

+206
-204
lines changed

6 files changed

+206
-204
lines changed

PWGHF/Core/DecayChannels.h

Lines changed: 180 additions & 177 deletions
Large diffs are not rendered by default.

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -780,17 +780,17 @@ struct HfCandidateCreator2ProngExpressions {
780780
int depth = 2;
781781
for (const auto& [chn, finalState] : finalStates2Prongs) {
782782
std::array<int, 2> finalStateParts2Prong = std::array{finalState[0], finalState[1]};
783-
if (finalState.size() == 3) { // Partly Reco 2-prong decays
783+
if (finalState.size() == 3) { // Partly Reco 2-prong decays
784784
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
785-
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
785+
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
786786
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
787787
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks);
788788
} else if (!matchKinkedDecayTopology && matchInteractionsWithMaterial) {
789789
indexRec = RecoDecay::getMatchedMCRec<false, false, true, false, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, nullptr, &nInteractionsWithMaterial);
790790
} else {
791791
indexRec = RecoDecay::getMatchedMCRec<false, false, true, false, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth);
792792
}
793-
793+
794794
if (indexRec > -1) {
795795
auto motherParticle = mcParticles.rawIteratorAt(indexRec);
796796
std::array<int, 3> finalStateParts2ProngAll = std::array{finalState[0], finalState[1], finalState[2]};
@@ -805,15 +805,15 @@ struct HfCandidateCreator2ProngExpressions {
805805
indexRec = -1; // Reset indexRec if the generated decay does not match the reconstructed one does not match the reconstructed one
806806
}
807807
}
808-
} else if (finalState.size() == 2) { // Fully Reco 2-prong decays
808+
} else if (finalState.size() == 2) { // Fully Reco 2-prong decays
809809
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
810-
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
810+
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
811811
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
812-
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks);
812+
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks);
813813
} else if (!matchKinkedDecayTopology && matchInteractionsWithMaterial) {
814-
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, nullptr, &nInteractionsWithMaterial);
814+
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, nullptr, &nInteractionsWithMaterial);
815815
} else {
816-
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth);
816+
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth);
817817
}
818818
} else {
819819
LOG(info) << "Final state size not supported: " << finalStateParts2Prong.size();

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -957,9 +957,9 @@ struct HfCandidateCreator3ProngExpressions {
957957
auto finalStates = getDecayChannel3Prong(pdg);
958958
for (const auto& [chn, finalState] : finalStates) {
959959
std::array<int, 3> finalStateParts3Prong = std::array{finalState[0], finalState[1], finalState[2]};
960-
if (finalState.size() > 3) { // Partly Reco 4-prong decays
960+
if (finalState.size() > 3) { // Partly Reco 4-prong decays
961961
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
962-
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
962+
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
963963
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
964964
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, false>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks);
965965
} else if (!matchKinkedDecayTopology && matchInteractionsWithMaterial) {
@@ -996,7 +996,7 @@ struct HfCandidateCreator3ProngExpressions {
996996
}
997997
}
998998
}
999-
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays
999+
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays
10001000
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
10011001
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
10021002
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
@@ -1015,8 +1015,8 @@ struct HfCandidateCreator3ProngExpressions {
10151015

10161016
// Flag the resonant decay channel
10171017
int resoMaxDepth = 1;
1018-
if (std::abs(mcParticles.rawIteratorAt(indexRec).pdgCode()) == Pdg::kDStar) {
1019-
resoMaxDepth = 2; // Flag D0 resonances
1018+
if (std::abs(mcParticles.rawIteratorAt(indexRec).pdgCode()) == Pdg::kDStar) {
1019+
resoMaxDepth = 2; // Flag D0 resonances
10201020
}
10211021
std::vector<int> arrResoDaughIndex = {};
10221022
RecoDecay::getDaughters(mcParticles.rawIteratorAt(indexRec), &arrResoDaughIndex, std::array{0}, resoMaxDepth);
@@ -1176,7 +1176,7 @@ struct HfCandidateCreator3ProngExpressions {
11761176
rowMcMatchRec(flag, origin, swapping, channel, -1.f, 0, nKinkedTracks, nInteractionsWithMaterial);
11771177
}
11781178
}
1179-
1179+
11801180
for (const auto& mcCollision : mcCollisions) {
11811181

11821182
// Slice the particles table to get the particles for the current MC collision

PWGHF/TableProducer/treeCreatorD0ToKPi.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ struct HfTreeCreatorD0ToKPi {
512512
}
513513
for (const auto& candidate : candidates) {
514514
if constexpr (onlyBkg) {
515-
if ( TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_2prong::DecayType::D0ToPiK) || (fillCorrBkgs && (candidate.flagMcMatchRec() != 0)) ) {
515+
if (TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_2prong::DecayType::D0ToPiK) || (fillCorrBkgs && (candidate.flagMcMatchRec() != 0))) {
516516
continue;
517517
}
518518
if (downSampleBkgFactor < 1.) {
@@ -523,7 +523,7 @@ struct HfTreeCreatorD0ToKPi {
523523
}
524524
}
525525
if constexpr (onlySig) {
526-
if ( !(TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_2prong::DecayType::D0ToPiK)) || (fillCorrBkgs && (candidate.flagMcMatchRec() != 0)) ) {
526+
if (!(TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_2prong::DecayType::D0ToPiK)) || (fillCorrBkgs && (candidate.flagMcMatchRec() != 0))) {
527527
continue;
528528
}
529529
}
@@ -551,7 +551,7 @@ struct HfTreeCreatorD0ToKPi {
551551
// Filling particle properties
552552
rowCandidateFullParticles.reserve(mcParticles.size());
553553
for (const auto& particle : mcParticles) {
554-
if ( TESTBIT(std::abs(particle.flagMcMatchGen()), aod::hf_cand_2prong::DecayType::D0ToPiK) || (fillCorrBkgs && particle.flagMcMatchGen() != 0) ) {
554+
if (TESTBIT(std::abs(particle.flagMcMatchGen()), aod::hf_cand_2prong::DecayType::D0ToPiK) || (fillCorrBkgs && particle.flagMcMatchGen() != 0)) {
555555
rowCandidateFullParticles(
556556
particle.mcCollisionId(),
557557
particle.pt(),

PWGHF/TableProducer/treeCreatorDplusToPiKPi.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ DECLARE_SOA_TABLE(HfCandDpFullPs, "AOD", "HFCANDDPFULLP",
245245
/// Writes the full information in an output TTree
246246
struct HfTreeCreatorDplusToPiKPi {
247247
Produces<o2::aod::HfCandDpFulls> rowCandidateFull;
248-
Produces<o2::aod::HfCandDpFullEvs> rowCandidateFullEvents;
248+
Produces<o2::aod::HfCandDpFullEvs> rowCandidateFullEvents;
249249
Produces<o2::aod::HfCandDpFullPs> rowCandidateFullParticles;
250250
Produces<o2::aod::HfCandDpLites> rowCandidateLite;
251251
Produces<o2::aod::HfCandDpMls> rowCandidateMl;
@@ -611,7 +611,6 @@ struct HfTreeCreatorDplusToPiKPi {
611611
}
612612

613613
PROCESS_SWITCH(HfTreeCreatorDplusToPiKPi, processMcSgnWCentMl, "Process MC signal with cent and ML info", false);
614-
615614
};
616615

617616
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

PWGHF/Utils/utilsMcGen.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void fillMcMatchGen2Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
6161
bool matched = false;
6262

6363
for (const auto& [chn, finalState] : finalStates2Prongs) {
64-
if (finalState.size() == 3) { // Partly Reco 3-prong decays
64+
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) {
6767
for (auto& part : finalStateParts) {
@@ -71,7 +71,7 @@ void fillMcMatchGen2Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
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 3-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 {
@@ -165,12 +165,12 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
165165
int maxDepth = 2;
166166
bool matched = false;
167167
if (motherPdgCode == Pdg::kDStar) {
168-
maxDepth = 3; // D0 resonant decays are switched on
168+
maxDepth = 3; // D0 resonant decays are switched on
169169
}
170-
170+
171171
std::vector<int> arrAllDaughtersIndex;
172172
for (const auto& [chn, finalState] : finalStates) {
173-
if (finalState.size() == 5) { // Partly Reco 3-prong decays
173+
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) {
176176
for (auto& part : finalStateParts) {
@@ -181,7 +181,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
181181
}
182182
RecoDecay::getDaughters<false>(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
183183
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, motherPdgCode, finalStateParts, true, &sign, -1);
184-
} else if (finalState.size() == 4) { // Partly Reco 3-prong decays
184+
} 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) {
187187
for (auto& part : finalStateParts) {
@@ -192,7 +192,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
192192
}
193193
RecoDecay::getDaughters<false>(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
194194
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, motherPdgCode, finalStateParts, true, &sign, -1);
195-
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays
195+
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays
196196
std::array<int, 3> finalStateParts = std::array{finalState[0], finalState[1], finalState[2]};
197197
RecoDecay::getDaughters<false>(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth);
198198
matched = RecoDecay::isMatchedMCGen(mcParticles, particle, motherPdgCode, finalStateParts, true, &sign, maxDepth);
@@ -205,7 +205,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
205205
// Flag the resonant decay channel
206206
int resoMaxDepth = 1;
207207
std::vector<int> arrResoDaughIndex = {};
208-
if (std::abs(motherPdgCode) == Pdg::kDStar) {
208+
if (std::abs(motherPdgCode) == Pdg::kDStar) {
209209
std::vector<int> arrResoDaughIndexDStar = {};
210210
RecoDecay::getDaughters(particle, &arrResoDaughIndexDStar, std::array{0}, resoMaxDepth);
211211
for (size_t iDaug = 0; iDaug < arrResoDaughIndexDStar.size(); iDaug++) {

0 commit comments

Comments
 (0)