Skip to content

Commit

Permalink
PWGJE : adding matching for substrucutre output task (AliceO2Group#3690)
Browse files Browse the repository at this point in the history
Co-authored-by: Nima Zardoshti <[email protected]>
  • Loading branch information
nzardosh and Nima Zardoshti authored Oct 25, 2023
1 parent 5421720 commit 12f1d9d
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 95 deletions.
42 changes: 29 additions & 13 deletions PWGJE/DataModel/JetSubstructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,37 @@ DECLARE_SOA_COLUMN(JetNConstituents, jetNConstituents, int); //!
} // namespace jetoutput

// Defines the jet substrcuture table definition
#define JETSUBSTRUCTURE_TABLE_DEF(_collision_type_, _jet_type_, _cand_type_, _name_, _description_) \
namespace _name_##substructure \
{ \
DECLARE_SOA_INDEX_COLUMN(_jet_type_, jet); \
DECLARE_SOA_INDEX_COLUMN_FULL(Candidate, candidate, int, _cand_type_, "_0"); \
DECLARE_SOA_DYNAMIC_COLUMN(Dummy##_jet_type_, dummy##_jet_type_, []() -> int { return 0; }); \
} \
DECLARE_SOA_TABLE(_jet_type_##Substructures, "AOD", _description_ "SS", jetsubstructure::Zg, jetsubstructure::Rg, jetsubstructure::Nsd, _name_##substructure::Dummy##_jet_type_<>); \
DECLARE_SOA_TABLE(_jet_type_##Output, "AOD", _description_ "O", jetoutput::_collision_type_##Id, _name_##substructure::_jet_type_##Id, _name_##substructure::Candidate##Id, jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetoutput::JetR, jetoutput::JetNConstituents); \
#define JETSUBSTRUCTURE_TABLE_DEF(_collision_type_, _jet_type_, _matched_jet_type_, _cand_type_, _name_, _description_) \
namespace _name_##substructure \
{ \
DECLARE_SOA_INDEX_COLUMN(_jet_type_, jet); \
DECLARE_SOA_INDEX_COLUMN_FULL(Candidate, candidate, int, _cand_type_, "_0"); \
DECLARE_SOA_DYNAMIC_COLUMN(Dummy##_jet_type_, dummy##_jet_type_, []() -> int { return 0; }); \
} \
\
namespace _name_##geomatched \
{ \
DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL(_matched_jet_type_, matchedJetGeo, int32_t, _matched_jet_type_##s, "_geo"); \
} \
\
namespace _name_##ptmatched \
{ \
DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL(_matched_jet_type_, matchedJetPt, int32_t, _matched_jet_type_##s, "_pt"); \
} \
\
namespace _name_##candmatched \
{ \
DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL(_matched_jet_type_, matchedJetCand, int32_t, _matched_jet_type_##s, "_hf"); \
} \
\
DECLARE_SOA_TABLE(_jet_type_##Substructures, "AOD", _description_ "SS", jetsubstructure::Zg, jetsubstructure::Rg, jetsubstructure::Nsd, _name_##substructure::Dummy##_jet_type_<>); \
DECLARE_SOA_TABLE(_jet_type_##Output, "AOD", _description_ "O", jetoutput::_collision_type_##Id, _name_##substructure::_jet_type_##Id, _name_##substructure::Candidate##Id, _name_##geomatched::_matched_jet_type_##Ids, _name_##ptmatched::_matched_jet_type_##Ids, _name_##candmatched::_matched_jet_type_##Ids, jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetoutput::JetR, jetoutput::JetNConstituents); \
DECLARE_SOA_TABLE(_jet_type_##SubstructureOutput, "AOD", _description_ "SSO", _name_##substructure::_jet_type_##Id, jetsubstructure::Zg, jetsubstructure::Rg, jetsubstructure::Nsd);

#define JETSUBSTRUCTURE_TABLES_DEF(_jet_type_, _cand_type_, _description_) \
JETSUBSTRUCTURE_TABLE_DEF(Collision, _jet_type_##Jet, _cand_type_, _jet_type_##jet, _description_) \
JETSUBSTRUCTURE_TABLE_DEF(Collision, _jet_type_##MCDetectorLevelJet, _cand_type_, _jet_type_##mcdetectorleveljet, _description_ "MCD") \
JETSUBSTRUCTURE_TABLE_DEF(McCollision, _jet_type_##MCParticleLevelJet, McParticles, _jet_type_##mcparticleleveljet, _description_ "MCP")
#define JETSUBSTRUCTURE_TABLES_DEF(_jet_type_, _cand_type_, _description_) \
JETSUBSTRUCTURE_TABLE_DEF(Collision, _jet_type_##Jet, _jet_type_##Jet, _cand_type_, _jet_type_##jet, _description_) \
JETSUBSTRUCTURE_TABLE_DEF(Collision, _jet_type_##MCDetectorLevelJet, _jet_type_##MCParticleLevelJet, _cand_type_, _jet_type_##mcdetectorleveljet, _description_ "MCD") \
JETSUBSTRUCTURE_TABLE_DEF(McCollision, _jet_type_##MCParticleLevelJet, _jet_type_##MCDetectorLevelJet, McParticles, _jet_type_##mcparticleleveljet, _description_ "MCP")

JETSUBSTRUCTURE_TABLES_DEF(Charged, HfCand2Prong, "C");
JETSUBSTRUCTURE_TABLES_DEF(D0Charged, HfCand2Prong, "D0");
Expand Down
Loading

0 comments on commit 12f1d9d

Please sign in to comment.