@@ -51,8 +51,6 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! absolute p
5151 [](float pt, float eta) -> float { return pt * std::cosh (eta); });
5252} // namespace jet
5353
54- // The standard constituents table is more simply defined fully via macros.
55-
5654// Constituent sub
5755namespace constituentssub
5856{
@@ -75,54 +73,54 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p,
7573} // namespace o2::aod
7674
7775// Defines the jet table definition
78- #define JET_TABLE_DEF (_collision_name_, _jet_type_, _name_, _description_ ) \
79- namespace _name_ ##util \
80- { \
81- DECLARE_SOA_DYNAMIC_COLUMN (Dummy##_jet_type_##s, dummy##_jet_type##s, \
82- []() -> int { return 0 ; }); \
83- } \
84- DECLARE_SOA_TABLE (_jet_type_##s, " AOD" , _description_, \
85- o2::soa::Index<>, \
86- jet::_collision_name_##Id, \
87- jet::Pt, \
88- jet::Eta, \
89- jet::Phi, \
90- jet::Energy, \
91- jet::Mass, \
92- jet::Area, \
93- jet::R, \
94- jet::Px<jet::Pt, jet::Phi>, \
95- jet::Py<jet::Pt, jet::Phi>, \
96- jet::Pz<jet::Pt, jet::Eta>, \
97- jet::P<jet::Pt, jet::Eta>, \
98- _name_##util::Dummy##_jet_type_##s<>); \
99- namespace _name_ ##matchingGeo \
100- { \
101- DECLARE_SOA_INDEX_COLUMN (_jet_type_, matchedJetGeo); \
102- } \
103- namespace _name_ ##matchingCand \
104- { \
105- DECLARE_SOA_INDEX_COLUMN (_jet_type_, matchedJetCand); \
76+ #define DECLARE_JET_TABLE (_collision_name_, _jet_type_, _name_, _description_ ) \
77+ namespace _name_ ##util \
78+ { \
79+ DECLARE_SOA_DYNAMIC_COLUMN (Dummy##_jet_type_##s, dummy##_jet_type##s, \
80+ []() -> int { return 0 ; }); \
81+ } \
82+ DECLARE_SOA_TABLE (_jet_type_##s, " AOD" , _description_, \
83+ o2::soa::Index<>, \
84+ jet::_collision_name_##Id, \
85+ jet::Pt, \
86+ jet::Eta, \
87+ jet::Phi, \
88+ jet::Energy, \
89+ jet::Mass, \
90+ jet::Area, \
91+ jet::R, \
92+ jet::Px<jet::Pt, jet::Phi>, \
93+ jet::Py<jet::Pt, jet::Phi>, \
94+ jet::Pz<jet::Pt, jet::Eta>, \
95+ jet::P<jet::Pt, jet::Eta>, \
96+ _name_##util::Dummy##_jet_type_##s<>); \
97+ namespace _name_ ##matchingGeo \
98+ { \
99+ DECLARE_SOA_INDEX_COLUMN (_jet_type_, matchedJetGeo); \
100+ } \
101+ namespace _name_ ##matchingCand \
102+ { \
103+ DECLARE_SOA_INDEX_COLUMN (_jet_type_, matchedJetCand); \
106104 }
107105
108- #define JET_CONSTITUENTS_ARRAY_TABLE_DEF (_jet_type_, _name_, _Description_, _track_type_, _cand_type_ ) \
109- namespace _name_ ##constituents \
110- { \
111- DECLARE_SOA_INDEX_COLUMN (_jet_type_, jet); \
112- DECLARE_SOA_ARRAY_INDEX_COLUMN (_track_type_, tracks); \
113- DECLARE_SOA_ARRAY_INDEX_COLUMN (EMCALCluster, clusters); \
114- DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL (HfCandidates, hfcandidates, int32_t , _cand_type_, " _hfcand" ); \
115- } \
116- DECLARE_SOA_TABLE (_jet_type_##Constituents, " AOD" , _Description_ " CONSTS" , \
117- _name_##constituents::_jet_type_##Id, \
118- _name_##constituents::_track_type_##Ids, \
119- _name_##constituents::EMCALClusterIds, \
106+ #define DECLARE_CONSTITUENTS_TABLE (_jet_type_, _name_, _Description_, _track_type_, _cand_type_ ) \
107+ namespace _name_ ##constituents \
108+ { \
109+ DECLARE_SOA_INDEX_COLUMN (_jet_type_, jet); \
110+ DECLARE_SOA_ARRAY_INDEX_COLUMN (_track_type_, tracks); \
111+ DECLARE_SOA_ARRAY_INDEX_COLUMN (EMCALCluster, clusters); \
112+ DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL (HfCandidates, hfcandidates, int32_t , _cand_type_, " _hfcand" ); \
113+ } \
114+ DECLARE_SOA_TABLE (_jet_type_##Constituents, " AOD" , _Description_ " CONSTS" , \
115+ _name_##constituents::_jet_type_##Id, \
116+ _name_##constituents::_track_type_##Ids, \
117+ _name_##constituents::EMCALClusterIds, \
120118 _name_##constituents::HfCandidatesIds);
121119
122120// Defines the jet constituent sub table
123121// NOTE: This relies on the jet index column being defined in the constituents namespace.
124122// Since these are always paired together, there's no point in redefining them.
125- #define JET_CONSTITUENTS_SUB_TABLE_DEF (_jet_type_, _name_, _Description_ ) \
123+ #define DECLARE_CONSTITUENTS_SUB_TABLE (_jet_type_, _name_, _Description_ ) \
126124 DECLARE_SOA_TABLE (_jet_type_##ConstituentsSub, " AOD" , _Description_ " CONSTSUB" , \
127125 _name_##constituents::_jet_type_##Id, \
128126 constituentssub::Pt, \
@@ -137,12 +135,12 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p,
137135 constituentssub::P<constituentssub::Pt, constituentssub::Eta>);
138136
139137// combine definition of tables for jets, constituents, and substructure
140- #define DECLARE_JET_TABLES (_collision_name_, _jet_type_, _const_type_, _hfcand_type_, _description_ ) \
141- JET_TABLE_DEF (_collision_name_, _jet_type_##Jet, _jet_type_##jet, _description_); \
142- using _jet_type_##Jet = _jet_type_##Jet##s::iterator; \
143- JET_CONSTITUENTS_ARRAY_TABLE_DEF (_jet_type_##Jet, _jet_type_##jet, _description_, _const_type_, _hfcand_type_); \
144- using _jet_type_##Jet##Constituent = _jet_type_##Jet##Constituents::iterator; \
145- JET_CONSTITUENTS_SUB_TABLE_DEF (_jet_type_##Jet, _jet_type_##jet, _description_); \
138+ #define DECLARE_JET_TABLES (_collision_name_, _jet_type_, _const_type_, _hfcand_type_, _description_ ) \
139+ DECLARE_JET_TABLE (_collision_name_, _jet_type_##Jet, _jet_type_##jet, _description_); \
140+ using _jet_type_##Jet = _jet_type_##Jet##s::iterator; \
141+ DECLARE_CONSTITUENTS_TABLE (_jet_type_##Jet, _jet_type_##jet, _description_, _const_type_, _hfcand_type_); \
142+ using _jet_type_##Jet##Constituent = _jet_type_##Jet##Constituents::iterator; \
143+ DECLARE_CONSTITUENTS_SUB_TABLE (_jet_type_##Jet, _jet_type_##jet, _description_); \
146144 using _jet_type_##Jet##ConstituentSub = _jet_type_##Jet##ConstituentsSub::iterator;
147145
148146#define DECLARE_JETMATCHING_TABLE (_jet_type_base_, _jet_type_tag_, _description_ ) \
0 commit comments