2020#include " Common/DataModel/Multiplicity.h"
2121#include " Common/DataModel/Centrality.h"
2222#include " Common/DataModel/Qvectors.h"
23+ #include " Common/DataModel/McCollisionExtra.h"
2324#include " PWGLF/DataModel/EPCalibrationTables.h"
2425
2526namespace o2 ::aod
@@ -294,6 +295,9 @@ DECLARE_SOA_COLUMN(PzPosMC, pzPosMC, float); //! V0 positive
294295DECLARE_SOA_COLUMN (PxNegMC, pxNegMC, float ); // ! V0 positive daughter px (GeV/c)
295296DECLARE_SOA_COLUMN (PyNegMC, pyNegMC, float ); // ! V0 positive daughter py (GeV/c)
296297DECLARE_SOA_COLUMN (PzNegMC, pzNegMC, float ); // ! V0 positive daughter pz (GeV/c)
298+ DECLARE_SOA_COLUMN (PxMC, pxMC, float ); // ! V0 px (GeV/c)
299+ DECLARE_SOA_COLUMN (PyMC, pyMC, float ); // ! V0 py (GeV/c)
300+ DECLARE_SOA_COLUMN (PzMC, pzMC, float ); // ! V0 pz (GeV/c)
297301
298302// ______________________________________________________
299303// Binned content for generated particles: derived data
@@ -464,6 +468,22 @@ DECLARE_SOA_DYNAMIC_COLUMN(IsPhotonTPConly, isPhotonTPConly, //! is tpc-only pho
464468 [](uint8_t V0Type) -> bool { return V0Type & (1 << 1 ); });
465469DECLARE_SOA_DYNAMIC_COLUMN (IsCollinear, isCollinear, // ! is collinear V0
466470 [](uint8_t V0Type) -> bool { return V0Type & (1 << 2 ); });
471+
472+ DECLARE_SOA_DYNAMIC_COLUMN (RapidityMC, rapidityMC, // ! rapidity (0:K0, 1:L, 2:Lbar)
473+ [](float PxMC, float PyMC, float PzMC, int value) -> float {
474+ if (value == 0 )
475+ return RecoDecay::y (std::array{PxMC, PyMC, PzMC}, o2::constants::physics::MassKaonNeutral);
476+ if (value == 1 || value == 2 )
477+ return RecoDecay::y (std::array{PxMC, PyMC, PzMC}, o2::constants::physics::MassLambda);
478+ return 0 .0f ;
479+ });
480+
481+ DECLARE_SOA_DYNAMIC_COLUMN (NegativePtMC, negativeptMC, // ! negative daughter pT
482+ [](float pxnegMC, float pynegMC) -> float { return RecoDecay::sqrtSumOfSquares (pxnegMC, pynegMC); });
483+ DECLARE_SOA_DYNAMIC_COLUMN (PositivePtMC, positiveptMC, // ! positive daughter pT
484+ [](float pxposMC, float pyposMC) -> float { return RecoDecay::sqrtSumOfSquares (pxposMC, pyposMC); });
485+ DECLARE_SOA_DYNAMIC_COLUMN (PtMC, ptMC, // ! V0 pT
486+ [](float pxMC, float pyMC) -> float { return RecoDecay::sqrtSumOfSquares (pxMC, pyMC); });
467487} // namespace v0data
468488
469489DECLARE_SOA_TABLE (V0Indices, " AOD" , " V0INDEX" , // ! index table when using AO2Ds
@@ -666,6 +686,19 @@ DECLARE_SOA_TABLE_VERSIONED(V0MCCores_001, "AOD", "V0MCCORE", 1, //! debug infor
666686 v0data::PxPosMC, v0data::PyPosMC, v0data::PzPosMC,
667687 v0data::PxNegMC, v0data::PyNegMC, v0data::PzNegMC);
668688
689+ DECLARE_SOA_TABLE_VERSIONED (V0MCCores_002, " AOD" , " V0MCCORE" , 2 , // ! debug information
690+ v0data::ParticleIdMC, // ! MC properties of the V0 for posterior analysis
691+ v0data::PDGCode, v0data::PDGCodeMother,
692+ v0data::PDGCodePositive, v0data::PDGCodeNegative,
693+ v0data::IsPhysicalPrimary, v0data::XMC , v0data::YMC , v0data::ZMC ,
694+ v0data::PxPosMC, v0data::PyPosMC, v0data::PzPosMC,
695+ v0data::PxNegMC, v0data::PyNegMC, v0data::PzNegMC,
696+ v0data::PxMC, v0data::PyMC, v0data::PzMC,
697+ v0data::RapidityMC<v0data::PxMC, v0data::PyMC, v0data::PzMC>,
698+ v0data::NegativePtMC<v0data::PxNegMC, v0data::PyNegMC>,
699+ v0data::PositivePtMC<v0data::PxPosMC, v0data::PyPosMC>,
700+ v0data::PtMC<v0data::PxMC, v0data::PyMC, v0data::PzMC>);
701+
669702DECLARE_SOA_TABLE (StoredV0MCCores_000, " AOD" , " V0MCCORE" , // ! MC properties of the V0 for posterior analysis
670703 v0data::PDGCode, v0data::PDGCodeMother,
671704 v0data::PDGCodePositive, v0data::PDGCodeNegative,
@@ -683,6 +716,16 @@ DECLARE_SOA_TABLE_VERSIONED(StoredV0MCCores_001, "AOD", "V0MCCORE", 1, //! debug
683716 v0data::PxNegMC, v0data::PyNegMC, v0data::PzNegMC,
684717 o2::soa::Marker<1 >);
685718
719+ DECLARE_SOA_TABLE_VERSIONED (StoredV0MCCores_002, " AOD" , " V0MCCORE" , 2 , // ! debug information
720+ v0data::ParticleIdMC, // ! MC properties of the V0 for posterior analysis
721+ v0data::PDGCode, v0data::PDGCodeMother,
722+ v0data::PDGCodePositive, v0data::PDGCodeNegative,
723+ v0data::IsPhysicalPrimary, v0data::XMC , v0data::YMC , v0data::ZMC ,
724+ v0data::PxPosMC, v0data::PyPosMC, v0data::PzPosMC,
725+ v0data::PxNegMC, v0data::PyNegMC, v0data::PzNegMC,
726+ v0data::PxMC, v0data::PyMC, v0data::PzMC,
727+ o2::soa::Marker<1 >);
728+
686729DECLARE_SOA_TABLE (V0MCCollRefs, " AOD" , " V0MCCOLLREF" , // ! refers MC candidate back to proper MC Collision
687730 o2::soa::Index<>, v0data::StraMCCollisionId, o2::soa::Marker<2 >);
688731
@@ -696,8 +739,8 @@ DECLARE_SOA_TABLE(V0MCMothers, "AOD", "V0MCMOTHER", //! optional table for MC mo
696739DECLARE_SOA_TABLE (StoredV0MCMothers, " AOD1" , " V0MCMOTHER" , // ! optional table for MC mothers
697740 o2::soa::Index<>, v0data::MotherMCPartId, o2::soa::Marker<1 >);
698741
699- using V0MCCores = V0MCCores_001 ;
700- using StoredV0MCCores = StoredV0MCCores_001 ;
742+ using V0MCCores = V0MCCores_002 ;
743+ using StoredV0MCCores = StoredV0MCCores_002 ;
701744
702745using V0Index = V0Indices::iterator;
703746using V0Core = V0Cores::iterator;
@@ -708,6 +751,7 @@ using V0fCDatas = soa::Join<V0fCIndices, V0fCTrackXs, V0fCCores>;
708751using V0fCData = V0fCDatas::iterator;
709752using V0MCDatas = soa::Join<V0MCCores, V0MCMothers>;
710753using V0MCData = V0MCDatas::iterator;
754+ using V0MCCore = V0MCCores::iterator;
711755
712756// definitions of indices for interlink tables
713757namespace v0data
@@ -997,6 +1041,24 @@ DECLARE_SOA_DYNAMIC_COLUMN(BachelorEta, bacheloreta, //! bachelor daughter eta
9971041 [](float PxPos, float PyPos, float PzPos) -> float { return RecoDecay::eta (std::array{PxPos, PyPos, PzPos}); });
9981042DECLARE_SOA_DYNAMIC_COLUMN (BachelorPhi, bachelorphi, // ! bachelor daughter phi
9991043 [](float PxPos, float PyPos) -> float { return RecoDecay::phi (PxPos, PyPos); });
1044+
1045+ DECLARE_SOA_DYNAMIC_COLUMN (RapidityMC, rapidityMC, // ! rapidity (0, 1: Xi; 2, 3: Omega)
1046+ [](float PxMC, float PyMC, float PzMC, int value) -> float {
1047+ if (value == 0 || value == 1 )
1048+ return RecoDecay::y (std::array{PxMC, PyMC, PzMC}, o2::constants::physics::MassXiMinus);
1049+ if (value == 2 || value == 3 )
1050+ return RecoDecay::y (std::array{PxMC, PyMC, PzMC}, o2::constants::physics::MassOmegaMinus);
1051+ return 0 .0f ;
1052+ });
1053+
1054+ DECLARE_SOA_DYNAMIC_COLUMN (NegativePtMC, negativeptMC, // ! negative daughter pT
1055+ [](float pxNegMC, float pyNegMC) -> float { return RecoDecay::sqrtSumOfSquares (pxNegMC, pyNegMC); });
1056+ DECLARE_SOA_DYNAMIC_COLUMN (PositivePtMC, positiveptMC, // ! positive daughter pT
1057+ [](float pxPosMC, float pyPosMC) -> float { return RecoDecay::sqrtSumOfSquares (pxPosMC, pyPosMC); });
1058+ DECLARE_SOA_DYNAMIC_COLUMN (BachelorPtMC, bachelorptMC, // ! bachelor daughter pT
1059+ [](float pxBachMC, float pyBachMC) -> float { return RecoDecay::sqrtSumOfSquares (pxBachMC, pyBachMC); });
1060+ DECLARE_SOA_DYNAMIC_COLUMN (PtMC, ptMC, // ! cascade pT
1061+ [](float pxMC, float pyMC) -> float { return RecoDecay::sqrtSumOfSquares (pxMC, pyMC); });
10001062} // namespace cascdata
10011063
10021064// ______________________________________________________
@@ -1190,7 +1252,12 @@ DECLARE_SOA_TABLE(CascMCCores, "AOD", "CASCMCCORE", //! bachelor-baryon correlat
11901252 cascdata::PxPosMC, cascdata::PyPosMC, cascdata::PzPosMC,
11911253 cascdata::PxNegMC, cascdata::PyNegMC, cascdata::PzNegMC,
11921254 cascdata::PxBachMC, cascdata::PyBachMC, cascdata::PzBachMC,
1193- cascdata::PxMC, cascdata::PyMC, cascdata::PzMC);
1255+ cascdata::PxMC, cascdata::PyMC, cascdata::PzMC,
1256+ cascdata::RapidityMC<cascdata::PxMC, cascdata::PyMC, cascdata::PzMC>,
1257+ cascdata::NegativePtMC<cascdata::PxNegMC, cascdata::PyNegMC>,
1258+ cascdata::PositivePtMC<cascdata::PxPosMC, cascdata::PyPosMC>,
1259+ cascdata::BachelorPtMC<cascdata::PxBachMC, cascdata::PyBachMC>,
1260+ cascdata::PtMC<cascdata::PxMC, cascdata::PyMC>);
11941261
11951262namespace cascdata
11961263{
0 commit comments