ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigEgammaEmulationTool
Root
TrigEgammaEmulationL1CaloHypoTool.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <utility>
6
7
#include "
TrigEgammaEmulationTool/TrigEgammaEmulationL1CaloHypoTool.h
"
8
#include "GaudiKernel/SystemOfUnits.h"
9
10
11
using namespace
Trig
;
12
//**********************************************************************
13
14
TrigEgammaEmulationL1CaloHypoTool::TrigEgammaEmulationL1CaloHypoTool
(
const
std::string& myname )
15
:
TrigEgammaEmulationBaseHypoTool
(myname)
16
{}
17
18
20
21
22
bool
TrigEgammaEmulationL1CaloHypoTool::emulate
(
const
Trig::TrigData
&input,
bool
&pass )
const
23
{
24
pass=
false
;
25
if
( !input.l1 )[[
unlikely
]]{
26
ATH_MSG_WARNING
(
"L1 not found. pointer is null"
);
27
return
false
;
28
}
29
30
pass =
decide
( input );
31
return
true
;
32
}
33
34
36
bool
TrigEgammaEmulationL1CaloHypoTool::decide
(
const
Trig::TrigData
&input )
const
37
{
38
auto
l1 = input.l1;
39
if
(!l1)[[
unlikely
]]{
40
ATH_MSG_WARNING
(
"L1 not found. pointer is null"
);
41
return
false
;
42
}
43
std::string l1item =
m_l1item
;
44
45
if
(l1->roiType() !=
xAOD::EmTauRoI::EMRoIWord
){
46
ATH_MSG_DEBUG
(
"This roi is not EMRoIWord!"
);
47
return
true
;
48
}
49
float
emE = l1->emClus()/Gaudi::Units::GeV;
// Cluster energy
50
float
eta
= l1->eta();
// eta
51
float
hadCore = l1->hadCore()/Gaudi::Units::GeV;
// Hadronic core energy
52
float
emIsol = l1->emIsol()/Gaudi::Units::GeV;
// EM Isolation energy
53
54
ATH_MSG_DEBUG
(
"emE = "
<< emE);
55
ATH_MSG_DEBUG
(
"eta = "
<<
eta
);
56
ATH_MSG_DEBUG
(
"hadCore = "
<< hadCore);
57
ATH_MSG_DEBUG
(
"emIsol = "
<< emIsol);
58
59
if
(l1item.contains(
"H"
)) {
60
ATH_MSG_DEBUG
(
"L1 (H) CUT"
);
61
if
(!
isolationL1
(
m_hadCoreCutMin
,
m_hadCoreCutOff
,
m_hadCoreCutSlope
,hadCore,emE)) {
62
ATH_MSG_DEBUG
(
"rejected"
);
63
return
false
;
64
}
65
ATH_MSG_DEBUG
(
"accepted"
);
66
}
67
68
if
(l1item.contains(
"I"
)) {
69
ATH_MSG_DEBUG
(
"L1 (I) CUT"
);
70
if
(!
isolationL1
(
m_emIsolCutMin
,
m_emIsolCutOff
,
m_emIsolCutSlope
,emIsol,emE)) {
71
ATH_MSG_DEBUG
(
"rejected"
);
72
return
false
;
73
}
74
ATH_MSG_DEBUG
(
"accepted"
);
75
}
76
77
ATH_MSG_DEBUG
(
"Apply L1 Et cut "
<<
m_l1threshold
<<
" cluster emE "
<< emE <<
" eta "
<<
eta
);
78
if
(l1item.contains(
"V"
)) {
79
ATH_MSG_DEBUG
(
"L1 (V) CUT"
);
80
if
(!
variableEtL1
(std::move(l1item),emE,
eta
)) {
81
ATH_MSG_DEBUG
(
"rejected"
);
82
return
false
;
83
}
84
ATH_MSG_DEBUG
(
"accepted"
);
85
}
86
// add new method for this also
87
else
if
(emE <=
m_l1threshold
) {
// this cut is confirmed to be <=
88
return
false
;
89
}
90
91
return
true
;
92
}
93
94
96
97
// (H) and (I) Hadronic core and electromagnetic isolation
98
bool
TrigEgammaEmulationL1CaloHypoTool::isolationL1
(
float
min
,
float
offset,
float
slope,
float
energy,
float
emE)
const
99
{
100
if
(emE >
m_isolMaxCut
) {
101
ATH_MSG_DEBUG
(
"L1 Isolation skipped, ET > Maximum isolation"
);
102
return
true
;
103
}
104
float
isolation = offset + emE*slope;
105
if
(isolation <
min
) isolation =
min
;
106
/*
107
from CaloDef.py
108
isolation <= ET/m + offset
109
*/
110
bool
value = (energy <= isolation);
111
112
113
ATH_MSG_DEBUG
(
"L1 Isolation ET = "
<< energy <<
" ISOLATION CUT "
<< isolation);
114
return
value;
115
}
116
117
119
// (V) Variable Et cut
120
bool
TrigEgammaEmulationL1CaloHypoTool::variableEtL1
(std::string L1item,
float
l1energy,
float
l1eta)
const
121
{
122
float
cut =
emulationL1V
(std::move(L1item),l1eta);
123
return
l1energy>cut;
124
}
125
126
// Eta dependant cuts for (V)
127
float
TrigEgammaEmulationL1CaloHypoTool::emulationL1V
(
const
std::string& L1item,
float
l1eta)
const
128
{
129
// Values updated from TriggerMenu-00-13-26
130
// Now they all look symmetric in negative and positive eta
131
// look that in general que can remove the first region since it is the defaul value
132
float
cut=0.;
133
// float eta = fabs((int)l1eta*10);
134
float
eta
= std::abs(l1eta);
135
if
(L1item==
"50V"
) {
136
if
(
eta
>= 0.8 &&
eta
< 1.2) cut = 51.0;
137
else
if
(
eta
>= 1.2 &&
eta
< 1.6) cut = 50.0;
138
else
if
(
eta
>= 1.6 &&
eta
< 2.0) cut = 51.0;
139
else
cut = 52;
140
}
141
else
if
(L1item==
"8VH"
) {
142
if
(
eta
> 0.8 &&
eta
<= 1.1) cut = 7.0;
143
else
if
(
eta
> 1.1 &&
eta
<= 1.4) cut = 6.0;
144
else
if
(
eta
> 1.4 &&
eta
<= 1.5) cut = 5.0;
145
else
if
(
eta
> 1.5 &&
eta
<= 1.8) cut = 7.0;
146
else
if
(
eta
> 1.8 &&
eta
<= 2.5) cut = 8.0;
147
else
cut = 9.0;
148
}
149
else
if
(L1item==
"10VH"
) {
150
if
(
eta
> 0.8 &&
eta
<= 1.1) cut = 9.0;
151
else
if
(
eta
> 1.1 &&
eta
<= 1.4) cut = 8.0;
152
else
if
(
eta
> 1.4 &&
eta
<= 1.5) cut = 7.0;
153
else
if
(
eta
> 1.5 &&
eta
<= 1.8) cut = 9.0;
154
else
if
(
eta
> 1.8 &&
eta
<= 2.5) cut = 10.0;
155
else
cut = 11.;
156
}
157
else
if
(L1item==
"13VH"
) {
158
if
(
eta
> 0.7 &&
eta
<= 0.9) cut = 14.0;
159
else
if
(
eta
> 0.9 &&
eta
<= 1.2) cut = 13.0;
160
else
if
(
eta
> 1.2 &&
eta
<= 1.4) cut = 12.0;
161
else
if
(
eta
> 1.4 &&
eta
<= 1.5) cut = 11.0;
162
else
if
(
eta
> 1.5 &&
eta
<= 1.7) cut = 13.0;
163
else
if
(
eta
> 1.7 &&
eta
<= 2.5) cut = 14.0;
164
else
cut = 15.0;
165
}
166
else
if
(L1item==
"15VH"
) {
167
if
(
eta
> 0.7 &&
eta
<= 0.9) cut = 16.0;
168
else
if
(
eta
> 0.9 &&
eta
<= 1.2) cut = 15.0;
169
else
if
(
eta
> 1.2 &&
eta
<= 1.4) cut = 14.0;
170
else
if
(
eta
> 1.4 &&
eta
<= 1.5) cut = 13.0;
171
else
if
(
eta
> 1.5 &&
eta
<= 1.7) cut = 15.0;
172
else
if
(
eta
> 1.7 &&
eta
<= 2.5) cut = 16.0;
173
else
cut = 17.0;
174
}
175
else
if
(L1item ==
"18VH"
) {
176
if
(
eta
> 0.7 &&
eta
<= 0.8) cut = 19.0;
177
else
if
(
eta
> 0.8 &&
eta
<= 1.1) cut = 18.0;
178
else
if
(
eta
> 1.1 &&
eta
<= 1.3) cut = 17.0;
179
else
if
(
eta
> 1.3 &&
eta
<= 1.4) cut = 16.0;
180
else
if
(
eta
> 1.4 &&
eta
<= 1.5) cut = 15.0;
181
else
if
(
eta
> 1.5 &&
eta
<= 1.7) cut = 17.0;
182
else
if
(
eta
> 1.7 &&
eta
<= 2.5) cut = 19.0;
183
else
cut = 20.0;
184
}
185
else
if
(L1item ==
"20VH"
) {
186
if
(
eta
> 0.7 &&
eta
<= 0.8) cut = 21.0;
187
else
if
(
eta
> 0.8 &&
eta
<= 1.1) cut = 20.0;
188
else
if
(
eta
> 1.1 &&
eta
<= 1.3) cut = 19.0;
189
else
if
(
eta
> 1.3 &&
eta
<= 1.4) cut = 18.0;
190
else
if
(
eta
> 1.4 &&
eta
<= 1.5) cut = 17.0;
191
else
if
(
eta
> 1.5 &&
eta
<= 1.7) cut = 19.0;
192
else
if
(
eta
> 1.7 &&
eta
<= 2.5) cut = 21.0;
193
else
cut = 22.0;
194
}
195
else
if
(L1item ==
"20VHI"
) {
// Same as 20VH
196
if
(
eta
> 0.7 &&
eta
<= 0.8) cut = 21.0;
197
else
if
(
eta
> 0.8 &&
eta
<= 1.1) cut = 20.0;
198
else
if
(
eta
> 1.1 &&
eta
<= 1.3) cut = 19.0;
199
else
if
(
eta
> 1.3 &&
eta
<= 1.4) cut = 18.0;
200
else
if
(
eta
> 1.4 &&
eta
<= 1.5) cut = 17.0;
201
else
if
(
eta
> 1.5 &&
eta
<= 1.7) cut = 19.0;
202
else
if
(
eta
> 1.7 &&
eta
<= 2.5) cut = 21.0;
203
else
cut = 22.0;
204
}
205
else
if
(L1item ==
"22VHI"
) {
206
if
(
eta
> 0.7 &&
eta
<= 0.8) cut = 23.0;
207
else
if
(
eta
> 0.8 &&
eta
<= 1.1) cut = 22.0;
208
else
if
(
eta
> 1.1 &&
eta
<= 1.3) cut = 21.0;
209
else
if
(
eta
> 1.3 &&
eta
<= 1.4) cut = 20.0;
210
else
if
(
eta
> 1.4 &&
eta
<= 1.5) cut = 19.0;
211
else
if
(
eta
> 1.5 &&
eta
<= 1.7) cut = 21.0;
212
else
if
(
eta
> 1.7 &&
eta
<= 2.5) cut = 23.0;
213
else
cut = 24.0;
214
}
215
return
cut;
216
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x,...)
Definition
AthMsgStreamMacros.h:46
TrigEgammaEmulationL1CaloHypoTool.h
min
#define min(a, b)
Definition
cfImp.cxx:40
Trig::TrigData
Definition
TrigEgammaEmulationToolMT.h:40
Trig::TrigEgammaEmulationBaseHypoTool::TrigEgammaEmulationBaseHypoTool
TrigEgammaEmulationBaseHypoTool(const std::string &myname)
Definition
TrigEgammaEmulationBaseHypoTool.cxx:12
Trig::TrigEgammaEmulationL1CaloHypoTool::TrigEgammaEmulationL1CaloHypoTool
TrigEgammaEmulationL1CaloHypoTool(const std::string &myname)
Definition
TrigEgammaEmulationL1CaloHypoTool.cxx:14
Trig::TrigEgammaEmulationL1CaloHypoTool::emulationL1V
float emulationL1V(const std::string &L1item, float l1eta) const
==========================================================================
Definition
TrigEgammaEmulationL1CaloHypoTool.cxx:127
Trig::TrigEgammaEmulationL1CaloHypoTool::m_hadCoreCutMin
Gaudi::Property< float > m_hadCoreCutMin
Definition
TrigEgammaEmulationL1CaloHypoTool.h:45
Trig::TrigEgammaEmulationL1CaloHypoTool::m_l1item
Gaudi::Property< std::string > m_l1item
Definition
TrigEgammaEmulationL1CaloHypoTool.h:43
Trig::TrigEgammaEmulationL1CaloHypoTool::m_isolMaxCut
Gaudi::Property< float > m_isolMaxCut
Definition
TrigEgammaEmulationL1CaloHypoTool.h:51
Trig::TrigEgammaEmulationL1CaloHypoTool::m_emIsolCutSlope
Gaudi::Property< float > m_emIsolCutSlope
Definition
TrigEgammaEmulationL1CaloHypoTool.h:50
Trig::TrigEgammaEmulationL1CaloHypoTool::m_hadCoreCutSlope
Gaudi::Property< float > m_hadCoreCutSlope
Definition
TrigEgammaEmulationL1CaloHypoTool.h:47
Trig::TrigEgammaEmulationL1CaloHypoTool::m_emIsolCutMin
Gaudi::Property< float > m_emIsolCutMin
Definition
TrigEgammaEmulationL1CaloHypoTool.h:48
Trig::TrigEgammaEmulationL1CaloHypoTool::variableEtL1
bool variableEtL1(std::string L1item, float l1energy, float l1eta) const
==========================================================================
Definition
TrigEgammaEmulationL1CaloHypoTool.cxx:120
Trig::TrigEgammaEmulationL1CaloHypoTool::isolationL1
bool isolationL1(float min, float offset, float slope, float energy, float emE) const
==========================================================================
Definition
TrigEgammaEmulationL1CaloHypoTool.cxx:98
Trig::TrigEgammaEmulationL1CaloHypoTool::m_hadCoreCutOff
Gaudi::Property< float > m_hadCoreCutOff
Definition
TrigEgammaEmulationL1CaloHypoTool.h:46
Trig::TrigEgammaEmulationL1CaloHypoTool::m_emIsolCutOff
Gaudi::Property< float > m_emIsolCutOff
Definition
TrigEgammaEmulationL1CaloHypoTool.h:49
Trig::TrigEgammaEmulationL1CaloHypoTool::emulate
virtual bool emulate(const TrigData &, bool &) const override
==========================================================================
Definition
TrigEgammaEmulationL1CaloHypoTool.cxx:22
Trig::TrigEgammaEmulationL1CaloHypoTool::decide
bool decide(const Trig::TrigData &input) const
==========================================================================
Definition
TrigEgammaEmulationL1CaloHypoTool.cxx:36
Trig::TrigEgammaEmulationL1CaloHypoTool::m_l1threshold
Gaudi::Property< float > m_l1threshold
Definition
TrigEgammaEmulationL1CaloHypoTool.h:44
xAOD::EmTauRoI_v2::EMRoIWord
@ EMRoIWord
This is a Run 2 EM RoI word.
Definition
EmTauRoI_v2.h:47
Trig
The common trigger namespace for trigger analysis tools.
Definition
LArCellMonAlg.h:33
unlikely
#define unlikely(x)
Definition
pythonic_coracool.cxx:9
Generated on
for ATLAS Offline Software by
1.17.0