From 916ba65bb820bfd92549728a56746c01d6ff4068 Mon Sep 17 00:00:00 2001 From: Jochen Klein Date: Wed, 10 Aug 2022 11:02:40 +0200 Subject: [PATCH] Add tables for HF jets - use arrays for constituents --- PWGJE/DataModel/Jet.h | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/PWGJE/DataModel/Jet.h b/PWGJE/DataModel/Jet.h index 1208b10c503..938a263db83 100644 --- a/PWGJE/DataModel/Jet.h +++ b/PWGJE/DataModel/Jet.h @@ -25,6 +25,7 @@ #include "Framework/AnalysisDataModel.h" #include "PWGJE/DataModel/EMCALClusters.h" +#include "PWGHF/DataModel/HFSecondaryVertex.h" #include // Defines the jet table definition @@ -73,6 +74,20 @@ _name_##constituents::_jet_type_##Id, \ _name_##constituents::EMCALClusterId); +#define JET_CONSTITUENTS_ARRAY_TABLE_DEF(_jet_type_, _name_, _Description_, _track_type_, _cand_type_) \ + namespace _name_##constituents \ + { \ + DECLARE_SOA_INDEX_COLUMN(_jet_type_, jet); \ + DECLARE_SOA_ARRAY_INDEX_COLUMN(_track_type_, tracks); \ + DECLARE_SOA_ARRAY_INDEX_COLUMN(EMCALCluster, clusters); \ + DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL(HfCandidates, hfcandidates, int32_t, _cand_type_, "_hfcand"); \ + } \ + DECLARE_SOA_TABLE(_jet_type_##Constituents, "AOD", _Description_ "CONSTS", \ + _name_##constituents::_jet_type_##Id, \ + _name_##constituents::_track_type_##Ids, \ + _name_##constituents::EMCALClusterIds, \ + _name_##constituents::HfCandidatesIds); + // Defines the jet constituent sub table // NOTE: This relies on eth jet index column being defined in the constiteunts namespace. // Since these are always paired together, there's no point in redefining them. @@ -263,6 +278,44 @@ using HybridIntermediateJetClusterConstituent = HybridIntermediateJetClusterCons JET_CONSTITUENTS_SUB_TABLE_DEF(HybridIntermediateJet, hybridintermediate, "HYBINT"); using HybridIntermediateJetConstituentSub = HybridIntermediateJetConstituentsSub::iterator; +// HF jets +JET_TABLE_DEF(Collision, HFJet, hfjet, "HFJET"); +using HFJet = HFJets::iterator; +using MatchedHFJet = MatchedHFJets::iterator; +JET_CONSTITUENTS_ARRAY_TABLE_DEF(HFJet, hfjet, "HFJET", Track, HfCandProng2); +using HFJetConstituent = HFJetConstituents::iterator; +JET_CONSTITUENTS_SUB_TABLE_DEF(HFJet, hfjet, "HFJET"); +using HFJetConstituentSub = HFJetConstituentsSub::iterator; + +// HF jets (MC particle level) +JET_TABLE_DEF(McCollision, MCParticleLevelHFJet, mcparticlelevelhfjet, "HFJETMCP"); +using MCParticleLevelHFJet = MCParticleLevelHFJets::iterator; +using MatchedMCParticleLevelHFJet = MatchedMCParticleLevelHFJets::iterator; +JET_CONSTITUENTS_ARRAY_TABLE_DEF(MCParticleLevelHFJet, mcparticlelevelhfjet, "HFMCP", McParticle, McParticles); +using MCParticleLevelHFJetConstituent = MCParticleLevelHFJetConstituents::iterator; +JET_CONSTITUENTS_SUB_TABLE_DEF(MCParticleLevelHFJet, mcparticlelevelhfjet, "HFMCP"); +using MCParticleLevelHFJetConstituentSub = MCParticleLevelHFJetConstituentsSub::iterator; + +// HF jets (MC detector level) +JET_TABLE_DEF(Collision, MCDetectorLevelHFJet, mcdetectorlevelhfjet, "HFJETMCD"); +using MCDetectorLevelHFJet = MCDetectorLevelHFJets::iterator; +using MatchedMCDetectorLevelHFJet = MatchedMCDetectorLevelHFJets::iterator; +JET_CONSTITUENTS_ARRAY_TABLE_DEF(MCDetectorLevelHFJet, mcdetectorlevelhfjet, "HFMCD", Track, HfCandProng2); +using MCDetectorLevelHFJetConstituent = MCDetectorLevelHFJetConstituents::iterator; +JET_CONSTITUENTS_SUB_TABLE_DEF(MCDetectorLevelHFJet, mcdetectorlevelhfjet, "HFMCD"); +using MCDetectorLevelHFJetConstituentSub = MCDetectorLevelHFJetConstituentsSub::iterator; + +namespace mcdetectorlevelhfjetmatching2 +{ +DECLARE_SOA_INDEX_COLUMN(MCDetectorLevelHFJet, matchedJet); +} +namespace mcparticlelevelhfjetmatching2 +{ +DECLARE_SOA_INDEX_COLUMN(MCParticleLevelHFJet, matchedJet); +} +DECLARE_SOA_TABLE(MatchedMCParticleDetectorLevelHFJets, "AOD", "HFJETMCPDMATCH", mcdetectorlevelhfjetmatching2::MCDetectorLevelHFJetId); +DECLARE_SOA_TABLE(MatchedMCDetectorParticleLevelHFJets, "AOD", "HFJETMCDPMATCH", mcparticlelevelhfjetmatching2::MCParticleLevelHFJetId); + } // namespace o2::aod #endif