Skip to content

Commit 82da127

Browse files
committed
Please consider the following formatting changes
1 parent 07b9cd8 commit 82da127

File tree

6 files changed

+270
-269
lines changed

6 files changed

+270
-269
lines changed

PWGHF/Core/DecayChannels.h

Lines changed: 210 additions & 208 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: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ struct HfCandidateCreator3Prong {
590590
uint8_t bitmapProngsContributorsPV = 0;
591591
if (indexCollision == track0.collisionId() && track0.isPVContributor()) {
592592
SETBIT(bitmapProngsContributorsPV, 0);
593-
}
593+
}
594594
if (indexCollision == track1.collisionId() && track1.isPVContributor()) {
595595
SETBIT(bitmapProngsContributorsPV, 1);
596596
}
@@ -952,7 +952,7 @@ struct HfCandidateCreator3ProngExpressions {
952952
// LOG(info) << "Matching correlated bkgs";
953953
std::array<int, 5> mothersPdgCodes = {Pdg::kDPlus, Pdg::kDS, Pdg::kDStar, Pdg::kLambdaCPlus, Pdg::kXiCPlus};
954954
indexRec = -1; // Index of the matched reconstructed candidate
955-
955+
956956
// LOG(info) << "CIAO 2";
957957
for (const auto& pdg : mothersPdgCodes) {
958958
int depth = 2;
@@ -965,17 +965,17 @@ struct HfCandidateCreator3ProngExpressions {
965965
for (const auto& [chn, finalState] : finalStates) {
966966
// LOG(info) << "CIAO 3.0.1";
967967
std::array<int, 3> finalStateParts3Prong = std::array{finalState[0], finalState[1], finalState[2]};
968-
if (finalState.size() > 3) { // Partly Reco 3-prong decays
968+
if (finalState.size() > 3) { // Partly Reco 3-prong decays
969969
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
970-
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
970+
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
971971
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
972972
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, false>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks);
973973
} else if (!matchKinkedDecayTopology && matchInteractionsWithMaterial) {
974974
indexRec = RecoDecay::getMatchedMCRec<false, false, true, false, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, nullptr, &nInteractionsWithMaterial);
975975
} else {
976976
indexRec = RecoDecay::getMatchedMCRec<false, false, true, false, false>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth);
977977
}
978-
978+
979979
// LOG(info) << "CIAO 3.0.2";
980980
if (indexRec != -1) {
981981
auto motherParticle = mcParticles.rawIteratorAt(indexRec);
@@ -1014,7 +1014,7 @@ struct HfCandidateCreator3ProngExpressions {
10141014
// LOG(info) << "CIAO 3.0.8";
10151015
}
10161016
// LOG(info) << "CIAO 3.0.9";
1017-
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays
1017+
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays
10181018
// LOG(info) << "CIAO 3.1";
10191019
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
10201020
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
@@ -1034,11 +1034,11 @@ struct HfCandidateCreator3ProngExpressions {
10341034
if (indexRec > -1) {
10351035
// std::cout << "Matched final state: " << chn << " with PDG code: " << pdg << std::endl;
10361036
flag = sign * chn;
1037-
1037+
10381038
// Flag the resonant decay channel
10391039
int resoMaxDepth = 1;
1040-
if (std::abs(pdg) == Pdg::kDStar) {
1041-
resoMaxDepth = 2; // Flag D0 resonances
1040+
if (std::abs(pdg) == Pdg::kDStar) {
1041+
resoMaxDepth = 2; // Flag D0 resonances
10421042
}
10431043
std::vector<int> arrResoDaughIndex = {};
10441044
RecoDecay::getDaughters(mcParticles.rawIteratorAt(indexRec), &arrResoDaughIndex, std::array{0}, resoMaxDepth);
@@ -1204,7 +1204,7 @@ struct HfCandidateCreator3ProngExpressions {
12041204
rowMcMatchRec(flag, origin, swapping, channel, -1.f, 0, nKinkedTracks, nInteractionsWithMaterial);
12051205
}
12061206
}
1207-
1207+
12081208
// LOG(info) << "BYE REC MATCHING, HELLO GEN MATCHING";
12091209
// LOG(info) << "Filling MC match gen for 3 prong candidates";
12101210
// LOG(info) << "Number of MC collisions: " << mcCollisions.size();
@@ -1249,7 +1249,6 @@ struct HfCandidateCreator3ProngExpressions {
12491249
}
12501250
}
12511251
// LOG(info) << "BYE GEN MATCHING";
1252-
12531252
}
12541253

12551254
void processMc(aod::TracksWMc const& tracks,

PWGHF/TableProducer/treeCreatorD0ToKPi.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -556,16 +556,16 @@ struct HfTreeCreatorD0ToKPi {
556556
rowCandidateFullParticles.reserve(mcParticles.size());
557557
for (const auto& particle : mcParticles) {
558558
// if (TESTBIT(std::abs(particle.flagMcMatchGen()), aod::hf_cand_2prong::DecayType::D0ToPiK)) {
559-
rowCandidateFullParticles(
560-
particle.mcCollisionId(),
561-
particle.pt(),
562-
particle.eta(),
563-
particle.phi(),
564-
RecoDecay::y(particle.pVector(), o2::constants::physics::MassD0),
565-
particle.flagMcMatchGen(),
566-
particle.flagMcDecayChanGen(),
567-
particle.originMcGen(),
568-
particle.globalIndex());
559+
rowCandidateFullParticles(
560+
particle.mcCollisionId(),
561+
particle.pt(),
562+
particle.eta(),
563+
particle.phi(),
564+
RecoDecay::y(particle.pVector(), o2::constants::physics::MassD0),
565+
particle.flagMcMatchGen(),
566+
particle.flagMcDecayChanGen(),
567+
particle.originMcGen(),
568+
particle.globalIndex());
569569
// }
570570
}
571571
}

PWGHF/TableProducer/treeCreatorDplusToPiKPi.cxx

Lines changed: 23 additions & 23 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;
@@ -599,33 +599,33 @@ struct HfTreeCreatorDplusToPiKPi {
599599
PROCESS_SWITCH(HfTreeCreatorDplusToPiKPi, processMcWCent, "Process MC with cent", false);
600600

601601
void processMcSgnWMl(aod::Collisions const& collisions,
602-
aod::McCollisions const& mccollisions,
603-
SelectedCandidatesMcWithMl const&,
604-
MatchedGenCandidatesMc const& particles,
605-
TracksWPid const& tracks)
606-
{
607-
fillMcTables<true>(collisions, mccollisions, reconstructedCandSigMl, particles, tracks);
608-
}
602+
aod::McCollisions const& mccollisions,
603+
SelectedCandidatesMcWithMl const&,
604+
MatchedGenCandidatesMc const& particles,
605+
TracksWPid const& tracks)
606+
{
607+
fillMcTables<true>(collisions, mccollisions, reconstructedCandSigMl, particles, tracks);
608+
}
609609

610-
PROCESS_SWITCH(HfTreeCreatorDplusToPiKPi, processMcSgnWMl, "Process MC signal with ML info", false);
610+
PROCESS_SWITCH(HfTreeCreatorDplusToPiKPi, processMcSgnWMl, "Process MC signal with ML info", false);
611611

612612
void processMcSgnWCentMl(CollisionsCent const& collisions,
613-
aod::McCollisions const& mccollisions,
614-
SelectedCandidatesMcWithMl const&,
615-
MatchedGenCandidatesMc const& particles,
616-
TracksWPid const& tracks)
617-
{
618-
fillMcTables<true>(collisions, mccollisions, reconstructedCandSigMl, particles, tracks);
619-
}
620-
621-
PROCESS_SWITCH(HfTreeCreatorDplusToPiKPi, processMcSgnWCentMl, "Process MC signal with cent and ML info", false);
613+
aod::McCollisions const& mccollisions,
614+
SelectedCandidatesMcWithMl const&,
615+
MatchedGenCandidatesMc const& particles,
616+
TracksWPid const& tracks)
617+
{
618+
fillMcTables<true>(collisions, mccollisions, reconstructedCandSigMl, particles, tracks);
619+
}
620+
621+
PROCESS_SWITCH(HfTreeCreatorDplusToPiKPi, processMcSgnWCentMl, "Process MC signal with cent and ML info", false);
622622

623623
void processMcCorrBkgsSgnWCentMl(aod::Collisions const& collisions,
624-
aod::McCollisions const& mccollisions,
625-
SelectedCandidatesMcWithMl const&, // SelectedCandidatesMcCorrBkgsWithMl const&, // SelectedCandidatesMcCorrBkgsWithMl const&,
626-
MatchedGenCandidatesMc const& particles, // MatchedGenCandidatesMcCorrBkgs const& particles,
627-
TracksWPid const& tracks)
628-
{
624+
aod::McCollisions const& mccollisions,
625+
SelectedCandidatesMcWithMl const&, // SelectedCandidatesMcCorrBkgsWithMl const&, // SelectedCandidatesMcCorrBkgsWithMl const&,
626+
MatchedGenCandidatesMc const& particles, // MatchedGenCandidatesMcCorrBkgs const& particles,
627+
TracksWPid const& tracks)
628+
{
629629
LOG(info) << "processMcCorrBkgsSgnWCentMl with " << reconstructedCandSigMl.size() << " reco particles";
630630
LOG(info) << "processMcCorrBkgsSgnWCentMl with " << particles.size() << " generated particles";
631631
fillMcTables(collisions, mccollisions, reconstructedCandSigMl, particles, tracks);

PWGHF/Utils/utilsMcGen.h

Lines changed: 9 additions & 9 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);
@@ -208,7 +208,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
208208
// Flag the resonant decay channel
209209
int resoMaxDepth = 1;
210210
std::vector<int> arrResoDaughIndex = {};
211-
if (std::abs(motherPdgCode) == Pdg::kDStar) {
211+
if (std::abs(motherPdgCode) == Pdg::kDStar) {
212212
std::vector<int> arrResoDaughIndexDStar = {};
213213
RecoDecay::getDaughters(particle, &arrResoDaughIndexDStar, std::array{0}, resoMaxDepth);
214214
for (size_t iDaug = 0; iDaug < arrResoDaughIndexDStar.size(); iDaug++) {
@@ -249,7 +249,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V
249249
flagResonantDecay<true>(motherPdgCode, &channel, arrPDGDaugh);
250250
if (std::abs(motherPdgCode) == Pdg::kDStar) {
251251
LOG(info) << "[matchFinalStateCorrBkgsGen] Matched final state: " << chn << " with PDG code: " << motherPdgCode << ", flag: " << static_cast<int>(flag) << ", sign: " << static_cast<int>(sign);
252-
LOG(info) << "[matchFinalStateCorrBkgsGen] Flag set to: " << static_cast<int>(flag) << " sign: " << static_cast<int>(sign) << " for channel: " << static_cast<int>(channel);
252+
LOG(info) << "[matchFinalStateCorrBkgsGen] Flag set to: " << static_cast<int>(flag) << " sign: " << static_cast<int>(sign) << " for channel: " << static_cast<int>(channel);
253253
}
254254
}
255255
break; // Exit loop if a match is found

0 commit comments

Comments
 (0)