ATLAS Offline Software
Loading...
Searching...
No Matches
JetTriggerDecoratorAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ASG_ANALYSIS_ALGORITHMS__JET_TRIGGER_DECORATOR_ALG_H
6#define ASG_ANALYSIS_ALGORITHMS__JET_TRIGGER_DECORATOR_ALG_H
7
10#include <AsgTools/ToolHandle.h>
21
22namespace CP
23{
27
29 {
30 public:
32
33 StatusCode initialize () override;
34 StatusCode execute (const EventContext& ctx) override;
35
36 private:
39
42 this, "jets", "", "the jet container to use"};
43
45 this, "L1Jets", "LVL1JetRoIs", "Legacy L1Calo jet RoI container"
46 };
47 // Phase-I L1Calo jFEX SR jet RoI container (data 2024+ / mc23e).
49 this, "L1JetsPhaseI", "L1_jFexSRJetRoI",
50 "Phase-I L1Calo jFEX SR jet RoI container"
51 };
53 this, "HLTJets", "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf_bJets",
54 "HLT jet container"
55 };
56
57 Gaudi::Property<std::string> m_trigger{
58 this, "trigger", {}, "trigger to match"
59 };
60 // To add missing HLT jets -- only for buggy triggers
61 // These extra jets are added because of bug in trigger navigation
62 // Will be removed once bug fixed at DAOD level
63 Gaudi::Property<std::vector<std::string>> m_triggerNavBug{
64 this, "triggerBugList", {}, "List of buggy triggers"
65 };
66 Gaudi::Property<float> m_l1dR{this, "l1dR_cut", 0.4,
67 "ΔR cone for L1 (jFEX) matching"};
68 Gaudi::Property<float> m_hltDR{this, "hltDR_cut", 0.4,
69 "ΔR cone for HLT matching"};
70
71 // PublicToolHandle: TrigDecisionTool is a shared singleton; a private
72 // ToolHandle would try to instantiate a duplicate and fail.
73#ifndef XAOD_STANDALONE
74 // For AthAnalysis and Athena, PublicToolHandle exist
75 PublicToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool{
76 this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool",
77 "trigger decision tool"};
78#else
79 // For AnalysisBase use ToolHandle as PublicToolHandle is not available
80 ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool{
81 this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool",
82 "trigger decision tool"};
83#endif
84 ToolHandle<Trig::ITrigBtagEmulationTool> m_emulationTool
85 {this, "trigEmulationTool", "", "Jet trigger emulation tool, to be used for Run 2"};
86
87 Gaudi::Property<bool> m_usePhaseIL1{
88 this, "usePhaseIL1", false,
89 "If true, use Phase-I L1Calo jFEX SR jet RoI container for L1 matching."
90 };
91
92 Gaudi::Property<std::string> m_l1ThresholdType{
93 this, "l1ThresholdType", "jJ",
94 "L1 threshold type for jFEX bit→name lookup (Phase-I L1 only)."
95 };
96
97 ToolHandle<TrigConf::ITrigConfigTool> m_trigConfigTool{
98 this, "TrigConfigTool", "TrigConf::xAODConfigTool/xAODConfigTool",
99 "Trigger configuration tool (Phase-I L1 menu access)"
100 };
101
102 // Phase-I L1 bit→name table, built lazily; rebuilt on menu-name change.
104
106 struct JetLeg
107 {
108 int index = 0;
109 int threshold = 0;
110 std::string name;
111 };
112 std::vector<JetLeg> m_jetLegs;
113
115 bool m_isNavBugTrigger {false};
116
119
120
121 Gaudi::Property<bool> m_doL1Matching{this, "doL1Matching", false,
122 "do trigger L1 matching?" };
123 CP::SysWriteDecorHandle<float> m_L1Et_decor {this, "L1Et", "", "L1-matched Et"};
124 CP::SysWriteDecorHandle<float> m_L1Eta_decor {this, "L1Eta", "", "L1-matched eta"};
125 CP::SysWriteDecorHandle<float> m_L1Phi_decor {this, "L1Phi", "", "L1-matched phi"};
126 CP::SysWriteDecorHandle<float> m_L1DR_decor {this, "L1DR", "", "L1-matched DR"};
127 CP::SysWriteDecorHandle<std::vector<int>> m_L1Threshold_decor {this, "L1Threshold", "", "L1-matched thresholds"};
128
129 Gaudi::Property<bool> m_doHLTMatching{this, "doHLTMatching", false,
130 "do trigger HLT matching?" };
131 Gaudi::Property<bool> m_useEmulationTool{this, "useEmulationTool", false,
132 "use HLT jet trigger emulation tool" };
133 CP::SysWriteDecorHandle<float> m_HLTPt_decor {this, "HLTPt", "", "HLT-matched pt"};
134 CP::SysWriteDecorHandle<float> m_HLTEta_decor {this, "HLTEta", "", "HLT-matched eta"};
135 CP::SysWriteDecorHandle<float> m_HLTPhi_decor {this, "HLTPhi", "", "HLT-matched phi"};
137 "HLT-matched dR"};
138 CP::SysWriteDecorHandle<std::vector<int>> m_HLTThreshold_decor {this, "HLTThreshold", "", "HLT-matched thresholds"};
139
140 bool isSameJet(const xAOD::IParticle *jet1, const xAOD::IParticle *jet2) const;
141
142 };
143}
144
145#endif
an algorithm decorating jets with the kinematics, ΔR and thresholds of the L1 RoI and HLT jet matched...
SysListHandle m_systematicsList
the systematics list we run
ToolHandle< TrigConf::ITrigConfigTool > m_trigConfigTool
Gaudi::Property< bool > m_doHLTMatching
Gaudi::Property< float > m_l1dR
Gaudi::Property< bool > m_useEmulationTool
Gaudi::Property< bool > m_usePhaseIL1
CP::SysWriteDecorHandle< std::vector< int > > m_L1Threshold_decor
CP::SysWriteDecorHandle< float > m_HLTPt_decor
CP::SysWriteDecorHandle< float > m_HLTPhi_decor
CP::SysWriteDecorHandle< std::vector< int > > m_HLTThreshold_decor
ToolHandle< Trig::ITrigBtagEmulationTool > m_emulationTool
bool isSameJet(const xAOD::IParticle *jet1, const xAOD::IParticle *jet2) const
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_L1JetsPhaseIInKey
Gaudi::Property< std::vector< std::string > > m_triggerNavBug
CP::SysWriteDecorHandle< float > m_L1Eta_decor
bool m_isNavBugTrigger
whether m_trigger is in m_triggerNavBug
Gaudi::Property< float > m_hltDR
CP::SysWriteDecorHandle< float > m_L1DR_decor
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
CP::SysReadHandle< xAOD::JetContainer > m_jetsHandle
SG::ReadHandleKey< xAOD::JetContainer > m_HLTJetsInKey
CP::SysWriteDecorHandle< float > m_HLTEta_decor
Gaudi::Property< std::string > m_trigger
CP::SysWriteDecorHandle< float > m_HLTDR_decor
CP::SysWriteDecorHandle< float > m_L1Et_decor
SG::ReadHandleKey< xAOD::JetRoIContainer > m_L1JetsInKey
Gaudi::Property< std::string > m_l1ThresholdType
bool m_warnedMissingChain
whether we already warned about m_trigger missing from the menu
Gaudi::Property< bool > m_doL1Matching
CP::SysWriteDecorHandle< float > m_L1Phi_decor
the Phase-I L1 jFEX threshold bit-to-name table, taken from the L1 menu, shared by the algorithms dec...
a class managing the property to configure the list of systematics to process
a data handle for reading systematics varied input data
a data handle for reading systematics varied input data
the (new) base class for EventLoop algorithms
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
virtual::StatusCode execute()
execute this algorithm
Property holding a SG store/key/clid from which a ReadHandle is made.
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
Definition index.py:1
a "j" leg of the chain, parsed once in initialize()
int threshold
leg threshold (the gsc threshold for gsc legs)
std::string name
leg name (key of the Run 2 emulation results)