Skip to content

Commit 7ae0bdc

Browse files
committed
Please consider the following formatting changes
1 parent 2d3cbb8 commit 7ae0bdc

File tree

7 files changed

+396
-389
lines changed

7 files changed

+396
-389
lines changed

PWGHF/Core/CorrelatedBkgs.h

Lines changed: 317 additions & 310 deletions
Large diffs are not rendered by default.

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -777,53 +777,53 @@ struct HfCandidateCreator2ProngExpressions {
777777
std::vector<int> arrResoDaughIndex = {};
778778
// const std::unordered_map<int, std::vector<int>>* finalStates = nullptr;
779779
// switch (pdgMother) {
780-
// case Pdg::kD0:
781-
// finalStates = reinterpret_cast<const std::unordered_map<int, std::vector<int>>*>(&finalStates2Prongs);
782-
// break;
783-
// default:
784-
// finalStates = reinterpret_cast<const std::unordered_map<int, std::vector<int>>*>(&finalStates3Prongs);
785-
// break;
786-
// }
787-
780+
// case Pdg::kD0:
781+
// finalStates = reinterpret_cast<const std::unordered_map<int, std::vector<int>>*>(&finalStates2Prongs);
782+
// break;
783+
// default:
784+
// finalStates = reinterpret_cast<const std::unordered_map<int, std::vector<int>>*>(&finalStates3Prongs);
785+
// break;
786+
// }
787+
788788
int depth = 2;
789789
for (const auto& [chn, finalState] : finalStates2Prongs) {
790790
std::array<int, 2> finalStateParts2Prong = std::array{finalState[0], finalState[1]};
791-
if (finalState.size() == 3) { // Partly Reco 2-prong decays
791+
if (finalState.size() == 3) { // Partly Reco 2-prong decays
792792
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
793-
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
793+
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
794794
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
795795
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks);
796796
} else if (!matchKinkedDecayTopology && matchInteractionsWithMaterial) {
797797
indexRec = RecoDecay::getMatchedMCRec<false, false, true, false, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, nullptr, &nInteractionsWithMaterial);
798798
} else {
799799
indexRec = RecoDecay::getMatchedMCRec<false, false, true, false, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth);
800800
}
801-
801+
802802
if (indexRec != -1) {
803803
auto motherParticle = mcParticles.rawIteratorAt(indexRec);
804804
std::array<int, 3> finalStateParts2ProngAll = std::array{finalState[0], finalState[1], finalState[2]};
805805
if (!RecoDecay::isMatchedMCGen(mcParticles, motherParticle, Pdg::kD0, finalStateParts2ProngAll, false, &sign, depth)) {
806806
indexRec = -1; // Reset indexRec if the generated decay
807807
}
808808
}
809-
} else if (finalState.size() == 2) { // Fully Reco 2-prong decays
809+
} else if (finalState.size() == 2) { // Fully Reco 2-prong decays
810810
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
811-
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
811+
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
812812
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
813-
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks);
813+
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, &nKinkedTracks);
814814
} else if (!matchKinkedDecayTopology && matchInteractionsWithMaterial) {
815-
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, nullptr, &nInteractionsWithMaterial);
815+
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth, nullptr, &nInteractionsWithMaterial);
816816
} else {
817-
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth);
817+
indexRec = RecoDecay::getMatchedMCRec<false, false, false, false, false>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, depth);
818818
}
819819
} else {
820820
LOG(info) << "Final state size not supported: " << finalStateParts2Prong.size();
821821
continue; // Skip unsupported final states
822822
}
823823
if (indexRec > -1) {
824824
// std::cout << "Matched final state: " << chn << " with PDG code: " << pdg << std::endl;
825-
flag = sign * (chn + 10); // Only D0 decay channels are considered here
826-
825+
flag = sign * (chn + 10); // Only D0 decay channels are considered here
826+
827827
// Flag the resonant decay channel
828828
int resoMaxDepth = 1;
829829
int NDaughtersResonant = 2;

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ struct HfCandidateCreator3Prong {
588588
uint8_t bitmapProngsContributorsPV = 0;
589589
if (indexCollision == track0.collisionId() && track0.isPVContributor()) {
590590
SETBIT(bitmapProngsContributorsPV, 0);
591-
}
591+
}
592592
if (indexCollision == track1.collisionId() && track1.isPVContributor()) {
593593
SETBIT(bitmapProngsContributorsPV, 1);
594594
}
@@ -957,25 +957,25 @@ struct HfCandidateCreator3ProngExpressions {
957957
auto finalStates = getParticleFinalStates3Prongs(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() == 4) { // Partly Reco 3-prong decays
960+
if (finalState.size() == 4) { // Partly Reco 3-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) {
966966
indexRec = RecoDecay::getMatchedMCRec<false, false, true, false, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, nullptr, &nInteractionsWithMaterial);
967967
} else {
968968
indexRec = RecoDecay::getMatchedMCRec<false, false, true, false, false>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth);
969969
}
970-
970+
971971
if (indexRec != -1) {
972972
auto motherParticle = mcParticles.rawIteratorAt(indexRec);
973973
std::array<int, 4> finalStateParts3ProngAll = std::array{finalState[0], finalState[1], finalState[2], finalState[3]};
974974
if (!RecoDecay::isMatchedMCGen(mcParticles, motherParticle, pdg, finalStateParts3ProngAll, false, &sign, depth)) {
975975
indexRec = -1; // Reset indexRec if the generated decay
976976
}
977977
}
978-
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays
978+
} else if (finalState.size() == 3) { // Fully Reco 3-prong decays
979979
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
980980
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
981981
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
@@ -995,7 +995,7 @@ struct HfCandidateCreator3ProngExpressions {
995995
case Pdg::kDPlus:
996996
flag = sign * (chn + 30);
997997
break;
998-
case Pdg::kDS:
998+
case Pdg::kDS:
999999
flag = sign * (chn + 50);
10001000
break;
10011001
case Pdg::kDStar:
@@ -1011,22 +1011,22 @@ struct HfCandidateCreator3ProngExpressions {
10111011
LOG(info) << "Unknown mother PDG code: " << pdg << ", skipping.";
10121012
continue; // Skip unknown mother PDG codes
10131013
}
1014-
1014+
10151015
// Flag the resonant decay channel
10161016
int resoMaxDepth = 1;
10171017
int NDaughtersResonant = 2;
1018-
if (std::abs(pdg) == Pdg::kDStar) {
1019-
resoMaxDepth = 2; // Flag D0 resonances
1018+
if (std::abs(pdg) == Pdg::kDStar) {
1019+
resoMaxDepth = 2; // Flag D0 resonances
10201020
}
10211021
RecoDecay::getDaughters(mcParticles.rawIteratorAt(indexRec), &arrResoDaughIndex, std::array{0}, resoMaxDepth);
10221022
std::vector<int> arrPDGDaugh = {};
10231023
if (arrResoDaughIndex.size() == NDaughtersResonant) {
10241024
for (auto iProng = 0u; iProng < arrResoDaughIndex.size(); ++iProng) {
10251025
auto daughI = mcParticles.rawIteratorAt(arrResoDaughIndex[iProng]);
1026-
if ( (std::abs(pdg) == Pdg::kDStar) ||
1027-
( (std::abs(pdg) == Pdg::kXiCPlus) &&
1028-
(std::abs(daughI.pdgCode()) == kPiPlus) &&
1029-
(arrPDGDaugh.size() >= 2) ) ) {
1026+
if ((std::abs(pdg) == Pdg::kDStar) ||
1027+
((std::abs(pdg) == Pdg::kXiCPlus) &&
1028+
(std::abs(daughI.pdgCode()) == kPiPlus) &&
1029+
(arrPDGDaugh.size() >= 2))) {
10301030
continue; // Skip the pion from D* decay and the second pion from XiC --> Sigma Pi Pi
10311031
}
10321032
arrPDGDaugh.push_back(std::abs(daughI.pdgCode()));

PWGHF/TableProducer/candidateSelectorD0.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ struct HfCandidateSelectorD0 {
488488
processSel<aod::hf_cand::VertexerType::DCAFitter>(candidates, tracks);
489489
}
490490
PROCESS_SWITCH(HfCandidateSelectorD0, processWithDCAFitterN, "process candidates selection with DCAFitterN", true);
491-
491+
492492
void processWithKFParticle(soa::Join<aod::HfCand2ProngWPid, aod::HfCand2ProngKF> const& candidates, TracksSel const& tracks)
493493
{
494494
LOG(info) << "Processing candidates selection with KFParticle";

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: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ DECLARE_SOA_TABLE(HfCandDpFullPs, "AOD", "HFCANDDPFULLP",
246246
/// Writes the full information in an output TTree
247247
struct HfTreeCreatorDplusToPiKPi {
248248
Produces<o2::aod::HfCandDpFulls> rowCandidateFull;
249-
Produces<o2::aod::HfCandDpFullEvs> rowCandidateFullEvents;
249+
Produces<o2::aod::HfCandDpFullEvs> rowCandidateFullEvents;
250250
Produces<o2::aod::HfCandDpFullPs> rowCandidateFullParticles;
251251
Produces<o2::aod::HfCandDpLites> rowCandidateLite;
252252
Produces<o2::aod::HfCandDpMls> rowCandidateMl;
@@ -277,7 +277,7 @@ struct HfTreeCreatorDplusToPiKPi {
277277
Partition<SelectedCandidatesMc> reconstructedCandSig = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DplusToPiKPi)) || nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)); // DecayType::DsToKKPi is used to flag both Ds± → K± K∓ π± and D± → K± K∓ π±
278278
Partition<SelectedCandidatesMc> reconstructedCandBkg = nabs(aod::hf_cand_3prong::flagMcMatchRec) != static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DplusToPiKPi));
279279
Partition<SelectedCandidatesMcWithMl> reconstructedCandSigMl = nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DplusToPiKPi)) || nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi)) || nabs(aod::hf_cand_3prong::flagMcMatchRec) == static_cast<int8_t>(BIT(aod::hf_cand_3prong::DstarToPiKPiBkg)); // DecayType::DsToKKPi is used to flag both Ds± → K± K∓ π± and D± → K± K∓ π±
280-
Partition<SelectedCandidatesMcCorrBkgsWithMl> reconstructedCandCorrBkgsMl = nabs(aod::hf_cand_3prong::flagMcMatchRec) != static_cast<int8_t>(BIT(0)); // DecayType::DsToKKPi is used to flag both Ds± → K± K∓ π± and D± → K± K∓ π±
280+
Partition<SelectedCandidatesMcCorrBkgsWithMl> reconstructedCandCorrBkgsMl = nabs(aod::hf_cand_3prong::flagMcMatchRec) != static_cast<int8_t>(BIT(0)); // DecayType::DsToKKPi is used to flag both Ds± → K± K∓ π± and D± → K± K∓ π±
281281

282282
void init(InitContext const&)
283283
{
@@ -598,33 +598,33 @@ struct HfTreeCreatorDplusToPiKPi {
598598
PROCESS_SWITCH(HfTreeCreatorDplusToPiKPi, processMcWCent, "Process MC with cent", false);
599599

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

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

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

622622
void processMcCorrBkgsSgnWCentMl(aod::Collisions const& collisions,
623-
aod::McCollisions const& mccollisions,
624-
SelectedCandidatesMcCorrBkgsWithMl const&,
625-
MatchedGenCandidatesMc const& particles,
626-
TracksWPid const& tracks)
627-
{
623+
aod::McCollisions const& mccollisions,
624+
SelectedCandidatesMcCorrBkgsWithMl const&,
625+
MatchedGenCandidatesMc const& particles,
626+
TracksWPid const& tracks)
627+
{
628628
LOG(info) << "processMcCorrBkgsSgnWCentMl with " << particles.size() << " particles";
629629
fillMcTables(collisions, mccollisions, reconstructedCandCorrBkgsMl, particles, tracks);
630630
}

0 commit comments

Comments
 (0)