diff --git a/PWGLF/DataModel/LFHypernucleiKfTables.h b/PWGLF/DataModel/LFHypernucleiKfTables.h index 328ab07f6b3..98f8076b2f6 100644 --- a/PWGLF/DataModel/LFHypernucleiKfTables.h +++ b/PWGLF/DataModel/LFHypernucleiKfTables.h @@ -8,11 +8,15 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -// authors Janik Ditzel and Michael Hartung + +/// \file LFHypernucleiKfTables.h +/// \brief Slim hypernuclei kf tables +/// \author Janik Ditzel and Michael Hartung #ifndef PWGLF_DATAMODEL_LFHYPERNUCLEIKFTABLES_H_ #define PWGLF_DATAMODEL_LFHYPERNUCLEIKFTABLES_H_ +#include #include "Framework/ASoA.h" #include "Framework/AnalysisDataModel.h" #include "Common/DataModel/Centrality.h" @@ -20,13 +24,13 @@ namespace o2::aod { -namespace hykfmcColl +namespace hykfmccoll { DECLARE_SOA_COLUMN(PassedEvSel, passedEvSel, bool); //! } DECLARE_SOA_TABLE(HypKfMcColls, "AOD", "HYPKFMCCOLL", o2::soa::Index<>, - hykfmcColl::PassedEvSel, + hykfmccoll::PassedEvSel, mccollision::PosX, mccollision::PosY, mccollision::PosZ); @@ -40,9 +44,10 @@ DECLARE_SOA_COLUMN(IsPhysicalPrimary, isPhysicalPrimary, bool); //! DECLARE_SOA_COLUMN(Svx, svx, float); //! DECLARE_SOA_COLUMN(Svy, svy, float); //! DECLARE_SOA_COLUMN(Svz, svz, float); //! +DECLARE_SOA_COLUMN(Occupancy, occupancy, int); //! DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float px, float py) { return RecoDecay::pt(std::array{px, py}); }); -DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float E, float pz) { return 0.5 * TMath::Log((E + pz) / (E - pz)); }); -DECLARE_SOA_DYNAMIC_COLUMN(Mass, mass, [](float E, float px, float py, float pz) { return TMath::Sqrt(E * E - px * px - py * py - pz * pz); }); +DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float E, float pz) { return 0.5 * std::log((E + pz) / (E - pz)); }); +DECLARE_SOA_DYNAMIC_COLUMN(Mass, mass, [](float E, float px, float py, float pz) { return std::sqrt(E * E - px * px - py * py - pz * pz); }); DECLARE_SOA_DYNAMIC_COLUMN(IsMatter, isMatter, [](int pdgCode) { return pdgCode > 0; }); } // namespace hykfmc @@ -67,34 +72,35 @@ using HypKfMcPart = HypKfMcParts::iterator; DECLARE_SOA_TABLE(HypKfColls, "AOD", "HYPKFCOLL", o2::soa::Index<>, - hykfmcColl::PassedEvSel, + hykfmccoll::PassedEvSel, hykfmc::HypKfMcCollId, collision::PosX, collision::PosY, collision::PosZ, cent::CentFT0A, cent::CentFT0C, - cent::CentFT0M); + cent::CentFT0M, + hykfmc::Occupancy); using HypKfColl = HypKfColls::iterator; namespace hykftrk { DECLARE_SOA_INDEX_COLUMN(HypKfColl, hypKfColl); DECLARE_SOA_COLUMN(Rigidity, rigidity, float); //! -DECLARE_SOA_COLUMN(TPCnCluster, tpcNcluster, float); //! -DECLARE_SOA_COLUMN(TPCnSigma, tpcNsigma, float); //! -DECLARE_SOA_COLUMN(TPCnSigmaNhp, tpcNsigmaNhp, float); //! -DECLARE_SOA_COLUMN(TPCnSigmaNlp, tpcNsigmaNlp, float); //! -DECLARE_SOA_COLUMN(TOFMass, tofMass, float); //! +DECLARE_SOA_COLUMN(TpcNcluster, tpcNcluster, float); //! +DECLARE_SOA_COLUMN(TpcNsigma, tpcNsigma, float); //! +DECLARE_SOA_COLUMN(TpcNsigmaNhp, tpcNsigmaNhp, float); //! +DECLARE_SOA_COLUMN(TpcNsigmaNlp, tpcNsigmaNlp, float); //! +DECLARE_SOA_COLUMN(TofMass, tofMass, float); //! DECLARE_SOA_COLUMN(IsPVContributor, isPVContributor, bool); //! DECLARE_SOA_COLUMN(SubMass, subMass, float); //! -DECLARE_SOA_DYNAMIC_COLUMN(Px, px, [](float pt, float phi) { return (double)pt * TMath::Cos(phi); }); -DECLARE_SOA_DYNAMIC_COLUMN(Py, py, [](float pt, float phi) { return (double)pt * TMath::Sin(phi); }); -DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, [](float pt, float eta) { return (double)pt * TMath::SinH(eta); }); -DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float pt, float eta) { return pt * TMath::CosH(eta); }); // -DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float pt, float eta, float mass) { return std::log((RecoDecay::sqrtSumOfSquares(mass, pt * TMath::CosH(eta)) + pt * TMath::SinH(eta)) / RecoDecay::sqrtSumOfSquares(mass, pt)); }); -DECLARE_SOA_DYNAMIC_COLUMN(Lambda, lambda, [](float eta) { return 1. / TMath::CosH(eta); }); -DECLARE_SOA_DYNAMIC_COLUMN(ITSnCluster, itsNcluster, [](uint32_t itsClusterSizes) { +DECLARE_SOA_DYNAMIC_COLUMN(Px, px, [](float pt, float phi) { return (double)pt * std::cos(phi); }); +DECLARE_SOA_DYNAMIC_COLUMN(Py, py, [](float pt, float phi) { return (double)pt * std::sin(phi); }); +DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, [](float pt, float eta) { return (double)pt * std::sinh(eta); }); +DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float pt, float eta) { return pt * std::cosh(eta); }); // +DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float pt, float eta, float mass) { return std::log((RecoDecay::sqrtSumOfSquares(mass, pt * std::cosh(eta)) + pt * std::sinh(eta)) / RecoDecay::sqrtSumOfSquares(mass, pt)); }); +DECLARE_SOA_DYNAMIC_COLUMN(Lambda, lambda, [](float eta) { return 1. / std::cosh(eta); }); +DECLARE_SOA_DYNAMIC_COLUMN(ItsNcluster, itsNcluster, [](uint32_t itsClusterSizes) { uint8_t n = 0; for (uint8_t i = 0; i < 7; i++) { if (itsClusterSizes >> (4 * i) & 15) @@ -102,21 +108,21 @@ DECLARE_SOA_DYNAMIC_COLUMN(ITSnCluster, itsNcluster, [](uint32_t itsClusterSizes } return n; }); -DECLARE_SOA_DYNAMIC_COLUMN(ITSfirstLayer, itsFirstLayer, [](uint32_t itsClusterSizes) { +DECLARE_SOA_DYNAMIC_COLUMN(ItsFirstLayer, itsFirstLayer, [](uint32_t itsClusterSizes) { for (int i = 0; i < 8; i++) { if (itsClusterSizes >> (4 * i) & 15) return i; } return -999; }); -DECLARE_SOA_DYNAMIC_COLUMN(ITSmeanClsSize, itsMeanClsSize, [](uint32_t itsClusterSizes) { +DECLARE_SOA_DYNAMIC_COLUMN(ItsMeanClsSize, itsMeanClsSize, [](uint32_t itsClusterSizes) { int sum = 0, n = 0; for (int i = 0; i < 8; i++) { sum += (itsClusterSizes >> (4 * i) & 15); if (itsClusterSizes >> (4 * i) & 15) n++; } - return static_cast(sum) / n; + return n > 0 ? static_cast(sum) / n : 0.f; }); } // namespace hykftrk @@ -128,25 +134,25 @@ DECLARE_SOA_TABLE(HypKfTracks, "AOD", "HYPKFTRACK", track::Phi, track::DcaXY, track::DcaZ, - hykftrk::TPCnCluster, + hykftrk::TpcNcluster, track::TPCChi2NCl, track::ITSClusterSizes, track::ITSChi2NCl, hykftrk::Rigidity, track::TPCSignal, - hykftrk::TPCnSigma, - hykftrk::TPCnSigmaNhp, - hykftrk::TPCnSigmaNlp, - hykftrk::TOFMass, + hykftrk::TpcNsigma, + hykftrk::TpcNsigmaNhp, + hykftrk::TpcNsigmaNlp, + hykftrk::TofMass, hykftrk::IsPVContributor, hykftrk::Px, hykftrk::Py, hykftrk::Pz, hykftrk::P, hykftrk::Lambda, - hykftrk::ITSnCluster, - hykftrk::ITSfirstLayer, - hykftrk::ITSmeanClsSize); + hykftrk::ItsNcluster, + hykftrk::ItsFirstLayer, + hykftrk::ItsMeanClsSize); using HypKfTrack = HypKfTracks::iterator; DECLARE_SOA_TABLE(HypKfSubDs, "AOD", "HYPKFSUBD", @@ -168,10 +174,10 @@ namespace hykfhyp { DECLARE_SOA_INDEX_COLUMN(HypKfColl, hypKfColl); DECLARE_SOA_INDEX_COLUMN(HypKfMcPart, hypKfMcPart); -DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfDaughtAdd, addons); -DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfTrack, daughterTracks); +DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfDaughtAdd, hypKfDaughtAdd); +DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfTrack, hypKfTrack); DECLARE_SOA_SELF_INDEX_COLUMN_FULL(HypDaughter, hypDaughter, int, "HypKfHypNucs"); -DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfSubD, subDaughters); +DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfSubD, hypKfSubD); DECLARE_SOA_COLUMN(Primary, primary, bool); //! DECLARE_SOA_COLUMN(Mass, mass, float); //! DECLARE_SOA_COLUMN(Px, px, float); //! diff --git a/PWGLF/TableProducer/Nuspex/hypKfRecoTask.cxx b/PWGLF/TableProducer/Nuspex/hypKfRecoTask.cxx index 353459c835b..a3a3db2e936 100644 --- a/PWGLF/TableProducer/Nuspex/hypKfRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/hypKfRecoTask.cxx @@ -9,10 +9,10 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. /// -/// \brief Hypernuclei rconstruction using KGParticle package -/// \authors Janik Ditzel and Michael Hartung +/// \file hypKfRecoTask.cxx +/// \brief Hypernuclei rconstruction using KFParticle package +/// \author Janik Ditzel and Michael Hartung -#include #include #include #include @@ -42,7 +42,7 @@ // KFParticle #ifndef HomogeneousField -#define HomogeneousField +#define HomogeneousField // o2-linter: disable=[name/macro] #endif #include "KFParticle.h" #include "KFPTrack.h" @@ -78,22 +78,22 @@ static const std::vector particleCharge{1, 1, 1, 1, 2, 2}; const int nBetheParams = 6; static const std::vector betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"}; constexpr double betheBlochDefault[nDaughterParticles][nBetheParams]{ - {14.182511, 3.784237, 0.010118, 1.775545, 0.742465, 0.09}, // pion - {23.248183, 2.357092, -0.143924, 2.178266, 0.416733, 0.09}, // proton - {12.881922, 3.775785, 0.062699, 2.452242, 1.049385, 0.09}, // deuteron - {0.313129, 181.664226, 2779397163087.684082, 2.130773, 29.609643, 0.09}, // triton - {70.584685, 3.196364, 0.133878, 2.731736, 1.675617, 0.09}, // helion - {105.625770, 0.868172, -0.871411, 1.895609, 0.046273, 0.09}}; // alpha - -const int nTrkSettings = 13; -static const std::vector trackPIDsettingsNames{"useBBparams", "minITSnCls", "minTPCnCls", "maxTPCchi2", "maxITSchi2", "minRigidity", "maxRigidity", "maxTPCnSigma", "TOFrequiredabove", "minTOFmass", "maxTOFmass", "minDcaToPvXY", "minDcaToPvZ"}; + {13.611469, 3.598765, -0.021138, 2.039562, 0.651040, 0.09}, // pion + {5.393020, 7.859534, 0.004048, 2.323197, 1.609307, 0.09}, // proton + {5.393020, 7.859534, 0.004048, 2.323197, 1.609307, 0.09}, // deuteron + {5.393020, 7.859534, 0.004048, 2.323197, 1.609307, 0.09}, // triton + {-126.557359, -0.858569, 1.111643, 1.210323, 2.656374, 0.09}, // helion + {-126.557359, -0.858569, 1.111643, 1.210323, 2.656374, 0.09}}; // alpha + +const int nTrkSettings = 15; +static const std::vector trackPIDsettingsNames{"useBBparams", "minITSnCls", "minTPCnCls", "maxTPCchi2", "maxITSchi2", "minRigidity", "maxRigidity", "maxTPCnSigma", "TOFrequiredabove", "minTOFmass", "maxTOFmass", "minDcaToPvXY", "minDcaToPvZ", "minITSclsSize", "maxITSclsSize"}; constexpr double trackPIDsettings[nDaughterParticles][nTrkSettings]{ - {0, 0, 50, 5, 50, 0.2, 1.2, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}}; + {0, 0, 60, 3.0, 5000, 0.15, 1.2, 2.5, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 70, 2.5, 5000, 0.20, 4.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 70, 5.0, 5000, 0.50, 5.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 70, 5.0, 5000, 0.50, 5.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 75, 1.5, 5000, 0.50, 5.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 70, 1.5, 5000, 0.50, 5.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}}; static const int nHyperNuclei = 10; static const std::vector hyperNucNames{"L->p+pi", "3LH->3He+pi", "3LH->d+p+pi", "4LH->4He+pi", "4LH->t+p+pi", "4LHe->3He+p+pi", "5LHe->4He+p+pi", "5LHe->3He+d+pi", "custom1", "custom2"}; @@ -119,29 +119,29 @@ static const std::string hyperNucSigns[nHyperNuclei][4]{{"+", "-", "", ""}, {"+" const int nSelPrim = 8; static const std::vector preSelectionPrimNames{"minMass", "maxMass", "minCt", "maxCt", "minCosPa", "maxDcaTracks", "maxDcaMotherToPvXY", "maxDcaMotherToPvZ"}; constexpr double preSelectionsPrimaries[nHyperNuclei][nSelPrim]{ - {1.0, 1.3, 0, 100, -1., 100., 10., 10.}, - {2.9, 3.1, 0, 100, -1., 100., 10., 10.}, - {2.9, 3.1, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {4.6, 5.2, 0, 100, -1., 100., 10., 10.}, - {4.6, 5.2, 0, 100, -1., 100., 10., 10.}, - {0.0, 9.9, 0, 100, -1., 100., 10., 10.}, - {0.0, 9.9, 0, 100, -1., 100., 10., 10.}}; + {1.00, 1.30, 0, 50, 0.90, 100., 2.0, 5.0}, + {2.96, 3.04, 0, 30, 0.99, 100., 1.5, 4.0}, + {2.96, 3.04, 0, 30, 0.99, 100., 1.5, 4.0}, + {3.87, 3.97, 0, 30, 0.95, 100., 2.0, 5.0}, + {3.87, 3.97, 0, 30, 0.95, 100., 2.0, 5.0}, + {3.85, 3.99, 0, 30, 0.98, 100., 1.5, 4.0}, + {4.60, 5.20, 0, 100, -1., 100., 10., 10.}, + {4.60, 5.20, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}}; const int nSelSec = 8; static const std::vector preSelectionSecNames{"minMass", "maxMass", "minCt", "maxCt", "minCosPaSv", "maxDcaTracks", "maxDcaMotherToSvXY", "maxDcaMotherToSvZ"}; constexpr double preSelectionsSecondaries[nHyperNuclei][nSelSec]{ - {1.0, 1.3, 0, 100, -1., 100., 10., 10.}, - {2.9, 3.1, 0, 100, -1., 100., 10., 10.}, - {2.9, 3.1, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {4.6, 5.2, 0, 100, -1., 100., 10., 10.}, - {4.6, 5.2, 0, 100, -1., 100., 10., 10.}, - {0.0, 9.9, 0, 100, -1., 100., 10., 10.}, - {0.0, 9.9, 0, 100, -1., 100., 10., 10.}}; + {1.00, 1.30, 0, 50, 0.90, 100., 2.0, 5.0}, + {2.96, 3.04, 0, 30, 0.99, 100., 1.5, 4.0}, + {2.96, 3.04, 0, 30, 0.99, 100., 1.5, 4.0}, + {3.87, 3.97, 0, 30, 0.95, 100., 2.0, 5.0}, + {3.87, 3.97, 0, 30, 0.95, 100., 2.0, 5.0}, + {3.85, 3.99, 0, 30, 0.98, 100., 1.5, 4.0}, + {4.60, 5.20, 0, 100, -1., 100., 10., 10.}, + {4.60, 5.20, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}}; static const int nCascades = 6; static const std::vector cascadeNames{"4LLH->4LHe+pi", "4XHe->4LHe+pi", "custom1", "custom2", "custom3", "custom4"}; @@ -161,15 +161,15 @@ static const std::string cascadeSigns[nCascades][4]{{"+", "-", "", ""}, {"+", "- const int nSelCas = 8; static const std::vector preSelectionCascadeNames{"minMass", "maxMass", "minCt", "maxCt", "minCosPa", "maxDcaTracks", "maxDcaMotherToPvXY", "maxDcaMotherToPvZ"}; constexpr double preSelectionsCascades[nCascades][nSelCas]{ - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}}; + {4.00, 4.20, 0, 30, 0.95, 100., 2.0, 5.}, + {4.00, 4.20, 0, 30, 0.95, 100., 2.0, 5.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}}; //---------------------------------------------------------------------------------------------------------------- -struct daughterParticle { +struct DaughterParticle { TString name; int pdgCode; double mass; @@ -177,7 +177,7 @@ struct daughterParticle { double resolution; std::vector betheParams; - daughterParticle(std::string name_, int pdgCode_, double mass_, int charge_, LabeledArray bethe) + DaughterParticle(std::string name_, int pdgCode_, double mass_, int charge_, LabeledArray bethe) { name = TString(name_); pdgCode = pdgCode_; @@ -188,19 +188,9 @@ struct daughterParticle { for (unsigned int i = 0; i < 5; i++) betheParams.push_back(bethe.get(name, i)); } +}; // class DaughterParticle - void Print() - { - std::cout << std::endl - << "Daughter: " << name << std::endl; - std::cout << "PDG: " << pdgCode << ", Mass: " << mass << ", Charge: " << charge << std::endl; - for (double d : betheParams) - std::cout << d << ", " << std::flush; - std::cout << resolution << std::endl; - } -}; // class daughterParticle - -struct hyperNucleus { +struct HyperNucleus { TString name; int pdgCode; double massMax; @@ -209,48 +199,37 @@ struct hyperNucleus { std::vector daughters; std::vector daughterTrackSigns; - hyperNucleus(std::string name_, int pdgCode_, bool active_, std::vector daughters_, std::vector daughterTrackSigns_) + HyperNucleus(std::string name_, int pdgCode_, bool active_, std::vector daughters_, std::vector daughterTrackSigns_) { name = TString(name_); pdgCode = pdgCode_; active = active_; - for (int d : daughters_) + for (const int& d : daughters_) daughters.push_back(d); - for (int dc : daughterTrackSigns_) + for (const int& dc : daughterTrackSigns_) daughterTrackSigns.push_back(dc); } - hyperNucleus(std::string name_, int pdgCode_, bool active_, int hypDaughter, std::vector daughters_, std::vector daughterTrackSigns_) + HyperNucleus(std::string name_, int pdgCode_, bool active_, int hypDaughter, std::vector daughters_, std::vector daughterTrackSigns_) { daughters.push_back(hypDaughter); name = TString(name_); pdgCode = pdgCode_; active = active_; - for (int d : daughters_) + for (const int& d : daughters_) daughters.push_back(d); - for (int dc : daughterTrackSigns_) + for (const int& dc : daughterTrackSigns_) daughterTrackSigns.push_back(dc); } - int GetNdaughters() { return static_cast(daughters.size()); } + int getNdaughters() { return static_cast(daughters.size()); } const char* motherName() { return name.Contains("->") ? ((TString)name(0, name.First("-"))).Data() : name.Data(); } const char* daughterNames() { return name.Contains("->") ? ((TString)name(name.First("-") + 2, name.Length())).Data() : ""; } - void Print() - { - std::cout << std::endl - << "Hypernucleus: " << name << " (" << pdgCode << "):" << (active ? " active" : " not active") << std::endl; - for (double d : daughters) - std::cout << d << ", " << std::flush; - for (double dc : daughterTrackSigns) - std::cout << dc << ", " << std::flush; - std::cout << std::endl - << std::endl; - } -}; // class hyperNucleus +}; // class HyperNucleus -struct hyperNucCandidate { +struct HyperNucCandidate { int species; KFParticle kfp; std::vector kfpDaughters; - hyperNucCandidate* hypNucDaughter; + HyperNucCandidate* hypNucDaughter; std::vector daughterTrackIds; std::vector recoSV; float devToVtx; @@ -263,24 +242,24 @@ struct hyperNucCandidate { int64_t mcParticleId; int tableId; - hyperNucCandidate(int species_, std::vector kfpDaughters_, std::vector daughterTrackIds_) : species(species_), hypNucDaughter(0), devToVtx(999), dcaToVtxXY(999), dcaToVtxZ(999), chi2(999), mcTrue(false), isPhysPrimary(false), isPrimaryCandidate(false), isSecondaryCandidate(false), isUsedSecondary(false), mcParticleId(-1), tableId(-1) + HyperNucCandidate(int species_, std::vector kfpDaughters_, std::vector daughterTrackIds_) : species(species_), hypNucDaughter(0), devToVtx(999), dcaToVtxXY(999), dcaToVtxZ(999), chi2(999), mcTrue(false), isPhysPrimary(false), isPrimaryCandidate(false), isSecondaryCandidate(false), isUsedSecondary(false), mcParticleId(-1), tableId(-1) { - for (auto kfd : kfpDaughters_) + for (const auto& kfd : kfpDaughters_) kfpDaughters.push_back(kfd); - for (auto dt : daughterTrackIds_) + for (const auto& dt : daughterTrackIds_) daughterTrackIds.push_back(dt); - Init(); + init(); } - hyperNucCandidate(int species_, hyperNucCandidate* hypNucDaughter_, std::vector kfpDaughters_, std::vector daughterTrackIds_) : species(species_), hypNucDaughter(hypNucDaughter_), devToVtx(999), dcaToVtxXY(999), dcaToVtxZ(999), chi2(999), mcTrue(false), isPhysPrimary(false), isPrimaryCandidate(false), isSecondaryCandidate(false), isUsedSecondary(false), mcParticleId(-1), tableId(-1) + HyperNucCandidate(int species_, HyperNucCandidate* hypNucDaughter_, std::vector kfpDaughters_, std::vector daughterTrackIds_) : species(species_), hypNucDaughter(hypNucDaughter_), devToVtx(999), dcaToVtxXY(999), dcaToVtxZ(999), chi2(999), mcTrue(false), isPhysPrimary(false), isPrimaryCandidate(false), isSecondaryCandidate(false), isUsedSecondary(false), mcParticleId(-1), tableId(-1) { - for (auto kfd : kfpDaughters_) + for (const auto& kfd : kfpDaughters_) kfpDaughters.push_back(kfd); - for (auto dt : daughterTrackIds_) + for (const auto& dt : daughterTrackIds_) daughterTrackIds.push_back(dt); - Init(); + init(); } - void Init() + void init() { kfp.SetConstructMethod(2); for (size_t i = 0; i < kfpDaughters.size(); i++) @@ -292,7 +271,7 @@ struct hyperNucCandidate { recoSV.push_back(kfp.GetY()); recoSV.push_back(kfp.GetZ()); } - bool CheckKfp() + bool checkKfp() { if (kfp.GetMass() == 0) return false; @@ -300,67 +279,67 @@ struct hyperNucCandidate { return false; return true; } - int GetDaughterTableId() + int getDaughterTableId() { if (hypNucDaughter) return hypNucDaughter->tableId; return -1; } - bool IsCascade() { return hypNucDaughter != 0; } - int GetSign() + bool isCascade() { return hypNucDaughter != 0; } + int getSign() { if (kfp.GetQ() == 0) return kfpDaughters.front().GetQ() / std::abs(kfpDaughters.front().GetQ()); return kfp.GetQ() / std::abs(kfp.GetQ()); } - int GetNdaughters() { return static_cast(kfpDaughters.size()); } - float GetDcaTracks() { return GetNdaughters() == 2 ? GetDcaTracks2() : GetMaxDcaToSv(); } - float GetDcaTracks2() { return kfpDaughters.at(0).GetDistanceFromParticle(kfpDaughters.at(1)); } - float GetMaxDcaToSv() + int getNdaughters() { return static_cast(kfpDaughters.size()); } + float getDcaTracks() { return getNdaughters() == 2 ? getDcaTracks2() : getMaxDcaToSv(); } + float getDcaTracks2() { return kfpDaughters.at(0).GetDistanceFromParticle(kfpDaughters.at(1)); } + float getMaxDcaToSv() { float maxDca = std::numeric_limits::lowest(); - for (auto& daughter : kfpDaughters) { + for (const auto& daughter : kfpDaughters) { float dca = daughter.GetDistanceFromVertex(&recoSV[0]); if (dca > maxDca) maxDca = dca; } return maxDca; } - float GetDcaMotherToVertex(std::vector vtx) { return kfp.GetDistanceFromVertex(&vtx[0]); } - double GetCpa(std::vector vtx) + float getDcaMotherToVertex(std::vector vtx) { return kfp.GetDistanceFromVertex(&vtx[0]); } + double getCpa(std::vector vtx) { kfp.TransportToDecayVertex(); return RecoDecay::cpa(std::array{vtx[0], vtx[1], vtx[2]}, std::array{recoSV[0], recoSV[1], recoSV[2]}, std::array{kfp.GetPx(), kfp.GetPy(), kfp.GetPz()}); ; } - float GetCt(std::vector vtx) + float getCt(std::vector vtx) { float dl = 0; for (size_t i = 0; i < vtx.size(); i++) { float tmp = recoSV.at(i) - vtx.at(i); dl += (tmp * tmp); } - return TMath::Sqrt(dl) * kfp.GetMass() / kfp.GetP(); + return std::sqrt(dl) * kfp.GetMass() / kfp.GetP(); } - float GetDcaMotherToVtxXY(std::vector vtx) { return kfp.GetDistanceFromVertexXY(&vtx[0]); } - float GetDcaMotherToVtxZ(std::vector vtx) + float getDcaMotherToVtxXY(std::vector vtx) { return kfp.GetDistanceFromVertexXY(&vtx[0]); } + float getDcaMotherToVtxZ(std::vector vtx) { kfp.TransportToPoint(&vtx[0]); - return std::abs(kfp.GetZ() - vtx[2]); + return kfp.GetZ() - vtx[2]; } - void GetDaughterPosMom(int daughter, std::vector& posMom) + void getDaughterPosMom(int daughter, std::vector& posMom) { kfpDaughters.at(daughter).TransportToPoint(&recoSV[0]); posMom.assign({kfpDaughters.at(daughter).GetX(), kfpDaughters.at(daughter).GetY(), kfpDaughters.at(daughter).GetZ(), kfpDaughters.at(daughter).GetPx(), kfpDaughters.at(daughter).GetPy(), kfpDaughters.at(daughter).GetPz()}); } - void CalcDevToVtx(KFPVertex& vtx) { devToVtx = kfp.GetDeviationFromVertexXY(vtx); } - void CalcDevToVtx(hyperNucCandidate& cand) + void calcDevToVtx(KFPVertex& vtx) { devToVtx = kfp.GetDeviationFromVertexXY(vtx); } + void calcDevToVtx(HyperNucCandidate& cand) { devToVtx = kfp.GetDeviationFromParticleXY(cand.kfp); - dcaToVtxXY = GetDcaMotherToVtxXY(cand.recoSV); - dcaToVtxZ = GetDcaMotherToVtxZ(cand.recoSV); + dcaToVtxXY = getDcaMotherToVtxXY(cand.recoSV); + dcaToVtxZ = getDcaMotherToVtxZ(cand.recoSV); } - float GetSubDaughterMass(int d1, int d2) + float getSubDaughterMass(int d1, int d2) { KFParticle subDaughter; subDaughter.SetConstructMethod(2); @@ -369,16 +348,30 @@ struct hyperNucCandidate { subDaughter.TransportToDecayVertex(); return subDaughter.GetMass(); } -}; // class hyperNucCandidate + KFParticle getDaughterTrackKfp(int track) + { + return kfpDaughters.at(track + isCascade() ? 1 : 0); + } + float getDcaTrackToVtxXY(int track, std::vector vtx) + { + return getDaughterTrackKfp(track).GetDistanceFromVertexXY(&vtx[0]); + } + float getDcaTrackToVtxZ(int track, std::vector vtx) + { + auto dKfp = getDaughterTrackKfp(track); + dKfp.TransportToPoint(&vtx[0]); + return dKfp.GetZ() - vtx[2]; + } +}; // class HyperNucCandidate -struct indexPairs { +struct IndexPairs { std::vector> pairs; - void Add(int64_t a, int b) { pairs.push_back({a, b}); } - void Clear() { pairs.clear(); } - bool GetIndex(int64_t a, int& b) + void add(int64_t a, int b) { pairs.push_back({a, b}); } + void clear() { pairs.clear(); } + bool getIndex(int64_t a, int& b) { - for (auto& pair : pairs) { + for (const auto& pair : pairs) { if (pair.first == a) { b = pair.second; return true; @@ -386,15 +379,15 @@ struct indexPairs { } return false; } -}; // class indexPairs +}; // class IndexPairs -struct mcCollInfo { +struct McCollInfo { bool hasRecoColl; bool passedEvSel; bool hasRecoParticle; int tableIndex; - mcCollInfo() : hasRecoColl(false), passedEvSel(false), hasRecoParticle(false), tableIndex(-1) {} -}; // class mcCollInfo + McCollInfo() : hasRecoColl(false), passedEvSel(false), hasRecoParticle(false), tableIndex(-1) {} +}; // class McCollInfo //---------------------------------------------------------------------------------------------------------------- std::vector> hDeDx; @@ -403,7 +396,7 @@ std::vector> hInvMass; //---------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------- -struct hypKfRecoTask { +struct hypKfRecoTask { // o2-linter: disable=[name/workflow-file][name/struct] Produces outputMcCollisionTable; Produces outputMcParticleTable; @@ -426,7 +419,7 @@ struct hypKfRecoTask { Configurable> cfgHyperNucsActive{"cfgHyperNucsActive", {hyperNucEnabled[0], nHyperNuclei, 1, hyperNucNames, hyperNucEnabledLb}, "enable or disable reconstruction"}; Configurable> cfgReduce{"cfgReduce", {reduceFactor[0], nHyperNuclei, 1, hyperNucNames, reduceLb}, "reconstruct only a percentage of all possible hypernuclei"}; - Configurable> cfgHyperNucPdg{"cfgHyperNucsPdg", {hyperNucPdgCodes[0], nHyperNuclei, 1, hyperNucNames, hyperNucPdgLb}, "PDG codes"}; + Configurable> cfgHyperNucPdg{"cfgHyperNucPdg", {hyperNucPdgCodes[0], nHyperNuclei, 1, hyperNucNames, hyperNucPdgLb}, "PDG codes"}; Configurable> cfgHyperNucDaughters{"cfgHyperNucDaughters", {hyperNucDaughters[0], nHyperNuclei, 4, hyperNucNames, hyperNucDaughtersLb}, "Daughter particles"}; Configurable> cfgHyperNucSigns{"cfgHyperNucSigns", {hyperNucSigns[0], nHyperNuclei, 4, hyperNucNames, hyperNucDaughtersLb}, "Daughter signs"}; @@ -444,65 +437,69 @@ struct hypKfRecoTask { // CCDB Service ccdb; - Configurable d_bz_input{"d_bz", -999, "bz field, -999 is automatic"}; - Configurable ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; + Configurable bField{"bField", -999, "bz field, -999 is automatic"}; + Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"}; Configurable grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"}; Configurable lutPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"}; Configurable geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"}; Configurable pidPath{"pidPath", "", "Path to the PID response object"}; - std::vector daughterParticles; + std::vector daughterParticles; std::vector> foundDaughters; - std::vector> singleHyperNucCandidates; // hypernuclei candidates - std::vector> cascadeHyperNucCandidates; // cascade candidates - std::vector singleHyperNuclei; - std::vector cascadeHyperNuclei; + std::vector> singleHyperNucCandidates; // hypernuclei candidates + std::vector> cascadeHyperNucCandidates; // cascade candidates + std::vector singleHyperNuclei; + std::vector cascadeHyperNuclei; std::vector primVtx; std::vector cents; - std::vector mcCollInfos; - indexPairs trackIndices; - indexPairs mcPartIndices; - KFPVertex KfPrimVtx; + std::vector mcCollInfos; + IndexPairs trackIndices; + IndexPairs mcPartIndices; + KFPVertex kfPrimVtx; bool collHasCandidate, collHasMcTrueCandidate; bool collPassedEvSel; int64_t mcCollTableIndex; - int mRunNumber; - float d_bz; + int mRunNumber, occupancy; + float dBz; TRandom rand; //---------------------------------------------------------------------------------------------------------------- void init(InitContext const&) { mRunNumber = 0; - d_bz = 0; + dBz = 0; rand.SetSeed(0); - ccdb->setURL(ccdburl); + ccdb->setURL(ccdbUrl); ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); ccdb->setFatalWhenNull(false); for (int i = 0; i < nDaughterParticles; i++) { // create daughterparticles - daughterParticles.push_back(daughterParticle(particleNames.at(i), particlePdgCodes.at(i), particleMasses.at(i), particleCharge.at(i), cfgBetheBlochParams)); + daughterParticles.push_back(DaughterParticle(particleNames.at(i), particlePdgCodes.at(i), particleMasses.at(i), particleCharge.at(i), cfgBetheBlochParams)); } for (unsigned int i = 0; i < nHyperNuclei; i++) { // create hypernuclei - singleHyperNuclei.push_back(hyperNucleus(hyperNucNames.at(i), cfgHyperNucPdg->get(i, 0u), cfgHyperNucsActive->get(i, 0u), getDaughterVec(i, cfgHyperNucDaughters), getDaughterSignVec(i, cfgHyperNucSigns))); + singleHyperNuclei.push_back(HyperNucleus(hyperNucNames.at(i), cfgHyperNucPdg->get(i, 0u), cfgHyperNucsActive->get(i, 0u), getDaughterVec(i, cfgHyperNucDaughters), getDaughterSignVec(i, cfgHyperNucSigns))); } for (unsigned int i = 0; i < nCascades; i++) { // create cascades - cascadeHyperNuclei.push_back(hyperNucleus(cascadeNames.at(i), cfgCascadesPdg->get(i, 0u), cfgCascadesActive->get(i, 0u), getHypDaughterVec(i, cfgCascadeHypDaughter), getDaughterVec(i, cfgCascadeDaughters), getDaughterSignVec(i, cfgCascadeSigns))); + cascadeHyperNuclei.push_back(HyperNucleus(cascadeNames.at(i), cfgCascadesPdg->get(i, 0u), cfgCascadesActive->get(i, 0u), getHypDaughterVec(i, cfgCascadeHypDaughter), getDaughterVec(i, cfgCascadeDaughters), getDaughterSignVec(i, cfgCascadeSigns))); } - // define histogram axes const AxisSpec axisMagField{10, -10., 10., "magnetic field"}; const AxisSpec axisNev{3, 0., 3., "Number of events"}; const AxisSpec axisRigidity{4000, -10., 10., "#it{p}^{TPC}/#it{z}"}; const AxisSpec axisdEdx{2000, 0, 2000, "d#it{E}/d#it{x}"}; const AxisSpec axisInvMass{1000, 1, 6, "inv mass"}; - + const AxisSpec axisCent{100, 0, 100, "centrality"}; + const AxisSpec axisVtxZ{100, -10, 10, "z"}; // create histograms histos.add("histMagField", "histMagField", kTH1F, {axisMagField}); histos.add("histNev", "histNev", kTH1F, {axisNev}); + histos.add("histVtxZ", "histVtxZ", kTH1F, {axisVtxZ}); + histos.add("histCentFT0A", "histCentFT0A", kTH1F, {axisCent}); + histos.add("histCentFT0C", "histCentFT0C", kTH1F, {axisCent}); + histos.add("histCentFT0M", "histCentFT0M", kTH1F, {axisCent}); hDeDx.resize(2 * nDaughterParticles + 2); for (int i = 0; i < nDaughterParticles + 1; i++) { TString histName = i < nDaughterParticles ? daughterParticles[i].name : "all"; @@ -512,11 +509,11 @@ struct hypKfRecoTask { // create invariant mass histograms hInvMass.resize(nHyperNuclei + nCascades); int histCount = 0; - std::vector> hypNucVectors = {singleHyperNuclei, cascadeHyperNuclei}; - for (auto vec : hypNucVectors) { - for (auto nuc : vec) { - if (nuc.active) { - hInvMass[histCount] = histos.add(Form("h%d_%s", histCount, nuc.motherName()), ";;Counts", HistType::kTH1F, {axisInvMass}); + std::vector> hypNucVectors = {singleHyperNuclei, cascadeHyperNuclei}; + for (size_t i = 0; i < hypNucVectors.size(); i++) { + for (size_t j = 0; j < hypNucVectors.at(i).size(); j++) { + if (hypNucVectors.at(i).at(j).active) { + hInvMass[histCount] = histos.add(Form("h%d_%s", histCount, hypNucVectors.at(i).at(j).motherName()), ";;Counts", HistType::kTH1F, {axisInvMass}); } histCount++; } @@ -550,6 +547,10 @@ struct hypKfRecoTask { continue; if (std::abs(track.dcaZ()) < cfgTrackPIDsettings->get(i, "minDcaToPvZ")) continue; + if (getMeanItsClsSize(track) < cfgTrackPIDsettings->get(i, "minITSclsSize")) + continue; + if (getMeanItsClsSize(track) > cfgTrackPIDsettings->get(i, "maxITSclsSize")) + continue; if (getRigidity(track) < cfgTrackPIDsettings->get(i, "minRigidity") || getRigidity(track) > cfgTrackPIDsettings->get(i, "maxRigidity")) continue; if (cfgTrackPIDsettings->get(i, "TOFrequiredabove") >= 0 && getRigidity(track) > cfgTrackPIDsettings->get(i, "TOFrequiredabove") && (track.mass() < cfgTrackPIDsettings->get(i, "minTOFmass") || track.mass() > cfgTrackPIDsettings->get(i, "maxTOFmass"))) @@ -589,10 +590,10 @@ struct hypKfRecoTask { { // loop over all hypernuclei that are to be reconstructed for (size_t hyperNucIter = 0; hyperNucIter < singleHyperNuclei.size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(singleHyperNuclei.at(hyperNucIter)); + HyperNucleus* hyperNuc = &(singleHyperNuclei.at(hyperNucIter)); if (!hyperNuc->active) continue; - int nDaughters = hyperNuc->GetNdaughters(); + int nDaughters = hyperNuc->getNdaughters(); std::vector::iterator> it; int nCombinations = 1; @@ -627,25 +628,25 @@ struct hypKfRecoTask { daughterIds.push_back(*(it[i])); auto daughterMass = daughterParticles.at(hyperNuc->daughters.at(i)).mass; auto daughterCharge = daughterParticles.at(hyperNuc->daughters.at(i)).charge; - daughterKfps.push_back(CreateKFParticle(daughterTrack, daughterMass, daughterCharge)); + daughterKfps.push_back(createKFParticle(daughterTrack, daughterMass, daughterCharge)); } - hyperNucCandidate candidate(hyperNucIter, daughterKfps, daughterIds); + HyperNucCandidate candidate(hyperNucIter, daughterKfps, daughterIds); bool isPrimCandidate = true, isSecCandidate = true; - if (candidate.CheckKfp()) { + if (candidate.checkKfp()) { // apply pre selections - candidate.CalcDevToVtx(KfPrimVtx); + candidate.calcDevToVtx(kfPrimVtx); if (candidate.kfp.GetMass() < cfgPreSelectionsPrimaries->get(hyperNucIter, "minMass") || candidate.kfp.GetMass() > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxMass")) isPrimCandidate = false; - if (candidate.GetDcaTracks() > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaTracks")) + if (candidate.getDcaTracks() > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaTracks")) isPrimCandidate = false; - if (candidate.GetCt(primVtx) < cfgPreSelectionsPrimaries->get(hyperNucIter, "minCt") || candidate.GetCt(primVtx) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxCt")) + if (candidate.getCt(primVtx) < cfgPreSelectionsPrimaries->get(hyperNucIter, "minCt") || candidate.getCt(primVtx) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxCt")) isPrimCandidate = false; - if (candidate.GetCpa(primVtx) < cfgPreSelectionsPrimaries->get(hyperNucIter, "minCosPa")) + if (candidate.getCpa(primVtx) < cfgPreSelectionsPrimaries->get(hyperNucIter, "minCosPa")) isPrimCandidate = false; - if (candidate.GetDcaMotherToVtxXY(primVtx) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaMotherToPvXY")) + if (std::abs(candidate.getDcaMotherToVtxXY(primVtx)) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaMotherToPvXY")) isPrimCandidate = false; - if (candidate.GetDcaMotherToVtxZ(primVtx) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaMotherToPvZ")) + if (std::abs(candidate.getDcaMotherToVtxZ(primVtx)) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaMotherToPvZ")) isPrimCandidate = false; if (isPrimCandidate) { candidate.isPrimaryCandidate = true; @@ -653,9 +654,9 @@ struct hypKfRecoTask { } if (candidate.kfp.GetMass() < cfgPreSelectionsSecondaries->get(hyperNucIter, "minMass") || candidate.kfp.GetMass() > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxMass")) isSecCandidate = false; - if (candidate.GetDcaTracks() > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxDcaTracks")) + if (candidate.getDcaTracks() > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxDcaTracks")) isSecCandidate = false; - if (candidate.GetCt(primVtx) < cfgPreSelectionsSecondaries->get(hyperNucIter, "minCt") || candidate.GetCt(primVtx) > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxCt")) + if (candidate.getCt(primVtx) < cfgPreSelectionsSecondaries->get(hyperNucIter, "minCt") || candidate.getCt(primVtx) > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxCt")) isSecCandidate = false; if (isSecCandidate) { candidate.isSecondaryCandidate = true; @@ -678,10 +679,10 @@ struct hypKfRecoTask { // loop over all cascade hypernuclei that are to be reconstructed for (size_t hyperNucIter = 0; hyperNucIter < cascadeHyperNuclei.size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(cascadeHyperNuclei.at(hyperNucIter)); + HyperNucleus* hyperNuc = &(cascadeHyperNuclei.at(hyperNucIter)); if (!hyperNuc->active) continue; - int nDaughters = hyperNuc->GetNdaughters(); + int nDaughters = hyperNuc->getNdaughters(); int nHypNucDaughters = singleHyperNucCandidates.at(hyperNuc->daughters.at(0)).size(); std::vector vecHypNucDaughers; @@ -706,7 +707,7 @@ struct hypKfRecoTask { // select hypernuclei daughter KFParticle auto hypNucDaughter = &(singleHyperNucCandidates.at(hyperNuc->daughters.at(0)).at(*it[0])); // check for correct signs - int checkSign = hypNucDaughter->GetSign(); + int checkSign = hypNucDaughter->getSign(); bool passedChecks = true; std::vector vec = hypNucDaughter->daughterTrackIds; for (int i = 1; i < nDaughters; i++) { @@ -726,32 +727,32 @@ struct hypKfRecoTask { const auto& daughterTrack = tracks.rawIteratorAt(*(it[i])); auto daughterMass = daughterParticles.at(hyperNuc->daughters.at(i)).mass; auto daughterCharge = daughterParticles.at(hyperNuc->daughters.at(i)).charge; - daughterKfps.push_back(CreateKFParticle(daughterTrack, daughterMass, daughterCharge)); + daughterKfps.push_back(createKFParticle(daughterTrack, daughterMass, daughterCharge)); } - hyperNucCandidate candidate(hyperNucIter, hypNucDaughter, daughterKfps, daughterIds); - if (candidate.CheckKfp()) { - hypNucDaughter->CalcDevToVtx(candidate); + HyperNucCandidate candidate(hyperNucIter, hypNucDaughter, daughterKfps, daughterIds); + if (candidate.checkKfp()) { + hypNucDaughter->calcDevToVtx(candidate); bool isCandidate = true; // apply pre selections for hypernucleus daughter - if (hypNucDaughter->GetCpa(candidate.recoSV) < cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "minCosPaSv")) + if (hypNucDaughter->getCpa(candidate.recoSV) < cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "minCosPaSv")) isCandidate = false; - if (hypNucDaughter->GetDcaMotherToVtxXY(candidate.recoSV) > cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "maxDcaMotherToSvXY")) + if (hypNucDaughter->getDcaMotherToVtxXY(candidate.recoSV) > cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "maxDcaMotherToSvXY")) isCandidate = false; - if (hypNucDaughter->GetDcaMotherToVtxZ(candidate.recoSV) > cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "maxDcaMotherToSvZ")) + if (hypNucDaughter->getDcaMotherToVtxZ(candidate.recoSV) > cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "maxDcaMotherToSvZ")) isCandidate = false; // apply pre selections for cascade if (candidate.kfp.GetMass() < cfgPreSelectionsCascades->get(hyperNucIter, "minMass") || candidate.kfp.GetMass() > cfgPreSelectionsCascades->get(hyperNucIter, "maxMass")) isCandidate = false; - if (candidate.GetDcaTracks() > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaTracks")) + if (candidate.getDcaTracks() > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaTracks")) isCandidate = false; - if (candidate.GetCt(primVtx) < cfgPreSelectionsCascades->get(hyperNucIter, "minCt") || candidate.GetCt(primVtx) > cfgPreSelectionsCascades->get(hyperNucIter, "maxCt")) + if (candidate.getCt(primVtx) < cfgPreSelectionsCascades->get(hyperNucIter, "minCt") || candidate.getCt(primVtx) > cfgPreSelectionsCascades->get(hyperNucIter, "maxCt")) isCandidate = false; - if (candidate.GetCpa(primVtx) < cfgPreSelectionsCascades->get(hyperNucIter, "minCosPa")) + if (candidate.getCpa(primVtx) < cfgPreSelectionsCascades->get(hyperNucIter, "minCosPa")) isCandidate = false; - if (candidate.GetDcaMotherToVtxXY(primVtx) > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaMotherToPvXY")) + if (std::abs(candidate.getDcaMotherToVtxXY(primVtx)) > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaMotherToPvXY")) isCandidate = false; - if (candidate.GetDcaMotherToVtxZ(primVtx) > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaMotherToPvZ")) + if (std::abs(candidate.getDcaMotherToVtxZ(primVtx)) > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaMotherToPvZ")) isCandidate = false; if (isCandidate) { @@ -774,34 +775,34 @@ struct hypKfRecoTask { { // check for mcTrue: single (primary & cascade daughter) and cascade hypernuclei - std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; - std::vector>*> candidateVectors = {&singleHyperNucCandidates, &cascadeHyperNucCandidates}; + std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; + std::vector>*> candidateVectors = {&singleHyperNucCandidates, &cascadeHyperNucCandidates}; const int nVecs = candidateVectors.size(); - - for (int vec = cascadesOnly ? 1 : 0; vec < nVecs; vec++) { + const int startVec = cascadesOnly ? 1 : 0; + for (int vec = startVec; vec < nVecs; vec++) { auto candidateVector = candidateVectors.at(vec); for (size_t hyperNucIter = 0; hyperNucIter < hypNucVectors.at(vec)->size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); + HyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); if (!hyperNuc->active) continue; - for (auto& hypCand : candidateVector->at(hyperNucIter)) { + for (auto& hypCand : candidateVector->at(hyperNucIter)) { // o2-linter: disable=[const-ref-in-for-loop] std::vector motherIds; int daughterCount = 0; - if (hypCand.IsCascade()) { + if (hypCand.isCascade()) { if (!hypCand.hypNucDaughter->mcTrue) continue; const auto& mcPart = particlesMC.rawIteratorAt(hypCand.hypNucDaughter->mcParticleId); if (!mcPart.has_mothers()) continue; daughterCount++; - for (auto& mother : mcPart.mothers_as()) { - if (mother.pdgCode() == hyperNuc->pdgCode * hypCand.GetSign()) { + for (const auto& mother : mcPart.mothers_as()) { + if (mother.pdgCode() == hyperNuc->pdgCode * hypCand.getSign()) { motherIds.push_back(mother.globalIndex()); break; } } } - for (auto& daughter : hypCand.daughterTrackIds) { + for (const auto& daughter : hypCand.daughterTrackIds) { const auto& mcLab = trackLabels.rawIteratorAt(daughter); if (!mcLab.has_mcParticle()) continue; @@ -810,8 +811,8 @@ struct hypKfRecoTask { continue; if (!mcPart.has_mothers()) continue; - for (auto& mother : mcPart.mothers_as()) { - if (mother.pdgCode() == hyperNuc->pdgCode * hypCand.GetSign()) { + for (const auto& mother : mcPart.mothers_as()) { + if (mother.pdgCode() == hyperNuc->pdgCode * hypCand.getSign()) { motherIds.push_back(mother.globalIndex()); break; } @@ -844,34 +845,34 @@ struct hypKfRecoTask { outputCollisionTable( collPassedEvSel, mcCollTableIndex, primVtx.at(0), primVtx.at(1), primVtx.at(2), - cents.at(0), cents.at(1), cents.at(2)); + cents.at(0), cents.at(1), cents.at(2), occupancy); - std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; - std::vector>*> candidateVectors = {&singleHyperNucCandidates, &cascadeHyperNucCandidates}; + std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; + std::vector>*> candidateVectors = {&singleHyperNucCandidates, &cascadeHyperNucCandidates}; for (int vec = 0; vec < 2; vec++) { auto candidateVector = candidateVectors.at(vec); for (size_t hyperNucIter = 0; hyperNucIter < hypNucVectors.at(vec)->size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); + HyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); if (!hyperNuc->active) continue; - for (auto& hypCand : candidateVector->at(hyperNucIter)) { - if (!hypCand.isPrimaryCandidate && !hypCand.isUsedSecondary && !hypCand.IsCascade()) + for (auto& hypCand : candidateVector->at(hyperNucIter)) { // o2-linter: disable=[const-ref-in-for-loop] + if (!hypCand.isPrimaryCandidate && !hypCand.isUsedSecondary && !hypCand.isCascade()) continue; if (saveOnlyMcTrue && !hypCand.mcTrue) continue; hInvMass[vec * nHyperNuclei + hyperNucIter]->Fill(hypCand.kfp.GetMass()); std::vector vecDaugtherTracks, vecAddons, vecSubDaughters; int daughterCount = 0; - for (auto daughterTrackId : hypCand.daughterTrackIds) { + for (const auto& daughterTrackId : hypCand.daughterTrackIds) { int trackTableId; - if (!trackIndices.GetIndex(daughterTrackId, trackTableId)) { + if (!trackIndices.getIndex(daughterTrackId, trackTableId)) { auto daught = hyperNuc->daughters.at(daughterCount); const auto& track = tracks.rawIteratorAt(daughterTrackId); outputTrackTable( hyperNuc->daughters.at(daughterCount) * track.sign(), track.pt(), track.eta(), track.phi(), - track.dcaXY(), track.dcaZ(), + hypCand.getDcaTrackToVtxXY(daughterCount, primVtx), hypCand.getDcaTrackToVtxZ(daughterCount, primVtx), track.tpcNClsFound(), track.tpcChi2NCl(), track.itsClusterSizes(), track.itsChi2NCl(), getRigidity(track), track.tpcSignal(), getTPCnSigma(track, daughterParticles.at(daught)), @@ -880,22 +881,22 @@ struct hypKfRecoTask { track.mass(), track.isPVContributor()); trackTableId = outputTrackTable.lastIndex(); - trackIndices.Add(daughterTrackId, trackTableId); + trackIndices.add(daughterTrackId, trackTableId); } vecDaugtherTracks.push_back(trackTableId); daughterCount++; } - for (int i = 0; i < hypCand.GetNdaughters(); i++) { + for (int i = 0; i < hypCand.getNdaughters(); i++) { std::vector posMom; - hypCand.GetDaughterPosMom(i, posMom); + hypCand.getDaughterPosMom(i, posMom); outputDaughterAddonTable( posMom.at(0), posMom.at(1), posMom.at(2), posMom.at(3), posMom.at(4), posMom.at(5)); vecAddons.push_back(outputDaughterAddonTable.lastIndex()); } - if (hypCand.GetNdaughters() > 2) { - for (int i = 0; i < hypCand.GetNdaughters(); i++) { - for (int j = i + 1; j < hypCand.GetNdaughters(); j++) { - outputSubDaughterTable(hypCand.GetSubDaughterMass(i, j)); + if (hypCand.getNdaughters() > 2) { + for (int i = 0; i < hypCand.getNdaughters(); i++) { + for (int j = i + 1; j < hypCand.getNdaughters(); j++) { + outputSubDaughterTable(hypCand.getSubDaughterMass(i, j)); vecSubDaughters.push_back(outputSubDaughterTable.lastIndex()); } } @@ -904,12 +905,12 @@ struct hypKfRecoTask { hypCand.kfp.TransportToDecayVertex(); int mcPartTableId; outputHypNucTable( - mcPartIndices.GetIndex(hypCand.mcParticleId, mcPartTableId) ? mcPartTableId : -1, - outputCollisionTable.lastIndex(), vecDaugtherTracks, vecAddons, hypCand.GetDaughterTableId(), vecSubDaughters, - (vec * nHyperNuclei + hyperNucIter + 1) * hypCand.GetSign(), + mcPartIndices.getIndex(hypCand.mcParticleId, mcPartTableId) ? mcPartTableId : -1, + outputCollisionTable.lastIndex(), vecDaugtherTracks, vecAddons, hypCand.getDaughterTableId(), vecSubDaughters, + (vec * nHyperNuclei + hyperNucIter + 1) * hypCand.getSign(), hypCand.isPrimaryCandidate, hypCand.kfp.GetMass(), hypCand.kfp.GetPx(), hypCand.kfp.GetPy(), hypCand.kfp.GetPz(), - hypCand.GetDcaMotherToVtxXY(primVtx), hypCand.GetDcaMotherToVtxZ(primVtx), + hypCand.getDcaMotherToVtxXY(primVtx), hypCand.getDcaMotherToVtxZ(primVtx), hypCand.devToVtx, hypCand.dcaToVtxXY, hypCand.dcaToVtxZ, hypCand.chi2, hypCand.recoSV.at(0), hypCand.recoSV.at(1), hypCand.recoSV.at(2)); hypCand.tableId = outputHypNucTable.lastIndex(); @@ -924,18 +925,18 @@ struct hypKfRecoTask { mcCollInfos.clear(); mcCollInfos.resize(mcColls.size()); - mcPartIndices.Clear(); + mcPartIndices.clear(); for (const auto& collision : collisions) { if (!collision.has_mcCollision()) continue; if (collision.sel8() && std::abs(collision.posZ()) < 10) mcCollInfos.at(collision.mcCollisionId()).passedEvSel = true; } - std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; - for (auto& mcPart : particlesMC) { + std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; + for (const auto& mcPart : particlesMC) { for (int vec = 0; vec < 2; vec++) { for (size_t hyperNucIter = 0; hyperNucIter < hypNucVectors.at(vec)->size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); + HyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); if (!hyperNuc->active) continue; if (std::abs(mcPart.pdgCode()) != hyperNuc->pdgCode) @@ -947,7 +948,7 @@ struct hypKfRecoTask { daughterPdg = daughterParticles.at(hyperNuc->daughters.at(0)).pdgCode; else daughterPdg = singleHyperNuclei.at(hyperNuc->daughters.at(0)).pdgCode; - for (auto& mcDaught : mcPart.daughters_as()) { + for (const auto& mcDaught : mcPart.daughters_as()) { if (std::abs(mcDaught.pdgCode()) == daughterPdg) { isDecayMode = true; svx = mcDaught.vx(); @@ -974,7 +975,7 @@ struct hypKfRecoTask { mcPart.px(), mcPart.py(), mcPart.pz(), mcPart.e(), svx, svy, svz); - mcPartIndices.Add(mcPart.globalIndex(), outputMcParticleTable.lastIndex()); + mcPartIndices.add(mcPart.globalIndex(), outputMcParticleTable.lastIndex()); } } } @@ -1012,7 +1013,7 @@ struct hypKfRecoTask { fillTree(tracks, cfgSaveOnlyMcTrue); } } - PROCESS_SWITCH(hypKfRecoTask, processMC, "MC analysis", true); + PROCESS_SWITCH(hypKfRecoTask, processMC, "MC analysis", false); //---------------------------------------------------------------------------------------------------------------- void processData(CollisionsFull const& collisions, TracksFull const& tracks, aod::BCsWithTimestamps const&, aod::TrackAssoc const& tracksColl) { @@ -1021,6 +1022,8 @@ struct hypKfRecoTask { auto bc = collision.bc_as(); initCCDB(bc); initCollision(collision); + if (!collPassedEvSel) + continue; const uint64_t collIdx = collision.globalIndex(); auto tracksByColl = tracksColl.sliceBy(perCollision, collIdx); findDaughterParticles(tracksByColl, tracks); @@ -1032,42 +1035,42 @@ struct hypKfRecoTask { fillTree(tracks); } } - PROCESS_SWITCH(hypKfRecoTask, processData, "data analysis", false); + PROCESS_SWITCH(hypKfRecoTask, processData, "data analysis", true); //---------------------------------------------------------------------------------------------------------------- void initCCDB(aod::BCsWithTimestamps::iterator const& bc) { if (mRunNumber == bc.runNumber()) { return; } - auto run3grp_timestamp = bc.timestamp(); - d_bz = 0; - o2::parameters::GRPObject* grpo = ccdb->getForTimeStamp(grpPath, run3grp_timestamp); + auto run3grpTimestamp = bc.timestamp(); + dBz = 0; + o2::parameters::GRPObject* grpo = ccdb->getForTimeStamp(grpPath, run3grpTimestamp); o2::parameters::GRPMagField* grpmag = 0x0; if (grpo) { o2::base::Propagator::initFieldFromGRP(grpo); - if (d_bz_input < -990) { + if (bField < -990) { // Fetch magnetic field from ccdb for current collision - d_bz = grpo->getNominalL3Field(); - LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG"; + dBz = grpo->getNominalL3Field(); + LOG(info) << "Retrieved GRP for timestamp " << run3grpTimestamp << " with magnetic field of " << dBz << " kZG"; } else { - d_bz = d_bz_input; + dBz = bField; } } else { - grpmag = ccdb->getForTimeStamp(grpmagPath, run3grp_timestamp); + grpmag = ccdb->getForTimeStamp(grpmagPath, run3grpTimestamp); if (!grpmag) { - LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grp_timestamp; + LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grpTimestamp; } o2::base::Propagator::initFieldFromGRP(grpmag); - if (d_bz_input < -990) { + if (bField < -990) { // Fetch magnetic field from ccdb for current collision - d_bz = std::lround(5.f * grpmag->getL3Current() / 30000.f); - LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG"; + dBz = std::lround(5.f * grpmag->getL3Current() / 30000.f); + LOG(info) << "Retrieved GRP for timestamp " << run3grpTimestamp << " with magnetic field of " << dBz << " kZG"; } else { - d_bz = d_bz_input; + dBz = bField; } } mRunNumber = bc.runNumber(); - KFParticle::SetField(d_bz); + KFParticle::SetField(dBz); } //---------------------------------------------------------------------------------------------------------------- template @@ -1079,17 +1082,21 @@ struct hypKfRecoTask { singleHyperNucCandidates.resize(nHyperNuclei); cascadeHyperNucCandidates.clear(); cascadeHyperNucCandidates.resize(nCascades); - trackIndices.Clear(); + trackIndices.clear(); collHasCandidate = false; collHasMcTrueCandidate = false; - histos.fill(HIST("histMagField"), d_bz); + histos.fill(HIST("histMagField"), dBz); histos.fill(HIST("histNev"), 0.5); - collPassedEvSel = collision.sel8() && std::abs(collision.posZ()) < 10; - if (collPassedEvSel) + if (collPassedEvSel) { histos.fill(HIST("histNev"), 1.5); - - KfPrimVtx = createKFPVertexFromCollision(collision); + histos.fill(HIST("histVtxZ"), collision.posZ()); + histos.fill(HIST("histCentFT0A"), collision.centFT0A()); + histos.fill(HIST("histCentFT0C"), collision.centFT0C()); + histos.fill(HIST("histCentFT0M"), collision.centFT0M()); + } + occupancy = collision.trackOccupancyInTimeRange(); + kfPrimVtx = createKFPVertexFromCollision(collision); primVtx.assign({collision.posX(), collision.posY(), collision.posZ()}); cents.assign({collision.centFT0A(), collision.centFT0C(), collision.centFT0M()}); } @@ -1107,7 +1114,7 @@ struct hypKfRecoTask { //---------------------------------------------------------------------------------------------------------------- template - float getTPCnSigma(T const& track, daughterParticle const& particle) + float getTPCnSigma(T const& track, DaughterParticle const& particle) { const float rigidity = getRigidity(track); if (!track.hasTPC()) @@ -1132,7 +1139,18 @@ struct hypKfRecoTask { return sigmaTPC; } //---------------------------------------------------------------------------------------------------------------- - + template + float getMeanItsClsSize(T const& track) + { + int sum = 0, n = 0; + for (int i = 0; i < 8; i++) { + sum += (track.itsClusterSizes() >> (4 * i) & 15); + if (track.itsClusterSizes() >> (4 * i) & 15) + n++; + } + return n > 0 ? static_cast(sum) / n : 0.f; + } + //---------------------------------------------------------------------------------------------------------------- template float getRigidity(T const& track) { @@ -1144,7 +1162,7 @@ struct hypKfRecoTask { //---------------------------------------------------------------------------------------------------------------- template - KFParticle CreateKFParticle(const T& track, float mass, int charge) + KFParticle createKFParticle(const T& track, float mass, int charge) { auto trackparCov = getTrackParCov(track); std::array fP; diff --git a/PWGLF/TableProducer/Nuspex/hypKfTreeCreator.cxx b/PWGLF/TableProducer/Nuspex/hypKfTreeCreator.cxx index 948cd62ac92..1eea2943112 100644 --- a/PWGLF/TableProducer/Nuspex/hypKfTreeCreator.cxx +++ b/PWGLF/TableProducer/Nuspex/hypKfTreeCreator.cxx @@ -9,8 +9,9 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. /// +/// \file hypKfTreeCreator.cxx /// \brief Creates flat tree for ML analysis -/// \authors Janik Ditzel and Michael Hartung +/// \author Janik Ditzel and Michael Hartung #include #include "Framework/runDataProcessing.h" @@ -43,35 +44,35 @@ namespace { std::vector> hPt; -struct trackProperties { - trackProperties() : X(0), Y(0), Z(0), Px(0), Py(0), Pz(0), TPCnCls(0), ITSnCls(0), TPCchi2(0), ITSchi2(0), ITSmeanClsSize(0), ITSmeanClsSizeL(0), Rigidity(0), TPCsignal(0), TPCnSigma(0), TPCnSigmaNhp(0), TPCnSigmaNlp(0), TOFmass(0), DcaXY(0), DcaZ(0), IsPvContributor(0), SubMass(0) {} - float X, Y, Z, Px, Py, Pz; - uint8_t TPCnCls, ITSnCls; - float TPCchi2, ITSchi2, ITSmeanClsSize, ITSmeanClsSizeL; - float Rigidity, TPCsignal, TPCnSigma, TPCnSigmaNhp, TPCnSigmaNlp; - float TOFmass, DcaXY, DcaZ; - bool IsPvContributor; - float SubMass; +struct TrackProperties { + TrackProperties() : x(0), y(0), z(0), px(0), py(0), pz(0), tpcNcls(0), itsNcls(0), tpcChi2(0), itsChi2(0), itsMeanClsSize(0), itsMeanClsSizeL(0), rigidity(0), tpcSignal(0), tpcNsigma(0), tpcNsigmaNhp(0), tpcNsigmaNlp(0), tofMass(0), dcaXY(0), dcaZ(0), isPvContributor(0), subMass(0) {} + float x, y, z, px, py, pz; + uint8_t tpcNcls, itsNcls; + float tpcChi2, itsChi2, itsMeanClsSize, itsMeanClsSizeL; + float rigidity, tpcSignal, tpcNsigma, tpcNsigmaNhp, tpcNsigmaNlp; + float tofMass, dcaXY, dcaZ; + bool isPvContributor; + float subMass; }; -struct hyperNucleus { - hyperNucleus() : PdgCode(0), IsReconstructed(0), GlobalIndex(0), Species(0), IsMatter(0), PassedEvSel(0), IsMatterMC(0), PassedEvSelMC(0), IsPhysicalPrimary(0), CollisionMcTrue(0), Mass(0), Y(0), Pt(0), Ct(0), YGen(0), PtGen(0), CtGen(0), CpaPvGen(0), CpaPv(0), CpaSv(0), MaxDcaTracks(0), MaxDcaTracksSV(0), DcaToPvXY(0), DcaToPvZ(0), DcaToVtxXY(0), DcaToVtxZ(0), DevToPvXY(0), Chi2(0), Pvx(0), Pvy(0), Pvz(0), Svx(0), Svy(0), Svz(0), Px(0), Py(0), Pz(0), PvxGen(0), PvyGen(0), PvzGen(0), SvxGen(0), SvyGen(0), SvzGen(0), PxGen(0), PyGen(0), PzGen(0), NsingleDaughters(0), NcascadeDaughters(0), McTrue(0), MCTrueVtx(0), McPhysicalPrimary(0), HypNucDaughter(0) {} - int PdgCode, IsReconstructed, GlobalIndex; - uint8_t Species; - bool IsMatter, PassedEvSel, IsMatterMC, PassedEvSelMC, IsPhysicalPrimary, CollisionMcTrue; - float Mass, Y, Pt, Ct, YGen, PtGen, CtGen, CpaPvGen, CpaPv, CpaSv, MaxDcaTracks, MaxDcaTracksSV; - float DcaToPvXY, DcaToPvZ, DcaToVtxXY, DcaToVtxZ, DevToPvXY, Chi2; - float Pvx, Pvy, Pvz, Svx, Svy, Svz, Px, Py, Pz; - float PvxGen, PvyGen, PvzGen, SvxGen, SvyGen, SvzGen, PxGen, PyGen, PzGen; - int NsingleDaughters, NcascadeDaughters; - bool McTrue, MCTrueVtx, McPhysicalPrimary; - std::vector daughterTracks; +struct HyperNucleus { + HyperNucleus() : pdgCode(0), isReconstructed(0), globalIndex(0), species(0), isMatter(0), passedEvSel(0), isMatterMC(0), passedEvSelMC(0), isPhysicalPrimary(0), collisionMcTrue(0), mass(0), y(0), pt(0), ct(0), yGen(0), ptGen(0), ctGen(0), cpaPvGen(0), cpaPv(0), cpaSv(0), maxDcaTracks(0), maxDcaTracksSV(0), dcaToPvXY(0), dcaToPvZ(0), dcaToVtxXY(0), dcaToVtxZ(0), devToPvXY(0), chi2(0), pvx(0), pvy(0), pvz(0), svx(0), svy(0), svz(0), px(0), py(0), pz(0), pvxGen(0), pvyGen(0), pvzGen(0), svxGen(0), svyGen(0), svzGen(0), pxGen(0), pyGen(0), pzGen(0), nSingleDaughters(0), nCascadeDaughters(0), mcTrue(0), mcTrueVtx(0), mcPhysicalPrimary(0), hypNucDaughter(0) {} + int pdgCode, isReconstructed, globalIndex; + uint8_t species; + bool isMatter, passedEvSel, isMatterMC, passedEvSelMC, isPhysicalPrimary, collisionMcTrue; + float mass, y, pt, ct, yGen, ptGen, ctGen, cpaPvGen, cpaPv, cpaSv, maxDcaTracks, maxDcaTracksSV; + float dcaToPvXY, dcaToPvZ, dcaToVtxXY, dcaToVtxZ, devToPvXY, chi2; + float pvx, pvy, pvz, svx, svy, svz, px, py, pz; + float pvxGen, pvyGen, pvzGen, svxGen, svyGen, svzGen, pxGen, pyGen, pzGen; + int nSingleDaughters, nCascadeDaughters, cent, occu; + bool mcTrue, mcTrueVtx, mcPhysicalPrimary; + std::vector daughterTracks; std::vector subDaughterMassVec; - hyperNucleus* HypNucDaughter; - ~hyperNucleus() + HyperNucleus* hypNucDaughter; + ~HyperNucleus() { - if (HypNucDaughter) - delete HypNucDaughter; + if (hypNucDaughter) + delete hypNucDaughter; } }; } // namespace @@ -107,6 +108,8 @@ DECLARE_SOA_COLUMN(SvzGen, svzGen, float); DECLARE_SOA_COLUMN(TvxGen, tvxGen, float); DECLARE_SOA_COLUMN(TvyGen, tvyGen, float); DECLARE_SOA_COLUMN(TvzGen, tvzGen, float); +DECLARE_SOA_COLUMN(Centrality, centrality, int); +DECLARE_SOA_COLUMN(Occupancy, occupancy, int); DECLARE_SOA_COLUMN(PassedEvSelMC, passedEvSelMC, bool); DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); DECLARE_SOA_COLUMN(IsMatterGen, isMatterGen, bool); @@ -174,9 +177,9 @@ DECLARE_SOA_COLUMN(D3TPCnSigmaNlp, d3TPCnSigmaNlp, float); DECLARE_SOA_COLUMN(D3TOFmass, d3TOFmass, float); DECLARE_SOA_COLUMN(D3DcaXY, d3DcaXY, float); DECLARE_SOA_COLUMN(D3DcaZ, d3DcaZ, float); -DECLARE_SOA_COLUMN(D1D2Mass, d1d2Mass, float); -DECLARE_SOA_COLUMN(D1D3Mass, d1d3Mass, float); -DECLARE_SOA_COLUMN(D2D3Mass, d2d3Mass, float); +DECLARE_SOA_COLUMN(D1d2Mass, d1d2Mass, float); +DECLARE_SOA_COLUMN(D1d3Mass, d1d3Mass, float); +DECLARE_SOA_COLUMN(D2d3Mass, d2d3Mass, float); DECLARE_SOA_COLUMN(D3IsPvContributor, d3IsPvContributor, bool); DECLARE_SOA_COLUMN(D0X, d0X, float); DECLARE_SOA_COLUMN(D0Y, d0Y, float); @@ -185,81 +188,81 @@ DECLARE_SOA_COLUMN(D0Px, d0Px, float); DECLARE_SOA_COLUMN(D0Py, d0Py, float); DECLARE_SOA_COLUMN(D0Pz, d0Pz, float); DECLARE_SOA_COLUMN(D0Mass, d0Mass, float); -DECLARE_SOA_COLUMN(D0Ct, d0ct, float); -DECLARE_SOA_COLUMN(D0CosPA, d0cosPa, float); -DECLARE_SOA_COLUMN(D0DcaTracks, d0dcaTracks, float); -DECLARE_SOA_COLUMN(D0DcaTracksTv, d0dcaTracksTv, float); -DECLARE_SOA_COLUMN(D0DcaToPvXY, d0dcaToPvXY, float); -DECLARE_SOA_COLUMN(D0DcaToPvZ, d0dcaToPvZ, float); -DECLARE_SOA_COLUMN(D0DcaToSvXY, d0dcaToSvXY, float); -DECLARE_SOA_COLUMN(D0DcaToSvZ, d0dcaToSvZ, float); -DECLARE_SOA_COLUMN(D0Chi2, d0chi2, float); -DECLARE_SOA_COLUMN(SD1X, sd1X, float); -DECLARE_SOA_COLUMN(SD1Y, sd1Y, float); -DECLARE_SOA_COLUMN(SD1Z, sd1Z, float); -DECLARE_SOA_COLUMN(SD1Px, sd1Px, float); -DECLARE_SOA_COLUMN(SD1Py, sd1Py, float); -DECLARE_SOA_COLUMN(SD1Pz, sd1Pz, float); -DECLARE_SOA_COLUMN(SD1TPCnCls, sd1TPCnCls, uint8_t); -DECLARE_SOA_COLUMN(SD1TPCchi2, sd1TPCchi2, float); -DECLARE_SOA_COLUMN(SD1ITSnCls, sd1ITSnCls, uint8_t); -DECLARE_SOA_COLUMN(SD1ITSchi2, sd1ITSchi2, float); -DECLARE_SOA_COLUMN(SD1ITSmeanClsSize, sd1ITSmeanClsSize, float); -DECLARE_SOA_COLUMN(SD1ITSmeanClsSizeL, sd1ITSmeanClsSizeL, float); -DECLARE_SOA_COLUMN(SD1Rigidity, sd1Rigidity, float); -DECLARE_SOA_COLUMN(SD1TPCsignal, sd1TPCsignal, float); -DECLARE_SOA_COLUMN(SD1TPCnSigma, sd1TPCnSigma, float); -DECLARE_SOA_COLUMN(SD1TPCnSigmaNhp, sd1TPCnSigmaNhp, float); -DECLARE_SOA_COLUMN(SD1TPCnSigmaNlp, sd1TPCnSigmaNlp, float); -DECLARE_SOA_COLUMN(SD1TOFmass, sd1TOFmass, float); -DECLARE_SOA_COLUMN(SD1DcaXY, sd1DcaXY, float); -DECLARE_SOA_COLUMN(SD1DcaZ, sd1DcaZ, float); -DECLARE_SOA_COLUMN(SD1IsPvContributor, sd1IsPvContributor, bool); -DECLARE_SOA_COLUMN(SD2X, sd2X, float); -DECLARE_SOA_COLUMN(SD2Y, sd2Y, float); -DECLARE_SOA_COLUMN(SD2Z, sd2Z, float); -DECLARE_SOA_COLUMN(SD2Px, sd2Px, float); -DECLARE_SOA_COLUMN(SD2Py, sd2Py, float); -DECLARE_SOA_COLUMN(SD2Pz, sd2Pz, float); -DECLARE_SOA_COLUMN(SD2TPCnCls, sd2TPCnCls, uint8_t); -DECLARE_SOA_COLUMN(SD2TPCchi2, sd2TPCchi2, float); -DECLARE_SOA_COLUMN(SD2ITSnCls, sd2ITSnCls, uint8_t); -DECLARE_SOA_COLUMN(SD2ITSchi2, sd2ITSchi2, float); -DECLARE_SOA_COLUMN(SD2ITSmeanClsSize, sd2ITSmeanClsSize, float); -DECLARE_SOA_COLUMN(SD2ITSmeanClsSizeL, sd2ITSmeanClsSizeL, float); -DECLARE_SOA_COLUMN(SD2Rigidity, sd2Rigidity, float); -DECLARE_SOA_COLUMN(SD2TPCsignal, sd2TPCsignal, float); -DECLARE_SOA_COLUMN(SD2TPCnSigma, sd2TPCnSigma, float); -DECLARE_SOA_COLUMN(SD2TPCnSigmaNhp, sd2TPCnSigmaNhp, float); -DECLARE_SOA_COLUMN(SD2TPCnSigmaNlp, sd2TPCnSigmaNlp, float); -DECLARE_SOA_COLUMN(SD2TOFmass, sd2TOFmass, float); -DECLARE_SOA_COLUMN(SD2DcaXY, sd2DcaXY, float); -DECLARE_SOA_COLUMN(SD2DcaZ, sd2DcaZ, float); -DECLARE_SOA_COLUMN(SD2IsPvContributor, sd2IsPvContributor, bool); -DECLARE_SOA_COLUMN(SD3X, sd3X, float); -DECLARE_SOA_COLUMN(SD3Y, sd3Y, float); -DECLARE_SOA_COLUMN(SD3Z, sd3Z, float); -DECLARE_SOA_COLUMN(SD3Px, sd3Px, float); -DECLARE_SOA_COLUMN(SD3Py, sd3Py, float); -DECLARE_SOA_COLUMN(SD3Pz, sd3Pz, float); -DECLARE_SOA_COLUMN(SD3TPCnCls, sd3TPCnCls, uint8_t); -DECLARE_SOA_COLUMN(SD3TPCchi2, sd3TPCchi2, float); -DECLARE_SOA_COLUMN(SD3ITSnCls, sd3ITSnCls, uint8_t); -DECLARE_SOA_COLUMN(SD3ITSchi2, sd3ITSchi2, float); -DECLARE_SOA_COLUMN(SD3ITSmeanClsSize, sd3ITSmeanClsSize, float); -DECLARE_SOA_COLUMN(SD3ITSmeanClsSizeL, sd3ITSmeanClsSizeL, float); -DECLARE_SOA_COLUMN(SD3Rigidity, sd3Rigidity, float); -DECLARE_SOA_COLUMN(SD3TPCsignal, sd3TPCsignal, float); -DECLARE_SOA_COLUMN(SD3TPCnSigma, sd3TPCnSigma, float); -DECLARE_SOA_COLUMN(SD3TPCnSigmaNhp, sd3TPCnSigmaNhp, float); -DECLARE_SOA_COLUMN(SD3TPCnSigmaNlp, sd3TPCnSigmaNlp, float); -DECLARE_SOA_COLUMN(SD3TOFmass, sd3TOFmass, float); -DECLARE_SOA_COLUMN(SD3DcaXY, sd3DcaXY, float); -DECLARE_SOA_COLUMN(SD3DcaZ, sd3DcaZ, float); -DECLARE_SOA_COLUMN(SD3IsPvContributor, sd3IsPvContributor, bool); -DECLARE_SOA_COLUMN(SD1SD2Mass, sd1sd2Mass, float); -DECLARE_SOA_COLUMN(SD1SD3Mass, sd1sd3Mass, float); -DECLARE_SOA_COLUMN(SD2SD3Mass, sd2sd3Mass, float); +DECLARE_SOA_COLUMN(D0ct, d0ct, float); +DECLARE_SOA_COLUMN(D0cosPa, d0cosPa, float); +DECLARE_SOA_COLUMN(D0dcaTracks, d0dcaTracks, float); +DECLARE_SOA_COLUMN(D0dcaTracksTv, d0dcaTracksTv, float); +DECLARE_SOA_COLUMN(D0dcaToPvXY, d0dcaToPvXY, float); +DECLARE_SOA_COLUMN(D0dcaToPvZ, d0dcaToPvZ, float); +DECLARE_SOA_COLUMN(D0dcaToSvXY, d0dcaToSvXY, float); +DECLARE_SOA_COLUMN(D0dcaToSvZ, d0dcaToSvZ, float); +DECLARE_SOA_COLUMN(D0chi2, d0chi2, float); +DECLARE_SOA_COLUMN(Sd1X, sd1X, float); +DECLARE_SOA_COLUMN(Sd1Y, sd1Y, float); +DECLARE_SOA_COLUMN(Sd1Z, sd1Z, float); +DECLARE_SOA_COLUMN(Sd1Px, sd1Px, float); +DECLARE_SOA_COLUMN(Sd1Py, sd1Py, float); +DECLARE_SOA_COLUMN(Sd1Pz, sd1Pz, float); +DECLARE_SOA_COLUMN(Sd1TPCnCls, sd1TPCnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd1TPCchi2, sd1TPCchi2, float); +DECLARE_SOA_COLUMN(Sd1ITSnCls, sd1ITSnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd1ITSchi2, sd1ITSchi2, float); +DECLARE_SOA_COLUMN(Sd1ITSmeanClsSize, sd1ITSmeanClsSize, float); +DECLARE_SOA_COLUMN(Sd1ITSmeanClsSizeL, sd1ITSmeanClsSizeL, float); +DECLARE_SOA_COLUMN(Sd1Rigidity, sd1Rigidity, float); +DECLARE_SOA_COLUMN(Sd1TPCsignal, sd1TPCsignal, float); +DECLARE_SOA_COLUMN(Sd1TPCnSigma, sd1TPCnSigma, float); +DECLARE_SOA_COLUMN(Sd1TPCnSigmaNhp, sd1TPCnSigmaNhp, float); +DECLARE_SOA_COLUMN(Sd1TPCnSigmaNlp, sd1TPCnSigmaNlp, float); +DECLARE_SOA_COLUMN(Sd1TOFmass, sd1TOFmass, float); +DECLARE_SOA_COLUMN(Sd1DcaXY, sd1DcaXY, float); +DECLARE_SOA_COLUMN(Sd1DcaZ, sd1DcaZ, float); +DECLARE_SOA_COLUMN(Sd1IsPvContributor, sd1IsPvContributor, bool); +DECLARE_SOA_COLUMN(Sd2X, sd2X, float); +DECLARE_SOA_COLUMN(Sd2Y, sd2Y, float); +DECLARE_SOA_COLUMN(Sd2Z, sd2Z, float); +DECLARE_SOA_COLUMN(Sd2Px, sd2Px, float); +DECLARE_SOA_COLUMN(Sd2Py, sd2Py, float); +DECLARE_SOA_COLUMN(Sd2Pz, sd2Pz, float); +DECLARE_SOA_COLUMN(Sd2TPCnCls, sd2TPCnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd2TPCchi2, sd2TPCchi2, float); +DECLARE_SOA_COLUMN(Sd2ITSnCls, sd2ITSnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd2ITSchi2, sd2ITSchi2, float); +DECLARE_SOA_COLUMN(Sd2ITSmeanClsSize, sd2ITSmeanClsSize, float); +DECLARE_SOA_COLUMN(Sd2ITSmeanClsSizeL, sd2ITSmeanClsSizeL, float); +DECLARE_SOA_COLUMN(Sd2Rigidity, sd2Rigidity, float); +DECLARE_SOA_COLUMN(Sd2TPCsignal, sd2TPCsignal, float); +DECLARE_SOA_COLUMN(Sd2TPCnSigma, sd2TPCnSigma, float); +DECLARE_SOA_COLUMN(Sd2TPCnSigmaNhp, sd2TPCnSigmaNhp, float); +DECLARE_SOA_COLUMN(Sd2TPCnSigmaNlp, sd2TPCnSigmaNlp, float); +DECLARE_SOA_COLUMN(Sd2TOFmass, sd2TOFmass, float); +DECLARE_SOA_COLUMN(Sd2DcaXY, sd2DcaXY, float); +DECLARE_SOA_COLUMN(Sd2DcaZ, sd2DcaZ, float); +DECLARE_SOA_COLUMN(Sd2IsPvContributor, sd2IsPvContributor, bool); +DECLARE_SOA_COLUMN(Sd3X, sd3X, float); +DECLARE_SOA_COLUMN(Sd3Y, sd3Y, float); +DECLARE_SOA_COLUMN(Sd3Z, sd3Z, float); +DECLARE_SOA_COLUMN(Sd3Px, sd3Px, float); +DECLARE_SOA_COLUMN(Sd3Py, sd3Py, float); +DECLARE_SOA_COLUMN(Sd3Pz, sd3Pz, float); +DECLARE_SOA_COLUMN(Sd3TPCnCls, sd3TPCnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd3TPCchi2, sd3TPCchi2, float); +DECLARE_SOA_COLUMN(Sd3ITSnCls, sd3ITSnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd3ITSchi2, sd3ITSchi2, float); +DECLARE_SOA_COLUMN(Sd3ITSmeanClsSize, sd3ITSmeanClsSize, float); +DECLARE_SOA_COLUMN(Sd3ITSmeanClsSizeL, sd3ITSmeanClsSizeL, float); +DECLARE_SOA_COLUMN(Sd3Rigidity, sd3Rigidity, float); +DECLARE_SOA_COLUMN(Sd3TPCsignal, sd3TPCsignal, float); +DECLARE_SOA_COLUMN(Sd3TPCnSigma, sd3TPCnSigma, float); +DECLARE_SOA_COLUMN(Sd3TPCnSigmaNhp, sd3TPCnSigmaNhp, float); +DECLARE_SOA_COLUMN(Sd3TPCnSigmaNlp, sd3TPCnSigmaNlp, float); +DECLARE_SOA_COLUMN(Sd3TOFmass, sd3TOFmass, float); +DECLARE_SOA_COLUMN(Sd3DcaXY, sd3DcaXY, float); +DECLARE_SOA_COLUMN(Sd3DcaZ, sd3DcaZ, float); +DECLARE_SOA_COLUMN(Sd3IsPvContributor, sd3IsPvContributor, bool); +DECLARE_SOA_COLUMN(Sd1sd2Mass, sd1sd2Mass, float); +DECLARE_SOA_COLUMN(Sd1sd3Mass, sd1sd3Mass, float); +DECLARE_SOA_COLUMN(Sd2sd3Mass, sd2sd3Mass, float); } // namespace hypkftree #define HYPKFGENBASE mcparticle::PdgCode, hypkftree::IsMatterGen, hypkftree::IsReconstructed, hykfmc::IsPhysicalPrimary, hypkftree::PassedEvSelMC, hypkftree::YGen, hypkftree::PtGen, hypkftree::CtGen @@ -268,26 +271,26 @@ DECLARE_SOA_COLUMN(SD2SD3Mass, sd2sd3Mass, float); #define HYPKFGENCAS hypkftree::TvxGen, hypkftree::TvyGen, hypkftree::TvzGen -#define HYPKFHYPNUC hykfmc::Species, hypkftree::IsMatter, hykfmcColl::PassedEvSel, hykfhyp::Mass, hypkftree::Y, track::Pt, hypkftree::Ct, hypkftree::CosPa, hypkftree::DcaTracks, hykfhyp::DcaToPvXY, hykfhyp::DcaToPvZ, hykfhyp::DevToPvXY, hykfhyp::Chi2, hypkftree::Pvx, hypkftree::Pvy, hypkftree::Pvz, hykfmc::Svx, hykfmc::Svy, hykfmc::Svz, hykfhyp::Px, hykfhyp::Py, hykfhyp::Pz, hypkftree::CollMcTrue +#define HYPKFHYPNUC hykfmc::Species, hypkftree::IsMatter, hypkftree::Centrality, hypkftree::Occupancy, hykfmccoll::PassedEvSel, hykfhyp::Mass, hypkftree::Y, track::Pt, hypkftree::Ct, hypkftree::CosPa, hypkftree::DcaTracks, hykfhyp::DcaToPvXY, hykfhyp::DcaToPvZ, hykfhyp::DevToPvXY, hykfhyp::Chi2, hypkftree::Pvx, hypkftree::Pvy, hypkftree::Pvz, hykfmc::Svx, hykfmc::Svy, hykfmc::Svz, hykfhyp::Px, hykfhyp::Py, hykfhyp::Pz, hypkftree::CollMcTrue #define HYPKFHYPNUCMC hypkftree::McTrue, hykfmc::IsPhysicalPrimary -#define HYPKFD0 hypkftree::Tvx, hypkftree::Tvy, hypkftree::Tvz, hypkftree::D0X, hypkftree::D0Y, hypkftree::D0Z, hypkftree::D0Px, hypkftree::D0Py, hypkftree::D0Pz, hypkftree::D0Mass, hypkftree::D0Ct, hypkftree::D0CosPA, hypkftree::D0DcaTracks, hypkftree::D0DcaToPvXY, hypkftree::D0DcaToPvZ, hypkftree::D0DcaToSvXY, hypkftree::D0DcaToSvZ, hypkftree::D0Chi2 +#define HYPKFD0 hypkftree::Tvx, hypkftree::Tvy, hypkftree::Tvz, hypkftree::D0X, hypkftree::D0Y, hypkftree::D0Z, hypkftree::D0Px, hypkftree::D0Py, hypkftree::D0Pz, hypkftree::D0Mass, hypkftree::D0ct, hypkftree::D0cosPa, hypkftree::D0dcaTracks, hypkftree::D0dcaToPvXY, hypkftree::D0dcaToPvZ, hypkftree::D0dcaToSvXY, hypkftree::D0dcaToSvZ, hypkftree::D0chi2 -#define HYPKFD1 hypkftree::D1X, hypkftree::D1Y, hypkftree::D1Z, hypkftree::D1Px, hypkftree::D1Py, hypkftree::D1Pz, hypkftree::D1TPCnCls, hypkftree::D1TPCchi2, hypkftree::D1ITSnCls, hypkftree::D1ITSchi2, hypkftree::D1ITSmeanClsSize, hypkftree::D1ITSmeanClsSizeL, hypkftree::D1Rigidity, hypkftree::D1TPCsignal, hypkftree::D1TPCnSigma, hypkftree::D1TPCnSigmaNhp, hypkftree::D1TPCnSigmaNlp, hypkftree::D1TOFmass, hypkftree::D1DcaXY, hypkftree::D1DcaZ, hypkftree::D1IsPvContributor +#define HYPKFD1 hypkftree::D1X, hypkftree::D1Y, hypkftree::D1Z, hypkftree::D1Px, hypkftree::D1Py, hypkftree::D1Pz, hypkftree::D1TPCnCls, hypkftree::D1TPCchi2, hypkftree::D1ITSnCls, hypkftree::D1ITSchi2, hypkftree::D1ITSmeanClsSizeL, hypkftree::D1Rigidity, hypkftree::D1TPCsignal, hypkftree::D1TPCnSigma, hypkftree::D1TPCnSigmaNhp, hypkftree::D1TPCnSigmaNlp, hypkftree::D1TOFmass, hypkftree::D1DcaXY, hypkftree::D1DcaZ, hypkftree::D1IsPvContributor -#define HYPKFD2 hypkftree::D2X, hypkftree::D2Y, hypkftree::D2Z, hypkftree::D2Px, hypkftree::D2Py, hypkftree::D2Pz, hypkftree::D2TPCnCls, hypkftree::D2TPCchi2, hypkftree::D2ITSnCls, hypkftree::D2ITSchi2, hypkftree::D2ITSmeanClsSize, hypkftree::D2ITSmeanClsSizeL, hypkftree::D2Rigidity, hypkftree::D2TPCsignal, hypkftree::D2TPCnSigma, hypkftree::D2TPCnSigmaNhp, hypkftree::D2TPCnSigmaNlp, hypkftree::D2TOFmass, hypkftree::D2DcaXY, hypkftree::D2DcaZ, hypkftree::D2IsPvContributor +#define HYPKFD2 hypkftree::D2X, hypkftree::D2Y, hypkftree::D2Z, hypkftree::D2Px, hypkftree::D2Py, hypkftree::D2Pz, hypkftree::D2TPCnCls, hypkftree::D2TPCchi2, hypkftree::D2ITSnCls, hypkftree::D2ITSchi2, hypkftree::D2ITSmeanClsSizeL, hypkftree::D2Rigidity, hypkftree::D2TPCsignal, hypkftree::D2TPCnSigma, hypkftree::D2TPCnSigmaNhp, hypkftree::D2TPCnSigmaNlp, hypkftree::D2TOFmass, hypkftree::D2DcaXY, hypkftree::D2DcaZ, hypkftree::D2IsPvContributor -#define HYPKFD3 hypkftree::D3X, hypkftree::D3Y, hypkftree::D3Z, hypkftree::D3Px, hypkftree::D3Py, hypkftree::D3Pz, hypkftree::D3TPCnCls, hypkftree::D3TPCchi2, hypkftree::D3ITSnCls, hypkftree::D3ITSchi2, hypkftree::D3ITSmeanClsSize, hypkftree::D3ITSmeanClsSizeL, hypkftree::D3Rigidity, hypkftree::D3TPCsignal, hypkftree::D3TPCnSigma, hypkftree::D3TPCnSigmaNhp, hypkftree::D3TPCnSigmaNlp, hypkftree::D3TOFmass, hypkftree::D3DcaXY, hypkftree::D3DcaZ, hypkftree::D3IsPvContributor +#define HYPKFD3 hypkftree::D3X, hypkftree::D3Y, hypkftree::D3Z, hypkftree::D3Px, hypkftree::D3Py, hypkftree::D3Pz, hypkftree::D3TPCnCls, hypkftree::D3TPCchi2, hypkftree::D3ITSnCls, hypkftree::D3ITSchi2, hypkftree::D3ITSmeanClsSizeL, hypkftree::D3Rigidity, hypkftree::D3TPCsignal, hypkftree::D3TPCnSigma, hypkftree::D3TPCnSigmaNhp, hypkftree::D3TPCnSigmaNlp, hypkftree::D3TOFmass, hypkftree::D3DcaXY, hypkftree::D3DcaZ, hypkftree::D3IsPvContributor -#define HYPKFSD1 hypkftree::SD1X, hypkftree::SD1Y, hypkftree::SD1Z, hypkftree::SD1Px, hypkftree::SD1Py, hypkftree::SD1Pz, hypkftree::SD1TPCnCls, hypkftree::SD1TPCchi2, hypkftree::SD1ITSnCls, hypkftree::SD1ITSchi2, hypkftree::SD1ITSmeanClsSize, hypkftree::SD1ITSmeanClsSizeL, hypkftree::SD1Rigidity, hypkftree::SD1TPCsignal, hypkftree::SD1TPCnSigma, hypkftree::SD1TPCnSigmaNhp, hypkftree::SD1TPCnSigmaNlp, hypkftree::SD1TOFmass, hypkftree::SD1DcaXY, hypkftree::SD1DcaZ, hypkftree::SD1IsPvContributor +#define HYPKFSD1 hypkftree::Sd1X, hypkftree::Sd1Y, hypkftree::Sd1Z, hypkftree::Sd1Px, hypkftree::Sd1Py, hypkftree::Sd1Pz, hypkftree::Sd1TPCnCls, hypkftree::Sd1TPCchi2, hypkftree::Sd1ITSnCls, hypkftree::Sd1ITSchi2, hypkftree::Sd1ITSmeanClsSizeL, hypkftree::Sd1Rigidity, hypkftree::Sd1TPCsignal, hypkftree::Sd1TPCnSigma, hypkftree::Sd1TPCnSigmaNhp, hypkftree::Sd1TPCnSigmaNlp, hypkftree::Sd1TOFmass, hypkftree::Sd1DcaXY, hypkftree::Sd1DcaZ, hypkftree::Sd1IsPvContributor -#define HYPKFSD2 hypkftree::SD2X, hypkftree::SD2Y, hypkftree::SD2Z, hypkftree::SD2Px, hypkftree::SD2Py, hypkftree::SD2Pz, hypkftree::SD2TPCnCls, hypkftree::SD2TPCchi2, hypkftree::SD2ITSnCls, hypkftree::SD2ITSchi2, hypkftree::SD2ITSmeanClsSize, hypkftree::SD2ITSmeanClsSizeL, hypkftree::SD2Rigidity, hypkftree::SD2TPCsignal, hypkftree::SD2TPCnSigma, hypkftree::SD2TPCnSigmaNhp, hypkftree::SD2TPCnSigmaNlp, hypkftree::SD2TOFmass, hypkftree::SD2DcaXY, hypkftree::SD2DcaZ, hypkftree::SD2IsPvContributor +#define HYPKFSD2 hypkftree::Sd2X, hypkftree::Sd2Y, hypkftree::Sd2Z, hypkftree::Sd2Px, hypkftree::Sd2Py, hypkftree::Sd2Pz, hypkftree::Sd2TPCnCls, hypkftree::Sd2TPCchi2, hypkftree::Sd2ITSnCls, hypkftree::Sd2ITSchi2, hypkftree::Sd2ITSmeanClsSizeL, hypkftree::Sd2Rigidity, hypkftree::Sd2TPCsignal, hypkftree::Sd2TPCnSigma, hypkftree::Sd2TPCnSigmaNhp, hypkftree::Sd2TPCnSigmaNlp, hypkftree::Sd2TOFmass, hypkftree::Sd2DcaXY, hypkftree::Sd2DcaZ, hypkftree::Sd2IsPvContributor -#define HYPKFSD3 hypkftree::SD3X, hypkftree::SD3Y, hypkftree::SD3Z, hypkftree::SD3Px, hypkftree::SD3Py, hypkftree::SD3Pz, hypkftree::SD3TPCnCls, hypkftree::SD3TPCchi2, hypkftree::SD3ITSnCls, hypkftree::SD3ITSchi2, hypkftree::SD3ITSmeanClsSize, hypkftree::SD3ITSmeanClsSizeL, hypkftree::SD3Rigidity, hypkftree::SD3TPCsignal, hypkftree::SD3TPCnSigma, hypkftree::SD3TPCnSigmaNhp, hypkftree::SD3TPCnSigmaNlp, hypkftree::SD3TOFmass, hypkftree::SD3DcaXY, hypkftree::SD3DcaZ, hypkftree::SD3IsPvContributor +#define HYPKFSD3 hypkftree::Sd3X, hypkftree::Sd3Y, hypkftree::Sd3Z, hypkftree::Sd3Px, hypkftree::Sd3Py, hypkftree::Sd3Pz, hypkftree::Sd3TPCnCls, hypkftree::Sd3TPCchi2, hypkftree::Sd3ITSnCls, hypkftree::Sd3ITSchi2, hypkftree::Sd3ITSmeanClsSizeL, hypkftree::Sd3Rigidity, hypkftree::Sd3TPCsignal, hypkftree::Sd3TPCnSigma, hypkftree::Sd3TPCnSigmaNhp, hypkftree::Sd3TPCnSigmaNlp, hypkftree::Sd3TOFmass, hypkftree::Sd3DcaXY, hypkftree::Sd3DcaZ, hypkftree::Sd3IsPvContributor -#define HYPKFSDMASS hypkftree::D1D2Mass, hypkftree::D1D3Mass, hypkftree::D2D3Mass -#define HYPKFSSDMASS hypkftree::SD1SD2Mass, hypkftree::SD1SD3Mass, hypkftree::SD2SD3Mass +#define HYPKFSDMASS hypkftree::D1d2Mass, hypkftree::D1d3Mass, hypkftree::D2d3Mass +#define HYPKFSSDMASS hypkftree::Sd1sd2Mass, hypkftree::Sd1sd3Mass, hypkftree::Sd2sd3Mass DECLARE_SOA_TABLE(HypKfGens, "AOD", "HYPKFGEN", HYPKFGENBASE); using HypKfGen = HypKfGens::iterator; @@ -317,7 +320,7 @@ DECLARE_SOA_TABLE(HypKfMcCascadeThreeTwoCandidates, "AOD", "HYPKFMCCAND32", HYPK using HypKfMcCascadeThreeTwoCandidate = HypKfMcCascadeThreeTwoCandidates::iterator; } // namespace o2::aod -struct hypKfTreeCreator { +struct hypKfTreeCreator { // o2-linter: disable=[name/workflow-file][name/struct] HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; Produces outputMcGenTable; @@ -356,10 +359,10 @@ struct hypKfTreeCreator { void processData(aod::HypKfHypNucs const& hypNucs, aod::HypKfColls const& hypKfColls, aod::HypKfTracks const& hypKfTrks, aod::HypKfDaughtAdds const& hypKfDAdd, aod::HypKfSubDs const& hypKfDSub) { - for (auto& hypNuc : hypNucs) { + for (const auto& hypNuc : hypNucs) { if (std::abs(hypNuc.species()) != cfgSpecies) continue; - hyperNucleus candidate, hypDaughter, dummy; + HyperNucleus candidate, hypDaughter, dummy; fillCandidate(candidate, hypDaughter, hypNuc, hypNucs, hypKfColls, hypKfTrks, hypKfDAdd, hypKfDSub); if (cfgNsecDaughters) { fillCandidate(hypDaughter, dummy, hypNucs.rawIteratorAt(hypNuc.hypDaughterId()), hypNucs, hypKfColls, hypKfTrks, hypKfDAdd, hypKfDSub); @@ -369,13 +372,13 @@ struct hypKfTreeCreator { } PROCESS_SWITCH(hypKfTreeCreator, processData, "single tree", false); //___________________________________________________________________________________________________________________________________________________________ - void fillTable(hyperNucleus& cand, hyperNucleus& hypDaughter) + void fillTable(HyperNucleus& cand, HyperNucleus& hypDaughter) { if (isMC && cfgMCGenerated) outputMcGenTable( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen); - if (!cand.IsReconstructed) { + if (!cand.isReconstructed) { cand.daughterTracks.resize(4); cand.subDaughterMassVec.resize(4); hypDaughter.daughterTracks.resize(4); @@ -385,53 +388,57 @@ struct hypKfTreeCreator { if (cfgNprimDaughters == 2 && cfgNsecDaughters == 0) { const auto& d1 = cand.daughterTracks.at(0); const auto& d2 = cand.daughterTracks.at(1); - if (!isMC || (isMC && cfgMCReconstructed && cand.IsReconstructed)) + if (!isMC || (isMC && cfgMCReconstructed && cand.isReconstructed)) outputTableTwo( - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, cand.McTrue, cand.McPhysicalPrimary, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor); + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + cand.mcTrue, cand.mcPhysicalPrimary, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor); if (isMC && cfgMCCombined) outputTableMcTwo( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen, - cand.CpaPvGen, cand.PxGen, cand.PyGen, cand.PzGen, cand.PvxGen, cand.PvyGen, cand.PvzGen, cand.SvxGen, cand.SvyGen, cand.SvzGen, - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen, + cand.cpaPvGen, cand.pxGen, cand.pyGen, cand.pzGen, cand.pvxGen, cand.pvyGen, cand.pvzGen, cand.svxGen, cand.svyGen, cand.svzGen, + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, + cand.dcaToPvXY, cand.dcaToPvZ, cand.devToPvXY, + cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor); } if (cfgNprimDaughters == 3 && cfgNsecDaughters == 0) { const auto& d1 = cand.daughterTracks.at(0); const auto& d2 = cand.daughterTracks.at(1); const auto& d3 = cand.daughterTracks.at(2); - if (!isMC || (isMC && cfgMCReconstructed && cand.IsReconstructed)) + if (!isMC || (isMC && cfgMCReconstructed && cand.isReconstructed)) outputTableThree( - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, cand.McTrue, cand.McPhysicalPrimary, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor, - d3.X, d3.Y, d3.Z, d3.Px, d3.Py, d3.Pz, d3.TPCnCls, d3.TPCchi2, d3.ITSnCls, d3.ITSchi2, d3.ITSmeanClsSize, d3.ITSmeanClsSizeL, - d3.Rigidity, d3.TPCsignal, d3.TPCnSigma, d3.TPCnSigmaNhp, d3.TPCnSigmaNlp, d3.TOFmass, d3.DcaXY, d3.DcaZ, d3.IsPvContributor, - d1.SubMass, d2.SubMass, d3.SubMass); + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + cand.mcTrue, cand.mcPhysicalPrimary, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor, + d3.x, d3.y, d3.z, d3.px, d3.py, d3.pz, d3.tpcNcls, d3.tpcChi2, d3.itsNcls, d3.itsChi2, d3.itsMeanClsSizeL, + d3.rigidity, d3.tpcSignal, d3.tpcNsigma, d3.tpcNsigmaNhp, d3.tpcNsigmaNlp, d3.tofMass, d3.dcaXY, d3.dcaZ, d3.isPvContributor, + d1.subMass, d2.subMass, d3.subMass); if (isMC && cfgMCCombined) outputTableMcThree( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen, - cand.CpaPvGen, cand.PxGen, cand.PyGen, cand.PzGen, cand.PvxGen, cand.PvyGen, cand.PvzGen, cand.SvxGen, cand.SvyGen, cand.SvzGen, - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor, - d3.X, d3.Y, d3.Z, d3.Px, d3.Py, d3.Pz, d3.TPCnCls, d3.TPCchi2, d3.ITSnCls, d3.ITSchi2, d3.ITSmeanClsSize, d3.ITSmeanClsSizeL, - d3.Rigidity, d3.TPCsignal, d3.TPCnSigma, d3.TPCnSigmaNhp, d3.TPCnSigmaNlp, d3.TOFmass, d3.DcaXY, d3.DcaZ, d3.IsPvContributor, - d1.SubMass, d2.SubMass, d3.SubMass); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen, + cand.cpaPvGen, cand.pxGen, cand.pyGen, cand.pzGen, cand.pvxGen, cand.pvyGen, cand.pvzGen, cand.svxGen, cand.svyGen, cand.svzGen, + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, + cand.dcaToPvXY, cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, + cand.pz, cand.collisionMcTrue, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor, + d3.x, d3.y, d3.z, d3.px, d3.py, d3.pz, d3.tpcNcls, d3.tpcChi2, d3.itsNcls, d3.itsChi2, d3.itsMeanClsSizeL, + d3.rigidity, d3.tpcSignal, d3.tpcNsigma, d3.tpcNsigmaNhp, d3.tpcNsigmaNlp, d3.tofMass, d3.dcaXY, d3.dcaZ, d3.isPvContributor, + d1.subMass, d2.subMass, d3.subMass); } if (cfgNprimDaughters == 2 && cfgNsecDaughters == 3) { const auto& d0 = cand.daughterTracks.at(0); @@ -439,38 +446,40 @@ struct hypKfTreeCreator { const auto& sd1 = hypDaughter.daughterTracks.at(0); const auto& sd2 = hypDaughter.daughterTracks.at(1); const auto& sd3 = hypDaughter.daughterTracks.at(2); - if (!isMC || (isMC && cfgMCReconstructed && cand.IsReconstructed)) + if (!isMC || (isMC && cfgMCReconstructed && cand.isReconstructed)) outputTableTwoThree( - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, cand.McTrue, cand.McPhysicalPrimary, - hypDaughter.Svx, hypDaughter.Svy, hypDaughter.Svz, d0.X, d0.Y, d0.Z, d0.Px, d0.Py, d0.Pz, hypDaughter.Mass, hypDaughter.Ct, hypDaughter.CpaPv, - hypDaughter.MaxDcaTracks, hypDaughter.DcaToPvXY, hypDaughter.DcaToPvZ, hypDaughter.DcaToVtxXY, hypDaughter.DcaToVtxZ, hypDaughter.Chi2, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - sd1.X, sd1.Y, sd1.Z, sd1.Px, sd1.Py, sd1.Pz, sd1.TPCnCls, sd1.TPCchi2, sd1.ITSnCls, sd1.ITSchi2, sd1.ITSmeanClsSize, sd1.ITSmeanClsSizeL, - sd1.Rigidity, sd1.TPCsignal, sd1.TPCnSigma, sd1.TPCnSigmaNhp, sd1.TPCnSigmaNlp, sd1.TOFmass, sd1.DcaXY, sd1.DcaZ, sd1.IsPvContributor, - sd2.X, sd2.Y, sd2.Z, sd2.Px, sd2.Py, sd2.Pz, sd2.TPCnCls, sd2.TPCchi2, sd2.ITSnCls, sd2.ITSchi2, sd2.ITSmeanClsSize, sd2.ITSmeanClsSizeL, - sd2.Rigidity, sd2.TPCsignal, sd2.TPCnSigma, sd2.TPCnSigmaNhp, sd2.TPCnSigmaNlp, sd2.TOFmass, sd2.DcaXY, sd2.DcaZ, sd2.IsPvContributor, - sd3.X, sd3.Y, sd3.Z, sd3.Px, sd3.Py, sd3.Pz, sd3.TPCnCls, sd3.TPCchi2, sd3.ITSnCls, sd3.ITSchi2, sd3.ITSmeanClsSize, sd3.ITSmeanClsSizeL, - sd3.Rigidity, sd3.TPCsignal, sd3.TPCnSigma, sd3.TPCnSigmaNhp, sd3.TPCnSigmaNlp, sd3.TOFmass, sd3.DcaXY, sd3.DcaZ, sd3.IsPvContributor, - sd1.SubMass, sd2.SubMass, sd3.SubMass); + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + cand.mcTrue, cand.mcPhysicalPrimary, + hypDaughter.svx, hypDaughter.svy, hypDaughter.svz, d0.x, d0.y, d0.z, d0.px, d0.py, d0.pz, hypDaughter.mass, hypDaughter.ct, hypDaughter.cpaPv, + hypDaughter.maxDcaTracks, hypDaughter.dcaToPvXY, hypDaughter.dcaToPvZ, hypDaughter.dcaToVtxXY, hypDaughter.dcaToVtxZ, hypDaughter.chi2, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + sd1.x, sd1.y, sd1.z, sd1.px, sd1.py, sd1.pz, sd1.tpcNcls, sd1.tpcChi2, sd1.itsNcls, sd1.itsChi2, sd1.itsMeanClsSizeL, + sd1.rigidity, sd1.tpcSignal, sd1.tpcNsigma, sd1.tpcNsigmaNhp, sd1.tpcNsigmaNlp, sd1.tofMass, sd1.dcaXY, sd1.dcaZ, sd1.isPvContributor, + sd2.x, sd2.y, sd2.z, sd2.px, sd2.py, sd2.pz, sd2.tpcNcls, sd2.tpcChi2, sd2.itsNcls, sd2.itsChi2, sd2.itsMeanClsSizeL, + sd2.rigidity, sd2.tpcSignal, sd2.tpcNsigma, sd2.tpcNsigmaNhp, sd2.tpcNsigmaNlp, sd2.tofMass, sd2.dcaXY, sd2.dcaZ, sd2.isPvContributor, + sd3.x, sd3.y, sd3.z, sd3.px, sd3.py, sd3.pz, sd3.tpcNcls, sd3.tpcChi2, sd3.itsNcls, sd3.itsChi2, sd3.itsMeanClsSizeL, + sd3.rigidity, sd3.tpcSignal, sd3.tpcNsigma, sd3.tpcNsigmaNhp, sd3.tpcNsigmaNlp, sd3.tofMass, sd3.dcaXY, sd3.dcaZ, sd3.isPvContributor, + sd1.subMass, sd2.subMass, sd3.subMass); if (isMC && cfgMCCombined) outputTableMcTwoThree( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen, - cand.CpaPvGen, cand.PxGen, cand.PyGen, cand.PzGen, cand.PvxGen, cand.PvyGen, cand.PvzGen, cand.SvxGen, cand.SvyGen, cand.SvzGen, - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, - hypDaughter.Svx, hypDaughter.Svy, hypDaughter.Svz, d0.X, d0.Y, d0.Z, d0.Px, d0.Py, d0.Pz, hypDaughter.Mass, hypDaughter.Ct, hypDaughter.CpaPv, - hypDaughter.MaxDcaTracks, hypDaughter.DcaToPvXY, hypDaughter.DcaToPvZ, hypDaughter.DcaToVtxXY, hypDaughter.DcaToVtxZ, hypDaughter.Chi2, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - sd1.X, sd1.Y, sd1.Z, sd1.Px, sd1.Py, sd1.Pz, sd1.TPCnCls, sd1.TPCchi2, sd1.ITSnCls, sd1.ITSchi2, sd1.ITSmeanClsSize, sd1.ITSmeanClsSizeL, - sd1.Rigidity, sd1.TPCsignal, sd1.TPCnSigma, sd1.TPCnSigmaNhp, sd1.TPCnSigmaNlp, sd1.TOFmass, sd1.DcaXY, sd1.DcaZ, sd1.IsPvContributor, - sd2.X, sd2.Y, sd2.Z, sd2.Px, sd2.Py, sd2.Pz, sd2.TPCnCls, sd2.TPCchi2, sd2.ITSnCls, sd2.ITSchi2, sd2.ITSmeanClsSize, sd2.ITSmeanClsSizeL, - sd2.Rigidity, sd2.TPCsignal, sd2.TPCnSigma, sd2.TPCnSigmaNhp, sd2.TPCnSigmaNlp, sd2.TOFmass, sd2.DcaXY, sd2.DcaZ, sd2.IsPvContributor, - sd3.X, sd3.Y, sd3.Z, sd3.Px, sd3.Py, sd3.Pz, sd3.TPCnCls, sd3.TPCchi2, sd3.ITSnCls, sd3.ITSchi2, sd3.ITSmeanClsSize, sd3.ITSmeanClsSizeL, - sd3.Rigidity, sd3.TPCsignal, sd3.TPCnSigma, sd3.TPCnSigmaNhp, sd3.TPCnSigmaNlp, sd3.TOFmass, sd3.DcaXY, sd3.DcaZ, sd3.IsPvContributor, - sd1.SubMass, sd2.SubMass, sd3.SubMass); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen, + cand.cpaPvGen, cand.pxGen, cand.pyGen, cand.pzGen, cand.pvxGen, cand.pvyGen, cand.pvzGen, cand.svxGen, cand.svyGen, cand.svzGen, + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, + cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + hypDaughter.svx, hypDaughter.svy, hypDaughter.svz, d0.x, d0.y, d0.z, d0.px, d0.py, d0.pz, hypDaughter.mass, hypDaughter.ct, hypDaughter.cpaPv, + hypDaughter.maxDcaTracks, hypDaughter.dcaToPvXY, hypDaughter.dcaToPvZ, hypDaughter.dcaToVtxXY, hypDaughter.dcaToVtxZ, hypDaughter.chi2, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + sd1.x, sd1.y, sd1.z, sd1.px, sd1.py, sd1.pz, sd1.tpcNcls, sd1.tpcChi2, sd1.itsNcls, sd1.itsChi2, sd1.itsMeanClsSizeL, + sd1.rigidity, sd1.tpcSignal, sd1.tpcNsigma, sd1.tpcNsigmaNhp, sd1.tpcNsigmaNlp, sd1.tofMass, sd1.dcaXY, sd1.dcaZ, sd1.isPvContributor, + sd2.x, sd2.y, sd2.z, sd2.px, sd2.py, sd2.pz, sd2.tpcNcls, sd2.tpcChi2, sd2.itsNcls, sd2.itsChi2, sd2.itsMeanClsSizeL, + sd2.rigidity, sd2.tpcSignal, sd2.tpcNsigma, sd2.tpcNsigmaNhp, sd2.tpcNsigmaNlp, sd2.tofMass, sd2.dcaXY, sd2.dcaZ, sd2.isPvContributor, + sd3.x, sd3.y, sd3.z, sd3.px, sd3.py, sd3.pz, sd3.tpcNcls, sd3.tpcChi2, sd3.itsNcls, sd3.itsChi2, sd3.itsMeanClsSizeL, + sd3.rigidity, sd3.tpcSignal, sd3.tpcNsigma, sd3.tpcNsigmaNhp, sd3.tpcNsigmaNlp, sd3.tofMass, sd3.dcaXY, sd3.dcaZ, sd3.isPvContributor, + sd1.subMass, sd2.subMass, sd3.subMass); } if (cfgNprimDaughters == 3 && cfgNsecDaughters == 1) { const auto& d0 = cand.daughterTracks.at(0); @@ -478,115 +487,117 @@ struct hypKfTreeCreator { const auto& d2 = cand.daughterTracks.at(2); const auto& sd1 = hypDaughter.daughterTracks.at(0); const auto& sd2 = hypDaughter.daughterTracks.at(1); - if (!isMC || (isMC && cfgMCReconstructed && cand.IsReconstructed)) + if (!isMC || (isMC && cfgMCReconstructed && cand.isReconstructed)) outputTableTwoThree( - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, cand.McTrue, cand.McPhysicalPrimary, - hypDaughter.Svx, hypDaughter.Svy, hypDaughter.Svz, d0.X, d0.Y, d0.Z, d0.Px, d0.Py, d0.Pz, hypDaughter.Mass, hypDaughter.Ct, hypDaughter.CpaPv, - hypDaughter.MaxDcaTracks, hypDaughter.DcaToPvXY, hypDaughter.DcaToPvZ, hypDaughter.DcaToVtxXY, hypDaughter.DcaToVtxZ, hypDaughter.Chi2, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor, - d0.SubMass, d1.SubMass, d2.SubMass, - sd1.X, sd1.Y, sd1.Z, sd1.Px, sd1.Py, sd1.Pz, sd1.TPCnCls, sd1.TPCchi2, sd1.ITSnCls, sd1.ITSchi2, sd1.ITSmeanClsSize, sd1.ITSmeanClsSizeL, - sd1.Rigidity, sd1.TPCsignal, sd1.TPCnSigma, sd1.TPCnSigmaNhp, sd1.TPCnSigmaNlp, sd1.TOFmass, sd1.DcaXY, sd1.DcaZ, sd1.IsPvContributor, - sd2.X, sd2.Y, sd2.Z, sd2.Px, sd2.Py, sd2.Pz, sd2.TPCnCls, sd2.TPCchi2, sd2.ITSnCls, sd2.ITSchi2, sd2.ITSmeanClsSize, sd2.ITSmeanClsSizeL, - sd2.Rigidity, sd2.TPCsignal, sd2.TPCnSigma, sd2.TPCnSigmaNhp, sd2.TPCnSigmaNlp, sd2.TOFmass, sd2.DcaXY, sd2.DcaZ, sd2.IsPvContributor); + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + cand.mcTrue, cand.mcPhysicalPrimary, hypDaughter.svx, hypDaughter.svy, hypDaughter.svz, d0.x, d0.y, d0.z, d0.px, d0.py, d0.pz, hypDaughter.mass, hypDaughter.ct, + hypDaughter.cpaPv, hypDaughter.maxDcaTracks, hypDaughter.dcaToPvXY, hypDaughter.dcaToPvZ, hypDaughter.dcaToVtxXY, hypDaughter.dcaToVtxZ, hypDaughter.chi2, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor, + d0.subMass, d1.subMass, d2.subMass, + sd1.x, sd1.y, sd1.z, sd1.px, sd1.py, sd1.pz, sd1.tpcNcls, sd1.tpcChi2, sd1.itsNcls, sd1.itsChi2, sd1.itsMeanClsSizeL, + sd1.rigidity, sd1.tpcSignal, sd1.tpcNsigma, sd1.tpcNsigmaNhp, sd1.tpcNsigmaNlp, sd1.tofMass, sd1.dcaXY, sd1.dcaZ, sd1.isPvContributor, + sd2.x, sd2.y, sd2.z, sd2.px, sd2.py, sd2.pz, sd2.tpcNcls, sd2.tpcChi2, sd2.itsNcls, sd2.itsChi2, sd2.itsMeanClsSizeL, + sd2.rigidity, sd2.tpcSignal, sd2.tpcNsigma, sd2.tpcNsigmaNhp, sd2.tpcNsigmaNlp, sd2.tofMass, sd2.dcaXY, sd2.dcaZ, sd2.isPvContributor); if (isMC && cfgMCCombined) outputTableMcTwoThree( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen, - cand.CpaPvGen, cand.PxGen, cand.PyGen, cand.PzGen, cand.PvxGen, cand.PvyGen, cand.PvzGen, cand.SvxGen, cand.SvyGen, cand.SvzGen, - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, - hypDaughter.Svx, hypDaughter.Svy, hypDaughter.Svz, d0.X, d0.Y, d0.Z, d0.Px, d0.Py, d0.Pz, hypDaughter.Mass, hypDaughter.Ct, hypDaughter.CpaPv, - hypDaughter.MaxDcaTracks, hypDaughter.DcaToPvXY, hypDaughter.DcaToPvZ, hypDaughter.DcaToVtxXY, hypDaughter.DcaToVtxZ, hypDaughter.Chi2, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor, - d0.SubMass, d1.SubMass, d2.SubMass, - sd1.X, sd1.Y, sd1.Z, sd1.Px, sd1.Py, sd1.Pz, sd1.TPCnCls, sd1.TPCchi2, sd1.ITSnCls, sd1.ITSchi2, sd1.ITSmeanClsSize, sd1.ITSmeanClsSizeL, - sd1.Rigidity, sd1.TPCsignal, sd1.TPCnSigma, sd1.TPCnSigmaNhp, sd1.TPCnSigmaNlp, sd1.TOFmass, sd1.DcaXY, sd1.DcaZ, sd1.IsPvContributor, - sd2.X, sd2.Y, sd2.Z, sd2.Px, sd2.Py, sd2.Pz, sd2.TPCnCls, sd2.TPCchi2, sd2.ITSnCls, sd2.ITSchi2, sd2.ITSmeanClsSize, sd2.ITSmeanClsSizeL, - sd2.Rigidity, sd2.TPCsignal, sd2.TPCnSigma, sd2.TPCnSigmaNhp, sd2.TPCnSigmaNlp, sd2.TOFmass, sd2.DcaXY, sd2.DcaZ, sd2.IsPvContributor); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen, + cand.cpaPvGen, cand.pxGen, cand.pyGen, cand.pzGen, cand.pvxGen, cand.pvyGen, cand.pvzGen, cand.svxGen, cand.svyGen, cand.svzGen, + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + hypDaughter.svx, hypDaughter.svy, hypDaughter.svz, d0.x, d0.y, d0.z, d0.px, d0.py, d0.pz, hypDaughter.mass, hypDaughter.ct, hypDaughter.cpaPv, + hypDaughter.maxDcaTracks, hypDaughter.dcaToPvXY, hypDaughter.dcaToPvZ, hypDaughter.dcaToVtxXY, hypDaughter.dcaToVtxZ, hypDaughter.chi2, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor, + d0.subMass, d1.subMass, d2.subMass, + sd1.x, sd1.y, sd1.z, sd1.px, sd1.py, sd1.pz, sd1.tpcNcls, sd1.tpcChi2, sd1.itsNcls, sd1.itsChi2, sd1.itsMeanClsSizeL, + sd1.rigidity, sd1.tpcSignal, sd1.tpcNsigma, sd1.tpcNsigmaNhp, sd1.tpcNsigmaNlp, sd1.tofMass, sd1.dcaXY, sd1.dcaZ, sd1.isPvContributor, + sd2.x, sd2.y, sd2.z, sd2.px, sd2.py, sd2.pz, sd2.tpcNcls, sd2.tpcChi2, sd2.itsNcls, sd2.itsChi2, sd2.itsMeanClsSizeL, + sd2.rigidity, sd2.tpcSignal, sd2.tpcNsigma, sd2.tpcNsigmaNhp, sd2.tpcNsigmaNlp, sd2.tofMass, sd2.dcaXY, sd2.dcaZ, sd2.isPvContributor); } } //___________________________________________________________________________________________________________________________________________________________ - void fillCandidate(hyperNucleus& cand, hyperNucleus& /*hypDaughter*/, aod::HypKfHypNuc const& hypNuc, aod::HypKfHypNucs const&, aod::HypKfColls const&, aod::HypKfTracks const&, aod::HypKfDaughtAdds const&, aod::HypKfSubDs const&) + void fillCandidate(HyperNucleus& cand, HyperNucleus& /*hypDaughter*/, aod::HypKfHypNuc const& hypNuc, aod::HypKfHypNucs const&, aod::HypKfColls const&, aod::HypKfTracks const&, aod::HypKfDaughtAdds const&, aod::HypKfSubDs const&) { cand.daughterTracks.clear(); cand.subDaughterMassVec.clear(); auto coll = hypNuc.hypKfColl(); - auto addOns = hypNuc.addons_as(); + auto addOns = hypNuc.hypKfDaughtAdd_as(); auto posVec = posVector(addOns); - cand.Species = std::abs(hypNuc.species()); - cand.IsMatter = hypNuc.isMatter(); - cand.PassedEvSel = coll.passedEvSel(); - cand.Mass = hypNuc.mass(); - cand.Y = hypNuc.y(); - cand.Pt = hypNuc.pt(); - cand.Ct = ct(coll, hypNuc); - cand.CpaPv = cpa(coll, hypNuc); - cand.MaxDcaTracks = maxValue(dcaTrackSvAll(posVec, hypNuc, "XY")); - cand.DcaToPvXY = hypNuc.dcaToPvXY(); - cand.DcaToPvZ = hypNuc.dcaToPvZ(); - cand.DcaToVtxXY = hypNuc.dcaToVtxXY(); - cand.DcaToVtxZ = hypNuc.dcaToVtxZ(); - cand.DevToPvXY = hypNuc.devToPvXY(); - cand.Chi2 = hypNuc.chi2(); - cand.Pvx = coll.posX(); - cand.Pvy = coll.posY(); - cand.Pvz = coll.posZ(); - cand.Svx = hypNuc.svx(); - cand.Svy = hypNuc.svy(); - cand.Svz = hypNuc.svz(); - cand.Px = hypNuc.px(); - cand.Py = hypNuc.py(); - cand.Pz = hypNuc.pz(); + cand.species = std::abs(hypNuc.species()); + cand.isMatter = hypNuc.isMatter(); + cand.cent = coll.centFT0C(); + cand.occu = coll.occupancy(); + cand.passedEvSel = coll.passedEvSel(); + cand.mass = hypNuc.mass(); + cand.y = hypNuc.y(); + cand.pt = hypNuc.pt(); + cand.ct = ct(coll, hypNuc); + cand.cpaPv = cpa(coll, hypNuc); + cand.maxDcaTracks = maxValue(dcaTrackSvAll(posVec, hypNuc, "XY")); + cand.dcaToPvXY = hypNuc.dcaToPvXY(); + cand.dcaToPvZ = hypNuc.dcaToPvZ(); + cand.dcaToVtxXY = hypNuc.dcaToVtxXY(); + cand.dcaToVtxZ = hypNuc.dcaToVtxZ(); + cand.devToPvXY = hypNuc.devToPvXY(); + cand.chi2 = hypNuc.chi2(); + cand.pvx = coll.posX(); + cand.pvy = coll.posY(); + cand.pvz = coll.posZ(); + cand.svx = hypNuc.svx(); + cand.svy = hypNuc.svy(); + cand.svz = hypNuc.svz(); + cand.px = hypNuc.px(); + cand.py = hypNuc.py(); + cand.pz = hypNuc.pz(); if (cfgNsecDaughters) { - trackProperties hypDaughter; + TrackProperties hypDaughter; cand.daughterTracks.push_back(hypDaughter); } - auto daughterTracks = hypNuc.daughterTracks_as(); - for (auto& track : daughterTracks) { - trackProperties daughter; - daughter.TPCnCls = track.tpcNcluster(); - daughter.ITSnCls = track.itsNcluster(); - daughter.TPCchi2 = track.tpcChi2NCl(); - daughter.ITSchi2 = track.itsChi2NCl(); - daughter.ITSmeanClsSize = track.itsMeanClsSize(); - daughter.ITSmeanClsSizeL = track.itsMeanClsSize() * track.lambda(); - daughter.Rigidity = track.rigidity(); - daughter.TPCsignal = track.tpcSignal(); - daughter.TPCnSigma = track.tpcNsigma(); - daughter.TPCnSigmaNhp = track.tpcNsigmaNhp(); - daughter.TPCnSigmaNlp = track.tpcNsigmaNlp(); - daughter.TOFmass = track.tofMass(); - daughter.DcaXY = track.dcaXY(); - daughter.DcaZ = track.dcaZ(); - daughter.IsPvContributor = track.isPVContributor(); + auto daughterTracks = hypNuc.hypKfTrack_as(); + for (const auto& track : daughterTracks) { + TrackProperties daughter; + daughter.tpcNcls = track.tpcNcluster(); + daughter.itsNcls = track.itsNcluster(); + daughter.tpcChi2 = track.tpcChi2NCl(); + daughter.itsChi2 = track.itsChi2NCl(); + daughter.itsMeanClsSize = track.itsMeanClsSize(); + daughter.itsMeanClsSizeL = track.itsMeanClsSize() * track.lambda(); + daughter.rigidity = track.rigidity(); + daughter.tpcSignal = track.tpcSignal(); + daughter.tpcNsigma = track.tpcNsigma(); + daughter.tpcNsigmaNhp = track.tpcNsigmaNhp(); + daughter.tpcNsigmaNlp = track.tpcNsigmaNlp(); + daughter.tofMass = track.tofMass(); + daughter.dcaXY = track.dcaXY(); + daughter.dcaZ = track.dcaZ(); + daughter.isPvContributor = track.isPVContributor(); cand.daughterTracks.push_back(daughter); } int trackCount = 0; - for (auto& addOn : addOns) { - cand.daughterTracks.at(trackCount).X = addOn.x(); - cand.daughterTracks.at(trackCount).Y = addOn.y(); - cand.daughterTracks.at(trackCount).Z = addOn.z(); - cand.daughterTracks.at(trackCount).Px = addOn.px(); - cand.daughterTracks.at(trackCount).Py = addOn.py(); - cand.daughterTracks.at(trackCount).Pz = addOn.py(); + for (const auto& addOn : addOns) { + cand.daughterTracks.at(trackCount).x = addOn.x(); + cand.daughterTracks.at(trackCount).y = addOn.y(); + cand.daughterTracks.at(trackCount).z = addOn.z(); + cand.daughterTracks.at(trackCount).px = addOn.px(); + cand.daughterTracks.at(trackCount).py = addOn.py(); + cand.daughterTracks.at(trackCount).pz = addOn.py(); trackCount++; } - cand.NsingleDaughters = trackCount; - if (cand.NsingleDaughters < 3) + cand.nSingleDaughters = trackCount; + if (cand.nSingleDaughters < 3) return; trackCount = 0; - auto subDaughters = hypNuc.subDaughters_as(); - for (auto& subDaughter : subDaughters) { - cand.daughterTracks.at(trackCount++).SubMass = subDaughter.subMass(); + auto subDaughters = hypNuc.hypKfSubD_as(); + for (const auto& subDaughter : subDaughters) { + cand.daughterTracks.at(trackCount++).subMass = subDaughter.subMass(); } } //___________________________________________________________________________________________________________________________________________________________ @@ -594,37 +605,37 @@ struct hypKfTreeCreator { void processMC(aod::HypKfMcParts const& mcHypNucs, aod::HypKfHypNucs const& hypNucs, aod::HypKfMcColls const&, aod::HypKfColls const& hypKfColls, aod::HypKfTracks const& hypKfTrks, aod::HypKfDaughtAdds const& hypKfDAdd, aod::HypKfSubDs const& hypKfDSub) { isMC = true; - for (auto& mcHypNuc : mcHypNucs) { + for (const auto& mcHypNuc : mcHypNucs) { if (std::abs(mcHypNuc.species()) != cfgSpecies) continue; auto mcColl = mcHypNuc.hypKfMcColl(); const auto mcParticleIdx = mcHypNuc.globalIndex(); auto hypNucsByMc = hypNucs.sliceBy(perMcParticle, mcParticleIdx); - hyperNucleus candidate, hypDaughter, dummy; - candidate.PdgCode = mcHypNuc.pdgCode(); - candidate.IsMatterMC = mcHypNuc.isMatter(); - candidate.IsPhysicalPrimary = mcHypNuc.isPhysicalPrimary(); - candidate.PassedEvSelMC = mcColl.passedEvSel(); - candidate.YGen = mcHypNuc.y(); - candidate.PtGen = mcHypNuc.pt(); - candidate.CtGen = ct(mcColl, mcHypNuc); - candidate.IsReconstructed = 0; - candidate.CpaPvGen = cpa(mcColl, mcHypNuc); - candidate.PxGen = mcHypNuc.px(); - candidate.PyGen = mcHypNuc.py(); - candidate.PzGen = mcHypNuc.pz(); - candidate.PvxGen = mcColl.posX(); - candidate.PvyGen = mcColl.posY(); - candidate.PvzGen = mcColl.posZ(); - candidate.SvxGen = mcHypNuc.svx(); - candidate.SvyGen = mcHypNuc.svy(); - candidate.SvzGen = mcHypNuc.svz(); - for (auto& hypNuc : hypNucsByMc) { + HyperNucleus candidate, hypDaughter, dummy; + candidate.pdgCode = mcHypNuc.pdgCode(); + candidate.isMatterMC = mcHypNuc.isMatter(); + candidate.isPhysicalPrimary = mcHypNuc.isPhysicalPrimary(); + candidate.passedEvSelMC = mcColl.passedEvSel(); + candidate.yGen = mcHypNuc.y(); + candidate.ptGen = mcHypNuc.pt(); + candidate.ctGen = ct(mcColl, mcHypNuc); + candidate.isReconstructed = 0; + candidate.cpaPvGen = cpa(mcColl, mcHypNuc); + candidate.pxGen = mcHypNuc.px(); + candidate.pyGen = mcHypNuc.py(); + candidate.pzGen = mcHypNuc.pz(); + candidate.pvxGen = mcColl.posX(); + candidate.pvyGen = mcColl.posY(); + candidate.pvzGen = mcColl.posZ(); + candidate.svxGen = mcHypNuc.svx(); + candidate.svyGen = mcHypNuc.svy(); + candidate.svzGen = mcHypNuc.svz(); + for (const auto& hypNuc : hypNucsByMc) { auto coll = hypNuc.hypKfColl(); if (coll.hypKfMcCollId() == mcHypNuc.hypKfMcCollId()) { - candidate.CollisionMcTrue = true; + candidate.collisionMcTrue = true; } - candidate.IsReconstructed++; + candidate.isReconstructed++; fillCandidate(candidate, hypDaughter, hypNucs.rawIteratorAt(hypNuc.globalIndex()), hypNucs, hypKfColls, hypKfTrks, hypKfDAdd, hypKfDSub); if (cfgNsecDaughters) { fillCandidate(hypDaughter, dummy, hypNucs.rawIteratorAt(hypNuc.hypDaughterId()), hypNucs, hypKfColls, hypKfTrks, hypKfDAdd, hypKfDSub); @@ -632,8 +643,8 @@ struct hypKfTreeCreator { } fillTable(candidate, hypDaughter); hPt[0]->Fill(mcHypNuc.pt()); - if (candidate.IsReconstructed) - hPt[1]->Fill(candidate.Pt); + if (candidate.isReconstructed) + hPt[1]->Fill(candidate.pt); } hPt[2]->Divide(hPt[1].get(), hPt[0].get()); } @@ -668,16 +679,16 @@ struct hypKfTreeCreator { float meanValue(std::vector vec) { float sum = 0; - for (auto value : vec) + for (const auto& value : vec) sum += value; return sum / vec.size(); } float mean2Value(std::vector vec) { float sum = 0; - for (auto value : vec) + for (const auto& value : vec) sum += (value * value); - return TMath::Sqrt(sum / vec.size()); + return std::sqrt(sum / vec.size()); } float dcaTracks(std::vector v, int track1, int track2, TString opt = "XY") @@ -703,7 +714,7 @@ struct hypKfTreeCreator { std::vector posVector(T const& addons) { std::vector v; - for (auto& pos : addons) { + for (const auto& pos : addons) { v.push_back(std::array{pos.x(), pos.y(), pos.z()}); } return v; @@ -738,11 +749,6 @@ struct hypKfTreeCreator { { return RecoDecay::cpa(primVtx(coll), decayVtx(hypNuc), momenta(hypNuc)); } - double paArcMin(double cosPa) - { - // returns the pointing angle (in arc min) for a given cosPa - return TMath::ACos(cosPa) * 60 * 180 / TMath::Pi(); - } // only for Cascades template float decayLength(TPart const& mother, TPart const& daughter)