ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
python
ConditionDefaults.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaCommon.Logging
import
logging
4
from
AthenaCommon.Constants
import
DEBUG
5
6
logger = logging.getLogger( __name__)
7
logger.setLevel(DEBUG)
8
9
import
math
10
from
copy
import
deepcopy
11
12
class
ConditionDefaults
:
13
def
__init__
(self):
14
15
# we have neta, ceta and p eta. Each is a key for
16
# TrigJetConditionConfig_signed_eta. We need a way to
17
# interprete the scenario, atking into account minus signs
18
# cannot appear in the chain name.
19
self.
defaults
= {
20
'et'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
21
'pt'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
22
'eta'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
23
'neta'
: {
'min'
:
'-inf'
,
'max'
:
'0'
},
# scenario etas: -eta -eta
24
'ceta'
: {
'min'
:
'-inf'
,
'max'
:
'inf'
},
# scenario etas: -eta, +eta
25
'peta'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
# scenario etas: +eta +eta
26
'nphi'
: {
'min'
:
'-inf'
,
'max'
:
'0'
},
# scenario phis: -phi -phi
27
'cphi'
: {
'min'
:
'-inf'
,
'max'
:
'inf'
},
# scenario phis: -phi, +phi
28
'pphi'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
# scenario phis: +phi +phi
29
'djmass'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
30
'djdeta'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
31
'djdphi'
: {
'min'
:
'0'
,
'max'
: str(math.pi)},
32
'ht'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
33
'dipz_mlpl'
: {
'min'
:
'-inf'
,
'max'
:
'inf'
},
34
'dipz_njet'
: {
'min'
:
'2'
,
'max'
:
'inf'
},
35
'mult'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
36
'smc'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
37
'jvt'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
38
'nnJvt'
: {
'min'
:
'0'
,
'max'
:
'0'
},
# Not used; boolean pass/fail
39
'bsel'
: {
'min'
:
'-inf'
,
'max'
:
'inf'
},
40
'tausel'
: {
'min'
:
'-inf'
,
'max'
:
'inf'
},
41
'clrsel'
: {
'min'
:
'-inf'
,
'max'
:
'inf'
},
42
'pileuprm'
: {
'min'
:
'-inf'
,
'max'
:
'inf'
},
43
'momCuts'
: {
'min'
:
'-inf'
,
'max'
:
'inf'
},
44
'timing'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
45
'timeSig'
: {
'min'
:
'0'
,
'max'
:
'inf'
},
46
}
47
48
self.
scale_factor
= {
49
'et'
: 1000.,
50
'pt'
: 1000.,
51
'eta'
: 0.01,
52
'neta'
: 0.01,
53
'ceta'
: 0.01,
54
'peta'
: 0.01,
55
'nphi'
: 0.01,
56
'cphi'
: 0.01,
57
'pphi'
: 0.01,
58
'djmass'
: 1000.,
59
'djdeta'
: 0.01,
60
'djdphi'
: 0.01,
61
'ht'
: 1000.,
62
'dipz_mlpl'
: -0.1,
63
'dipz_njet'
: 1.0,
64
'mult'
: 1,
65
'smc'
: 1000.,
66
'jvt'
: 0.01,
67
'nnJvt'
: 0.,
68
'clrsel'
: 0.01,
69
'pileuprm'
: 0.01,
70
'momCuts'
: 0.01,
71
'timing'
: 1.0,
72
'timeSig'
: 1.0,
73
}
74
75
def
__call__
(self, key, lo='', hi=''):
76
vals = deepcopy(self.
defaults
[key])
77
if
lo: vals[
'min'
] = self.
scale
(key, lo)
78
if
hi: vals[
'max'
] = self.
scale
(key, hi)
79
return
vals
80
81
def
scale
(self, key, val):
82
return
str(float(val) * self.
scale_factor
[key])
83
84
defaults =
ConditionDefaults
()
85
python.ConditionDefaults.ConditionDefaults
Definition
ConditionDefaults.py:12
python.ConditionDefaults.ConditionDefaults.defaults
dict defaults
Definition
ConditionDefaults.py:19
python.ConditionDefaults.ConditionDefaults.scale
scale(self, key, val)
Definition
ConditionDefaults.py:81
python.ConditionDefaults.ConditionDefaults.scale_factor
dict scale_factor
Definition
ConditionDefaults.py:48
python.ConditionDefaults.ConditionDefaults.__init__
__init__(self)
Definition
ConditionDefaults.py:13
python.ConditionDefaults.ConditionDefaults.__call__
__call__(self, key, lo='', hi='')
Definition
ConditionDefaults.py:75
Constants
Generated on
for ATLAS Offline Software by
1.14.0