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