From 3f950d3c40109b5798f5cebde4aeecb5a970ec3a Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Tue, 29 Oct 2024 18:36:35 +0100 Subject: [PATCH 1/5] PWGHF: add single track variables to D2H reduced data formats --- PWGHF/D2H/DataModel/ReducedDataModel.h | 177 +++++++++++++++--- .../dataCreatorCharmHadPiReduced.cxx | 44 ++++- .../dataCreatorCharmResoReduced.cxx | 29 ++- 3 files changed, 212 insertions(+), 38 deletions(-) diff --git a/PWGHF/D2H/DataModel/ReducedDataModel.h b/PWGHF/D2H/DataModel/ReducedDataModel.h index 906859de48e..82428a7ea1d 100644 --- a/PWGHF/D2H/DataModel/ReducedDataModel.h +++ b/PWGHF/D2H/DataModel/ReducedDataModel.h @@ -17,6 +17,8 @@ /// \author Alexandre Bigot , IPHC Strasbourg /// \author Antonio Palasciano , Università degli Studi di Bari & INFN, Bari /// \author Fabio Catalano , CERN +/// \author Fabrizio Grosa , CERN +/// \author Luca Aglietta , Università degli Studi di Torino (UniTO) #ifndef PWGHF_D2H_DATAMODEL_REDUCEDDATAMODEL_H_ #define PWGHF_D2H_DATAMODEL_REDUCEDDATAMODEL_H_ @@ -30,6 +32,7 @@ #include "Common/DataModel/PIDResponse.h" #include "PWGHF/DataModel/CandidateReconstructionTables.h" +#include "PWGHF/Utils/utilsPid.h" namespace o2 { @@ -125,13 +128,18 @@ DECLARE_SOA_COLUMN(C1Pt21Pt2, c1Pt21Pt2, float); //! Covariance matrix namespace hf_track_index_reduced { -DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index -DECLARE_SOA_COLUMN(TrackId, trackId, int); //! Original track index -DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index -DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index -DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index -DECLARE_SOA_COLUMN(HasTPC, hasTPC, bool); //! Flag to check if track has a TPC match -DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); //! Flag to check if track has a TOF match +DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index +DECLARE_SOA_COLUMN(TrackId, trackId, int); //! Original track index +DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index +DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index +DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index +DECLARE_SOA_COLUMN(HasTPC, hasTPC, bool); //! Flag to check if track has a TPC match +DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); //! Flag to check if track has a TOF match +DECLARE_SOA_COLUMN(NumItsCls, numItsCls, int); //! Number of clusters in ITS +DECLARE_SOA_COLUMN(NumTpcCrossedRows, numTpcCrossedRows, int); //! Number of TPC crossed rows +// dynamic columns +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPi, tpcTofNSigmaPi, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); } // namespace hf_track_index_reduced // CAREFUL: need to follow convention [Name = Description + 's'] in DECLARE_SOA_TABLE(Name, "AOD", Description) @@ -141,6 +149,8 @@ DECLARE_SOA_TABLE(HfRedTrackBases, "AOD", "HFREDTRACKBASE", //! Table with track hf_track_index_reduced::TrackId, hf_track_index_reduced::HfRedCollisionId, HFTRACKPAR_COLUMNS, + hf_track_index_reduced::NumItsCls, + hf_track_index_reduced::NumTpcCrossedRows, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -156,7 +166,8 @@ DECLARE_SOA_TABLE(HfRedTracksPid, "AOD", "HFREDTRACKPID", //! Table with PID tra hf_track_index_reduced::HasTPC, hf_track_index_reduced::HasTOF, pidtpc::TPCNSigmaPi, - pidtof::TOFNSigmaPi); + pidtof::TOFNSigmaPi, + hf_track_index_reduced::TPCTOFNSigmaPi); DECLARE_SOA_EXTENDED_TABLE_USER(HfRedTracksExt, HfRedTrackBases, "HFREDTRACKEXT", //! Track parameters at collision vertex aod::track::Pt); @@ -173,6 +184,36 @@ DECLARE_SOA_COLUMN(MlScoreNonpromptMassHypo0, mlScoreNonpromptMassHypo0, float); DECLARE_SOA_COLUMN(MlScoreBkgMassHypo1, mlScoreBkgMassHypo1, float); //! ML score for background class (mass hypothesis 1) DECLARE_SOA_COLUMN(MlScorePromptMassHypo1, mlScorePromptMassHypo1, float); //! ML score for prompt class (mass hypothesis 1) DECLARE_SOA_COLUMN(MlScoreNonpromptMassHypo1, mlScoreNonpromptMassHypo1, float); //! ML score for non-prompt class (mass hypothesis 1) +DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); //! minimum value of number of ITS clusters for the decay daughter tracks +DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks +DECLARE_SOA_COLUMN(MinAbsEtaProng, minAbsEtaProng, float); //! minimum value of absolute pseudorapidity for the decay daughter tracks +DECLARE_SOA_COLUMN(MinPtProng, minPtProng, float); //! minimum value of transverse momentum for the decay daughter tracks +DECLARE_SOA_COLUMN(TPCNSigmaPiProng0, tpcNSigmaPiProng0, float); //! NsigmaTPCPi for prong0 +DECLARE_SOA_COLUMN(TPCNSigmaPiProng1, tpcNSigmaPiProng1, float); //! NsigmaTPCPi for prong1 +DECLARE_SOA_COLUMN(TPCNSigmaPiProng2, tpcNSigmaPiProng2, float); //! NsigmaTPCPi for prong2 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng0, tpcNSigmaKaProng0, float); //! NsigmaTPCKa for prong0 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng1, tpcNSigmaKaProng1, float); //! NsigmaTPCKa for prong1 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng2, tpcNSigmaKaProng2, float); //! NsigmaTPCKa for prong2 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng0, tofNSigmaPiProng0, float); //! NsigmaTOFPi for prong0 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng1, tofNSigmaPiProng1, float); //! NsigmaTOFPi for prong1 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng2, tofNSigmaPiProng2, float); //! NsigmaTOFPi for prong2 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng0, tofNSigmaKaProng0, float); //! NsigmaTOFKa for prong0 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng1, tofNSigmaKaProng1, float); //! NsigmaTOFKa for prong1 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng2, tofNSigmaKaProng2, float); //! NsigmaTOFKa for prong2 + +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng0, tpcTofNSigmaPiProng0, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng1, tpcTofNSigmaPiProng1, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng2, tpcTofNSigmaPiProng2, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng0, tpcTofNSigmaKaProng0, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng1, tpcTofNSigmaKaProng1, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng2, tpcTofNSigmaKaProng2, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); + } // namespace hf_charm_cand_reduced // CAREFUL: need to follow convention [Name = Description + 's'] in DECLARE_SOA_TABLE(Name, "AOD", Description) @@ -184,6 +225,8 @@ DECLARE_SOA_TABLE(HfRed2Prongs, "AOD", "HFRED2PRONG", //! Table with 2prong cand HFTRACKPAR_COLUMNS, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_charm_cand_reduced::InvMassHypo0, hf_charm_cand_reduced::InvMassHypo1, + hf_charm_cand_reduced::MinPtProng, hf_charm_cand_reduced::MinAbsEtaProng, + hf_charm_cand_reduced::MinNumItsClsProng, hf_charm_cand_reduced::MinNumTpcCrossedRowsProng, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -211,6 +254,8 @@ DECLARE_SOA_TABLE(HfRed3Prongs, "AOD", "HFRED3PRONG", //! Table with 3prong cand HFTRACKPAR_COLUMNS, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_charm_cand_reduced::InvMassHypo0, hf_charm_cand_reduced::InvMassHypo1, + hf_charm_cand_reduced::MinPtProng, hf_charm_cand_reduced::MinAbsEtaProng, + hf_charm_cand_reduced::MinNumItsClsProng, hf_charm_cand_reduced::MinNumTpcCrossedRowsProng, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -237,6 +282,30 @@ DECLARE_SOA_TABLE_VERSIONED(HfRed3ProngsMl_001, "AOD", "HFRED3PRONGML", 1, //! T using HfRed3ProngsMl = HfRed3ProngsMl_001; +DECLARE_SOA_TABLE(HfRedPidDau0s, "AOD", "HFREDPIDDAU0", //! + hf_charm_cand_reduced::TPCNSigmaPiProng0, + hf_charm_cand_reduced::TOFNSigmaPiProng0, + hf_charm_cand_reduced::TPCNSigmaKaProng0, + hf_charm_cand_reduced::TOFNSigmaKaProng0, + hf_charm_cand_reduced::TPCTOFNSigmaPiProng0, + hf_charm_cand_reduced::TPCTOFNSigmaKaProng0); + +DECLARE_SOA_TABLE(HfRedPidDau1s, "AOD", "HFREDPIDDAU1", //! + hf_charm_cand_reduced::TPCNSigmaPiProng1, + hf_charm_cand_reduced::TOFNSigmaPiProng1, + hf_charm_cand_reduced::TPCNSigmaKaProng1, + hf_charm_cand_reduced::TOFNSigmaKaProng1, + hf_charm_cand_reduced::TPCTOFNSigmaPiProng0, + hf_charm_cand_reduced::TPCTOFNSigmaKaProng0); + +DECLARE_SOA_TABLE(HfRedPidDau2s, "AOD", "HFREDPIDDAU2", //! + hf_charm_cand_reduced::TPCNSigmaPiProng2, + hf_charm_cand_reduced::TOFNSigmaPiProng2, + hf_charm_cand_reduced::TPCNSigmaKaProng2, + hf_charm_cand_reduced::TOFNSigmaKaProng2, + hf_charm_cand_reduced::TPCTOFNSigmaPiProng2, + hf_charm_cand_reduced::TPCTOFNSigmaKaProng2); + // Beauty candidates prongs namespace hf_cand_b0_reduced { @@ -545,7 +614,9 @@ DECLARE_SOA_TABLE(HfCandBsConfigs, "AOD", "HFCANDBSCONFIG", //! Table with confi // Charm resonances analysis namespace hf_reso_3_prong { -DECLARE_SOA_COLUMN(DType, dType, int8_t); //! Integer with selected D candidate type: 1 = Dplus, -1 = Dminus, 2 = DstarPlus, -2 = DstarMinus +DECLARE_SOA_COLUMN(DType, dType, int8_t); //! Integer with selected D candidate type: 1 = Dplus, -1 = Dminus, 2 = DstarPlus, -2 = DstarMinus +DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); //! minimum value of number of ITS clusters for the decay daughter tracks +DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pxProng0, float pxProng1, float pxProng2) -> float { return 1.f * pxProng0 + 1.f * pxProng1 + 1.f * pxProng2; }); @@ -555,6 +626,18 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //! [](float pzProng0, float pzProng1, float pzProng2) -> float { return 1.f * pzProng0 + 1.f * pzProng1 + 1.f * pzProng2; }); DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! [](float pxProng0, float pxProng1, float pxProng2, float pyProng0, float pyProng1, float pyProng2) -> float { return RecoDecay::pt((1.f * pxProng0 + 1.f * pxProng1 + 1.f * pxProng2), (1.f * pyProng0 + 1.f * pyProng1 + 1.f * pyProng2)); }); +DECLARE_SOA_DYNAMIC_COLUMN(PtProng0, ptProng0, //! + [](float pxProng0, float pyProng0) -> float { return RecoDecay::pt(pxProng0, pyProng0); }); +DECLARE_SOA_DYNAMIC_COLUMN(PtProng1, ptProng1, //! + [](float pxProng1, float pyProng1) -> float { return RecoDecay::pt(pxProng1, pyProng1); }); +DECLARE_SOA_DYNAMIC_COLUMN(PtProng2, ptProng2, //! + [](float pxProng2, float pyProng2) -> float { return RecoDecay::pt(pxProng2, pyProng2); }); +DECLARE_SOA_DYNAMIC_COLUMN(EtaProng0, etaProng0, //! + [](float pxProng0, float pyProng0, float pzProng0) -> float { return RecoDecay::eta(std::array{pxProng0, pyProng0, pzProng0}); }); +DECLARE_SOA_DYNAMIC_COLUMN(EtaProng1, etaProng1, //! + [](float pxProng1, float pyProng1, float pzProng1) -> float { return RecoDecay::eta(std::array{pxProng1, pyProng1, pzProng1}); }); +DECLARE_SOA_DYNAMIC_COLUMN(EtaProng2, etaProng2, //! + [](float pxProng2, float pyProng2, float pzProng2) -> float { return RecoDecay::eta(std::array{pxProng2, pyProng2, pzProng2}); }); DECLARE_SOA_DYNAMIC_COLUMN(InvMassDplus, invMassDplus, [](float px0, float py0, float pz0, float px1, float py1, float pz1, float px2, float py2, float pz2) -> float { return RecoDecay::m(std::array{std::array{px0, py0, pz0}, std::array{px1, py1, pz1}, std::array{px2, py2, pz2}}, std::array{constants::physics::MassPiPlus, constants::physics::MassKPlus, constants::physics::MassPiPlus}); }); DECLARE_SOA_DYNAMIC_COLUMN(InvMassDstar, invMassDstar, @@ -567,10 +650,13 @@ DECLARE_SOA_DYNAMIC_COLUMN(InvMassAntiDstar, invMassAntiDstar, namespace hf_reso_v0 { -DECLARE_SOA_COLUMN(Cpa, cpa, float); //! Cosine of Pointing Angle of V0 candidate -DECLARE_SOA_COLUMN(Dca, dca, float); //! DCA of V0 candidate -DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius of V0 candidate -DECLARE_SOA_COLUMN(V0Type, v0Type, uint8_t); //! Bitmap with mass hypothesis of the V0 +DECLARE_SOA_COLUMN(Cpa, cpa, float); //! Cosine of Pointing Angle of V0 candidate +DECLARE_SOA_COLUMN(Dca, dca, float); //! DCA of V0 candidate +DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius of V0 candidate +DECLARE_SOA_COLUMN(V0Type, v0Type, uint8_t); //! Bitmap with mass hypothesis of the V0 +DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); //! minimum value of number of ITS clusters for the decay daughter tracks +DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks + DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pxProng0, float pxProng1) -> float { return 1.f * pxProng0 + 1.f * pxProng1; }); DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //! @@ -579,6 +665,14 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //! [](float pzProng0, float pzProng1) -> float { return 1.f * pzProng0 + 1.f * pzProng1; }); DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! [](float pxProng0, float pxProng1, float pyProng0, float pyProng1) -> float { return RecoDecay::pt((1.f * pxProng0 + 1.f * pxProng1), (1.f * pyProng0 + 1.f * pyProng1)); }); +DECLARE_SOA_DYNAMIC_COLUMN(PtProng0, ptProng0, //! + [](float pxProng0, float pyProng0) -> float { return RecoDecay::pt(pxProng0, pyProng0); }); +DECLARE_SOA_DYNAMIC_COLUMN(PtProng1, ptProng1, //! + [](float pxProng1, float pyProng1) -> float { return RecoDecay::pt(pxProng1, pyProng1); }); +DECLARE_SOA_DYNAMIC_COLUMN(EtaProng0, etaProng0, //! + [](float pxProng0, float pyProng0, float pzProng0) -> float { return RecoDecay::eta(std::array{pxProng0, pyProng0, pzProng0}); }); +DECLARE_SOA_DYNAMIC_COLUMN(EtaProng1, etaProng1, //! + [](float pxProng1, float pyProng1, float pzProng1) -> float { return RecoDecay::eta(std::array{pxProng1, pyProng1, pzProng1}); }); DECLARE_SOA_DYNAMIC_COLUMN(V0Radius, v0Radius, //! V0 decay radius (2D, centered at zero) [](float x, float y) -> float { return RecoDecay::sqrtSumOfSquares(x, y); }); DECLARE_SOA_DYNAMIC_COLUMN(InvMassLambda, invMassLambda, //! mass under lambda hypothesis @@ -591,23 +685,32 @@ DECLARE_SOA_DYNAMIC_COLUMN(InvMassK0s, invMassK0s, //! mass under K0short hypoth namespace hf_reso_track { -DECLARE_SOA_COLUMN(Px, px, float); //! x-component of momentum -DECLARE_SOA_COLUMN(Py, py, float); //! y-component of momentum -DECLARE_SOA_COLUMN(Pz, pz, float); //! z-component of momentum -DECLARE_SOA_COLUMN(Sign, sign, uint8_t); //! charge sign -DECLARE_SOA_COLUMN(NSigmaTpcPi, nSigmaTpcPi, float); //! TPC Nsigma for pion hypothesis -DECLARE_SOA_COLUMN(NSigmaTpcKa, nSigmaTpcKa, float); //! TPC Nsigma for kaon hypothesis -DECLARE_SOA_COLUMN(NSigmaTpcPr, nSigmaTpcPr, float); //! TPC Nsigma for proton hypothesis -DECLARE_SOA_COLUMN(NSigmaTofPi, nSigmaTofPi, float); //! TOF Nsigma for pion hypothesis -DECLARE_SOA_COLUMN(NSigmaTofKa, nSigmaTofKa, float); //! TOF Nsigma for kaon hypothesis -DECLARE_SOA_COLUMN(NSigmaTofPr, nSigmaTofPr, float); //! TOF Nsigma for proton hypothesis -DECLARE_SOA_COLUMN(HasTof, hasTof, bool); //! flag for presence of TOF -DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! +DECLARE_SOA_COLUMN(Px, px, float); //! x-component of momentum +DECLARE_SOA_COLUMN(Py, py, float); //! y-component of momentum +DECLARE_SOA_COLUMN(Pz, pz, float); //! z-component of momentum +DECLARE_SOA_COLUMN(Sign, sign, uint8_t); //! charge sign +DECLARE_SOA_COLUMN(NSigmaTpcPi, nSigmaTpcPi, float); //! TPC Nsigma for pion hypothesis +DECLARE_SOA_COLUMN(NSigmaTpcKa, nSigmaTpcKa, float); //! TPC Nsigma for kaon hypothesis +DECLARE_SOA_COLUMN(NSigmaTpcPr, nSigmaTpcPr, float); //! TPC Nsigma for proton hypothesis +DECLARE_SOA_COLUMN(NSigmaTofPi, nSigmaTofPi, float); //! TOF Nsigma for pion hypothesis +DECLARE_SOA_COLUMN(NSigmaTofKa, nSigmaTofKa, float); //! TOF Nsigma for kaon hypothesis +DECLARE_SOA_COLUMN(NSigmaTofPr, nSigmaTofPr, float); //! TOF Nsigma for proton hypothesis +DECLARE_SOA_COLUMN(HasTof, hasTof, bool); //! flag for presence of TOF +DECLARE_SOA_COLUMN(NumItsCls, numItsCls, int); //! Number of clusters in ITS +DECLARE_SOA_COLUMN(NumTpcCrossedRows, numTpcCrossedRows, int); //! Number of TPC crossed rows +// dynamic columns +DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! transverse momentum [](float px, float py) -> float { return RecoDecay::pt(px, py); }); -DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! +DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! azimuthal angle [](float px, float py) -> float { return RecoDecay::phi(px, py); }); -DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! +DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! pseudorapidity [](float px, float py, float pz) -> float { return RecoDecay::eta(std::array{px, py, pz}); }); +DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofPi, nSigmaTpcTofPi, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofKa, nSigmaTpcTofKa, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); +DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofPr, nSigmaTpcTofPr, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPr, float tofNSigmaPr) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPr, tofNSigmaPr); }); } // namespace hf_reso_track @@ -622,11 +725,17 @@ DECLARE_SOA_TABLE(HfRedVzeros, "AOD", "HFREDVZERO", //! Table with V0 candidate hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1, hf_reso_v0::Cpa, hf_reso_v0::Dca, + hf_reso_v0::MinNumItsClsProng, + hf_reso_v0::MinNumTpcCrossedRowsProng, hf_reso_v0::V0Type, // Dynamic hf_reso_v0::Px, hf_reso_v0::Py, hf_reso_v0::Pz, + hf_reso_v0::PtProng0, + hf_reso_v0::PtProng1, + hf_reso_v0::EtaProng0, + hf_reso_v0::EtaProng1, hf_reso_v0::InvMassK0s, hf_reso_v0::InvMassLambda, hf_reso_v0::InvMassAntiLambda, @@ -649,10 +758,15 @@ DECLARE_SOA_TABLE(HfRedTrkNoParams, "AOD", "HFREDTRKNOPARAM", //! Table with tra hf_reso_track::NSigmaTofKa, hf_reso_track::NSigmaTofPr, hf_reso_track::HasTof, + hf_reso_track::NumItsCls, + hf_reso_track::NumTpcCrossedRows, // Dynamic hf_reso_track::Pt, hf_reso_track::Eta, - hf_reso_track::Phi); + hf_reso_track::Phi, + hf_reso_track::NSigmaTpcTofPi, + hf_reso_track::NSigmaTpcTofKa, + hf_reso_track::NSigmaTpcTofPr); DECLARE_SOA_TABLE(HfRed3PrNoTrks, "AOD", "HFRED3PRNOTRK", //! Table with 3 prong candidate information for resonances reduced workflow o2::soa::Index<>, @@ -664,11 +778,18 @@ DECLARE_SOA_TABLE(HfRed3PrNoTrks, "AOD", "HFRED3PRNOTRK", //! Table with 3 prong hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1, hf_cand::PxProng2, hf_cand::PyProng2, hf_cand::PzProng2, + hf_reso_3_prong::MinNumItsClsProng, hf_reso_3_prong::MinNumTpcCrossedRowsProng, hf_reso_3_prong::DType, // Dynamic hf_reso_3_prong::Px, hf_reso_3_prong::Py, hf_reso_3_prong::Pz, + hf_reso_3_prong::PtProng0, + hf_reso_3_prong::PtProng1, + hf_reso_3_prong::PtProng2, + hf_reso_3_prong::EtaProng0, + hf_reso_3_prong::EtaProng1, + hf_reso_3_prong::EtaProng2, hf_reso_3_prong::InvMassDplus, hf_reso_3_prong::InvMassDstar, hf_reso_3_prong::InvMassAntiDstar, diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx index 2058ac86611..a7294947c23 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx @@ -83,6 +83,11 @@ struct HfDataCreatorCharmHadPiReduced { Produces hfCand3Prong; Produces hfCand3ProngCov; Produces hfCand3ProngMl; + // PID tables for charm-hadron candidate daughter tracks + Produces hfCandPidProng0; + Produces hfCandPidProng1; + Produces hfCandPidProng2; + // B-hadron config and MC related tables Produces rowCandidateConfigB0; Produces rowHfDPiMcRecReduced; @@ -150,16 +155,16 @@ struct HfDataCreatorCharmHadPiReduced { o2::vertexing::DCAFitterN<3> df3; o2::vertexing::DCAFitterN<2> df2; - using TracksPidPi = soa::Join; - using TracksPidWithSel = soa::Join; + using TracksPid = soa::Join; // TODO: revert to pion only once the Nsigma variables for the charm-hadron candidate daughters are in the candidate table for 3 prongs too + using TracksPidWithSel = soa::Join; using TracksPidWithSelAndMc = soa::Join; using CandsDplusFiltered = soa::Filtered>; using CandsDplusFilteredWithMl = soa::Filtered>; using CandsDsFiltered = soa::Filtered>; using CandsDsFilteredWithMl = soa::Filtered>; - using CandsD0Filtered = soa::Filtered>; - using CandsD0FilteredWithMl = soa::Filtered>; + using CandsD0Filtered = soa::Filtered>; + using CandsD0FilteredWithMl = soa::Filtered>; using CollisionsWMcLabels = soa::Join; @@ -840,6 +845,23 @@ struct HfDataCreatorCharmHadPiReduced { trackParCovCharmHad.setAbsCharge(0); // to be sure } + float ptDauMin = 1.e6, etaDauMin = 999.f; + int nItsClsDauMin = 8, nTpcCrossRowsDauMin = 200; + for (const auto& charmHadTrack : charmHadDauTracks) { + if (charmHadTrack.pt() < ptDauMin) { + ptDauMin = charmHadTrack.pt(); + } + if (std::abs(charmHadTrack.eta()) < etaDauMin) { + etaDauMin = std::abs(charmHadTrack.eta()); + } + if (charmHadTrack.itsNCls() < nItsClsDauMin) { + nItsClsDauMin = charmHadTrack.itsNCls(); + } + if (charmHadTrack.tpcNClsCrossedRows() < nTpcCrossRowsDauMin) { + nTpcCrossRowsDauMin = charmHadTrack.tpcNClsCrossedRows(); + } + } + for (const auto& trackId : trackIndices) { auto trackPion = trackId.template track_as(); @@ -881,7 +903,8 @@ struct HfDataCreatorCharmHadPiReduced { hfTrackPion(trackPion.globalIndex(), indexHfReducedCollision, trackParCovPion.getX(), trackParCovPion.getAlpha(), trackParCovPion.getY(), trackParCovPion.getZ(), trackParCovPion.getSnp(), - trackParCovPion.getTgl(), trackParCovPion.getQ2Pt()); + trackParCovPion.getTgl(), trackParCovPion.getQ2Pt(), + trackPion.itsNCls(), trackPion.tpcNClsCrossedRows()); hfTrackCovPion(trackParCovPion.getSigmaY2(), trackParCovPion.getSigmaZY(), trackParCovPion.getSigmaZ2(), trackParCovPion.getSigmaSnpY(), trackParCovPion.getSigmaSnpZ(), trackParCovPion.getSigmaSnp2(), trackParCovPion.getSigmaTglY(), trackParCovPion.getSigmaTglZ(), @@ -913,13 +936,17 @@ struct HfDataCreatorCharmHadPiReduced { trackParCovCharmHad.getX(), trackParCovCharmHad.getAlpha(), trackParCovCharmHad.getY(), trackParCovCharmHad.getZ(), trackParCovCharmHad.getSnp(), trackParCovCharmHad.getTgl(), trackParCovCharmHad.getQ2Pt(), - candC.xSecondaryVertex(), candC.ySecondaryVertex(), candC.zSecondaryVertex(), invMassC0, invMassC1); + candC.xSecondaryVertex(), candC.ySecondaryVertex(), candC.zSecondaryVertex(), invMassC0, invMassC1, + ptDauMin, etaDauMin, nItsClsDauMin, nTpcCrossRowsDauMin); hfCand3ProngCov(trackParCovCharmHad.getSigmaY2(), trackParCovCharmHad.getSigmaZY(), trackParCovCharmHad.getSigmaZ2(), trackParCovCharmHad.getSigmaSnpY(), trackParCovCharmHad.getSigmaSnpZ(), trackParCovCharmHad.getSigmaSnp2(), trackParCovCharmHad.getSigmaTglY(), trackParCovCharmHad.getSigmaTglZ(), trackParCovCharmHad.getSigmaTglSnp(), trackParCovCharmHad.getSigmaTgl2(), trackParCovCharmHad.getSigma1PtY(), trackParCovCharmHad.getSigma1PtZ(), trackParCovCharmHad.getSigma1PtSnp(), trackParCovCharmHad.getSigma1PtTgl(), trackParCovCharmHad.getSigma1Pt2()); + hfCandPidProng0(charmHadDauTracks[0].tpcNSigmaPi(), charmHadDauTracks[0].tofNSigmaPi(), charmHadDauTracks[0].tpcNSigmaKa(), charmHadDauTracks[0].tofNSigmaKa()); + hfCandPidProng1(charmHadDauTracks[1].tpcNSigmaPi(), charmHadDauTracks[1].tofNSigmaPi(), charmHadDauTracks[1].tpcNSigmaKa(), charmHadDauTracks[1].tofNSigmaKa()); + hfCandPidProng2(charmHadDauTracks[2].tpcNSigmaPi(), charmHadDauTracks[2].tofNSigmaPi(), charmHadDauTracks[2].tpcNSigmaKa(), charmHadDauTracks[2].tofNSigmaKa()); if constexpr (withMl) { if constexpr (decChannel == DecayChannel::B0ToDminusPi) { hfCand3ProngMl(candC.mlProbDplusToPiKPi()[0], candC.mlProbDplusToPiKPi()[1], candC.mlProbDplusToPiKPi()[2], -1., -1., -1.); @@ -940,13 +967,16 @@ struct HfDataCreatorCharmHadPiReduced { trackParCovCharmHad.getX(), trackParCovCharmHad.getAlpha(), trackParCovCharmHad.getY(), trackParCovCharmHad.getZ(), trackParCovCharmHad.getSnp(), trackParCovCharmHad.getTgl(), trackParCovCharmHad.getQ2Pt(), - candC.xSecondaryVertex(), candC.ySecondaryVertex(), candC.zSecondaryVertex(), invMassC0, invMassC1); + candC.xSecondaryVertex(), candC.ySecondaryVertex(), candC.zSecondaryVertex(), invMassC0, invMassC1, + ptDauMin, etaDauMin, nItsClsDauMin, nTpcCrossRowsDauMin); hfCand2ProngCov(trackParCovCharmHad.getSigmaY2(), trackParCovCharmHad.getSigmaZY(), trackParCovCharmHad.getSigmaZ2(), trackParCovCharmHad.getSigmaSnpY(), trackParCovCharmHad.getSigmaSnpZ(), trackParCovCharmHad.getSigmaSnp2(), trackParCovCharmHad.getSigmaTglY(), trackParCovCharmHad.getSigmaTglZ(), trackParCovCharmHad.getSigmaTglSnp(), trackParCovCharmHad.getSigmaTgl2(), trackParCovCharmHad.getSigma1PtY(), trackParCovCharmHad.getSigma1PtZ(), trackParCovCharmHad.getSigma1PtSnp(), trackParCovCharmHad.getSigma1PtTgl(), trackParCovCharmHad.getSigma1Pt2()); + hfCandPidProng0(candC.nSigTpcPi0(), candC.nSigTofPi0(), candC.nSigTpcKa0(), candC.nSigTofKa0()); + hfCandPidProng1(candC.nSigTpcPi1(), candC.nSigTofPi1(), candC.nSigTpcKa1(), candC.nSigTofKa1()); if constexpr (withMl) { std::array mlScores = {-1.f, -1.f, -1.f, -1.f, -1.f, -1.f}; if (candC.mlProbD0().size() == 3) { diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx index f1cce927da1..5b65afd1ce8 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx @@ -672,15 +672,37 @@ struct HfDataCreatorCharmResoReduced { } } // else if + // Get single track variables + int nItsClsDauMin = 8, nTpcCrossRowsDauMin = 200; + for (const auto& charmHadTrack : charmHadDauTracks) { + if (charmHadTrack.itsNCls() < nItsClsDauMin) { + nItsClsDauMin = charmHadTrack.itsNCls(); + } + if (charmHadTrack.tpcNClsCrossedRows() < nTpcCrossRowsDauMin) { + nTpcCrossRowsDauMin = charmHadTrack.tpcNClsCrossedRows(); + } + } + if constexpr (DecayChannel == DecayChannel::DplusV0 || DecayChannel == DecayChannel::DstarV0) { // Loop on V0 candidates for (const auto& v0 : bachelors) { auto trackPos = v0.template posTrack_as(); auto trackNeg = v0.template negTrack_as(); // Apply selsection - if (!buildAndSelectV0(collision, prongIdsD, std::array{trackPos, trackNeg})) { + auto v0DauTracks = std::array{trackPos, trackNeg}; + if (!buildAndSelectV0(collision, prongIdsD, v0DauTracks)) { continue; } + // Get single track variables + int nItsClsDauV0Min = 8, nTpcCrossRowsDauV0Min = 200; + for (const auto& v0Track : v0DauTracks) { + if (v0Track.itsNCls() < nItsClsDauV0Min) { + nItsClsDauV0Min = v0Track.itsNCls(); + } + if (v0Track.tpcNClsCrossedRows() < nTpcCrossRowsDauV0Min) { + nTpcCrossRowsDauV0Min = v0Track.tpcNClsCrossedRows(); + } + } // propagate V0 to primary vertex (if enabled) if (propagateV0toPV) { std::array pVecV0Orig = {candidateV0.mom[0], candidateV0.mom[1], candidateV0.mom[2]}; @@ -739,6 +761,7 @@ struct HfDataCreatorCharmResoReduced { candidateV0.momNeg[0], candidateV0.momNeg[1], candidateV0.momNeg[2], candidateV0.cosPA, candidateV0.dcaV0ToPv, + nItsClsDauV0Min, nTpcCrossRowsDauV0Min, candidateV0.v0Type); selectedV0s[v0.globalIndex()] = hfCandV0.lastIndex(); } @@ -785,7 +808,7 @@ struct HfDataCreatorCharmResoReduced { track.px(), track.py(), track.pz(), track.sign(), track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(), - track.hasTOF()); + track.hasTOF(), track.itsNCls(), track.tpcNClsCrossedRows()); selectedTracks[track.globalIndex()] = hfTrackNoParam.lastIndex(); } fillHfCandD = true; @@ -799,7 +822,7 @@ struct HfDataCreatorCharmResoReduced { candD.pxProng0(), candD.pyProng0(), candD.pzProng0(), candD.pxProng1(), candD.pyProng1(), candD.pzProng1(), pVecProng2[0], pVecProng2[1], pVecProng2[2], - dtype); + nItsClsDauMin, nTpcCrossRowsDauMin, dtype); if constexpr (withMl) { hfCandDMl(bdtScores[0], bdtScores[1], bdtScores[2], -1., -1., -1.); } From e636989117487297335cd3e6ce762c2354a0e2ea Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 29 Oct 2024 17:40:46 +0000 Subject: [PATCH 2/5] Please consider the following formatting changes --- PWGHF/D2H/DataModel/ReducedDataModel.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PWGHF/D2H/DataModel/ReducedDataModel.h b/PWGHF/D2H/DataModel/ReducedDataModel.h index 82428a7ea1d..52f6c8e513b 100644 --- a/PWGHF/D2H/DataModel/ReducedDataModel.h +++ b/PWGHF/D2H/DataModel/ReducedDataModel.h @@ -138,7 +138,7 @@ DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); //! Flag to check DECLARE_SOA_COLUMN(NumItsCls, numItsCls, int); //! Number of clusters in ITS DECLARE_SOA_COLUMN(NumTpcCrossedRows, numTpcCrossedRows, int); //! Number of TPC crossed rows // dynamic columns -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPi, tpcTofNSigmaPi, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPi, tpcTofNSigmaPi, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); } // namespace hf_track_index_reduced @@ -201,17 +201,17 @@ DECLARE_SOA_COLUMN(TOFNSigmaKaProng0, tofNSigmaKaProng0, float); DECLARE_SOA_COLUMN(TOFNSigmaKaProng1, tofNSigmaKaProng1, float); //! NsigmaTOFKa for prong1 DECLARE_SOA_COLUMN(TOFNSigmaKaProng2, tofNSigmaKaProng2, float); //! NsigmaTOFKa for prong2 -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng0, tpcTofNSigmaPiProng0, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng0, tpcTofNSigmaPiProng0, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng1, tpcTofNSigmaPiProng1, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng1, tpcTofNSigmaPiProng1, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng2, tpcTofNSigmaPiProng2, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng2, tpcTofNSigmaPiProng2, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng0, tpcTofNSigmaKaProng0, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng0, tpcTofNSigmaKaProng0, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng1, tpcTofNSigmaKaProng1, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng1, tpcTofNSigmaKaProng1, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng2, tpcTofNSigmaKaProng2, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng2, tpcTofNSigmaKaProng2, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); } // namespace hf_charm_cand_reduced @@ -699,17 +699,17 @@ DECLARE_SOA_COLUMN(HasTof, hasTof, bool); //! flag for pres DECLARE_SOA_COLUMN(NumItsCls, numItsCls, int); //! Number of clusters in ITS DECLARE_SOA_COLUMN(NumTpcCrossedRows, numTpcCrossedRows, int); //! Number of TPC crossed rows // dynamic columns -DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! transverse momentum +DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! transverse momentum [](float px, float py) -> float { return RecoDecay::pt(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! azimuthal angle [](float px, float py) -> float { return RecoDecay::phi(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! pseudorapidity [](float px, float py, float pz) -> float { return RecoDecay::eta(std::array{px, py, pz}); }); -DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofPi, nSigmaTpcTofPi, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofPi, nSigmaTpcTofPi, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofKa, nSigmaTpcTofKa, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofKa, nSigmaTpcTofKa, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); -DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofPr, nSigmaTpcTofPr, //! Combination of NsigmaTPC and NsigmaTOF +DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofPr, nSigmaTpcTofPr, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPr, float tofNSigmaPr) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPr, tofNSigmaPr); }); } // namespace hf_reso_track From 5775d0af5b2f4797ec7fb663497991367f91b2cb Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Wed, 30 Oct 2024 11:47:46 +0100 Subject: [PATCH 3/5] Add TPC chi2 and hasTOF/hasTPC flags in PID tables --- PWGHF/D2H/DataModel/ReducedDataModel.h | 26 ++++++++++++++++--- .../dataCreatorCharmHadPiReduced.cxx | 21 ++++++++------- .../dataCreatorCharmResoReduced.cxx | 14 +++++++--- 3 files changed, 46 insertions(+), 15 deletions(-) diff --git a/PWGHF/D2H/DataModel/ReducedDataModel.h b/PWGHF/D2H/DataModel/ReducedDataModel.h index 52f6c8e513b..b957a3d6c51 100644 --- a/PWGHF/D2H/DataModel/ReducedDataModel.h +++ b/PWGHF/D2H/DataModel/ReducedDataModel.h @@ -137,6 +137,7 @@ DECLARE_SOA_COLUMN(HasTPC, hasTPC, bool); //! Flag to check DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); //! Flag to check if track has a TOF match DECLARE_SOA_COLUMN(NumItsCls, numItsCls, int); //! Number of clusters in ITS DECLARE_SOA_COLUMN(NumTpcCrossedRows, numTpcCrossedRows, int); //! Number of TPC crossed rows +DECLARE_SOA_COLUMN(Chi2Tpc, chi2Tpc, float); //! TPC chi2 // dynamic columns DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPi, tpcTofNSigmaPi, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); @@ -151,6 +152,7 @@ DECLARE_SOA_TABLE(HfRedTrackBases, "AOD", "HFREDTRACKBASE", //! Table with track HFTRACKPAR_COLUMNS, hf_track_index_reduced::NumItsCls, hf_track_index_reduced::NumTpcCrossedRows, + hf_track_index_reduced::Chi2Tpc, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -188,6 +190,7 @@ DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks DECLARE_SOA_COLUMN(MinAbsEtaProng, minAbsEtaProng, float); //! minimum value of absolute pseudorapidity for the decay daughter tracks DECLARE_SOA_COLUMN(MinPtProng, minPtProng, float); //! minimum value of transverse momentum for the decay daughter tracks +DECLARE_SOA_COLUMN(MaxChi2Tpc, maxChi2Tpc, float); //! maximum value of TPC chi2 for the decay daughter tracks DECLARE_SOA_COLUMN(TPCNSigmaPiProng0, tpcNSigmaPiProng0, float); //! NsigmaTPCPi for prong0 DECLARE_SOA_COLUMN(TPCNSigmaPiProng1, tpcNSigmaPiProng1, float); //! NsigmaTPCPi for prong1 DECLARE_SOA_COLUMN(TPCNSigmaPiProng2, tpcNSigmaPiProng2, float); //! NsigmaTPCPi for prong2 @@ -200,6 +203,12 @@ DECLARE_SOA_COLUMN(TOFNSigmaPiProng2, tofNSigmaPiProng2, float); DECLARE_SOA_COLUMN(TOFNSigmaKaProng0, tofNSigmaKaProng0, float); //! NsigmaTOFKa for prong0 DECLARE_SOA_COLUMN(TOFNSigmaKaProng1, tofNSigmaKaProng1, float); //! NsigmaTOFKa for prong1 DECLARE_SOA_COLUMN(TOFNSigmaKaProng2, tofNSigmaKaProng2, float); //! NsigmaTOFKa for prong2 +DECLARE_SOA_COLUMN(HasTPCProng0, hasTPCProng0, bool); //! Flag to check if prong0 has a TPC match +DECLARE_SOA_COLUMN(HasTOFProng0, hasTOFProng0, bool); //! Flag to check if prong0 has a TOF match +DECLARE_SOA_COLUMN(HasTPCProng1, hasTPCProng1, bool); //! Flag to check if prong1 has a TPC match +DECLARE_SOA_COLUMN(HasTOFProng1, hasTOFProng1, bool); //! Flag to check if prong1 has a TOF match +DECLARE_SOA_COLUMN(HasTPCProng2, hasTPCProng2, bool); //! Flag to check if prong2 has a TPC match +DECLARE_SOA_COLUMN(HasTOFProng2, hasTOFProng2, bool); //! Flag to check if prong2 has a TOF match DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng0, tpcTofNSigmaPiProng0, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); @@ -226,7 +235,7 @@ DECLARE_SOA_TABLE(HfRed2Prongs, "AOD", "HFRED2PRONG", //! Table with 2prong cand hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_charm_cand_reduced::InvMassHypo0, hf_charm_cand_reduced::InvMassHypo1, hf_charm_cand_reduced::MinPtProng, hf_charm_cand_reduced::MinAbsEtaProng, - hf_charm_cand_reduced::MinNumItsClsProng, hf_charm_cand_reduced::MinNumTpcCrossedRowsProng, + hf_charm_cand_reduced::MinNumItsClsProng, hf_charm_cand_reduced::MinNumTpcCrossedRowsProng, hf_charm_cand_reduced::MaxChi2Tpc, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -255,7 +264,7 @@ DECLARE_SOA_TABLE(HfRed3Prongs, "AOD", "HFRED3PRONG", //! Table with 3prong cand hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_charm_cand_reduced::InvMassHypo0, hf_charm_cand_reduced::InvMassHypo1, hf_charm_cand_reduced::MinPtProng, hf_charm_cand_reduced::MinAbsEtaProng, - hf_charm_cand_reduced::MinNumItsClsProng, hf_charm_cand_reduced::MinNumTpcCrossedRowsProng, + hf_charm_cand_reduced::MinNumItsClsProng, hf_charm_cand_reduced::MinNumTpcCrossedRowsProng, hf_charm_cand_reduced::MaxChi2Tpc, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -287,6 +296,8 @@ DECLARE_SOA_TABLE(HfRedPidDau0s, "AOD", "HFREDPIDDAU0", //! hf_charm_cand_reduced::TOFNSigmaPiProng0, hf_charm_cand_reduced::TPCNSigmaKaProng0, hf_charm_cand_reduced::TOFNSigmaKaProng0, + hf_charm_cand_reduced::HasTOFProng0, + hf_charm_cand_reduced::HasTPCProng0, hf_charm_cand_reduced::TPCTOFNSigmaPiProng0, hf_charm_cand_reduced::TPCTOFNSigmaKaProng0); @@ -295,6 +306,8 @@ DECLARE_SOA_TABLE(HfRedPidDau1s, "AOD", "HFREDPIDDAU1", //! hf_charm_cand_reduced::TOFNSigmaPiProng1, hf_charm_cand_reduced::TPCNSigmaKaProng1, hf_charm_cand_reduced::TOFNSigmaKaProng1, + hf_charm_cand_reduced::HasTOFProng1, + hf_charm_cand_reduced::HasTPCProng1, hf_charm_cand_reduced::TPCTOFNSigmaPiProng0, hf_charm_cand_reduced::TPCTOFNSigmaKaProng0); @@ -303,6 +316,8 @@ DECLARE_SOA_TABLE(HfRedPidDau2s, "AOD", "HFREDPIDDAU2", //! hf_charm_cand_reduced::TOFNSigmaPiProng2, hf_charm_cand_reduced::TPCNSigmaKaProng2, hf_charm_cand_reduced::TOFNSigmaKaProng2, + hf_charm_cand_reduced::HasTOFProng2, + hf_charm_cand_reduced::HasTPCProng2, hf_charm_cand_reduced::TPCTOFNSigmaPiProng2, hf_charm_cand_reduced::TPCTOFNSigmaKaProng2); @@ -617,6 +632,7 @@ namespace hf_reso_3_prong DECLARE_SOA_COLUMN(DType, dType, int8_t); //! Integer with selected D candidate type: 1 = Dplus, -1 = Dminus, 2 = DstarPlus, -2 = DstarMinus DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); //! minimum value of number of ITS clusters for the decay daughter tracks DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks +DECLARE_SOA_COLUMN(MaxChi2Tpc, maxChi2Tpc, float); //! maximum value of TPC chi2 for the decay daughter tracks DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pxProng0, float pxProng1, float pxProng2) -> float { return 1.f * pxProng0 + 1.f * pxProng1 + 1.f * pxProng2; }); @@ -656,6 +672,7 @@ DECLARE_SOA_COLUMN(Radius, radius, float); / DECLARE_SOA_COLUMN(V0Type, v0Type, uint8_t); //! Bitmap with mass hypothesis of the V0 DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); //! minimum value of number of ITS clusters for the decay daughter tracks DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks +DECLARE_SOA_COLUMN(MaxChi2Tpc, maxChi2Tpc, float); //! maximum value of TPC chi2 for the decay daughter tracks DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pxProng0, float pxProng1) -> float { return 1.f * pxProng0 + 1.f * pxProng1; }); @@ -698,6 +715,7 @@ DECLARE_SOA_COLUMN(NSigmaTofPr, nSigmaTofPr, float); //! TOF Nsigma fo DECLARE_SOA_COLUMN(HasTof, hasTof, bool); //! flag for presence of TOF DECLARE_SOA_COLUMN(NumItsCls, numItsCls, int); //! Number of clusters in ITS DECLARE_SOA_COLUMN(NumTpcCrossedRows, numTpcCrossedRows, int); //! Number of TPC crossed rows +DECLARE_SOA_COLUMN(Chi2Tpc, chi2Tpc, float); //! TPC chi2 // dynamic columns DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! transverse momentum [](float px, float py) -> float { return RecoDecay::pt(px, py); }); @@ -727,6 +745,7 @@ DECLARE_SOA_TABLE(HfRedVzeros, "AOD", "HFREDVZERO", //! Table with V0 candidate hf_reso_v0::Dca, hf_reso_v0::MinNumItsClsProng, hf_reso_v0::MinNumTpcCrossedRowsProng, + hf_reso_v0::MaxChi2Tpc, hf_reso_v0::V0Type, // Dynamic hf_reso_v0::Px, @@ -760,6 +779,7 @@ DECLARE_SOA_TABLE(HfRedTrkNoParams, "AOD", "HFREDTRKNOPARAM", //! Table with tra hf_reso_track::HasTof, hf_reso_track::NumItsCls, hf_reso_track::NumTpcCrossedRows, + hf_reso_track::Chi2Tpc, // Dynamic hf_reso_track::Pt, hf_reso_track::Eta, @@ -778,7 +798,7 @@ DECLARE_SOA_TABLE(HfRed3PrNoTrks, "AOD", "HFRED3PRNOTRK", //! Table with 3 prong hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1, hf_cand::PxProng2, hf_cand::PyProng2, hf_cand::PzProng2, - hf_reso_3_prong::MinNumItsClsProng, hf_reso_3_prong::MinNumTpcCrossedRowsProng, + hf_reso_3_prong::MinNumItsClsProng, hf_reso_3_prong::MinNumTpcCrossedRowsProng, hf_reso_3_prong::MaxChi2Tpc, hf_reso_3_prong::DType, // Dynamic hf_reso_3_prong::Px, diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx index a7294947c23..3a52b39387f 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx @@ -845,7 +845,7 @@ struct HfDataCreatorCharmHadPiReduced { trackParCovCharmHad.setAbsCharge(0); // to be sure } - float ptDauMin = 1.e6, etaDauMin = 999.f; + float ptDauMin = 1.e6, etaDauMin = 999.f, chi2TpcDauMax = -1.f; int nItsClsDauMin = 8, nTpcCrossRowsDauMin = 200; for (const auto& charmHadTrack : charmHadDauTracks) { if (charmHadTrack.pt() < ptDauMin) { @@ -860,6 +860,9 @@ struct HfDataCreatorCharmHadPiReduced { if (charmHadTrack.tpcNClsCrossedRows() < nTpcCrossRowsDauMin) { nTpcCrossRowsDauMin = charmHadTrack.tpcNClsCrossedRows(); } + if (charmHadTrack.tpcChi2NCl() > chi2TpcDauMax) { + chi2TpcDauMax = charmHadTrack.tpcChi2NCl(); + } } for (const auto& trackId : trackIndices) { @@ -904,7 +907,7 @@ struct HfDataCreatorCharmHadPiReduced { trackParCovPion.getX(), trackParCovPion.getAlpha(), trackParCovPion.getY(), trackParCovPion.getZ(), trackParCovPion.getSnp(), trackParCovPion.getTgl(), trackParCovPion.getQ2Pt(), - trackPion.itsNCls(), trackPion.tpcNClsCrossedRows()); + trackPion.itsNCls(), trackPion.tpcNClsCrossedRows(), trackPion.tpcChi2NCl()); hfTrackCovPion(trackParCovPion.getSigmaY2(), trackParCovPion.getSigmaZY(), trackParCovPion.getSigmaZ2(), trackParCovPion.getSigmaSnpY(), trackParCovPion.getSigmaSnpZ(), trackParCovPion.getSigmaSnp2(), trackParCovPion.getSigmaTglY(), trackParCovPion.getSigmaTglZ(), @@ -937,16 +940,16 @@ struct HfDataCreatorCharmHadPiReduced { trackParCovCharmHad.getY(), trackParCovCharmHad.getZ(), trackParCovCharmHad.getSnp(), trackParCovCharmHad.getTgl(), trackParCovCharmHad.getQ2Pt(), candC.xSecondaryVertex(), candC.ySecondaryVertex(), candC.zSecondaryVertex(), invMassC0, invMassC1, - ptDauMin, etaDauMin, nItsClsDauMin, nTpcCrossRowsDauMin); + ptDauMin, etaDauMin, nItsClsDauMin, nTpcCrossRowsDauMin, chi2TpcDauMax); hfCand3ProngCov(trackParCovCharmHad.getSigmaY2(), trackParCovCharmHad.getSigmaZY(), trackParCovCharmHad.getSigmaZ2(), trackParCovCharmHad.getSigmaSnpY(), trackParCovCharmHad.getSigmaSnpZ(), trackParCovCharmHad.getSigmaSnp2(), trackParCovCharmHad.getSigmaTglY(), trackParCovCharmHad.getSigmaTglZ(), trackParCovCharmHad.getSigmaTglSnp(), trackParCovCharmHad.getSigmaTgl2(), trackParCovCharmHad.getSigma1PtY(), trackParCovCharmHad.getSigma1PtZ(), trackParCovCharmHad.getSigma1PtSnp(), trackParCovCharmHad.getSigma1PtTgl(), trackParCovCharmHad.getSigma1Pt2()); - hfCandPidProng0(charmHadDauTracks[0].tpcNSigmaPi(), charmHadDauTracks[0].tofNSigmaPi(), charmHadDauTracks[0].tpcNSigmaKa(), charmHadDauTracks[0].tofNSigmaKa()); - hfCandPidProng1(charmHadDauTracks[1].tpcNSigmaPi(), charmHadDauTracks[1].tofNSigmaPi(), charmHadDauTracks[1].tpcNSigmaKa(), charmHadDauTracks[1].tofNSigmaKa()); - hfCandPidProng2(charmHadDauTracks[2].tpcNSigmaPi(), charmHadDauTracks[2].tofNSigmaPi(), charmHadDauTracks[2].tpcNSigmaKa(), charmHadDauTracks[2].tofNSigmaKa()); + hfCandPidProng0(charmHadDauTracks[0].tpcNSigmaPi(), charmHadDauTracks[0].tofNSigmaPi(), charmHadDauTracks[0].tpcNSigmaKa(), charmHadDauTracks[0].tofNSigmaKa(), charmHadDauTracks[0].hasTOF(), charmHadDauTracks[0].hasTPC()); + hfCandPidProng1(charmHadDauTracks[1].tpcNSigmaPi(), charmHadDauTracks[1].tofNSigmaPi(), charmHadDauTracks[1].tpcNSigmaKa(), charmHadDauTracks[1].tofNSigmaKa(), charmHadDauTracks[1].hasTOF(), charmHadDauTracks[1].hasTPC()); + hfCandPidProng2(charmHadDauTracks[2].tpcNSigmaPi(), charmHadDauTracks[2].tofNSigmaPi(), charmHadDauTracks[2].tpcNSigmaKa(), charmHadDauTracks[2].tofNSigmaKa(), charmHadDauTracks[2].hasTOF(), charmHadDauTracks[2].hasTPC()); if constexpr (withMl) { if constexpr (decChannel == DecayChannel::B0ToDminusPi) { hfCand3ProngMl(candC.mlProbDplusToPiKPi()[0], candC.mlProbDplusToPiKPi()[1], candC.mlProbDplusToPiKPi()[2], -1., -1., -1.); @@ -968,15 +971,15 @@ struct HfDataCreatorCharmHadPiReduced { trackParCovCharmHad.getY(), trackParCovCharmHad.getZ(), trackParCovCharmHad.getSnp(), trackParCovCharmHad.getTgl(), trackParCovCharmHad.getQ2Pt(), candC.xSecondaryVertex(), candC.ySecondaryVertex(), candC.zSecondaryVertex(), invMassC0, invMassC1, - ptDauMin, etaDauMin, nItsClsDauMin, nTpcCrossRowsDauMin); + ptDauMin, etaDauMin, nItsClsDauMin, nTpcCrossRowsDauMin, chi2TpcDauMax); hfCand2ProngCov(trackParCovCharmHad.getSigmaY2(), trackParCovCharmHad.getSigmaZY(), trackParCovCharmHad.getSigmaZ2(), trackParCovCharmHad.getSigmaSnpY(), trackParCovCharmHad.getSigmaSnpZ(), trackParCovCharmHad.getSigmaSnp2(), trackParCovCharmHad.getSigmaTglY(), trackParCovCharmHad.getSigmaTglZ(), trackParCovCharmHad.getSigmaTglSnp(), trackParCovCharmHad.getSigmaTgl2(), trackParCovCharmHad.getSigma1PtY(), trackParCovCharmHad.getSigma1PtZ(), trackParCovCharmHad.getSigma1PtSnp(), trackParCovCharmHad.getSigma1PtTgl(), trackParCovCharmHad.getSigma1Pt2()); - hfCandPidProng0(candC.nSigTpcPi0(), candC.nSigTofPi0(), candC.nSigTpcKa0(), candC.nSigTofKa0()); - hfCandPidProng1(candC.nSigTpcPi1(), candC.nSigTofPi1(), candC.nSigTpcKa1(), candC.nSigTofKa1()); + hfCandPidProng0(candC.nSigTpcPi0(), candC.nSigTofPi0(), candC.nSigTpcKa0(), candC.nSigTofKa0(), charmHadDauTracks[0].hasTOF(), charmHadDauTracks[0].hasTPC()); + hfCandPidProng1(candC.nSigTpcPi1(), candC.nSigTofPi1(), candC.nSigTpcKa1(), candC.nSigTofKa1(), charmHadDauTracks[1].hasTOF(), charmHadDauTracks[1].hasTPC()); if constexpr (withMl) { std::array mlScores = {-1.f, -1.f, -1.f, -1.f, -1.f, -1.f}; if (candC.mlProbD0().size() == 3) { diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx index 5b65afd1ce8..2468e2c510d 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx @@ -673,6 +673,7 @@ struct HfDataCreatorCharmResoReduced { } // else if // Get single track variables + float chi2TpcDauMax = -1.f; int nItsClsDauMin = 8, nTpcCrossRowsDauMin = 200; for (const auto& charmHadTrack : charmHadDauTracks) { if (charmHadTrack.itsNCls() < nItsClsDauMin) { @@ -681,6 +682,9 @@ struct HfDataCreatorCharmResoReduced { if (charmHadTrack.tpcNClsCrossedRows() < nTpcCrossRowsDauMin) { nTpcCrossRowsDauMin = charmHadTrack.tpcNClsCrossedRows(); } + if (charmHadTrack.tpcChi2NCl() > chi2TpcDauMax) { + chi2TpcDauMax = charmHadTrack.tpcChi2NCl(); + } } if constexpr (DecayChannel == DecayChannel::DplusV0 || DecayChannel == DecayChannel::DstarV0) { @@ -694,6 +698,7 @@ struct HfDataCreatorCharmResoReduced { continue; } // Get single track variables + float chi2TpcDauV0Max = -1.f; int nItsClsDauV0Min = 8, nTpcCrossRowsDauV0Min = 200; for (const auto& v0Track : v0DauTracks) { if (v0Track.itsNCls() < nItsClsDauV0Min) { @@ -702,6 +707,9 @@ struct HfDataCreatorCharmResoReduced { if (v0Track.tpcNClsCrossedRows() < nTpcCrossRowsDauV0Min) { nTpcCrossRowsDauV0Min = v0Track.tpcNClsCrossedRows(); } + if (v0Track.tpcChi2NCl() > chi2TpcDauV0Max) { + chi2TpcDauV0Max = v0Track.tpcChi2NCl(); + } } // propagate V0 to primary vertex (if enabled) if (propagateV0toPV) { @@ -761,7 +769,7 @@ struct HfDataCreatorCharmResoReduced { candidateV0.momNeg[0], candidateV0.momNeg[1], candidateV0.momNeg[2], candidateV0.cosPA, candidateV0.dcaV0ToPv, - nItsClsDauV0Min, nTpcCrossRowsDauV0Min, + nItsClsDauV0Min, nTpcCrossRowsDauV0Min, chi2TpcDauV0Max, candidateV0.v0Type); selectedV0s[v0.globalIndex()] = hfCandV0.lastIndex(); } @@ -808,7 +816,7 @@ struct HfDataCreatorCharmResoReduced { track.px(), track.py(), track.pz(), track.sign(), track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(), - track.hasTOF(), track.itsNCls(), track.tpcNClsCrossedRows()); + track.hasTOF(), track.itsNCls(), track.tpcNClsCrossedRows(), track.tpcChi2NCl()); selectedTracks[track.globalIndex()] = hfTrackNoParam.lastIndex(); } fillHfCandD = true; @@ -822,7 +830,7 @@ struct HfDataCreatorCharmResoReduced { candD.pxProng0(), candD.pyProng0(), candD.pzProng0(), candD.pxProng1(), candD.pyProng1(), candD.pzProng1(), pVecProng2[0], pVecProng2[1], pVecProng2[2], - nItsClsDauMin, nTpcCrossRowsDauMin, dtype); + nItsClsDauMin, nTpcCrossRowsDauMin, chi2TpcDauMax, dtype); if constexpr (withMl) { hfCandDMl(bdtScores[0], bdtScores[1], bdtScores[2], -1., -1., -1.); } From 1e39ddec7a5f2205651306823f4f08238e9429f0 Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Wed, 30 Oct 2024 14:53:50 +0100 Subject: [PATCH 4/5] Reduce duplicated columns and rename --- PWGHF/D2H/DataModel/ReducedDataModel.h | 317 ++++++++---------- .../dataCreatorCharmResoReduced.cxx | 2 +- 2 files changed, 147 insertions(+), 172 deletions(-) diff --git a/PWGHF/D2H/DataModel/ReducedDataModel.h b/PWGHF/D2H/DataModel/ReducedDataModel.h index b957a3d6c51..89888b9c31f 100644 --- a/PWGHF/D2H/DataModel/ReducedDataModel.h +++ b/PWGHF/D2H/DataModel/ReducedDataModel.h @@ -133,15 +133,87 @@ DECLARE_SOA_COLUMN(TrackId, trackId, int); //! Original trac DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index -DECLARE_SOA_COLUMN(HasTPC, hasTPC, bool); //! Flag to check if track has a TPC match -DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); //! Flag to check if track has a TOF match -DECLARE_SOA_COLUMN(NumItsCls, numItsCls, int); //! Number of clusters in ITS -DECLARE_SOA_COLUMN(NumTpcCrossedRows, numTpcCrossedRows, int); //! Number of TPC crossed rows -DECLARE_SOA_COLUMN(Chi2Tpc, chi2Tpc, float); //! TPC chi2 +} // namespace hf_track_index_reduced + +namespace hf_track_vars_reduced +{ +// CAREFUL: the getters names shall be the same as the ones of the getTrackParCov method in Common/Core/trackUtilities.h +DECLARE_SOA_COLUMN(Px, px, float); //! x-component of momentum +DECLARE_SOA_COLUMN(Py, py, float); //! y-component of momentum +DECLARE_SOA_COLUMN(Pz, pz, float); //! z-component of momentum +DECLARE_SOA_COLUMN(Sign, sign, uint8_t); //! charge sign +DECLARE_SOA_COLUMN(HasTPC, hasTPC, bool); //! Flag to check if track has a TPC match +DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); //! Flag to check if track has a TOF match +DECLARE_SOA_COLUMN(HasTPCProng0, hasTPCProng0, bool); //! Flag to check if prong0 has a TPC match +DECLARE_SOA_COLUMN(HasTOFProng0, hasTOFProng0, bool); //! Flag to check if prong0 has a TOF match +DECLARE_SOA_COLUMN(HasTPCProng1, hasTPCProng1, bool); //! Flag to check if prong1 has a TPC match +DECLARE_SOA_COLUMN(HasTOFProng1, hasTOFProng1, bool); //! Flag to check if prong1 has a TOF match +DECLARE_SOA_COLUMN(HasTPCProng2, hasTPCProng2, bool); //! Flag to check if prong2 has a TPC match +DECLARE_SOA_COLUMN(HasTOFProng2, hasTOFProng2, bool); //! Flag to check if prong2 has a TOF match +DECLARE_SOA_COLUMN(ItsNCls, itsNCls, int); //! Number of clusters in ITS +DECLARE_SOA_COLUMN(TpcNClsCrossedRows, tpcNClsCrossedRows, int); //! Number of TPC crossed rows +DECLARE_SOA_COLUMN(TpcChi2NCl, tpcChi2NCl, float); //! TPC chi2 +DECLARE_SOA_COLUMN(ItsNClsProngMin, itsNClsProngMin, int); //! minimum value of number of ITS clusters for the decay daughter tracks +DECLARE_SOA_COLUMN(TpcNClsCrossedRowsProngMin, tpcNClsCrossedRowsProngMin, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks +DECLARE_SOA_COLUMN(TpcChi2NClProngMax, tpcChi2NClProngMax, float); //! maximum value of TPC chi2 for the decay daughter tracks +DECLARE_SOA_COLUMN(PtProngMin, ptProngMin, float); //! minimum value of transverse momentum for the decay daughter tracks +DECLARE_SOA_COLUMN(AbsEtaProngMin, absEtaProngMin, float); //! minimum value of absolute pseudorapidity for the decay daughter tracks + +// dynamic columns +DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! transverse momentum + [](float px, float py) -> float { return RecoDecay::pt(px, py); }); +DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! azimuthal angle + [](float px, float py) -> float { return RecoDecay::phi(px, py); }); +DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! pseudorapidity + [](float px, float py, float pz) -> float { return RecoDecay::eta(std::array{px, py, pz}); }); +DECLARE_SOA_DYNAMIC_COLUMN(PtProng0, ptProng0, //! + [](float pxProng0, float pyProng0) -> float { return RecoDecay::pt(pxProng0, pyProng0); }); +DECLARE_SOA_DYNAMIC_COLUMN(PtProng1, ptProng1, //! + [](float pxProng1, float pyProng1) -> float { return RecoDecay::pt(pxProng1, pyProng1); }); +DECLARE_SOA_DYNAMIC_COLUMN(PtProng2, ptProng2, //! + [](float pxProng2, float pyProng2) -> float { return RecoDecay::pt(pxProng2, pyProng2); }); +DECLARE_SOA_DYNAMIC_COLUMN(EtaProng0, etaProng0, //! + [](float pxProng0, float pyProng0, float pzProng0) -> float { return RecoDecay::eta(std::array{pxProng0, pyProng0, pzProng0}); }); +DECLARE_SOA_DYNAMIC_COLUMN(EtaProng1, etaProng1, //! + [](float pxProng1, float pyProng1, float pzProng1) -> float { return RecoDecay::eta(std::array{pxProng1, pyProng1, pzProng1}); }); +DECLARE_SOA_DYNAMIC_COLUMN(EtaProng2, etaProng2, //! + [](float pxProng2, float pyProng2, float pzProng2) -> float { return RecoDecay::eta(std::array{pxProng2, pyProng2, pzProng2}); }); +} // namespace hf_track_vars_reduced + +namespace hf_track_pid_reduced +{ +DECLARE_SOA_COLUMN(TPCNSigmaPiProng0, tpcNSigmaPiProng0, float); //! NsigmaTPCPi for prong0 +DECLARE_SOA_COLUMN(TPCNSigmaPiProng1, tpcNSigmaPiProng1, float); //! NsigmaTPCPi for prong1 +DECLARE_SOA_COLUMN(TPCNSigmaPiProng2, tpcNSigmaPiProng2, float); //! NsigmaTPCPi for prong2 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng0, tpcNSigmaKaProng0, float); //! NsigmaTPCKa for prong0 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng1, tpcNSigmaKaProng1, float); //! NsigmaTPCKa for prong1 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng2, tpcNSigmaKaProng2, float); //! NsigmaTPCKa for prong2 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng0, tofNSigmaPiProng0, float); //! NsigmaTOFPi for prong0 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng1, tofNSigmaPiProng1, float); //! NsigmaTOFPi for prong1 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng2, tofNSigmaPiProng2, float); //! NsigmaTOFPi for prong2 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng0, tofNSigmaKaProng0, float); //! NsigmaTOFKa for prong0 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng1, tofNSigmaKaProng1, float); //! NsigmaTOFKa for prong1 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng2, tofNSigmaKaProng2, float); //! NsigmaTOFKa for prong2 // dynamic columns DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPi, tpcTofNSigmaPi, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -} // namespace hf_track_index_reduced +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKa, tpcTofNSigmaKa, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPr, tpcTofNSigmaPr, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng0, tpcTofNSigmaPiProng0, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng1, tpcTofNSigmaPiProng1, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng2, tpcTofNSigmaPiProng2, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng0, tpcTofNSigmaKaProng0, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng1, tpcTofNSigmaKaProng1, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); +DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng2, tpcTofNSigmaKaProng2, //! Combination of NsigmaTPC and NsigmaTOF + [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); +} // namespace hf_track_pid_reduced // CAREFUL: need to follow convention [Name = Description + 's'] in DECLARE_SOA_TABLE(Name, "AOD", Description) // to call DECLARE_SOA_INDEX_COLUMN_FULL later on @@ -150,9 +222,9 @@ DECLARE_SOA_TABLE(HfRedTrackBases, "AOD", "HFREDTRACKBASE", //! Table with track hf_track_index_reduced::TrackId, hf_track_index_reduced::HfRedCollisionId, HFTRACKPAR_COLUMNS, - hf_track_index_reduced::NumItsCls, - hf_track_index_reduced::NumTpcCrossedRows, - hf_track_index_reduced::Chi2Tpc, + hf_track_vars_reduced::ItsNCls, + hf_track_vars_reduced::TpcNClsCrossedRows, + hf_track_vars_reduced::TpcChi2NCl, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -165,11 +237,11 @@ DECLARE_SOA_TABLE(HfRedTracksCov, "AOD", "HFREDTRACKCOV", //! Table with track c // table with all attributes needed to call statusTpcAndTof() in the selector task DECLARE_SOA_TABLE(HfRedTracksPid, "AOD", "HFREDTRACKPID", //! Table with PID track information for reduced workflow o2::soa::Index<>, - hf_track_index_reduced::HasTPC, - hf_track_index_reduced::HasTOF, + hf_track_vars_reduced::HasTPC, + hf_track_vars_reduced::HasTOF, pidtpc::TPCNSigmaPi, pidtof::TOFNSigmaPi, - hf_track_index_reduced::TPCTOFNSigmaPi); + hf_track_pid_reduced::TPCTOFNSigmaPi); DECLARE_SOA_EXTENDED_TABLE_USER(HfRedTracksExt, HfRedTrackBases, "HFREDTRACKEXT", //! Track parameters at collision vertex aod::track::Pt); @@ -186,43 +258,6 @@ DECLARE_SOA_COLUMN(MlScoreNonpromptMassHypo0, mlScoreNonpromptMassHypo0, float); DECLARE_SOA_COLUMN(MlScoreBkgMassHypo1, mlScoreBkgMassHypo1, float); //! ML score for background class (mass hypothesis 1) DECLARE_SOA_COLUMN(MlScorePromptMassHypo1, mlScorePromptMassHypo1, float); //! ML score for prompt class (mass hypothesis 1) DECLARE_SOA_COLUMN(MlScoreNonpromptMassHypo1, mlScoreNonpromptMassHypo1, float); //! ML score for non-prompt class (mass hypothesis 1) -DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); //! minimum value of number of ITS clusters for the decay daughter tracks -DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks -DECLARE_SOA_COLUMN(MinAbsEtaProng, minAbsEtaProng, float); //! minimum value of absolute pseudorapidity for the decay daughter tracks -DECLARE_SOA_COLUMN(MinPtProng, minPtProng, float); //! minimum value of transverse momentum for the decay daughter tracks -DECLARE_SOA_COLUMN(MaxChi2Tpc, maxChi2Tpc, float); //! maximum value of TPC chi2 for the decay daughter tracks -DECLARE_SOA_COLUMN(TPCNSigmaPiProng0, tpcNSigmaPiProng0, float); //! NsigmaTPCPi for prong0 -DECLARE_SOA_COLUMN(TPCNSigmaPiProng1, tpcNSigmaPiProng1, float); //! NsigmaTPCPi for prong1 -DECLARE_SOA_COLUMN(TPCNSigmaPiProng2, tpcNSigmaPiProng2, float); //! NsigmaTPCPi for prong2 -DECLARE_SOA_COLUMN(TPCNSigmaKaProng0, tpcNSigmaKaProng0, float); //! NsigmaTPCKa for prong0 -DECLARE_SOA_COLUMN(TPCNSigmaKaProng1, tpcNSigmaKaProng1, float); //! NsigmaTPCKa for prong1 -DECLARE_SOA_COLUMN(TPCNSigmaKaProng2, tpcNSigmaKaProng2, float); //! NsigmaTPCKa for prong2 -DECLARE_SOA_COLUMN(TOFNSigmaPiProng0, tofNSigmaPiProng0, float); //! NsigmaTOFPi for prong0 -DECLARE_SOA_COLUMN(TOFNSigmaPiProng1, tofNSigmaPiProng1, float); //! NsigmaTOFPi for prong1 -DECLARE_SOA_COLUMN(TOFNSigmaPiProng2, tofNSigmaPiProng2, float); //! NsigmaTOFPi for prong2 -DECLARE_SOA_COLUMN(TOFNSigmaKaProng0, tofNSigmaKaProng0, float); //! NsigmaTOFKa for prong0 -DECLARE_SOA_COLUMN(TOFNSigmaKaProng1, tofNSigmaKaProng1, float); //! NsigmaTOFKa for prong1 -DECLARE_SOA_COLUMN(TOFNSigmaKaProng2, tofNSigmaKaProng2, float); //! NsigmaTOFKa for prong2 -DECLARE_SOA_COLUMN(HasTPCProng0, hasTPCProng0, bool); //! Flag to check if prong0 has a TPC match -DECLARE_SOA_COLUMN(HasTOFProng0, hasTOFProng0, bool); //! Flag to check if prong0 has a TOF match -DECLARE_SOA_COLUMN(HasTPCProng1, hasTPCProng1, bool); //! Flag to check if prong1 has a TPC match -DECLARE_SOA_COLUMN(HasTOFProng1, hasTOFProng1, bool); //! Flag to check if prong1 has a TOF match -DECLARE_SOA_COLUMN(HasTPCProng2, hasTPCProng2, bool); //! Flag to check if prong2 has a TPC match -DECLARE_SOA_COLUMN(HasTOFProng2, hasTOFProng2, bool); //! Flag to check if prong2 has a TOF match - -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng0, tpcTofNSigmaPiProng0, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng1, tpcTofNSigmaPiProng1, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPiProng2, tpcTofNSigmaPiProng2, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng0, tpcTofNSigmaKaProng0, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng1, tpcTofNSigmaKaProng1, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaKaProng2, tpcTofNSigmaKaProng2, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); - } // namespace hf_charm_cand_reduced // CAREFUL: need to follow convention [Name = Description + 's'] in DECLARE_SOA_TABLE(Name, "AOD", Description) @@ -234,8 +269,8 @@ DECLARE_SOA_TABLE(HfRed2Prongs, "AOD", "HFRED2PRONG", //! Table with 2prong cand HFTRACKPAR_COLUMNS, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_charm_cand_reduced::InvMassHypo0, hf_charm_cand_reduced::InvMassHypo1, - hf_charm_cand_reduced::MinPtProng, hf_charm_cand_reduced::MinAbsEtaProng, - hf_charm_cand_reduced::MinNumItsClsProng, hf_charm_cand_reduced::MinNumTpcCrossedRowsProng, hf_charm_cand_reduced::MaxChi2Tpc, + hf_track_vars_reduced::PtProngMin, hf_track_vars_reduced::AbsEtaProngMin, + hf_track_vars_reduced::ItsNClsProngMin, hf_track_vars_reduced::TpcNClsCrossedRowsProngMin, hf_track_vars_reduced::TpcChi2NClProngMax, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -263,8 +298,8 @@ DECLARE_SOA_TABLE(HfRed3Prongs, "AOD", "HFRED3PRONG", //! Table with 3prong cand HFTRACKPAR_COLUMNS, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_charm_cand_reduced::InvMassHypo0, hf_charm_cand_reduced::InvMassHypo1, - hf_charm_cand_reduced::MinPtProng, hf_charm_cand_reduced::MinAbsEtaProng, - hf_charm_cand_reduced::MinNumItsClsProng, hf_charm_cand_reduced::MinNumTpcCrossedRowsProng, hf_charm_cand_reduced::MaxChi2Tpc, + hf_track_vars_reduced::PtProngMin, hf_track_vars_reduced::AbsEtaProngMin, + hf_track_vars_reduced::ItsNClsProngMin, hf_track_vars_reduced::TpcNClsCrossedRowsProngMin, hf_track_vars_reduced::TpcChi2NClProngMax, aod::track::Px, aod::track::Py, aod::track::Pz, @@ -292,34 +327,34 @@ DECLARE_SOA_TABLE_VERSIONED(HfRed3ProngsMl_001, "AOD", "HFRED3PRONGML", 1, //! T using HfRed3ProngsMl = HfRed3ProngsMl_001; DECLARE_SOA_TABLE(HfRedPidDau0s, "AOD", "HFREDPIDDAU0", //! - hf_charm_cand_reduced::TPCNSigmaPiProng0, - hf_charm_cand_reduced::TOFNSigmaPiProng0, - hf_charm_cand_reduced::TPCNSigmaKaProng0, - hf_charm_cand_reduced::TOFNSigmaKaProng0, - hf_charm_cand_reduced::HasTOFProng0, - hf_charm_cand_reduced::HasTPCProng0, - hf_charm_cand_reduced::TPCTOFNSigmaPiProng0, - hf_charm_cand_reduced::TPCTOFNSigmaKaProng0); + hf_track_pid_reduced::TPCNSigmaPiProng0, + hf_track_pid_reduced::TOFNSigmaPiProng0, + hf_track_pid_reduced::TPCNSigmaKaProng0, + hf_track_pid_reduced::TOFNSigmaKaProng0, + hf_track_vars_reduced::HasTOFProng0, + hf_track_vars_reduced::HasTPCProng0, + hf_track_pid_reduced::TPCTOFNSigmaPiProng0, + hf_track_pid_reduced::TPCTOFNSigmaKaProng0); DECLARE_SOA_TABLE(HfRedPidDau1s, "AOD", "HFREDPIDDAU1", //! - hf_charm_cand_reduced::TPCNSigmaPiProng1, - hf_charm_cand_reduced::TOFNSigmaPiProng1, - hf_charm_cand_reduced::TPCNSigmaKaProng1, - hf_charm_cand_reduced::TOFNSigmaKaProng1, - hf_charm_cand_reduced::HasTOFProng1, - hf_charm_cand_reduced::HasTPCProng1, - hf_charm_cand_reduced::TPCTOFNSigmaPiProng0, - hf_charm_cand_reduced::TPCTOFNSigmaKaProng0); + hf_track_pid_reduced::TPCNSigmaPiProng1, + hf_track_pid_reduced::TOFNSigmaPiProng1, + hf_track_pid_reduced::TPCNSigmaKaProng1, + hf_track_pid_reduced::TOFNSigmaKaProng1, + hf_track_vars_reduced::HasTOFProng1, + hf_track_vars_reduced::HasTPCProng1, + hf_track_pid_reduced::TPCTOFNSigmaPiProng0, + hf_track_pid_reduced::TPCTOFNSigmaKaProng0); DECLARE_SOA_TABLE(HfRedPidDau2s, "AOD", "HFREDPIDDAU2", //! - hf_charm_cand_reduced::TPCNSigmaPiProng2, - hf_charm_cand_reduced::TOFNSigmaPiProng2, - hf_charm_cand_reduced::TPCNSigmaKaProng2, - hf_charm_cand_reduced::TOFNSigmaKaProng2, - hf_charm_cand_reduced::HasTOFProng2, - hf_charm_cand_reduced::HasTPCProng2, - hf_charm_cand_reduced::TPCTOFNSigmaPiProng2, - hf_charm_cand_reduced::TPCTOFNSigmaKaProng2); + hf_track_pid_reduced::TPCNSigmaPiProng2, + hf_track_pid_reduced::TOFNSigmaPiProng2, + hf_track_pid_reduced::TPCNSigmaKaProng2, + hf_track_pid_reduced::TOFNSigmaKaProng2, + hf_track_vars_reduced::HasTOFProng2, + hf_track_vars_reduced::HasTPCProng2, + hf_track_pid_reduced::TPCTOFNSigmaPiProng2, + hf_track_pid_reduced::TPCTOFNSigmaKaProng2); // Beauty candidates prongs namespace hf_cand_b0_reduced @@ -630,9 +665,6 @@ DECLARE_SOA_TABLE(HfCandBsConfigs, "AOD", "HFCANDBSCONFIG", //! Table with confi namespace hf_reso_3_prong { DECLARE_SOA_COLUMN(DType, dType, int8_t); //! Integer with selected D candidate type: 1 = Dplus, -1 = Dminus, 2 = DstarPlus, -2 = DstarMinus -DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); //! minimum value of number of ITS clusters for the decay daughter tracks -DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks -DECLARE_SOA_COLUMN(MaxChi2Tpc, maxChi2Tpc, float); //! maximum value of TPC chi2 for the decay daughter tracks DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pxProng0, float pxProng1, float pxProng2) -> float { return 1.f * pxProng0 + 1.f * pxProng1 + 1.f * pxProng2; }); @@ -642,18 +674,6 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //! [](float pzProng0, float pzProng1, float pzProng2) -> float { return 1.f * pzProng0 + 1.f * pzProng1 + 1.f * pzProng2; }); DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! [](float pxProng0, float pxProng1, float pxProng2, float pyProng0, float pyProng1, float pyProng2) -> float { return RecoDecay::pt((1.f * pxProng0 + 1.f * pxProng1 + 1.f * pxProng2), (1.f * pyProng0 + 1.f * pyProng1 + 1.f * pyProng2)); }); -DECLARE_SOA_DYNAMIC_COLUMN(PtProng0, ptProng0, //! - [](float pxProng0, float pyProng0) -> float { return RecoDecay::pt(pxProng0, pyProng0); }); -DECLARE_SOA_DYNAMIC_COLUMN(PtProng1, ptProng1, //! - [](float pxProng1, float pyProng1) -> float { return RecoDecay::pt(pxProng1, pyProng1); }); -DECLARE_SOA_DYNAMIC_COLUMN(PtProng2, ptProng2, //! - [](float pxProng2, float pyProng2) -> float { return RecoDecay::pt(pxProng2, pyProng2); }); -DECLARE_SOA_DYNAMIC_COLUMN(EtaProng0, etaProng0, //! - [](float pxProng0, float pyProng0, float pzProng0) -> float { return RecoDecay::eta(std::array{pxProng0, pyProng0, pzProng0}); }); -DECLARE_SOA_DYNAMIC_COLUMN(EtaProng1, etaProng1, //! - [](float pxProng1, float pyProng1, float pzProng1) -> float { return RecoDecay::eta(std::array{pxProng1, pyProng1, pzProng1}); }); -DECLARE_SOA_DYNAMIC_COLUMN(EtaProng2, etaProng2, //! - [](float pxProng2, float pyProng2, float pzProng2) -> float { return RecoDecay::eta(std::array{pxProng2, pyProng2, pzProng2}); }); DECLARE_SOA_DYNAMIC_COLUMN(InvMassDplus, invMassDplus, [](float px0, float py0, float pz0, float px1, float py1, float pz1, float px2, float py2, float pz2) -> float { return RecoDecay::m(std::array{std::array{px0, py0, pz0}, std::array{px1, py1, pz1}, std::array{px2, py2, pz2}}, std::array{constants::physics::MassPiPlus, constants::physics::MassKPlus, constants::physics::MassPiPlus}); }); DECLARE_SOA_DYNAMIC_COLUMN(InvMassDstar, invMassDstar, @@ -670,9 +690,6 @@ DECLARE_SOA_COLUMN(Cpa, cpa, float); / DECLARE_SOA_COLUMN(Dca, dca, float); //! DCA of V0 candidate DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius of V0 candidate DECLARE_SOA_COLUMN(V0Type, v0Type, uint8_t); //! Bitmap with mass hypothesis of the V0 -DECLARE_SOA_COLUMN(MinNumItsClsProng, minNumItsClsProng, int); //! minimum value of number of ITS clusters for the decay daughter tracks -DECLARE_SOA_COLUMN(MinNumTpcCrossedRowsProng, minNumTpcCrossedRowsProng, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks -DECLARE_SOA_COLUMN(MaxChi2Tpc, maxChi2Tpc, float); //! maximum value of TPC chi2 for the decay daughter tracks DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pxProng0, float pxProng1) -> float { return 1.f * pxProng0 + 1.f * pxProng1; }); @@ -682,14 +699,6 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //! [](float pzProng0, float pzProng1) -> float { return 1.f * pzProng0 + 1.f * pzProng1; }); DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! [](float pxProng0, float pxProng1, float pyProng0, float pyProng1) -> float { return RecoDecay::pt((1.f * pxProng0 + 1.f * pxProng1), (1.f * pyProng0 + 1.f * pyProng1)); }); -DECLARE_SOA_DYNAMIC_COLUMN(PtProng0, ptProng0, //! - [](float pxProng0, float pyProng0) -> float { return RecoDecay::pt(pxProng0, pyProng0); }); -DECLARE_SOA_DYNAMIC_COLUMN(PtProng1, ptProng1, //! - [](float pxProng1, float pyProng1) -> float { return RecoDecay::pt(pxProng1, pyProng1); }); -DECLARE_SOA_DYNAMIC_COLUMN(EtaProng0, etaProng0, //! - [](float pxProng0, float pyProng0, float pzProng0) -> float { return RecoDecay::eta(std::array{pxProng0, pyProng0, pzProng0}); }); -DECLARE_SOA_DYNAMIC_COLUMN(EtaProng1, etaProng1, //! - [](float pxProng1, float pyProng1, float pzProng1) -> float { return RecoDecay::eta(std::array{pxProng1, pyProng1, pzProng1}); }); DECLARE_SOA_DYNAMIC_COLUMN(V0Radius, v0Radius, //! V0 decay radius (2D, centered at zero) [](float x, float y) -> float { return RecoDecay::sqrtSumOfSquares(x, y); }); DECLARE_SOA_DYNAMIC_COLUMN(InvMassLambda, invMassLambda, //! mass under lambda hypothesis @@ -700,38 +709,6 @@ DECLARE_SOA_DYNAMIC_COLUMN(InvMassK0s, invMassK0s, //! mass under K0short hypoth [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::m(std::array{std::array{pxpos, pypos, pzpos}, std::array{pxneg, pyneg, pzneg}}, std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassPionCharged}); }); } // namespace hf_reso_v0 -namespace hf_reso_track -{ -DECLARE_SOA_COLUMN(Px, px, float); //! x-component of momentum -DECLARE_SOA_COLUMN(Py, py, float); //! y-component of momentum -DECLARE_SOA_COLUMN(Pz, pz, float); //! z-component of momentum -DECLARE_SOA_COLUMN(Sign, sign, uint8_t); //! charge sign -DECLARE_SOA_COLUMN(NSigmaTpcPi, nSigmaTpcPi, float); //! TPC Nsigma for pion hypothesis -DECLARE_SOA_COLUMN(NSigmaTpcKa, nSigmaTpcKa, float); //! TPC Nsigma for kaon hypothesis -DECLARE_SOA_COLUMN(NSigmaTpcPr, nSigmaTpcPr, float); //! TPC Nsigma for proton hypothesis -DECLARE_SOA_COLUMN(NSigmaTofPi, nSigmaTofPi, float); //! TOF Nsigma for pion hypothesis -DECLARE_SOA_COLUMN(NSigmaTofKa, nSigmaTofKa, float); //! TOF Nsigma for kaon hypothesis -DECLARE_SOA_COLUMN(NSigmaTofPr, nSigmaTofPr, float); //! TOF Nsigma for proton hypothesis -DECLARE_SOA_COLUMN(HasTof, hasTof, bool); //! flag for presence of TOF -DECLARE_SOA_COLUMN(NumItsCls, numItsCls, int); //! Number of clusters in ITS -DECLARE_SOA_COLUMN(NumTpcCrossedRows, numTpcCrossedRows, int); //! Number of TPC crossed rows -DECLARE_SOA_COLUMN(Chi2Tpc, chi2Tpc, float); //! TPC chi2 -// dynamic columns -DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! transverse momentum - [](float px, float py) -> float { return RecoDecay::pt(px, py); }); -DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! azimuthal angle - [](float px, float py) -> float { return RecoDecay::phi(px, py); }); -DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! pseudorapidity - [](float px, float py, float pz) -> float { return RecoDecay::eta(std::array{px, py, pz}); }); -DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofPi, nSigmaTpcTofPi, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); -DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofKa, nSigmaTpcTofKa, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaKa, float tofNSigmaKa) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaKa, tofNSigmaKa); }); -DECLARE_SOA_DYNAMIC_COLUMN(NSigmaTpcTofPr, nSigmaTpcTofPr, //! Combination of NsigmaTPC and NsigmaTOF - [](float tpcNSigmaPr, float tofNSigmaPr) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPr, tofNSigmaPr); }); - -} // namespace hf_reso_track - DECLARE_SOA_TABLE(HfRedVzeros, "AOD", "HFREDVZERO", //! Table with V0 candidate information for resonances reduced workflow o2::soa::Index<>, // Indices @@ -741,20 +718,17 @@ DECLARE_SOA_TABLE(HfRedVzeros, "AOD", "HFREDVZERO", //! Table with V0 candidate hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1, - hf_reso_v0::Cpa, - hf_reso_v0::Dca, - hf_reso_v0::MinNumItsClsProng, - hf_reso_v0::MinNumTpcCrossedRowsProng, - hf_reso_v0::MaxChi2Tpc, + hf_reso_v0::Cpa, hf_reso_v0::Dca, + hf_track_vars_reduced::ItsNClsProngMin, hf_track_vars_reduced::TpcNClsCrossedRowsProngMin, hf_track_vars_reduced::TpcChi2NClProngMax, hf_reso_v0::V0Type, // Dynamic hf_reso_v0::Px, hf_reso_v0::Py, hf_reso_v0::Pz, - hf_reso_v0::PtProng0, - hf_reso_v0::PtProng1, - hf_reso_v0::EtaProng0, - hf_reso_v0::EtaProng1, + hf_track_vars_reduced::PtProng0, + hf_track_vars_reduced::PtProng1, + hf_track_vars_reduced::EtaProng0, + hf_track_vars_reduced::EtaProng1, hf_reso_v0::InvMassK0s, hf_reso_v0::InvMassLambda, hf_reso_v0::InvMassAntiLambda, @@ -766,27 +740,28 @@ DECLARE_SOA_TABLE(HfRedTrkNoParams, "AOD", "HFREDTRKNOPARAM", //! Table with tra // Indices hf_track_index_reduced::HfRedCollisionId, // Static - hf_reso_track::Px, - hf_reso_track::Py, - hf_reso_track::Pz, - hf_reso_track::Sign, - hf_reso_track::NSigmaTpcPi, - hf_reso_track::NSigmaTpcKa, - hf_reso_track::NSigmaTpcPr, - hf_reso_track::NSigmaTofPi, - hf_reso_track::NSigmaTofKa, - hf_reso_track::NSigmaTofPr, - hf_reso_track::HasTof, - hf_reso_track::NumItsCls, - hf_reso_track::NumTpcCrossedRows, - hf_reso_track::Chi2Tpc, + hf_track_vars_reduced::Px, + hf_track_vars_reduced::Py, + hf_track_vars_reduced::Pz, + hf_track_vars_reduced::Sign, + pidtpc::TPCNSigmaPi, + pidtpc::TPCNSigmaKa, + pidtpc::TPCNSigmaPr, + pidtof::TOFNSigmaPi, + pidtof::TOFNSigmaKa, + pidtof::TOFNSigmaPr, + hf_track_vars_reduced::HasTOF, + hf_track_vars_reduced::HasTPC, + hf_track_vars_reduced::ItsNCls, + hf_track_vars_reduced::TpcNClsCrossedRows, + hf_track_vars_reduced::TpcChi2NCl, // Dynamic - hf_reso_track::Pt, - hf_reso_track::Eta, - hf_reso_track::Phi, - hf_reso_track::NSigmaTpcTofPi, - hf_reso_track::NSigmaTpcTofKa, - hf_reso_track::NSigmaTpcTofPr); + hf_track_vars_reduced::Pt, + hf_track_vars_reduced::Eta, + hf_track_vars_reduced::Phi, + hf_track_pid_reduced::TPCTOFNSigmaPi, + hf_track_pid_reduced::TPCTOFNSigmaKa, + hf_track_pid_reduced::TPCTOFNSigmaPr); DECLARE_SOA_TABLE(HfRed3PrNoTrks, "AOD", "HFRED3PRNOTRK", //! Table with 3 prong candidate information for resonances reduced workflow o2::soa::Index<>, @@ -798,18 +773,18 @@ DECLARE_SOA_TABLE(HfRed3PrNoTrks, "AOD", "HFRED3PRNOTRK", //! Table with 3 prong hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1, hf_cand::PxProng2, hf_cand::PyProng2, hf_cand::PzProng2, - hf_reso_3_prong::MinNumItsClsProng, hf_reso_3_prong::MinNumTpcCrossedRowsProng, hf_reso_3_prong::MaxChi2Tpc, + hf_track_vars_reduced::ItsNClsProngMin, hf_track_vars_reduced::TpcNClsCrossedRowsProngMin, hf_track_vars_reduced::TpcChi2NClProngMax, hf_reso_3_prong::DType, // Dynamic hf_reso_3_prong::Px, hf_reso_3_prong::Py, hf_reso_3_prong::Pz, - hf_reso_3_prong::PtProng0, - hf_reso_3_prong::PtProng1, - hf_reso_3_prong::PtProng2, - hf_reso_3_prong::EtaProng0, - hf_reso_3_prong::EtaProng1, - hf_reso_3_prong::EtaProng2, + hf_track_vars_reduced::PtProng0, + hf_track_vars_reduced::PtProng1, + hf_track_vars_reduced::PtProng2, + hf_track_vars_reduced::EtaProng0, + hf_track_vars_reduced::EtaProng1, + hf_track_vars_reduced::EtaProng2, hf_reso_3_prong::InvMassDplus, hf_reso_3_prong::InvMassDstar, hf_reso_3_prong::InvMassAntiDstar, diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx index 2468e2c510d..a394139ac85 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx @@ -816,7 +816,7 @@ struct HfDataCreatorCharmResoReduced { track.px(), track.py(), track.pz(), track.sign(), track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(), - track.hasTOF(), track.itsNCls(), track.tpcNClsCrossedRows(), track.tpcChi2NCl()); + track.hasTOF(), track.hasTPC(), track.itsNCls(), track.tpcNClsCrossedRows(), track.tpcChi2NCl()); selectedTracks[track.globalIndex()] = hfTrackNoParam.lastIndex(); } fillHfCandD = true; From 4c4a0f2b8fe00f4fdb9eef9d86a888e723be16ef Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 30 Oct 2024 13:54:26 +0000 Subject: [PATCH 5/5] Please consider the following formatting changes --- PWGHF/D2H/DataModel/ReducedDataModel.h | 44 +++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/PWGHF/D2H/DataModel/ReducedDataModel.h b/PWGHF/D2H/DataModel/ReducedDataModel.h index 89888b9c31f..e56bfcfb067 100644 --- a/PWGHF/D2H/DataModel/ReducedDataModel.h +++ b/PWGHF/D2H/DataModel/ReducedDataModel.h @@ -128,11 +128,11 @@ DECLARE_SOA_COLUMN(C1Pt21Pt2, c1Pt21Pt2, float); //! Covariance matrix namespace hf_track_index_reduced { -DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index -DECLARE_SOA_COLUMN(TrackId, trackId, int); //! Original track index -DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index -DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index -DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index +DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index +DECLARE_SOA_COLUMN(TrackId, trackId, int); //! Original track index +DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index +DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index +DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index } // namespace hf_track_index_reduced namespace hf_track_vars_reduced @@ -182,18 +182,18 @@ DECLARE_SOA_DYNAMIC_COLUMN(EtaProng2, etaProng2, //! namespace hf_track_pid_reduced { -DECLARE_SOA_COLUMN(TPCNSigmaPiProng0, tpcNSigmaPiProng0, float); //! NsigmaTPCPi for prong0 -DECLARE_SOA_COLUMN(TPCNSigmaPiProng1, tpcNSigmaPiProng1, float); //! NsigmaTPCPi for prong1 -DECLARE_SOA_COLUMN(TPCNSigmaPiProng2, tpcNSigmaPiProng2, float); //! NsigmaTPCPi for prong2 -DECLARE_SOA_COLUMN(TPCNSigmaKaProng0, tpcNSigmaKaProng0, float); //! NsigmaTPCKa for prong0 -DECLARE_SOA_COLUMN(TPCNSigmaKaProng1, tpcNSigmaKaProng1, float); //! NsigmaTPCKa for prong1 -DECLARE_SOA_COLUMN(TPCNSigmaKaProng2, tpcNSigmaKaProng2, float); //! NsigmaTPCKa for prong2 -DECLARE_SOA_COLUMN(TOFNSigmaPiProng0, tofNSigmaPiProng0, float); //! NsigmaTOFPi for prong0 -DECLARE_SOA_COLUMN(TOFNSigmaPiProng1, tofNSigmaPiProng1, float); //! NsigmaTOFPi for prong1 -DECLARE_SOA_COLUMN(TOFNSigmaPiProng2, tofNSigmaPiProng2, float); //! NsigmaTOFPi for prong2 -DECLARE_SOA_COLUMN(TOFNSigmaKaProng0, tofNSigmaKaProng0, float); //! NsigmaTOFKa for prong0 -DECLARE_SOA_COLUMN(TOFNSigmaKaProng1, tofNSigmaKaProng1, float); //! NsigmaTOFKa for prong1 -DECLARE_SOA_COLUMN(TOFNSigmaKaProng2, tofNSigmaKaProng2, float); //! NsigmaTOFKa for prong2 +DECLARE_SOA_COLUMN(TPCNSigmaPiProng0, tpcNSigmaPiProng0, float); //! NsigmaTPCPi for prong0 +DECLARE_SOA_COLUMN(TPCNSigmaPiProng1, tpcNSigmaPiProng1, float); //! NsigmaTPCPi for prong1 +DECLARE_SOA_COLUMN(TPCNSigmaPiProng2, tpcNSigmaPiProng2, float); //! NsigmaTPCPi for prong2 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng0, tpcNSigmaKaProng0, float); //! NsigmaTPCKa for prong0 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng1, tpcNSigmaKaProng1, float); //! NsigmaTPCKa for prong1 +DECLARE_SOA_COLUMN(TPCNSigmaKaProng2, tpcNSigmaKaProng2, float); //! NsigmaTPCKa for prong2 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng0, tofNSigmaPiProng0, float); //! NsigmaTOFPi for prong0 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng1, tofNSigmaPiProng1, float); //! NsigmaTOFPi for prong1 +DECLARE_SOA_COLUMN(TOFNSigmaPiProng2, tofNSigmaPiProng2, float); //! NsigmaTOFPi for prong2 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng0, tofNSigmaKaProng0, float); //! NsigmaTOFKa for prong0 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng1, tofNSigmaKaProng1, float); //! NsigmaTOFKa for prong1 +DECLARE_SOA_COLUMN(TOFNSigmaKaProng2, tofNSigmaKaProng2, float); //! NsigmaTOFKa for prong2 // dynamic columns DECLARE_SOA_DYNAMIC_COLUMN(TPCTOFNSigmaPi, tpcTofNSigmaPi, //! Combination of NsigmaTPC and NsigmaTOF [](float tpcNSigmaPi, float tofNSigmaPi) -> float { return pid_tpc_tof_utils::combineNSigma(tpcNSigmaPi, tofNSigmaPi); }); @@ -664,7 +664,7 @@ DECLARE_SOA_TABLE(HfCandBsConfigs, "AOD", "HFCANDBSCONFIG", //! Table with confi // Charm resonances analysis namespace hf_reso_3_prong { -DECLARE_SOA_COLUMN(DType, dType, int8_t); //! Integer with selected D candidate type: 1 = Dplus, -1 = Dminus, 2 = DstarPlus, -2 = DstarMinus +DECLARE_SOA_COLUMN(DType, dType, int8_t); //! Integer with selected D candidate type: 1 = Dplus, -1 = Dminus, 2 = DstarPlus, -2 = DstarMinus DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pxProng0, float pxProng1, float pxProng2) -> float { return 1.f * pxProng0 + 1.f * pxProng1 + 1.f * pxProng2; }); @@ -686,10 +686,10 @@ DECLARE_SOA_DYNAMIC_COLUMN(InvMassAntiDstar, invMassAntiDstar, namespace hf_reso_v0 { -DECLARE_SOA_COLUMN(Cpa, cpa, float); //! Cosine of Pointing Angle of V0 candidate -DECLARE_SOA_COLUMN(Dca, dca, float); //! DCA of V0 candidate -DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius of V0 candidate -DECLARE_SOA_COLUMN(V0Type, v0Type, uint8_t); //! Bitmap with mass hypothesis of the V0 +DECLARE_SOA_COLUMN(Cpa, cpa, float); //! Cosine of Pointing Angle of V0 candidate +DECLARE_SOA_COLUMN(Dca, dca, float); //! DCA of V0 candidate +DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius of V0 candidate +DECLARE_SOA_COLUMN(V0Type, v0Type, uint8_t); //! Bitmap with mass hypothesis of the V0 DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! [](float pxProng0, float pxProng1) -> float { return 1.f * pxProng0 + 1.f * pxProng1; });