ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigEgammaMonitoring
python
TrigEgammaInfo.py
Go to the documentation of this file.
1
#
2
# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
#
4
5
from
ROOT.ChainNameParser
import
HLTChainInfo
6
7
8
class
TrigEgammaInfo
(object):
9
10
EM = {
"e"
,
"electron"
}
11
GAMMA = {
"g"
,
"photon"
}
12
13
14
def
__init__
(self, trigger):
15
self.
__chain
= trigger
16
self.
__legs
= HLTChainInfo(trigger)
17
self.
__sigs
= {leg.signature.lower()
for
leg
in
self.
__legs
}
18
19
def
chain
(self):
20
return
self.
__chain
21
22
def
legs
(self):
23
return
self.
__legs
24
25
def
signatures
(self):
26
return
self.
__sigs
27
28
def
isElectron
(self):
29
sigs = self.
__sigs
30
return
bool(sigs & self.
EM
)
and
not
(sigs & self.
GAMMA
)
31
32
def
isPhoton
(self):
33
sigs = self.
__sigs
34
return
bool(sigs & self.
GAMMA
)
and
not
(sigs & self.
EM
)
35
36
def
isTagAndProbeZeeg
(self):
37
sigs = self.
__sigs
38
return
(
39
"probe"
in
self.
__chain
.lower()
40
or
(bool(sigs & self.
EM
)
and
bool(sigs & self.
GAMMA
))
41
)
42
43
def
threshold
(self):
44
if
self.
isElectron
()
or
self.
isPhoton
():
45
thresholdValue = self.
__legs
.threshold
46
thresholdString = str(thresholdValue)
47
48
elif
self.
isTagAndProbeZeeg
():
49
if
self.
__sigs
& self.
GAMMA
:
# photon/gamma-like signature
50
thresholdValue = self.
__legs
.threshold
51
thresholdString = str(thresholdValue)
52
53
return
thresholdString
54
55
def
pidname
(self):
56
if
not
self.
__legs
:
57
return
None
58
pid =
None
59
60
if
self.
isElectron
()
or
self.
isPhoton
():
61
pid = self.
__legs
.legParts[0]
62
63
elif
self.
isTagAndProbeZeeg
():
64
if
self.
__sigs
& self.
GAMMA
:
# photon/gamma-like signature
65
pid = self.
__legs
.legParts[0]
66
67
return
pid
68
69
def
isIsolated
(self):
70
for
part_name
in
[
'iloose'
,
'ivarloose'
,
'icaloloose'
,
'icalovloose'
,
'icalotight'
]:
71
if
part_name
in
self.
chain
():
72
return
True
73
return
False
74
75
76
77
python.TrigEgammaInfo.TrigEgammaInfo
Definition
TrigEgammaInfo.py:8
python.TrigEgammaInfo.TrigEgammaInfo.__legs
__legs
Definition
TrigEgammaInfo.py:16
python.TrigEgammaInfo.TrigEgammaInfo.__sigs
dict __sigs
Definition
TrigEgammaInfo.py:17
python.TrigEgammaInfo.TrigEgammaInfo.isPhoton
isPhoton(self)
Definition
TrigEgammaInfo.py:32
python.TrigEgammaInfo.TrigEgammaInfo.isElectron
isElectron(self)
Definition
TrigEgammaInfo.py:28
python.TrigEgammaInfo.TrigEgammaInfo.pidname
pidname(self)
Definition
TrigEgammaInfo.py:55
python.TrigEgammaInfo.TrigEgammaInfo.isIsolated
isIsolated(self)
Definition
TrigEgammaInfo.py:69
python.TrigEgammaInfo.TrigEgammaInfo.chain
chain(self)
Definition
TrigEgammaInfo.py:19
python.TrigEgammaInfo.TrigEgammaInfo.GAMMA
dict GAMMA
Definition
TrigEgammaInfo.py:11
python.TrigEgammaInfo.TrigEgammaInfo.threshold
threshold(self)
Definition
TrigEgammaInfo.py:43
python.TrigEgammaInfo.TrigEgammaInfo.legs
legs(self)
Definition
TrigEgammaInfo.py:22
python.TrigEgammaInfo.TrigEgammaInfo.isTagAndProbeZeeg
isTagAndProbeZeeg(self)
Definition
TrigEgammaInfo.py:36
python.TrigEgammaInfo.TrigEgammaInfo.EM
dict EM
Definition
TrigEgammaInfo.py:10
python.TrigEgammaInfo.TrigEgammaInfo.signatures
signatures(self)
Definition
TrigEgammaInfo.py:25
python.TrigEgammaInfo.TrigEgammaInfo.__chain
__chain
Definition
TrigEgammaInfo.py:15
python.TrigEgammaInfo.TrigEgammaInfo.__init__
__init__(self, trigger)
Definition
TrigEgammaInfo.py:14
Generated on
for ATLAS Offline Software by
1.16.1