@@ -709,11 +709,38 @@ DECLARE_SOA_DYNAMIC_COLUMN(PFracNeg, pfracneg,
709709
710710// Calculated on the fly with mass assumption + dynamic tables
711711DECLARE_SOA_DYNAMIC_COLUMN (MLambda, mLambda , // ! mass under lambda hypothesis
712- [](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::MassProton, o2::constants::physics::MassPionCharged}); });
712+ [](int v0type, float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
713+ if (v0type==1 ){
714+ return RecoDecay::m (std::array{std::array{pxpos, pypos, pzpos}, std::array{pxneg, pyneg, pzneg}}, std::array{o2::constants::physics::MassProton, o2::constants::physics::MassPionCharged});
715+ };
716+ return 0 .0f ; // do not provide valid mass if TPC-only
717+ });
713718DECLARE_SOA_DYNAMIC_COLUMN (MAntiLambda, mAntiLambda , // ! mass under antilambda hypothesis
714- [](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::MassProton}); });
719+ [](int v0type, float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
720+ if (v0type==1 ){
721+ return RecoDecay::m (std::array{std::array{pxpos, pypos, pzpos}, std::array{pxneg, pyneg, pzneg}}, std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassProton});
722+ };
723+ return 0 .0f ; // do not provide valid mass if TPC-only
724+ });
715725DECLARE_SOA_DYNAMIC_COLUMN (MK0Short, mK0Short , // ! mass under K0short hypothesis
716- [](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}); });
726+ [](int v0type, float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
727+ if (v0type==1 ){
728+ 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});
729+ };
730+ return 0 .0f ; // do not provide valid mass if TPC-only
731+ });
732+ DECLARE_SOA_DYNAMIC_COLUMN (MLambda_unchecked, mLambda_unchecked , // ! mass under lambda hypothesis without v0 type check (will include TPC only and potentially duplicates! use with care)
733+ [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
734+ return RecoDecay::m (std::array{std::array{pxpos, pypos, pzpos}, std::array{pxneg, pyneg, pzneg}}, std::array{o2::constants::physics::MassProton, o2::constants::physics::MassPionCharged});
735+ });
736+ DECLARE_SOA_DYNAMIC_COLUMN (MAntiLambda_unchecked, mAntiLambda_unchecked , // ! mass under antilambda hypothesis without v0 type check (will include TPC only and potentially duplicates! use with care)
737+ [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
738+ return RecoDecay::m (std::array{std::array{pxpos, pypos, pzpos}, std::array{pxneg, pyneg, pzneg}}, std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassProton});
739+ });
740+ DECLARE_SOA_DYNAMIC_COLUMN (MK0Short_unchecked, mK0Short_unchecked , // ! mass under K0short hypothesis without v0 type check (will include TPC only and potentially duplicates! use with care)
741+ [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
742+ 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});
743+ });
717744DECLARE_SOA_DYNAMIC_COLUMN (MGamma, mGamma , // ! mass under gamma hypothesis
718745 [](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::MassElectron, o2::constants::physics::MassElectron}); });
719746// Account for rigidity in case of hypertriton
@@ -794,6 +821,23 @@ DECLARE_SOA_DYNAMIC_COLUMN(PositivePtMC, positiveptMC, //! positive daughter pT
794821 [](float pxposMC, float pyposMC) -> float { return RecoDecay::sqrtSumOfSquares (pxposMC, pyposMC); });
795822DECLARE_SOA_DYNAMIC_COLUMN (PtMC, ptMC, // ! V0 pT
796823 [](float pxMC, float pyMC) -> float { return RecoDecay::sqrtSumOfSquares (pxMC, pyMC); });
824+
825+ // declare legacy mass getters in v0data legacy name space
826+ // caution: these do not have intrinsic protection against photon candidates
827+ namespace legacy {
828+ DECLARE_SOA_DYNAMIC_COLUMN (MLambda, mLambda , // ! mass under lambda hypothesis without v0 type check (will include TPC only and potentially duplicates! use with care)
829+ [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
830+ return RecoDecay::m (std::array{std::array{pxpos, pypos, pzpos}, std::array{pxneg, pyneg, pzneg}}, std::array{o2::constants::physics::MassProton, o2::constants::physics::MassPionCharged});
831+ });
832+ DECLARE_SOA_DYNAMIC_COLUMN (MAntiLambda, mAntiLambda , // ! mass under antilambda hypothesis without v0 type check (will include TPC only and potentially duplicates! use with care)
833+ [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
834+ return RecoDecay::m (std::array{std::array{pxpos, pypos, pzpos}, std::array{pxneg, pyneg, pzneg}}, std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassProton});
835+ });
836+ DECLARE_SOA_DYNAMIC_COLUMN (MK0Short, mK0Short , // ! mass under K0short hypothesis without v0 type check (will include TPC only and potentially duplicates! use with care)
837+ [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
838+ 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});
839+ });
840+ } // namespace v0data::legacy
797841} // namespace v0data
798842
799843DECLARE_SOA_TABLE (V0Indices, " AOD" , " V0INDEX" , // ! index table when using AO2Ds
@@ -835,9 +879,12 @@ DECLARE_SOA_TABLE_STAGED(V0CoresBase, "V0CORE", //! core information about decay
835879 v0data::PFracNeg<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>, // 24
836880
837881 // Invariant masses
838- v0data::MLambda<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
839- v0data::MAntiLambda<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
840- v0data::MK0Short<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
882+ v0data::MLambda<v0data::V0Type, v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
883+ v0data::MAntiLambda<v0data::V0Type, v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
884+ v0data::MK0Short<v0data::V0Type, v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
885+ v0data::MLambda_unchecked<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
886+ v0data::MAntiLambda_unchecked<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
887+ v0data::MK0Short_unchecked<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
841888 v0data::MGamma<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
842889 v0data::MHypertriton<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
843890 v0data::MAntiHypertriton<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
@@ -916,9 +963,9 @@ DECLARE_SOA_TABLE_FULL(StoredV0fCCores, "V0fCCores", "AOD", "V0FCCORE", //! core
916963 v0data::PFracNeg<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>, // 24
917964
918965 // Invariant masses
919- v0data::MLambda<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
920- v0data::MAntiLambda<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
921- v0data::MK0Short<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
966+ v0data::MLambda<v0data::V0Type, v0data:: PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
967+ v0data::MAntiLambda<v0data::V0Type, v0data:: PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
968+ v0data::MK0Short<v0data::V0Type, v0data:: PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
922969 v0data::MGamma<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
923970 v0data::MHypertriton<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
924971 v0data::MAntiHypertriton<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
0 commit comments