ATLAS Offline Software
Loading...
Searching...
No Matches
TrigL1FexJetMonitorTool< T > Class Template Reference

#include <TrigL1FexJetMonitorTool.h>

Inheritance diagram for TrigL1FexJetMonitorTool< T >:
Collaboration diagram for TrigL1FexJetMonitorTool< T >:

Public Types

typedef T::JetContainer JetContainer

Public Member Functions

 TrigL1FexJetMonitorTool (const std::string &, const std::string &, const IInterface *)
virtual StatusCode initialize () override
virtual StatusCode getData (const EventContext &ctx, std::vector< JetData > &jetData) const override
virtual StatusCode getMatchData (const EventContext &ctx, MatchToEnum, std::vector< JetMatchData > &jetData) const override

Private Attributes

SG::ReadHandleKey< JetContainerm_l1jetContainerkey
Gaudi::Property< bool > m_doMatching
Gaudi::Property< std::string > m_offlineJetContainerToMatch
Gaudi::Property< std::string > m_HLTJetContainerToMatch
SG::ReadDecorHandleKey< JetContainerm_offmatchedKey
SG::ReadDecorHandleKey< JetContainerm_offptdiffKey
SG::ReadDecorHandleKey< JetContainerm_offenergydiffKey
SG::ReadDecorHandleKey< JetContainerm_offmassdiffKey
SG::ReadDecorHandleKey< JetContainerm_offptrespKey
SG::ReadDecorHandleKey< JetContainerm_offenergyrespKey
SG::ReadDecorHandleKey< JetContainerm_offmassrespKey
SG::ReadDecorHandleKey< JetContainerm_offptrefKey
SG::ReadDecorHandleKey< JetContainerm_offetarefKey
SG::ReadDecorHandleKey< JetContainerm_hltmatchedKey
SG::ReadDecorHandleKey< JetContainerm_hltptdiffKey
SG::ReadDecorHandleKey< JetContainerm_hltenergydiffKey
SG::ReadDecorHandleKey< JetContainerm_hltmassdiffKey
SG::ReadDecorHandleKey< JetContainerm_hltptrespKey
SG::ReadDecorHandleKey< JetContainerm_hltenergyrespKey
SG::ReadDecorHandleKey< JetContainerm_hltmassrespKey
SG::ReadDecorHandleKey< JetContainerm_hltptrefKey
SG::ReadDecorHandleKey< JetContainerm_hltetarefKey

Detailed Description

template<typename T>
class TrigL1FexJetMonitorTool< T >

Definition at line 21 of file TrigL1FexJetMonitorTool.h.

Member Typedef Documentation

◆ JetContainer

template<typename T>
typedef T::JetContainer TrigL1FexJetMonitorTool< T >::JetContainer

Definition at line 26 of file TrigL1FexJetMonitorTool.h.

Constructor & Destructor Documentation

◆ TrigL1FexJetMonitorTool()

template<typename T>
TrigL1FexJetMonitorTool< T >::TrigL1FexJetMonitorTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 19 of file TrigL1FexJetMonitorTool.cxx.

23{
25
26}
SG::ReadHandleKey< JetContainer > m_l1jetContainerkey

Member Function Documentation

◆ getData()

template<typename T>
StatusCode TrigL1FexJetMonitorTool< T >::getData ( const EventContext & ctx,
std::vector< JetData > & jetData ) const
overridevirtual

Definition at line 143 of file TrigL1FexJetMonitorTool.cxx.

