diff --git a/PWGHF/TableProducer/candidateCreator2Prong.cxx b/PWGHF/TableProducer/candidateCreator2Prong.cxx index fb89f849976..c161b0d72fb 100644 --- a/PWGHF/TableProducer/candidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator2Prong.cxx @@ -20,41 +20,40 @@ #define HomogeneousField // o2-linter: disable=name/macro (required by KFParticle) #endif -#include -#include -#include - -#include -#include -#include -#include -#include +#include "PWGHF/Core/CentralityEstimation.h" +#include "PWGHF/Core/DecayChannels.h" +#include "PWGHF/Core/SelectorCuts.h" +#include "PWGHF/DataModel/CandidateReconstructionTables.h" +#include "PWGHF/Utils/utilsBfieldCCDB.h" +#include "PWGHF/Utils/utilsEvSelHf.h" +#include "PWGHF/Utils/utilsMcGen.h" +#include "PWGHF/Utils/utilsMcMatching.h" +#include "PWGHF/Utils/utilsPid.h" +#include "PWGHF/Utils/utilsTrkCandHf.h" +#include "PWGLF/DataModel/mcCentrality.h" -#include +#include "Common/Core/trackUtilities.h" +#include "Tools/KFparticle/KFUtilities.h" #include "CommonConstants/PhysicsConstants.h" #include "DCAFitter/DCAFitterN.h" #include "Framework/AnalysisTask.h" #include "Framework/HistogramRegistry.h" -#include "Framework/runDataProcessing.h" #include "Framework/RunningWorkflowInfo.h" +#include "Framework/runDataProcessing.h" #include "ReconstructionDataFormats/DCA.h" -#include "Common/Core/trackUtilities.h" -#include "Tools/KFparticle/KFUtilities.h" +#include -#include "PWGLF/DataModel/mcCentrality.h" +#include +#include +#include +#include +#include -#include "PWGHF/Core/CentralityEstimation.h" -#include "PWGHF/Core/SelectorCuts.h" -#include "PWGHF/Core/DecayChannels.h" -#include "PWGHF/DataModel/CandidateReconstructionTables.h" -#include "PWGHF/Utils/utilsBfieldCCDB.h" -#include "PWGHF/Utils/utilsEvSelHf.h" -#include "PWGHF/Utils/utilsMcGen.h" -#include "PWGHF/Utils/utilsPid.h" -#include "PWGHF/Utils/utilsTrkCandHf.h" -#include "PWGHF/Utils/utilsMcMatching.h" +#include +#include +#include using namespace o2; using namespace o2::analysis; diff --git a/PWGHF/TableProducer/candidateCreator3Prong.cxx b/PWGHF/TableProducer/candidateCreator3Prong.cxx index 19ce53e595f..e8d47fc19d9 100644 --- a/PWGHF/TableProducer/candidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator3Prong.cxx @@ -19,41 +19,40 @@ #define HomogeneousField // o2-linter: disable=name/macro (required by KFParticle) #endif -#include -#include -#include -#include - -#include -#include -#include -#include -#include +#include "PWGHF/Core/CentralityEstimation.h" +#include "PWGHF/Core/DecayChannels.h" +#include "PWGHF/DataModel/CandidateReconstructionTables.h" +#include "PWGHF/Utils/utilsBfieldCCDB.h" +#include "PWGHF/Utils/utilsEvSelHf.h" +#include "PWGHF/Utils/utilsMcGen.h" +#include "PWGHF/Utils/utilsMcMatching.h" +#include "PWGHF/Utils/utilsPid.h" +#include "PWGHF/Utils/utilsTrkCandHf.h" +#include "PWGLF/DataModel/mcCentrality.h" -#include +#include "Common/Core/trackUtilities.h" +#include "Tools/KFparticle/KFUtilities.h" #include "CommonConstants/PhysicsConstants.h" #include "DCAFitter/DCAFitterN.h" #include "Framework/AnalysisTask.h" #include "Framework/HistogramRegistry.h" -#include "Framework/runDataProcessing.h" #include "Framework/RunningWorkflowInfo.h" +#include "Framework/runDataProcessing.h" #include "ReconstructionDataFormats/DCA.h" -#include "Common/Core/trackUtilities.h" -#include "Tools/KFparticle/KFUtilities.h" +#include -#include "PWGLF/DataModel/mcCentrality.h" +#include +#include +#include +#include +#include -#include "PWGHF/Core/CentralityEstimation.h" -#include "PWGHF/Core/DecayChannels.h" -#include "PWGHF/DataModel/CandidateReconstructionTables.h" -#include "PWGHF/Utils/utilsBfieldCCDB.h" -#include "PWGHF/Utils/utilsEvSelHf.h" -#include "PWGHF/Utils/utilsMcGen.h" -#include "PWGHF/Utils/utilsPid.h" -#include "PWGHF/Utils/utilsTrkCandHf.h" -#include "PWGHF/Utils/utilsMcMatching.h" +#include +#include +#include +#include using namespace o2; using namespace o2::hf_evsel; @@ -948,14 +947,14 @@ struct HfCandidateCreator3ProngExpressions { } if (matchCorrBkgs) { - indexRec = -1; // Index of the matched reconstructed candidate - constexpr int MaxDepth = 2; // Depth for final state matching - constexpr int ResoMaxDepth = 1; // Depth for resonant decay matching + indexRec = -1; // Index of the matched reconstructed candidate + constexpr int MaxDepth = 2; // Depth for final state matching + constexpr int ResoMaxDepth = 1; // Depth for resonant decay matching for (const auto& pdg : mothersCorrBkgsPdgs.value) { int depth = MaxDepth; if (pdg == Pdg::kDStar) { - depth = MaxDepth+1; // D0 resonant decays are active + depth = MaxDepth + 1; // D0 resonant decays are active } auto finalStates = getDecayChannelMain(pdg); for (const auto& [chn, finalState] : finalStates) { diff --git a/PWGHF/Utils/utilsMcGen.h b/PWGHF/Utils/utilsMcGen.h index e89ca3c789b..4ba17f29cc8 100644 --- a/PWGHF/Utils/utilsMcGen.h +++ b/PWGHF/Utils/utilsMcGen.h @@ -17,21 +17,22 @@ #ifndef PWGHF_UTILS_UTILSMCGEN_H_ #define PWGHF_UTILS_UTILSMCGEN_H_ -#include -#include +#include "PWGHF/Core/DecayChannels.h" +#include "PWGHF/DataModel/CandidateReconstructionTables.h" +#include "PWGHF/Utils/utilsMcMatching.h" + +#include "Common/Core/RecoDecay.h" #include +#include + +#include + #include #include #include -#include "Common/Core/RecoDecay.h" - -#include "PWGHF/Core/DecayChannels.h" -#include "PWGHF/DataModel/CandidateReconstructionTables.h" -#include "PWGHF/Utils/utilsMcMatching.h" - namespace hf_mc_gen { @@ -54,8 +55,8 @@ void fillMcMatchGen2Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V continue; } if (matchCorrBkgs) { - constexpr int MaxDepth = 2; // Depth for final state matching - constexpr int ResoMaxDepth = 1; // Depth for resonant decay matching + constexpr int MaxDepth = 2; // Depth for final state matching + constexpr int ResoMaxDepth = 1; // Depth for resonant decay matching bool matched = false; for (const auto& [chn, finalState] : o2::hf_decay::hf_cand_2prong::daughtersD0Main) { @@ -152,13 +153,13 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V continue; // Skip if the particle PDG code does not match the mother PDG code } auto finalStates = o2::hf_decay::hf_cand_3prong::getDecayChannelMain(motherPdgCode); - constexpr int MaxDepth = 2; // Depth for final state matching - constexpr int ResoMaxDepth = 1; // Depth for resonant decay matching + constexpr int MaxDepth = 2; // Depth for final state matching + constexpr int ResoMaxDepth = 1; // Depth for resonant decay matching int maxDepth = MaxDepth; bool matched = false; if (motherPdgCode == Pdg::kDStar) { - maxDepth = MaxDepth+1; // D0 resonant decays are switched on + maxDepth = MaxDepth + 1; // D0 resonant decays are switched on } std::vector arrAllDaughtersIndex; @@ -170,7 +171,7 @@ void fillMcMatchGen3Prong(T const& mcParticles, U const& mcParticlesPerMcColl, V matched = RecoDecay::isMatchedMCGen(mcParticles, particle, motherPdgCode, finalStateParts, true, &sign, -1); } else if (finalState.size() == 4) { // Partly Reco 3-prong decays from 4-prong decays std::array finalStateParts = std::array{finalState[0], finalState[1], finalState[2], finalState[3]}; - o2::hf_decay::convertPi0ToAntiPi0(particle.pdgCode(), finalStateParts); + o2::hf_decay::convertPi0ToAntiPi0(particle.pdgCode(), finalStateParts); RecoDecay::getDaughters(particle, &arrAllDaughtersIndex, finalStateParts, maxDepth); matched = RecoDecay::isMatchedMCGen(mcParticles, particle, motherPdgCode, finalStateParts, true, &sign, -1); } else if (finalState.size() == 3) { // Fully Reco 3-prong decays diff --git a/PWGHF/Utils/utilsMcMatching.h b/PWGHF/Utils/utilsMcMatching.h index 9849653ec08..3c93ef36321 100644 --- a/PWGHF/Utils/utilsMcMatching.h +++ b/PWGHF/Utils/utilsMcMatching.h @@ -57,11 +57,11 @@ namespace hf_cand_3prong // D± static const std::unordered_map> daughtersDplusMain{ - {DecayChannelMain::DplusToPiKPi, {+kKMinus, +kKPlus, +kPiPlus}}, - {DecayChannelMain::DplusToPiKK, {+kKMinus, +kPiPlus, +kPiPlus}}, - {DecayChannelMain::DplusToPiKPiPi0, {+kKMinus, +kPiPlus, +kPiPlus, +kPi0}}, - {DecayChannelMain::DplusToPiPiPi, {+kPiMinus, +kPiPlus, +kPiPlus}}, - }; + {DecayChannelMain::DplusToPiKPi, {+kKMinus, +kKPlus, +kPiPlus}}, + {DecayChannelMain::DplusToPiKK, {+kKMinus, +kPiPlus, +kPiPlus}}, + {DecayChannelMain::DplusToPiKPiPi0, {+kKMinus, +kPiPlus, +kPiPlus, +kPi0}}, + {DecayChannelMain::DplusToPiPiPi, {+kPiMinus, +kPiPlus, +kPiPlus}}, +}; static const std::unordered_map> daughtersDplusResonant{ {DecayChannelResonant::DplusToPhiPi, {+o2::constants::physics::kPhi, +kPiPlus}}, @@ -120,8 +120,7 @@ static const std::unordered_map> daught {DecayChannelMain::LcToPKPi, {+kProton, +kKMinus, +kPiPlus}}, {DecayChannelMain::LcToPKPiPi0, {+kProton, +kKMinus, +kPiPlus, +kPi0}}, {DecayChannelMain::LcToPPiPi, {+kProton, +kPiMinus, +kPiPlus}}, - {DecayChannelMain::LcToPKK, {+kProton, +kKMinus, +kKPlus}} -}; + {DecayChannelMain::LcToPKK, {+kProton, +kKMinus, +kKPlus}}}; static const std::unordered_map> daughtersLcResonant{ {DecayChannelResonant::LcToPKstar0, {+o2::constants::physics::kK0Star892, +kProton}}, @@ -257,7 +256,7 @@ template inline void convertPi0ToAntiPi0(const int partPdgCode, std::array& arrPdgIndexes) { if (partPdgCode < 0) { - for (auto& part : arrPdgIndexes) { // o2-linter: disable=const-ref-in-for-loop (int elements) + for (auto& part : arrPdgIndexes) { // o2-linter: disable=const-ref-in-for-loop (int elements) if (part == kPi0) { part = -part; // The Pi0 pdg code does not change between particle and antiparticle }