Skip to content

Commit 1b27145

Browse files
Luca610alibuild
andauthored
[PWGHF] Refactor of charm resonances derived data creator (#11447)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 5e260bb commit 1b27145

File tree

2 files changed

+1004
-334
lines changed

2 files changed

+1004
-334
lines changed

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,21 @@ DECLARE_SOA_DYNAMIC_COLUMN(PVector, pVector,
877877
[](float px0, float py0, float pz0, float px1, float py1, float pz1, float px2, float py2, float pz2) -> std::array<float, 3> { return std::array{px0 + px1 + px2, py0 + py1 + py2, pz0 + pz1 + pz2}; });
878878
} // namespace hf_reso_3_prong
879879

880+
namespace hf_reso_2_prong
881+
{
882+
DECLARE_SOA_COLUMN(SelFlagD0, selFlagD0, uint8_t); //! Integer with D0 selection flag: 1 = selected as D0, 2 = selected as D0bar, 3 = selected as D0 and D0bar
883+
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
884+
[](float pxProng0, float pxProng1) -> float { return 1.f * pxProng0 + 1.f * pxProng1; });
885+
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //!
886+
[](float pyProng0, float pyProng1) -> float { return 1.f * pyProng0 + 1.f * pyProng1; });
887+
DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //!
888+
[](float pzProng0, float pzProng1) -> float { return 1.f * pzProng0 + 1.f * pzProng1; });
889+
DECLARE_SOA_DYNAMIC_COLUMN(PVector, pVector,
890+
[](float pxProng0, float pyProng0, float pzProng0, float pxProng1, float pyProng1, float pzProng1) -> std::array<float, 3> { return std::array{pxProng0 + pxProng1, pyProng0 + pyProng1, pzProng0 + pzProng1}; });
891+
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //!
892+
[](float pxProng0, float pxProng1, float pyProng0, float pyProng1) -> float { return RecoDecay::pt((1.f * pxProng0 + 1.f * pxProng1), (1.f * pyProng0 + 1.f * pyProng1)); });
893+
} // namespace hf_reso_2_prong
894+
880895
namespace hf_reso_v0
881896
{
882897
DECLARE_SOA_COLUMN(Cpa, cpa, float); //! Cosine of Pointing Angle of V0 candidate
@@ -994,6 +1009,31 @@ DECLARE_SOA_TABLE(HfRed3PrNoTrks, "AOD", "HFRED3PRNOTRK", //! Table with 3 prong
9941009
hf_cand::PVectorProng2<hf_cand::PxProng2, hf_cand::PyProng2, hf_cand::PzProng2>,
9951010
hf_reso_3_prong::PVector<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>);
9961011

1012+
DECLARE_SOA_TABLE(HfRed2PrNoTrks, "AOD", "HFRED2PRNOTRK", //! Table with 2 prong candidate information for resonances reduced workflow
1013+
o2::soa::Index<>,
1014+
// Indices
1015+
hf_track_index_reduced::Prong0Id, hf_track_index_reduced::Prong1Id,
1016+
hf_track_index_reduced::HfRedCollisionId,
1017+
// Static
1018+
hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex,
1019+
hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0,
1020+
hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1,
1021+
hf_track_vars_reduced::ItsNClsProngMin, hf_track_vars_reduced::TpcNClsCrossedRowsProngMin, hf_track_vars_reduced::TpcChi2NClProngMax,
1022+
hf_reso_2_prong::SelFlagD0,
1023+
// Dynamic
1024+
hf_reso_2_prong::Px<hf_cand::PxProng0, hf_cand::PxProng1>,
1025+
hf_reso_2_prong::Py<hf_cand::PyProng0, hf_cand::PyProng1>,
1026+
hf_reso_2_prong::Pz<hf_cand::PzProng0, hf_cand::PzProng1>,
1027+
hf_track_vars_reduced::PtProng0<hf_cand::PxProng0, hf_cand::PyProng0>,
1028+
hf_track_vars_reduced::PtProng1<hf_cand::PxProng1, hf_cand::PyProng1>,
1029+
hf_track_vars_reduced::EtaProng0<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0>,
1030+
hf_track_vars_reduced::EtaProng1<hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
1031+
hf_reso_2_prong::PVector<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
1032+
hf_reso_2_prong::Pt<hf_cand::PxProng0, hf_cand::PxProng1, hf_cand::PyProng0, hf_cand::PyProng1>,
1033+
// InvMasses
1034+
hf_cand_dstar::InvMassD0<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
1035+
hf_cand_dstar::InvMassD0Bar<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>);
1036+
9971037
namespace hf_reso_cand_reduced
9981038
{
9991039
DECLARE_SOA_COLUMN(InvMass, invMass, float); //! Invariant mass in GeV/c2
@@ -1012,7 +1052,7 @@ DECLARE_SOA_COLUMN(FlagMcMatchGen, flagMcMatchGen, int8_t); // fla
10121052
DECLARE_SOA_COLUMN(DebugMcRec, debugMcRec, int8_t); // debug flag for mis-association at reconstruction level
10131053
DECLARE_SOA_COLUMN(Origin, origin, int8_t); // Flag for origin of MC particle 1=promt, 2=FD
10141054
DECLARE_SOA_COLUMN(SignD0, signD0, int8_t); // Sign of the D0 in the channels with D* -> D0 pi, needed in case of non-matched D*
1015-
1055+
DECLARE_SOA_COLUMN(InvMassGen, invMassGen, float); //! Invariant mass at generation level in GeV/c2
10161056
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //!
10171057
[](float pxProng0, float pxProng1, float pyProng0, float pyProng1) -> float { return RecoDecay::pt((1.f * pxProng0 + 1.f * pxProng1), (1.f * pyProng0 + 1.f * pyProng1)); });
10181058
DECLARE_SOA_DYNAMIC_COLUMN(PtProng0, ptProng0, //!
@@ -1073,6 +1113,7 @@ DECLARE_SOA_TABLE(HfMcRecRedDV0s, "AOD", "HFMCRECREDDV0", //! Table with reconst
10731113
hf_reso_cand_reduced::Origin,
10741114
hf_reso_cand_reduced::SignD0,
10751115
hf_b0_mc::PtMother,
1116+
hf_reso_cand_reduced::InvMassGen,
10761117
o2::soa::Marker<1>);
10771118

10781119
DECLARE_SOA_TABLE(HfMcGenRedResos, "AOD", "HFMCGENREDRESO", //! Generation-level MC information on Ds-Resonances candidates for reduced workflow

0 commit comments

Comments
 (0)