145 {
146
147
148 // Retrieve the L1 jet container
150 if( !jets.isValid() ){
151 // the L1 containers should _always_ be present, although may be empty.
152 ATH_MSG_WARNING("evtStore() does not contain the L1 jet collection with name "
154 return StatusCode::SUCCESS;
155 }
156
157 // find variables associated with jets in the input container.
158 for(const auto jet : *jets){
159 /*
160 Ensure that the the et is above a hardware threshold:
161 From Sergi Rodriguez 23/02/2022
162 in the bitwise simulation we also have an energy threshold,
163 which is taken from the trigger menu.
164 If the Et is below the threshold the TOB word is set to 0
165 */
166
167 if (vetoJet(jet)) {continue;} // see L1MonitoredAdaptors
168
169 jetData.emplace_back(et(jet)*0.001, // see L1MonitoredAdaptors
170 jet->eta(),
171 jet->phi(),
172 et_label(jet));
173
174 }
175 return StatusCode::SUCCESS;
176}
#define ATH_MSG_WARNING(x)
float et(const xAOD::jFexSRJetRoI *j)
bool vetoJet(const xAOD::jFexSRJetRoI *j)

◆ getMatchData()

template<typename T>
StatusCode TrigL1FexJetMonitorTool< T >::getMatchData ( const EventContext & ctx,
MatchToEnum matchTo,
std::vector< JetMatchData > & jetData ) const
overridevirtual

Definition at line 182 of file TrigL1FexJetMonitorTool.cxx.

185 {
186 if (!m_doMatching) {
187 // otherwise will attempt to use uniniatialied Keys
188 return StatusCode::SUCCESS;
189 }
190
200
201 if (matchTo == MatchToEnum::hlt) {
202
212 } else if (matchTo == MatchToEnum::offline) {
222 } else {
223 ATH_MSG_ERROR ("unsupported MatchTo value");
224 return StatusCode::FAILURE;
225 }
226
227 ATH_CHECK((*matchedHandle).initialize());
228 ATH_CHECK((*ptdiffHandle).initialize());
229 ATH_CHECK((*energydiffHandle).initialize());
230 ATH_CHECK((*massdiffHandle).initialize());
231 ATH_CHECK((*ptrespHandle).initialize());
232 ATH_CHECK((*energyrespHandle).initialize());
233 ATH_CHECK((*massrespHandle).initialize());
234 ATH_CHECK((*ptrefHandle).initialize());
235 ATH_CHECK((*etarefHandle).initialize());
236
237
238 // Loop over L1 jets and fill pt, energy, mass differences and responses
239 // between matched jets, plus reference pT and eta
240
241 // Retrieve the L1 jet container
243 if(!jets.isValid()){
244 // the L1 containers should _always_ be present, although may be empty.
245 ATH_MSG_WARNING("evtStore() does not contain the L1 jet collection with name "
247 return StatusCode::SUCCESS;
248 }
249
250 for(const auto jet : *jets){
251 bool matched = (*matchedHandle)(*jet);
252
253 if(matched){
254 jetMatchData.emplace_back((*ptdiffHandle)(*jet),
256 (*massdiffHandle)(*jet),
257 (*ptrespHandle)(*jet),
259 (*massrespHandle)(*jet),
260 (*ptrefHandle)(*jet),
261 (*etarefHandle)(*jet));
262 }
263 }
264
265 return StatusCode::SUCCESS;
266}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
SG::ReadDecorHandleKey< JetContainer > m_hltmassrespKey
SG::ReadDecorHandleKey< JetContainer > m_offmatchedKey
SG::ReadDecorHandleKey< JetContainer > m_offptrefKey
SG::ReadDecorHandleKey< JetContainer > m_offetarefKey
SG::ReadDecorHandleKey< JetContainer > m_hltptdiffKey
SG::ReadDecorHandleKey< JetContainer > m_hltmassdiffKey
SG::ReadDecorHandleKey< JetContainer > m_hltptrespKey
SG::ReadDecorHandleKey< JetContainer > m_hltenergyrespKey
SG::ReadDecorHandleKey< JetContainer > m_hltenergydiffKey
SG::ReadDecorHandleKey< JetContainer > m_offptrespKey
SG::ReadDecorHandleKey< JetContainer > m_offmassdiffKey
SG::ReadDecorHandleKey< JetContainer > m_hltmatchedKey
SG::ReadDecorHandleKey< JetContainer > m_hltetarefKey
SG::ReadDecorHandleKey< JetContainer > m_offenergyrespKey
SG::ReadDecorHandleKey< JetContainer > m_offmassrespKey
SG::ReadDecorHandleKey< JetContainer > m_offenergydiffKey
SG::ReadDecorHandleKey< JetContainer > m_offptdiffKey
SG::ReadDecorHandleKey< JetContainer > m_hltptrefKey
Gaudi::Property< bool > m_doMatching

◆ initialize()

template<typename T>
StatusCode TrigL1FexJetMonitorTool< T >::initialize ( )
overridevirtual

Definition at line 31 of file TrigL1FexJetMonitorTool.cxx.

32{
33 ATH_CHECK(m_l1jetContainerkey.initialize());
34
35 if (m_doMatching) {
38
41
44
47
50
53
56
59
62
63 ATH_CHECK(m_offmatchedKey.initialize() );
64 ATH_CHECK(m_offptdiffKey.initialize() );
65 ATH_CHECK(m_offenergydiffKey.initialize() );
66 ATH_CHECK(m_offmassdiffKey.initialize() );
67 ATH_CHECK(m_offptrespKey.initialize() );
68 ATH_CHECK(m_offenergyrespKey.initialize() );
69 ATH_CHECK(m_offmassrespKey.initialize() );
70 ATH_CHECK(m_offptrefKey.initialize() );
71 ATH_CHECK(m_offetarefKey.initialize() );
72
75
78
80 m_l1jetContainerkey.key() + ".energydiff_" + m_HLTJetContainerToMatch;
81
83 m_l1jetContainerkey.key() + ".massdiff_" + m_HLTJetContainerToMatch;
84
87
89 m_l1jetContainerkey.key() + ".energyresp_" + m_HLTJetContainerToMatch;
90
92 m_l1jetContainerkey.key() + ".massresp_" + m_HLTJetContainerToMatch;
93
96
99
100 ATH_CHECK(m_hltmatchedKey.initialize());
101 ATH_CHECK(m_hltptdiffKey.initialize());
102 ATH_CHECK(m_hltenergydiffKey.initialize());
103 ATH_CHECK(m_hltmassdiffKey.initialize());
104 ATH_CHECK(m_hltptrespKey.initialize());
105 ATH_CHECK(m_hltenergyrespKey.initialize());
106 ATH_CHECK(m_hltmassrespKey.initialize());
107 ATH_CHECK(m_hltptrefKey.initialize());
108 ATH_CHECK(m_hltetarefKey.initialize());
109
110 } else {
111 // declare the keys unused if no matching is configured
112
113 // offline container matching
114 ATH_CHECK(m_offmatchedKey.initialize(false));
115 ATH_CHECK(m_offptdiffKey.initialize(false));
116 ATH_CHECK(m_offenergydiffKey.initialize(false));
117 ATH_CHECK(m_offmassdiffKey.initialize(false));
118 ATH_CHECK(m_offptrespKey.initialize(false));
119 ATH_CHECK(m_offenergyrespKey.initialize(false));
120 ATH_CHECK(m_offmassrespKey.initialize(false));
121 ATH_CHECK(m_offptrefKey.initialize(false));
122 ATH_CHECK(m_offetarefKey.initialize(false));
123
124 // trigger container matching
125 ATH_CHECK(m_hltmatchedKey.initialize(false));
126 ATH_CHECK(m_hltptdiffKey.initialize(false));
127 ATH_CHECK(m_hltenergydiffKey.initialize(false));
128 ATH_CHECK(m_hltmassdiffKey.initialize(false));
129 ATH_CHECK(m_hltptrespKey.initialize(false));
130 ATH_CHECK(m_hltenergyrespKey.initialize(false));
131 ATH_CHECK(m_hltmassrespKey.initialize(false));
132 ATH_CHECK(m_hltptrefKey.initialize(false));
133 ATH_CHECK(m_hltetarefKey.initialize(false));
134 }
135
136 return StatusCode::SUCCESS;
137}
Gaudi::Property< std::string > m_offlineJetContainerToMatch
Gaudi::Property< std::string > m_HLTJetContainerToMatch

Member Data Documentation

◆ m_doMatching

template<typename T>
Gaudi::Property<bool> TrigL1FexJetMonitorTool< T >::m_doMatching
private
Initial value:
{
this, "do_matching", false,
"Plotting response histograms for L1 jets matched to online/offline jets"}

Definition at line 51 of file TrigL1FexJetMonitorTool.h.

51 {
52 this, "do_matching", false,
53 "Plotting response histograms for L1 jets matched to online/offline jets"};

◆ m_hltenergydiffKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltenergydiffKey
private
Initial value:
{
this, "hltenergydiff", "hltenergydiff",
"SG key for input matched energydiff decoration"}

Definition at line 104 of file TrigL1FexJetMonitorTool.h.

104 {
105 this, "hltenergydiff", "hltenergydiff",
106 "SG key for input matched energydiff decoration"};

◆ m_hltenergyrespKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltenergyrespKey
private
Initial value:
{
this, "hltenergyresp", "hltenergyresp",
"SG key for input matched energyresp decoration"}

Definition at line 116 of file TrigL1FexJetMonitorTool.h.

116 {
117 this, "hltenergyresp", "hltenergyresp",
118 "SG key for input matched energyresp decoration"};

◆ m_hltetarefKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltetarefKey
private
Initial value:
{
this, "hltetaref", "hltetaref",
"SG key for input matched etaref decoration"}

Definition at line 128 of file TrigL1FexJetMonitorTool.h.

128 {
129 this, "hltetaref", "hltetaref",
130 "SG key for input matched etaref decoration"};

◆ m_HLTJetContainerToMatch

template<typename T>
Gaudi::Property<std::string> TrigL1FexJetMonitorTool< T >::m_HLTJetContainerToMatch
private
Initial value:
{
this, "HLTJetsToMatch", "", "Name of matched HLT jet collection"}

Definition at line 59 of file TrigL1FexJetMonitorTool.h.

59 {
60 this, "HLTJetsToMatch", "", "Name of matched HLT jet collection"};

◆ m_hltmassdiffKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltmassdiffKey
private
Initial value:
{
this, "hltmassdiff", "hltmassdiff",
"SG key for input matched massdiff decoration"}

Definition at line 108 of file TrigL1FexJetMonitorTool.h.

108 {
109 this, "hltmassdiff", "hltmassdiff",
110 "SG key for input matched massdiff decoration"};

◆ m_hltmassrespKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltmassrespKey
private
Initial value:
{
this, "hltmassresp", "hltmassresp",
"SG key for input matched massresp decoration"}

Definition at line 120 of file TrigL1FexJetMonitorTool.h.

120 {
121 this, "hltmassresp", "hltmassresp",
122 "SG key for input matched massresp decoration"};

◆ m_hltmatchedKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltmatchedKey
private
Initial value:
{
this, "hltmatched", "hltmatched", "SG key for input matched decoration"}

Definition at line 97 of file TrigL1FexJetMonitorTool.h.

97 {
98 this, "hltmatched", "hltmatched", "SG key for input matched decoration"};

◆ m_hltptdiffKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltptdiffKey
private
Initial value:
{
this, "hltptdiff", "hltptdiff",
"SG key for input matched ptdiff decoration"}

Definition at line 100 of file TrigL1FexJetMonitorTool.h.

100 {
101 this, "hltptdiff", "hltptdiff",
102 "SG key for input matched ptdiff decoration"};

◆ m_hltptrefKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltptrefKey
private
Initial value:
{
this, "hltptref", "hltptref",
"SG key for input matched ptref decoration"}

Definition at line 124 of file TrigL1FexJetMonitorTool.h.

124 {
125 this, "hltptref", "hltptref",
126 "SG key for input matched ptref decoration"};

◆ m_hltptrespKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_hltptrespKey
private
Initial value:
{
this, "hltptresp", "hltptresp",
"SG key for input matched ptresp decoration"}

Definition at line 112 of file TrigL1FexJetMonitorTool.h.

112 {
113 this, "hltptresp", "hltptresp",
114 "SG key for input matched ptresp decoration"};

◆ m_l1jetContainerkey

template<typename T>
SG::ReadHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_l1jetContainerkey
private

Definition at line 48 of file TrigL1FexJetMonitorTool.h.

◆ m_offenergydiffKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offenergydiffKey
private
Initial value:
{
this, "offenergydiff", "offenergydiff",
"SG key for input matched energydiff decoration"}

Definition at line 69 of file TrigL1FexJetMonitorTool.h.

69 {
70 this, "offenergydiff", "offenergydiff",
71 "SG key for input matched energydiff decoration"};

◆ m_offenergyrespKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offenergyrespKey
private
Initial value:
{
this, "offenergyresp", "offenergyresp",
"SG key for input matched energyresp decoration"}

Definition at line 81 of file TrigL1FexJetMonitorTool.h.

81 {
82 this, "offenergyresp", "offenergyresp",
83 "SG key for input matched energyresp decoration"};

◆ m_offetarefKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offetarefKey
private
Initial value:
{
this, "offetaref", "offetaref",
"SG key for input matched etaref decoration"}

Definition at line 93 of file TrigL1FexJetMonitorTool.h.

93 {
94 this, "offetaref", "offetaref",
95 "SG key for input matched etaref decoration"};

◆ m_offlineJetContainerToMatch

template<typename T>
Gaudi::Property<std::string> TrigL1FexJetMonitorTool< T >::m_offlineJetContainerToMatch
private
Initial value:
{
this, "offlineJetsToMatch", "",
"Name of matched offline jet collection"}

Definition at line 55 of file TrigL1FexJetMonitorTool.h.

55 {
56 this, "offlineJetsToMatch", "",
57 "Name of matched offline jet collection"};

◆ m_offmassdiffKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offmassdiffKey
private
Initial value:
{
this, "offmassdiff", "offmassdiff",
"SG key for input matched massdiff decoration"}

Definition at line 73 of file TrigL1FexJetMonitorTool.h.

73 {
74 this, "offmassdiff", "offmassdiff",
75 "SG key for input matched massdiff decoration"};

◆ m_offmassrespKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offmassrespKey
private
Initial value:
{
this, "offmassresp", "offmassresp",
"SG key for input matched massresp decoration"}

Definition at line 85 of file TrigL1FexJetMonitorTool.h.

85 {
86 this, "offmassresp", "offmassresp",
87 "SG key for input matched massresp decoration"};

◆ m_offmatchedKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offmatchedKey
private
Initial value:
{
this, "offmatched", "offmatched", "SG key for input matched decoration"}

Definition at line 62 of file TrigL1FexJetMonitorTool.h.

62 {
63 this, "offmatched", "offmatched", "SG key for input matched decoration"};

◆ m_offptdiffKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offptdiffKey
private
Initial value:
{
this, "offptdiff", "offptdiff",
"SG key for input matched ptdiff decoration"}

Definition at line 65 of file TrigL1FexJetMonitorTool.h.

65 {
66 this, "offptdiff", "offptdiff",
67 "SG key for input matched ptdiff decoration"};

◆ m_offptrefKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offptrefKey
private
Initial value:
{
this, "offptref", "offptref",
"SG key for input matched ptref decoration"}

Definition at line 89 of file TrigL1FexJetMonitorTool.h.

89 {
90 this, "offptref", "offptref",
91 "SG key for input matched ptref decoration"};

◆ m_offptrespKey

template<typename T>
SG::ReadDecorHandleKey<JetContainer> TrigL1FexJetMonitorTool< T >::m_offptrespKey
private
Initial value:
{
this, "offptresp", "offptresp",
"SG key for input matched ptresp decoration"}

Definition at line 77 of file TrigL1FexJetMonitorTool.h.

77 {
78 this, "offptresp", "offptresp",
79 "SG key for input matched ptresp decoration"};

The documentation for this class was generated from the following files: