From e7b466e3ae52ac279fd3c2b8d5cf46ea9f32dedb Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Sat, 15 Nov 2025 14:18:39 +0000 Subject: [PATCH] Please consider the following formatting changes --- ALICE3/DataModel/A3DecayFinderTables.h | 175 +++++++++--------- ALICE3/ML/alice3-mlresponse3prong.h | 45 +++-- ALICE3/TableProducer/alice3-decayfinder.cxx | 141 +++++++------- .../TableProducer/alice3-decaypreselector.cxx | 2 +- .../TableProducer/alice3-selector3prong.cxx | 25 ++- .../alice3-treecreator3prong.cxx | 45 +++-- ALICE3/Tasks/alice3-task3prong.cxx | 16 +- PWGHF/Core/HfHelper.h | 12 +- 8 files changed, 226 insertions(+), 235 deletions(-) diff --git a/ALICE3/DataModel/A3DecayFinderTables.h b/ALICE3/DataModel/A3DecayFinderTables.h index 777b9545a48..ba35f15d71f 100644 --- a/ALICE3/DataModel/A3DecayFinderTables.h +++ b/ALICE3/DataModel/A3DecayFinderTables.h @@ -80,8 +80,8 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pt2Prong0, pt2Prong0, //! [](float px, float py) -> float { return RecoDecay::pt2(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(PVectorProng0, pVectorProng0, //! [](float px, float py, float pz) -> std::array { return std::array{px, py, pz}; }); -DECLARE_SOA_COLUMN(ImpactParameterY0, impactParameterY0, float); //! -DECLARE_SOA_COLUMN(ErrorImpactParameterY0, errorImpactParameterY0, float); //! +DECLARE_SOA_COLUMN(ImpactParameterY0, impactParameterY0, float); //! +DECLARE_SOA_COLUMN(ErrorImpactParameterY0, errorImpactParameterY0, float); //! DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterNormalised0, impactParameterNormalised0, //! [](float dca, float err) -> float { return dca / err; }); DECLARE_SOA_COLUMN(ImpactParameterZ0, impactParameterZ0, float); //! @@ -97,8 +97,8 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pt2Prong1, pt2Prong1, //! [](float px, float py) -> float { return RecoDecay::pt2(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(PVectorProng1, pVectorProng1, //! [](float px, float py, float pz) -> std::array { return std::array{px, py, pz}; }); -DECLARE_SOA_COLUMN(ImpactParameterY1, impactParameterY1, float); //! -DECLARE_SOA_COLUMN(ErrorImpactParameterY1, errorImpactParameterY1, float); //! +DECLARE_SOA_COLUMN(ImpactParameterY1, impactParameterY1, float); //! +DECLARE_SOA_COLUMN(ErrorImpactParameterY1, errorImpactParameterY1, float); //! DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterNormalised1, impactParameterNormalised1, //! [](float dca, float err) -> float { return dca / err; }); DECLARE_SOA_COLUMN(ImpactParameterZ1, impactParameterZ1, float); //! @@ -114,8 +114,8 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pt2Prong2, pt2Prong2, //! [](float px, float py) -> float { return RecoDecay::pt2(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(PVectorProng2, pVectorProng2, //! [](float px, float py, float pz) -> std::array { return std::array{px, py, pz}; }); -DECLARE_SOA_COLUMN(ImpactParameterY2, impactParameterY2, float); //! -DECLARE_SOA_COLUMN(ErrorImpactParameterY2, errorImpactParameterY2, float); //! +DECLARE_SOA_COLUMN(ImpactParameterY2, impactParameterY2, float); //! +DECLARE_SOA_COLUMN(ErrorImpactParameterY2, errorImpactParameterY2, float); //! DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterNormalised2, impactParameterNormalised2, //! [](float dca, float err) -> float { return dca / err; }); DECLARE_SOA_COLUMN(ImpactParameterZ2, impactParameterZ2, float); //! @@ -124,42 +124,42 @@ DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterZNormalised2, impactParameterZNormalis [](float dca, float err) -> float { return dca / err; }); /// prong PID nsigma -DECLARE_SOA_COLUMN(NSigTrkPi0, nSigTrkPi0, float); //! -DECLARE_SOA_COLUMN(NSigTrkKa0, nSigTrkKa0, float); //! -DECLARE_SOA_COLUMN(NSigTrkPr0, nSigTrkPr0, float); //! -DECLARE_SOA_COLUMN(NSigTrkPi1, nSigTrkPi1, float); //! -DECLARE_SOA_COLUMN(NSigTrkKa1, nSigTrkKa1, float); //! -DECLARE_SOA_COLUMN(NSigTrkPr1, nSigTrkPr1, float); //! -DECLARE_SOA_COLUMN(NSigTrkPi2, nSigTrkPi2, float); //! -DECLARE_SOA_COLUMN(NSigTrkKa2, nSigTrkKa2, float); //! -DECLARE_SOA_COLUMN(NSigTrkPr2, nSigTrkPr2, float); //! -DECLARE_SOA_COLUMN(NSigRichPi0, nSigRichPi0, float); //! -DECLARE_SOA_COLUMN(NSigRichKa0, nSigRichKa0, float); //! -DECLARE_SOA_COLUMN(NSigRichPr0, nSigRichPr0, float); //! -DECLARE_SOA_COLUMN(NSigRichPi1, nSigRichPi1, float); //! -DECLARE_SOA_COLUMN(NSigRichKa1, nSigRichKa1, float); //! -DECLARE_SOA_COLUMN(NSigRichPr1, nSigRichPr1, float); //! -DECLARE_SOA_COLUMN(NSigRichPi2, nSigRichPi2, float); //! -DECLARE_SOA_COLUMN(NSigRichKa2, nSigRichKa2, float); //! -DECLARE_SOA_COLUMN(NSigRichPr2, nSigRichPr2, float); //! -DECLARE_SOA_COLUMN(NSigInnTofPi0, nSigInnTofPi0, float); //! -DECLARE_SOA_COLUMN(NSigInnTofKa0, nSigInnTofKa0, float); //! -DECLARE_SOA_COLUMN(NSigInnTofPr0, nSigInnTofPr0, float); //! -DECLARE_SOA_COLUMN(NSigInnTofPi1, nSigInnTofPi1, float); //! -DECLARE_SOA_COLUMN(NSigInnTofKa1, nSigInnTofKa1, float); //! -DECLARE_SOA_COLUMN(NSigInnTofPr1, nSigInnTofPr1, float); //! -DECLARE_SOA_COLUMN(NSigInnTofPi2, nSigInnTofPi2, float); //! -DECLARE_SOA_COLUMN(NSigInnTofKa2, nSigInnTofKa2, float); //! -DECLARE_SOA_COLUMN(NSigInnTofPr2, nSigInnTofPr2, float); //! -DECLARE_SOA_COLUMN(NSigOutTofPi0, nSigOutTofPi0, float); //! -DECLARE_SOA_COLUMN(NSigOutTofKa0, nSigOutTofKa0, float); //! -DECLARE_SOA_COLUMN(NSigOutTofPr0, nSigOutTofPr0, float); //! -DECLARE_SOA_COLUMN(NSigOutTofPi1, nSigOutTofPi1, float); //! -DECLARE_SOA_COLUMN(NSigOutTofKa1, nSigOutTofKa1, float); //! -DECLARE_SOA_COLUMN(NSigOutTofPr1, nSigOutTofPr1, float); //! -DECLARE_SOA_COLUMN(NSigOutTofPi2, nSigOutTofPi2, float); //! -DECLARE_SOA_COLUMN(NSigOutTofKa2, nSigOutTofKa2, float); //! -DECLARE_SOA_COLUMN(NSigOutTofPr2, nSigOutTofPr2, float); //! +DECLARE_SOA_COLUMN(NSigTrkPi0, nSigTrkPi0, float); //! +DECLARE_SOA_COLUMN(NSigTrkKa0, nSigTrkKa0, float); //! +DECLARE_SOA_COLUMN(NSigTrkPr0, nSigTrkPr0, float); //! +DECLARE_SOA_COLUMN(NSigTrkPi1, nSigTrkPi1, float); //! +DECLARE_SOA_COLUMN(NSigTrkKa1, nSigTrkKa1, float); //! +DECLARE_SOA_COLUMN(NSigTrkPr1, nSigTrkPr1, float); //! +DECLARE_SOA_COLUMN(NSigTrkPi2, nSigTrkPi2, float); //! +DECLARE_SOA_COLUMN(NSigTrkKa2, nSigTrkKa2, float); //! +DECLARE_SOA_COLUMN(NSigTrkPr2, nSigTrkPr2, float); //! +DECLARE_SOA_COLUMN(NSigRichPi0, nSigRichPi0, float); //! +DECLARE_SOA_COLUMN(NSigRichKa0, nSigRichKa0, float); //! +DECLARE_SOA_COLUMN(NSigRichPr0, nSigRichPr0, float); //! +DECLARE_SOA_COLUMN(NSigRichPi1, nSigRichPi1, float); //! +DECLARE_SOA_COLUMN(NSigRichKa1, nSigRichKa1, float); //! +DECLARE_SOA_COLUMN(NSigRichPr1, nSigRichPr1, float); //! +DECLARE_SOA_COLUMN(NSigRichPi2, nSigRichPi2, float); //! +DECLARE_SOA_COLUMN(NSigRichKa2, nSigRichKa2, float); //! +DECLARE_SOA_COLUMN(NSigRichPr2, nSigRichPr2, float); //! +DECLARE_SOA_COLUMN(NSigInnTofPi0, nSigInnTofPi0, float); //! +DECLARE_SOA_COLUMN(NSigInnTofKa0, nSigInnTofKa0, float); //! +DECLARE_SOA_COLUMN(NSigInnTofPr0, nSigInnTofPr0, float); //! +DECLARE_SOA_COLUMN(NSigInnTofPi1, nSigInnTofPi1, float); //! +DECLARE_SOA_COLUMN(NSigInnTofKa1, nSigInnTofKa1, float); //! +DECLARE_SOA_COLUMN(NSigInnTofPr1, nSigInnTofPr1, float); //! +DECLARE_SOA_COLUMN(NSigInnTofPi2, nSigInnTofPi2, float); //! +DECLARE_SOA_COLUMN(NSigInnTofKa2, nSigInnTofKa2, float); //! +DECLARE_SOA_COLUMN(NSigInnTofPr2, nSigInnTofPr2, float); //! +DECLARE_SOA_COLUMN(NSigOutTofPi0, nSigOutTofPi0, float); //! +DECLARE_SOA_COLUMN(NSigOutTofKa0, nSigOutTofKa0, float); //! +DECLARE_SOA_COLUMN(NSigOutTofPr0, nSigOutTofPr0, float); //! +DECLARE_SOA_COLUMN(NSigOutTofPi1, nSigOutTofPi1, float); //! +DECLARE_SOA_COLUMN(NSigOutTofKa1, nSigOutTofKa1, float); //! +DECLARE_SOA_COLUMN(NSigOutTofPr1, nSigOutTofPr1, float); //! +DECLARE_SOA_COLUMN(NSigOutTofPi2, nSigOutTofPi2, float); //! +DECLARE_SOA_COLUMN(NSigOutTofKa2, nSigOutTofKa2, float); //! +DECLARE_SOA_COLUMN(NSigOutTofPr2, nSigOutTofPr2, float); //! // candidate properties DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! @@ -202,41 +202,41 @@ DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterXY, impactParameterXY, //! [](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz) -> float { return RecoDecay::impParXY(std::array{xVtxP, yVtxP, zVtxP}, std::array{xVtxS, yVtxS, zVtxS}, std::array{px, py, pz}); }); // ML scores columns -DECLARE_SOA_COLUMN(MlScore0, mlScore0, float); //! -DECLARE_SOA_COLUMN(MlScore1, mlScore1, float); //! -DECLARE_SOA_COLUMN(MlScore2, mlScore2, float); //! +DECLARE_SOA_COLUMN(MlScore0, mlScore0, float); //! +DECLARE_SOA_COLUMN(MlScore1, mlScore1, float); //! +DECLARE_SOA_COLUMN(MlScore2, mlScore2, float); //! } // namespace a3_hf_cand -#define HFCAND_COLUMNS \ - a3_hf_cand::CollisionId, \ - collision::PosX, collision::PosY, collision::PosZ, \ - a3_hf_cand::XSecondaryVertex, a3_hf_cand::YSecondaryVertex, a3_hf_cand::ZSecondaryVertex, \ - a3_hf_cand::ErrorDecayLength, a3_hf_cand::ErrorDecayLengthXY, \ - a3_hf_cand::Chi2PCA, \ - /* dynamic columns */ a3_hf_cand::RSecondaryVertex, \ - a3_hf_cand::DecayLength, \ - a3_hf_cand::DecayLengthXY, \ - a3_hf_cand::DecayLengthNormalised, \ - a3_hf_cand::DecayLengthXYNormalised +#define HFCAND_COLUMNS \ + a3_hf_cand::CollisionId, \ + collision::PosX, collision::PosY, collision::PosZ, \ + a3_hf_cand::XSecondaryVertex, a3_hf_cand::YSecondaryVertex, a3_hf_cand::ZSecondaryVertex, \ + a3_hf_cand::ErrorDecayLength, a3_hf_cand::ErrorDecayLengthXY, \ + a3_hf_cand::Chi2PCA, \ + /* dynamic columns */ a3_hf_cand::RSecondaryVertex, \ + a3_hf_cand::DecayLength, \ + a3_hf_cand::DecayLengthXY, \ + a3_hf_cand::DecayLengthNormalised, \ + a3_hf_cand::DecayLengthXYNormalised // general columns -#define HFPRONG0_COLUMNS \ +#define HFPRONG0_COLUMNS \ a3_hf_cand::ImpactParameterNormalised0, \ - a3_hf_cand::PtProng0, \ - a3_hf_cand::Pt2Prong0, \ - a3_hf_cand::PVectorProng0 + a3_hf_cand::PtProng0, \ + a3_hf_cand::Pt2Prong0, \ + a3_hf_cand::PVectorProng0 -#define HFPRONG1_COLUMNS \ +#define HFPRONG1_COLUMNS \ a3_hf_cand::ImpactParameterNormalised1, \ - a3_hf_cand::PtProng1, \ - a3_hf_cand::Pt2Prong1, \ - a3_hf_cand::PVectorProng1 + a3_hf_cand::PtProng1, \ + a3_hf_cand::Pt2Prong1, \ + a3_hf_cand::PVectorProng1 -#define HFPRONG2_COLUMNS \ +#define HFPRONG2_COLUMNS \ a3_hf_cand::ImpactParameterNormalised2, \ - a3_hf_cand::PtProng2, \ - a3_hf_cand::Pt2Prong2, \ - a3_hf_cand::PVectorProng2 + a3_hf_cand::PtProng2, \ + a3_hf_cand::Pt2Prong2, \ + a3_hf_cand::PVectorProng2 namespace a3DecayMap { @@ -309,22 +309,22 @@ DECLARE_SOA_TABLE(Alice3D0MCTruth, "AOD", "ALICE3D0MCTRUTH", //! namespace a3_hf_cand_3prong { DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! -DECLARE_SOA_COLUMN(Px, px, float); //! -DECLARE_SOA_COLUMN(Py, py, float); //! -DECLARE_SOA_COLUMN(Pz, pz, float); //! -DECLARE_SOA_COLUMN(Pt, pt, float); //! +DECLARE_SOA_COLUMN(Px, px, float); //! +DECLARE_SOA_COLUMN(Py, py, float); //! +DECLARE_SOA_COLUMN(Pz, pz, float); //! +DECLARE_SOA_COLUMN(Pt, pt, float); //! DECLARE_SOA_DYNAMIC_COLUMN(M, m, [](float px0, float py0, float pz0, float px1, float py1, float pz1, float px2, float py2, float pz2, const std::array& m) -> float { return RecoDecay::m(std::array{std::array{px0, py0, pz0}, - std::array{px1, py1, pz1}, - std::array{px2, py2, pz2}}, + std::array{px1, py1, pz1}, + std::array{px2, py2, pz2}}, m); }); DECLARE_SOA_DYNAMIC_COLUMN(E, e, //! [](float px, float py, float pz, const float m) -> float { return RecoDecay::e(px, py, pz, m); }); -DECLARE_SOA_COLUMN(Eta, eta, float); //! -DECLARE_SOA_COLUMN(Phi, phi, float); //! +DECLARE_SOA_COLUMN(Eta, eta, float); //! +DECLARE_SOA_COLUMN(Phi, phi, float); //! DECLARE_SOA_COLUMN(IsSwapped, isSwapped, bool); //! DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float px, float py, float pz, const float m) -> float { return RecoDecay::y(std::array{px, py, pz}, m); }); @@ -361,12 +361,11 @@ DECLARE_SOA_TABLE(Alice3Cand3Ps, "AOD", "ALICE3CAND3P", //! a3_hf_cand_3prong::M, - a3_hf_cand_3prong::E - ); + a3_hf_cand_3prong::E); namespace a3_hf_sel_3prong { -DECLARE_SOA_COLUMN(IsSel, isSel, bool); //! +DECLARE_SOA_COLUMN(IsSel, isSel, bool); //! // PID selection enum PidSels { @@ -385,7 +384,7 @@ enum PidSels { OutTofProng2, NPidSelections }; -DECLARE_SOA_COLUMN(PidBitMask, pidBitMask, uint32_t); //! +DECLARE_SOA_COLUMN(PidBitMask, pidBitMask, uint32_t); //! } // namespace a3_hf_sel_3prong DECLARE_SOA_TABLE(Alice3Sel3Ps, "AOD", "ALICE3SEL3P", //! a3_hf_sel_3prong::IsSel, @@ -393,19 +392,19 @@ DECLARE_SOA_TABLE(Alice3Sel3Ps, "AOD", "ALICE3SEL3P", //! namespace a3_mc_truth { -DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int); //! -DECLARE_SOA_COLUMN(BHadMotherPtRec, bHadMotherPtRec, float); //! -DECLARE_SOA_COLUMN(FlagMcRec, flagMcRec, int); //! -DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int); //! -DECLARE_SOA_COLUMN(BHadMotherPtGen, bHadMotherPtGen, float); //! -DECLARE_SOA_COLUMN(FlagMcGen, flagMcGen, int); //! +DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int); //! +DECLARE_SOA_COLUMN(BHadMotherPtRec, bHadMotherPtRec, float); //! +DECLARE_SOA_COLUMN(FlagMcRec, flagMcRec, int); //! +DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int); //! +DECLARE_SOA_COLUMN(BHadMotherPtGen, bHadMotherPtGen, float); //! +DECLARE_SOA_COLUMN(FlagMcGen, flagMcGen, int); //! } // namespace a3_mc_truth -DECLARE_SOA_TABLE(Alice3McRecFlags, "AOD", "ALICE3MCRECFLAG", //! +DECLARE_SOA_TABLE(Alice3McRecFlags, "AOD", "ALICE3MCRECFLAG", //! a3_mc_truth::OriginMcRec, a3_mc_truth::BHadMotherPtRec, a3_mc_truth::FlagMcRec); -DECLARE_SOA_TABLE(Alice3McGenFlags, "AOD", "ALICE3MCGENFLAG", //! +DECLARE_SOA_TABLE(Alice3McGenFlags, "AOD", "ALICE3MCGENFLAG", //! a3_mc_truth::OriginMcGen, a3_mc_truth::BHadMotherPtGen, a3_mc_truth::FlagMcGen); diff --git a/ALICE3/ML/alice3-mlresponse3prong.h b/ALICE3/ML/alice3-mlresponse3prong.h index 8fe778af211..d898663cc2c 100644 --- a/ALICE3/ML/alice3-mlresponse3prong.h +++ b/ALICE3/ML/alice3-mlresponse3prong.h @@ -16,7 +16,6 @@ #ifndef ALICE3_ML_ALICE3MLRESPONSE3PRONG_H_ #define ALICE3_ML_ALICE3MLRESPONSE3PRONG_H_ -#include "Tools/ML/MlResponse.h" #include "PWGHF/DataModel/CandidateReconstructionTables.h" #include "Tools/ML/MlResponse.h" @@ -38,10 +37,10 @@ // Specific case of CHECK_AND_FILL_ML_ALICE3_FULL(OBJECT, FEATURE, GETTER) // where OBJECT is named candidate and FEATURE = GETTER -#define CHECK_AND_FILL_ML_ALICE3(GETTER) \ - case static_cast(InputFeatures3Prong::GETTER): { \ - inputFeatures.emplace_back(candidate.GETTER()); \ - break; \ +#define CHECK_AND_FILL_ML_ALICE3(GETTER) \ + case static_cast(InputFeatures3Prong::GETTER): { \ + inputFeatures.emplace_back(candidate.GETTER()); \ + break; \ } namespace o2::analysis @@ -62,15 +61,15 @@ enum class InputFeatures3Prong : uint8_t { cpa, cpaXY, chi2PCA, - nSigRichPr0, // 0 - nSigRichKa0, // 0 - nSigRichPi0, // 0 - nSigRichPr1, // 1 - nSigRichKa1, // 1 - nSigRichPi1, // 1 - nSigRichPr2, // 2 - nSigRichKa2, // 2 - nSigRichPi2, // 2 + nSigRichPr0, // 0 + nSigRichKa0, // 0 + nSigRichPi0, // 0 + nSigRichPr1, // 1 + nSigRichKa1, // 1 + nSigRichPi1, // 1 + nSigRichPr2, // 2 + nSigRichKa2, // 2 + nSigRichPi2, // 2 nSigInnTofPr0, // 0 nSigInnTofKa0, // 0 nSigInnTofPi0, // 0 @@ -89,15 +88,15 @@ enum class InputFeatures3Prong : uint8_t { nSigOutTofPr2, // 2 nSigOutTofKa2, // 2 nSigOutTofPi2, // 2 - nSigTrkPr0, // 0 - nSigTrkKa0, // 0 - nSigTrkPi0, // 0 - nSigTrkPr1, // 1 - nSigTrkKa1, // 1 - nSigTrkPi1, // 1 - nSigTrkPr2, // 2 - nSigTrkKa2, // 2 - nSigTrkPi2 // 2 + nSigTrkPr0, // 0 + nSigTrkKa0, // 0 + nSigTrkPi0, // 0 + nSigTrkPr1, // 1 + nSigTrkKa1, // 1 + nSigTrkPi1, // 1 + nSigTrkPr2, // 2 + nSigTrkKa2, // 2 + nSigTrkPi2 // 2 }; template diff --git a/ALICE3/TableProducer/alice3-decayfinder.cxx b/ALICE3/TableProducer/alice3-decayfinder.cxx index fa0a797cd9b..bc9ddf125fc 100644 --- a/ALICE3/TableProducer/alice3-decayfinder.cxx +++ b/ALICE3/TableProducer/alice3-decayfinder.cxx @@ -17,38 +17,40 @@ // HF decays. Work in progress: use at your own risk! // -#include -#include -#include -#include -#include -#include +#include "PWGHF/Utils/utilsAnalysis.h" +#include "PWGLF/DataModel/LFParticleIdentification.h" +#include "PWGLF/DataModel/LFStrangenessTables.h" -#include "Framework/runDataProcessing.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/AnalysisTask.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/ASoAHelpers.h" -#include "DCAFitter/DCAFitterN.h" -#include "ReconstructionDataFormats/Track.h" +#include "ALICE3/DataModel/A3DecayFinderTables.h" +#include "ALICE3/DataModel/OTFPIDTrk.h" +#include "ALICE3/DataModel/OTFRICH.h" +#include "ALICE3/DataModel/OTFTOF.h" +#include "ALICE3/DataModel/RICH.h" #include "Common/Core/RecoDecay.h" -#include "Common/Core/trackUtilities.h" -#include "PWGLF/DataModel/LFStrangenessTables.h" -#include "PWGLF/DataModel/LFParticleIdentification.h" #include "Common/Core/TrackSelection.h" +#include "Common/Core/trackUtilities.h" #include "Common/DataModel/TrackSelectionTables.h" -#include "DetectorsBase/Propagator.h" -#include "DetectorsBase/GeometryManager.h" -#include "DataFormatsParameters/GRPObject.h" -#include "DataFormatsParameters/GRPMagField.h" + #include "CCDB/BasicCCDBManager.h" +#include "DCAFitter/DCAFitterN.h" #include "DataFormatsCalibration/MeanVertexObject.h" -#include "ALICE3/DataModel/OTFTOF.h" -#include "ALICE3/DataModel/OTFPIDTrk.h" -#include "ALICE3/DataModel/OTFRICH.h" -#include "ALICE3/DataModel/RICH.h" -#include "ALICE3/DataModel/A3DecayFinderTables.h" -#include "PWGHF/Utils/utilsAnalysis.h" +#include "DataFormatsParameters/GRPMagField.h" +#include "DataFormatsParameters/GRPObject.h" +#include "DetectorsBase/GeometryManager.h" +#include "DetectorsBase/Propagator.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/RunningWorkflowInfo.h" +#include "Framework/runDataProcessing.h" +#include "ReconstructionDataFormats/Track.h" + +#include +#include +#include +#include +#include +#include using namespace o2; using namespace o2::analysis; @@ -68,13 +70,13 @@ using Alice3TracksWPid = soa::Join candidateD0meson; // contains D0 and D0bar selected candidates (separated, i.e. each row with a single mass hypothesis) - Produces selectionOutcome; // flags for isSelD0 and isSelD0bar - Produces mcTruthOutcome; // contains MC truth info (is true D0, true D0bar, or bkg) - Produces candidate3Prong; // contains Lc selected candidates - Produces mcRecFlags; // contains MC truth info (is true Lc, or bkg) - Produces pidInfoLcDaugs; // contains PID info for Lc candidates - Produces mcGenFlags; // contains MC gen info for 3-prong candidates + Produces candidateD0meson; // contains D0 and D0bar selected candidates (separated, i.e. each row with a single mass hypothesis) + Produces selectionOutcome; // flags for isSelD0 and isSelD0bar + Produces mcTruthOutcome; // contains MC truth info (is true D0, true D0bar, or bkg) + Produces candidate3Prong; // contains Lc selected candidates + Produces mcRecFlags; // contains MC truth info (is true Lc, or bkg) + Produces pidInfoLcDaugs; // contains PID info for Lc candidates + Produces mcGenFlags; // contains MC gen info for 3-prong candidates Configurable fillSwapHypo{"fillSwapHypo", true, "swap prong 0 and prong 2 in 3-prong case"}; // Vertexing @@ -171,8 +173,8 @@ struct alice3decayFinder { // partitions for D mesons Partition tracksPiPlusFromD = ((aod::a3DecayMap::decayMap & trackSelectionPiPlusFromD) == trackSelectionPiPlusFromD) && - aod::track::signed1Pt > 0.0f && - nabs(aod::track::dcaXY) > piFromD_dcaXYconstant + piFromD_dcaXYpTdep* nabs(aod::track::signed1Pt); + aod::track::signed1Pt > 0.0f && + nabs(aod::track::dcaXY) > piFromD_dcaXYconstant + piFromD_dcaXYpTdep* nabs(aod::track::signed1Pt); Partition tracksPiMinusFromD = ((aod::a3DecayMap::decayMap & trackSelectionPiMinusFromD) == trackSelectionPiMinusFromD) && aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > piFromD_dcaXYconstant + piFromD_dcaXYpTdep* nabs(aod::track::signed1Pt); Partition tracksKaPlusFromD = @@ -215,36 +217,36 @@ struct alice3decayFinder { float normalizedDecayLength; int mcTruth; // 0 = bkg, 1 = D0, 2 = D0bar } dmeson; - + struct { float dcaDau; float mass; float pt; float phi; float eta; - std::array Pdaug0; // proton track - std::array Pdaug1; // kaon track - std::array Pdaug2; // pion track - std::array primaryVertex; // primary vertex coordinates + std::array Pdaug0; // proton track + std::array Pdaug1; // kaon track + std::array Pdaug2; // pion track + std::array primaryVertex; // primary vertex coordinates std::array secondaryVertex; // secondary vertex coordinates - float impactParameterY0; // impact parameters - float errorImpactParameterY0; // impact parameters error - float impactParameterY1; // impact parameters - float errorImpactParameterY1; // impact parameters error - float impactParameterY2; // impact parameters - float errorImpactParameterY2; // impact parameters error - float impactParameterZ0; // impact parameters - float errorImpactParameterZ0; // impact parameters error - float impactParameterZ1; // impact parameters - float errorImpactParameterZ1; // impact parameters error - float impactParameterZ2; // impact parameters - float errorImpactParameterZ2; // impact parameters error - float errorDecayLength; // normalized 3D decay length - float errorDecayLengthXY; // normalized 3D decay length - float chi2PCA; // normalized 3D decay length - int flagMc; // 0 = bkg, pdg code for signal - int origin; // 1 = prompt, 2 = non-prompt - float ptBMotherRec; // pT of the B hadron mother (reconstructed) + float impactParameterY0; // impact parameters + float errorImpactParameterY0; // impact parameters error + float impactParameterY1; // impact parameters + float errorImpactParameterY1; // impact parameters error + float impactParameterY2; // impact parameters + float errorImpactParameterY2; // impact parameters error + float impactParameterZ0; // impact parameters + float errorImpactParameterZ0; // impact parameters error + float impactParameterZ1; // impact parameters + float errorImpactParameterZ1; // impact parameters error + float impactParameterZ2; // impact parameters + float errorImpactParameterZ2; // impact parameters error + float errorDecayLength; // normalized 3D decay length + float errorDecayLengthXY; // normalized 3D decay length + float chi2PCA; // normalized 3D decay length + int flagMc; // 0 = bkg, pdg code for signal + int origin; // 1 = prompt, 2 = non-prompt + float ptBMotherRec; // pT of the B hadron mother (reconstructed) } cand3prong; template @@ -338,7 +340,7 @@ struct alice3decayFinder { return false; } //}-{}-{}-{}-{}-{}-{}-{}-{}-{} - + auto covMatrixPCA = fitter3.calcPCACovMatrixFlat(); cand3prong.chi2PCA = fitter3.getChi2AtPCACandidate(); cand3prong.dcaDau = TMath::Sqrt(fitter3.getChi2AtPCACandidate()); @@ -353,7 +355,7 @@ struct alice3decayFinder { trackParVar0 = fitter3.getTrack(0); trackParVar1 = fitter3.getTrack(1); trackParVar2 = fitter3.getTrack(2); - + std::array P0{}; std::array P1{}; std::array P2{}; @@ -396,8 +398,8 @@ struct alice3decayFinder { // return mass cand3prong.mass = RecoDecay::m(array{array{P0[0], P0[1], P0[2]}, - array{P1[0], P1[1], P1[2]}, - array{P2[0], P2[1], P2[2]}}, + array{P1[0], P1[1], P1[2]}, + array{P2[0], P2[1], P2[2]}}, daughtersMasses3Prong); cand3prong.pt = std::hypot(P0[0] + P1[0] + P2[0], P0[1] + P1[1] + P2[1]); @@ -423,7 +425,7 @@ struct alice3decayFinder { } else { cand3prong.flagMc = motherPart.pdgCode() > 0 ? charmHadFlag : -charmHadFlag; // Particle } - + cand3prong.origin = 0; if (indexRec > 0) { LOG(info) << "indexRec: " << indexRec; @@ -589,7 +591,6 @@ struct alice3decayFinder { histos.add("h2dDCAxyVsPtPrMinusFrom3P", "h2dDCAxyVsPtPrMinusFrom3P", kTH2F, {axisPt, axisDCA}); histos.add("hDcaXYProngs", "DCAxy of 3-prong candidate daughters;#it{p}_{T} (GeV/#it{c};#it{d}_{xy}) (#mum);entries", {HistType::kTH2F, {{100, 0., 20.}, {200, -500., 500.}}}); histos.add("hDcaZProngs", "DCAz of 3-prong candidate daughters;#it{p}_{T} (GeV/#it{c};#it{d}_{z}) (#mum);entries", {HistType::kTH2F, {{100, 0., 20.}, {200, -500., 500.}}}); - } } @@ -661,7 +662,7 @@ struct alice3decayFinder { if (mcParticle.pdgCode() > 0) { LOG(info) << "[P] Origin: " << origin << " PDG: " << charmHadFlag << " " << mcParticle.pdgCode(); histos.fill(HIST("h2dGen3Prong"), mcParticle.pt(), mcParticle.eta()); - } else { + } else { histos.fill(HIST("h2dGen3ProngBar"), mcParticle.pt(), mcParticle.eta()); LOG(info) << "[AP] Origin: " << origin << " PDG: " << -charmHadFlag << " " << mcParticle.pdgCode(); } @@ -985,7 +986,7 @@ struct alice3decayFinder { } //*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+* - template + template void fillPidTable(TProng const& prong0, TProng const& prong1, TProng const& prong2) { if (motherPdgCode == o2::constants::physics::Pdg::kLambdaCPlus) { @@ -998,7 +999,7 @@ struct alice3decayFinder { } //*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+* - template + template void fill3ProngTable(aod::Collision const& collision, TProng const& prongs0, TProng const& prongs1, TProng const& prongs2, aod::McParticles const& mcParticles) { // LOG(info) << "Filling 3-prong candidates with nprongs0: " << prongs0.size() << ", nprongs1: " << prongs1.size() << ", nprongs2: " << prongs2.size(); @@ -1042,8 +1043,7 @@ struct alice3decayFinder { std::sqrt(cand3prong.errorImpactParameterZ1), std::sqrt(cand3prong.errorImpactParameterZ2), false, // is swapped hypothesis - candPx, candPy, candPz - ); + candPx, candPy, candPz); mcRecFlags(cand3prong.origin, cand3prong.ptBMotherRec, cand3prong.flagMc); // placeholder for prompt/non-prompt fillPidTable(prong0, prong1, prong2); @@ -1070,8 +1070,7 @@ struct alice3decayFinder { std::sqrt(cand3prong.errorImpactParameterZ1), std::sqrt(cand3prong.errorImpactParameterZ0), true, // is swapped hypothesis - candPx, candPy, candPz - ); + candPx, candPy, candPz); mcRecFlags(cand3prong.origin, cand3prong.ptBMotherRec, cand3prong.flagMc); // placeholder for prompt/non-prompt fillPidTable(prong2, prong1, prong0); } diff --git a/ALICE3/TableProducer/alice3-decaypreselector.cxx b/ALICE3/TableProducer/alice3-decaypreselector.cxx index fef4b41c438..2021936b6e0 100644 --- a/ALICE3/TableProducer/alice3-decaypreselector.cxx +++ b/ALICE3/TableProducer/alice3-decaypreselector.cxx @@ -183,7 +183,7 @@ struct alice3decaypreselector { if (!checkPDG(track, +4122, +211)) { //+4122 -> +2212 -321 +211 bitoff(selectionMap[track.globalIndex()], kTruePiPlusFromLc); } - if (!checkPDG(track, -4122, -2212)){ //-4122 -> -2212 +321 -211 + if (!checkPDG(track, -4122, -2212)) { //-4122 -> -2212 +321 -211 bitoff(selectionMap[track.globalIndex()], kTruePrMinusFromLc); } if (!checkPDG(track, -4122, +321)) { //-4122 -> -2212 +321 -211 diff --git a/ALICE3/TableProducer/alice3-selector3prong.cxx b/ALICE3/TableProducer/alice3-selector3prong.cxx index 63d6bf2e0f5..31a375e28b4 100644 --- a/ALICE3/TableProducer/alice3-selector3prong.cxx +++ b/ALICE3/TableProducer/alice3-selector3prong.cxx @@ -14,18 +14,17 @@ /// /// \author Marcello Di Costanzo , Polytechnic University of Turin and INFN Turin -#include "ALICE3/ML/alice3-mlresponse3prong.h" -#include "ALICE3/DataModel/OTFTOF.h" -#include "ALICE3/DataModel/OTFPIDTrk.h" -#include "ALICE3/DataModel/OTFRICH.h" -#include "ALICE3/DataModel/RICH.h" -#include "ALICE3/DataModel/A3DecayFinderTables.h" - #include "PWGHF/Core/HfHelper.h" #include "PWGHF/Core/SelectorCuts.h" #include "PWGHF/DataModel/CandidateReconstructionTables.h" #include "PWGHF/DataModel/CandidateSelectionTables.h" +#include "ALICE3/DataModel/A3DecayFinderTables.h" +#include "ALICE3/DataModel/OTFPIDTrk.h" +#include "ALICE3/DataModel/OTFRICH.h" +#include "ALICE3/DataModel/OTFTOF.h" +#include "ALICE3/DataModel/RICH.h" +#include "ALICE3/ML/alice3-mlresponse3prong.h" #include "Common/Core/TrackSelectorPID.h" #include "Common/DataModel/PIDResponseCombined.h" @@ -61,7 +60,7 @@ enum Particles { /// Struct for applying Lc selection cuts struct Alice3Selector3Prong { - Produces candSelFlags; // flags for isSelLc + Produces candSelFlags; // flags for isSelLc Produces candMlScores; Configurable ptCandMin{"ptCandMin", 0., "Lower bound of cand pT"}; @@ -241,14 +240,14 @@ struct Alice3Selector3Prong { /// \param pidTrack0 is the PID status of proton cand track /// \param pidTrack1 is the PID status of kaon cand track /// \param pidTrack2 is the PID status of pion cand track - template + template void configurePidMask(const TCand& cand, uint32_t& pidMask) { - auto isSelPid = [&] (int selCut, float nsigma, float pt, float nSigmaMax, float ptMin, float ptMax) - { + auto isSelPid = [&](int selCut, float nsigma, float pt, float nSigmaMax, float ptMin, float ptMax) { bool isSelected = !(pt >= ptMin && pt < ptMax && std::abs(nsigma) > nSigmaMax); - if (isSelected) SETBIT(pidMask, selCut); + if (isSelected) + SETBIT(pidMask, selCut); return isSelected; }; @@ -291,7 +290,7 @@ struct Alice3Selector3Prong { bool isSel = false; std::vector outputMl{-1.f, -1.f, -1.f}; uint32_t pidMask = 0; - + // looping over 3-prong cands for (const auto& cand : cands) { isSel = false; diff --git a/ALICE3/TableProducer/alice3-treecreator3prong.cxx b/ALICE3/TableProducer/alice3-treecreator3prong.cxx index e3528be3b2c..051b3626f64 100644 --- a/ALICE3/TableProducer/alice3-treecreator3prong.cxx +++ b/ALICE3/TableProducer/alice3-treecreator3prong.cxx @@ -307,7 +307,7 @@ struct Alice3TreeCreator3Prong { /// \tparam TCand Type of candidate /// \param nCands Number of candidates to reserve space for /// \param cand Candidate to be used to check which PID tables to reserve - template + template void reserveTables(size_t nCands, const TCand& cand) { if (fillTables.fillCandVtxInfo) { @@ -340,23 +340,23 @@ struct Alice3TreeCreator3Prong { // PID tables if (fillTables.fillPid) { LOG(info) << "Reserving PID tables for " << nCands << " candidates."; - if constexpr ( requires { cand.nSigTrkPi0(); } ) + if constexpr (requires { cand.nSigTrkPi0(); }) rowPidPi0.reserve(nCands); - if constexpr ( requires { cand.nSigTrkPi1(); } ) + if constexpr (requires { cand.nSigTrkPi1(); }) rowPidPi1.reserve(nCands); - if constexpr ( requires { cand.nSigTrkPi2(); } ) + if constexpr (requires { cand.nSigTrkPi2(); }) rowPidPi2.reserve(nCands); - if constexpr ( requires { cand.nSigTrkKa0(); } ) + if constexpr (requires { cand.nSigTrkKa0(); }) rowPidKa0.reserve(nCands); - if constexpr ( requires { cand.nSigTrkKa1(); } ) + if constexpr (requires { cand.nSigTrkKa1(); }) rowPidKa1.reserve(nCands); - if constexpr ( requires { cand.nSigTrkKa2(); } ) + if constexpr (requires { cand.nSigTrkKa2(); }) rowPidKa2.reserve(nCands); - if constexpr ( requires { cand.nSigTrkPr0(); } ) + if constexpr (requires { cand.nSigTrkPr0(); }) rowPidPr0.reserve(nCands); - if constexpr ( requires { cand.nSigTrkPr1(); } ) + if constexpr (requires { cand.nSigTrkPr1(); }) rowPidPr1.reserve(nCands); - if constexpr ( requires { cand.nSigTrkPr2(); } ) + if constexpr (requires { cand.nSigTrkPr2(); }) rowPidPr2.reserve(nCands); } } @@ -408,7 +408,7 @@ struct Alice3TreeCreator3Prong { cand.errorImpactParameterZ1(), cand.errorImpactParameterZ2()); } - if constexpr ( requires { cand.mlScore0(); } ) { + if constexpr (requires { cand.mlScore0(); }) { if (fillTables.fillMlScoreInfo) { rowCandMls(cand.mlScore0(), cand.mlScore1(), cand.mlScore2()); } @@ -430,23 +430,23 @@ struct Alice3TreeCreator3Prong { // Fill PID tables if (fillTables.fillPid) { - if constexpr ( requires { cand.nSigTrkPi0(); } ) + if constexpr (requires { cand.nSigTrkPi0(); }) rowPidPi0(cand.nSigTrkPi0(), cand.nSigRichPi0(), cand.nSigInnTofPi0(), cand.nSigOutTofPi0()); - if constexpr ( requires { cand.nSigTrkPi1(); } ) + if constexpr (requires { cand.nSigTrkPi1(); }) rowPidPi1(cand.nSigTrkPi1(), cand.nSigRichPi1(), cand.nSigInnTofPi1(), cand.nSigOutTofPi1()); - if constexpr ( requires { cand.nSigTrkPi2(); } ) + if constexpr (requires { cand.nSigTrkPi2(); }) rowPidPi2(cand.nSigTrkPi2(), cand.nSigRichPi2(), cand.nSigInnTofPi2(), cand.nSigOutTofPi2()); - if constexpr ( requires { cand.nSigTrkKa0(); } ) + if constexpr (requires { cand.nSigTrkKa0(); }) rowPidKa0(cand.nSigTrkKa0(), cand.nSigRichKa0(), cand.nSigInnTofKa0(), cand.nSigOutTofKa0()); - if constexpr ( requires { cand.nSigTrkKa1(); } ) + if constexpr (requires { cand.nSigTrkKa1(); }) rowPidKa1(cand.nSigTrkKa1(), cand.nSigRichKa1(), cand.nSigInnTofKa1(), cand.nSigOutTofKa1()); - if constexpr ( requires { cand.nSigTrkKa2(); } ) + if constexpr (requires { cand.nSigTrkKa2(); }) rowPidKa2(cand.nSigTrkKa2(), cand.nSigRichKa2(), cand.nSigInnTofKa2(), cand.nSigOutTofKa2()); - if constexpr ( requires { cand.nSigTrkPr0(); } ) + if constexpr (requires { cand.nSigTrkPr0(); }) rowPidPr0(cand.nSigTrkPr0(), cand.nSigRichPr0(), cand.nSigInnTofPr0(), cand.nSigOutTofPr0()); - if constexpr ( requires { cand.nSigTrkPr1(); } ) + if constexpr (requires { cand.nSigTrkPr1(); }) rowPidPr1(cand.nSigTrkPr1(), cand.nSigRichPr1(), cand.nSigInnTofPr1(), cand.nSigOutTofPr1()); - if constexpr ( requires { cand.nSigTrkPr2(); } ) + if constexpr (requires { cand.nSigTrkPr2(); }) rowPidPr2(cand.nSigTrkPr2(), cand.nSigRichPr2(), cand.nSigInnTofPr2(), cand.nSigOutTofPr2()); } } @@ -474,9 +474,9 @@ struct Alice3TreeCreator3Prong { /// \tparam TCandsGen Type of generated candidates collection /// \param candsRec Reconstructed candidates collection /// \param candsGen Generated candidates collection - template + template void fillRecoGenTables(const TCandsRec& candsRec, - const TCandsGen& candsGen) + const TCandsGen& candsGen) { reserveTables(candsRec.size(), *candsRec.begin()); for (const auto& cand : candsRec) { @@ -513,7 +513,6 @@ struct Alice3TreeCreator3Prong { } } PROCESS_SWITCH(Alice3TreeCreator3Prong, processLcWMl, "Process Lc with ML", false); - }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) diff --git a/ALICE3/Tasks/alice3-task3prong.cxx b/ALICE3/Tasks/alice3-task3prong.cxx index 6d7076da1b8..175f8602cff 100644 --- a/ALICE3/Tasks/alice3-task3prong.cxx +++ b/ALICE3/Tasks/alice3-task3prong.cxx @@ -13,18 +13,17 @@ /// \brief 3-prong candidates analysis task for ALICE 3 simulation studies /// \author Marcello Di Costanzo , Polytechnic University of Turin and INFN Turin -#include "ALICE3/DataModel/A3DecayFinderTables.h" -#include "ALICE3/DataModel/OTFTOF.h" -#include "ALICE3/DataModel/OTFPIDTrk.h" -#include "ALICE3/DataModel/OTFRICH.h" -#include "ALICE3/DataModel/RICH.h" - #include "PWGHF/Core/DecayChannels.h" #include "PWGHF/Core/HfHelper.h" #include "PWGHF/Core/SelectorCuts.h" #include "PWGHF/DataModel/CandidateSelectionTables.h" #include "PWGHF/Utils/utilsAnalysis.h" +#include "ALICE3/DataModel/A3DecayFinderTables.h" +#include "ALICE3/DataModel/OTFPIDTrk.h" +#include "ALICE3/DataModel/OTFRICH.h" +#include "ALICE3/DataModel/OTFTOF.h" +#include "ALICE3/DataModel/RICH.h" #include "Common/Core/RecoDecay.h" #include "Common/DataModel/EventSelection.h" @@ -71,7 +70,7 @@ struct Alice3Task3Prong { HfHelper hfHelper; SliceCache cache; Service ccdb; - + int selectedPdg{-1}; using Cands3PReco = soa::Filtered>; @@ -353,7 +352,7 @@ struct Alice3Task3Prong { fillHistosMcGen(candsGenLcs); } PROCESS_SWITCH(Alice3Task3Prong, processLc, "Process Lc w/o ML sels", true); - + void processLcWMl(Cands3PRecoWMl const& candsLcWMl, Cands3PGen const&) { @@ -361,7 +360,6 @@ struct Alice3Task3Prong { fillHistosMcGen(candsGenLcs); } PROCESS_SWITCH(Alice3Task3Prong, processLcWMl, "Process Lc with ML sels", false); - }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) diff --git a/PWGHF/Core/HfHelper.h b/PWGHF/Core/HfHelper.h index e461adff7b2..83a03b8a7a4 100644 --- a/PWGHF/Core/HfHelper.h +++ b/PWGHF/Core/HfHelper.h @@ -1337,18 +1337,17 @@ class HfHelper return applySelectionDmesMlScoresForB(cuts, binsPtC, RecoDecay::pt(candB.pxProng0(), candB.pyProng0()), mlScores); } - /// Get candidate mass (ALICE3 HF data model) /// \tparam TCand candidate type /// \param cand candidate /// \return candidate mass - template + template static double getCandMass(const TCand& cand) { switch (CharmHad) { case o2::analysis::CharmHadAlice3::Lc: return cand.isSwapped() ? invMassLcToPiKP(cand) - : invMassLcToPKPi(cand); + : invMassLcToPKPi(cand); default: LOG(fatal) << "Unsupported charm hadron type"; return -1.; @@ -1359,7 +1358,7 @@ class HfHelper /// \tparam TCand candidate type /// \param cand candidate /// \return candidate energy - template + template static double getCandEnergy(const TCand& cand) { switch (CharmHad) { @@ -1375,10 +1374,10 @@ class HfHelper /// \tparam TCand candidate type /// \param cand candidate /// \return candidate rapidity - template + template static double getCandY(const TCand& cand) { - if constexpr ( requires { cand.flagMcRec(); } ) { + if constexpr (requires { cand.flagMcRec(); }) { switch (CharmHad) { case o2::analysis::CharmHadAlice3::Lc: return yLc(cand); @@ -1396,7 +1395,6 @@ class HfHelper } } } - }; #endif // PWGHF_CORE_HFHELPER_H_