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>
20
21namespace CP
22{
24 {
25 public:
26
27 JetTriggerDecoratorAlg(const std::string &name,
28 ISvcLocator *svcLoc = nullptr);
29
30 StatusCode initialize () override;
31 StatusCode execute (const EventContext& ctx) override;
32
33 private:
34 // Lazily rebuilt in execute() — beginInputFile() fires before xAODConfigSvc publishes the menu (map::at).
35 StatusCode rebuildJfexThresholdTable(const EventContext& ctx);
36
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.
103 std::vector<std::string> m_jfexThresholdNames;
106
107
108 Gaudi::Property<bool> m_doL1Matching{this, "doL1Matching", false,
109 "do trigger L1 matching?" };
110 CP::SysWriteDecorHandle<float> m_L1Et_decor {this, "L1Et", "", "L1-matched Et"};
111 CP::SysWriteDecorHandle<float> m_L1Eta_decor {this, "L1Eta", "", "L1-matched eta"};
112 CP::SysWriteDecorHandle<float> m_L1Phi_decor {this, "L1Phi", "", "L1-matched phi"};
113 CP::SysWriteDecorHandle<float> m_L1DR_decor {this, "L1DR", "", "L1-matched DR"};
114 CP::SysWriteDecorHandle<std::vector<int>> m_L1Threshold_decor {this, "L1Threshold", "", "L1-matched thresholds"};
115
116 Gaudi::Property<bool> m_doHLTMatching{this, "doHLTMatching", false,
117 "do trigger HLT matching?" };
118 Gaudi::Property<bool> m_useEmulationTool{this, "useEmulationTool", false,
119 "use HLT jet trigger emulation tool" };
120 CP::SysWriteDecorHandle<float> m_HLTPt_decor {this, "HLTPt", "", "HLT-matched pt"};
121 CP::SysWriteDecorHandle<float> m_HLTEta_decor {this, "HLTEta", "", "HLT-matched eta"};
122 CP::SysWriteDecorHandle<float> m_HLTPhi_decor {this, "HLTPhi", "", "HLT-matched phi"};
124 "HLT-matched dR"};
125 CP::SysWriteDecorHandle<std::vector<int>> m_HLTThreshold_decor {this, "HLTThreshold", "", "HLT-matched thresholds"};
126
127 bool isSameJet(const xAOD::IParticle *jet1, const xAOD::IParticle *jet2) const;
128
129 };
130}
131
132#endif
SysListHandle m_systematicsList
the systematics list we run
ToolHandle< TrigConf::ITrigConfigTool > m_trigConfigTool
Gaudi::Property< bool > m_doHLTMatching
Gaudi::Property< float > m_l1dR
JetTriggerDecoratorAlg(const std::string &name, ISvcLocator *svcLoc=nullptr)
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
Gaudi::Property< float > m_hltDR
CP::SysWriteDecorHandle< float > m_L1DR_decor
StatusCode rebuildJfexThresholdTable(const EventContext &ctx)
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
std::vector< std::string > m_jfexThresholdNames
CP::SysWriteDecorHandle< float > m_HLTDR_decor
CP::SysWriteDecorHandle< float > m_L1Et_decor
SG::ReadHandleKey< xAOD::JetRoIContainer > m_L1JetsInKey
Gaudi::Property< std::string > m_l1ThresholdType
Gaudi::Property< bool > m_doL1Matching
CP::SysWriteDecorHandle< float > m_L1Phi_decor
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
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.