ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TriggerCommon
TriggerMenuMT
python
HLT
Test
TestChainConfiguration.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaCommon.Logging
import
logging
4
logging.getLogger().info(
"Importing %s"
,__name__)
5
log = logging.getLogger(__name__)
6
7
8
from
..Config.ChainConfigurationBase
import
ChainConfigurationBase
9
10
from
TriggerMenuMT.CFtest.HLTSignatureConfig
import
muMenuSequence, elMenuSequence, gamMenuSequence
11
from
TriggerMenuMT.CFtest.HLTSignatureHypoTools
import
dimuDrComboHypoTool
12
from
TriggerMenuMT.HLT.Config.MenuComponents
import
createEmptyMenuSequenceCfg
13
14
#--------------------------------------------------------
15
# fragments generating config will be functions in new JO
16
#--------------------------------------------------------
17
18
19
# Muons
20
def
muCfg
(flags,step,reconame, hyponame):
21
return
muMenuSequence(flags,step,reconame, hyponame)
22
23
def
muCfg111
(flags):
24
return
muCfg
(flags,step=
"1"
,reconame=
"v1"
, hyponame=
"v1"
)
25
26
def
muCfg211
(flags):
27
return
muCfg
(flags,step=
"2"
,reconame=
"v1"
, hyponame=
"v1"
)
28
29
def
muCfg311
(flags):
30
return
muCfg
(flags,step=
"3"
,reconame=
"v1"
, hyponame=
"v1"
)
31
32
def
muCfg322
(flags):
33
return
muCfg
(flags,step=
"3"
,reconame=
"v2"
, hyponame=
"v2"
)
34
35
def
muCfg411
(flags):
36
return
muCfg
(flags,step=
"4"
,reconame=
"v1"
, hyponame=
"v1"
)
37
38
def
muCfg222
(flags):
39
return
muCfg
(flags,step=
"2"
,reconame=
"v2"
, hyponame=
"v2"
)
40
41
42
# Egamma
43
def
elCfg
(flags,step,reconame, hyponame):
44
return
elMenuSequence(flags,step,reconame, hyponame)
45
46
def
gamCfg
(flags,step,reconame, hyponame):
47
return
gamMenuSequence(flags,step,reconame, hyponame)
48
49
def
elCfg111
(flags):
50
return
elCfg
(flags,step=
"1"
,reconame=
"v1"
, hyponame=
"v1"
)
51
52
def
elCfg211
(flags):
53
return
elCfg
(flags,step=
"2"
,reconame=
"v1"
, hyponame=
"v1"
)
54
55
def
elCfg222
(flags):
56
return
elCfg
(flags,step=
"2"
,reconame=
"v2"
, hyponame=
"v2"
)
57
58
def
elCfg223
(flags):
59
return
elCfg
(flags,step=
"2"
,reconame=
"v2"
, hyponame=
"v3"
)
60
61
def
elCfg311
(flags):
62
return
elCfg
(flags,step=
"3"
,reconame=
"v1"
, hyponame=
"v1"
)
63
64
def
gamCfg111
(flags):
65
return
gamCfg
(flags,step=
"1"
,reconame=
"v1"
, hyponame=
"v1"
)
66
67
68
69
#----------------------------------------------------------------
70
# Class to configure chain
71
#----------------------------------------------------------------
72
class
TestChainConfiguration
(ChainConfigurationBase):
73
74
def
__init__
(self, chainDict):
75
ChainConfigurationBase.__init__(self,chainDict)
76
77
# ----------------------
78
# Assemble the chain depending on information from chainName
79
# ----------------------
80
def
assembleChainImpl
(self, flags):
81
chainSteps = []
82
stepDictionary = self.
getStepDictionary
()
83
key = self.chainPart[
'extra'
]
84
85
log.debug(
'testChain key = %s'
, key)
86
if
key
in
stepDictionary:
87
steps=stepDictionary[key]
88
else
:
89
raise
RuntimeError(
"Chain configuration unknown for electron chain with key: "
+ key )
90
91
for
step
in
steps:
92
chainstep = getattr(self, step)(flags)
93
chainSteps+=[chainstep]
94
95
96
myChain = self.buildChain(chainSteps)
97
return
myChain
98
99
100
101
def
getStepDictionary
(self):
102
# --------------------
103
# define names of the steps and obtain the chainStep configuration
104
# --------------------
105
106
stepDictionary = {
107
#muons
108
'mv1step'
: [
'Step_mu11'
],
109
'mv1'
: [
'Step_mu11'
,
'Step_mu21'
,
'Step_mu31'
,
'Step_mu41'
],
110
'mv2'
: [
'Step_mu11'
,
'Step_mu22'
,
'Step_mu31'
],
111
'mEmpty1'
: [
'Step_empty1'
,
'Step_mu21'
],
# empty step
112
#'mEmpty1': ['Step_empty1', 'Step_mu11'], # try to break 'Step_mu21'],
113
'mEmpty2'
: [
'Step_mu11'
,
'Step_empty2'
,
'Step_mu31'
,
'Step_mu41'
],
# same as mv1 with empty step
114
'mEmpty3'
: [
'Step_mu11'
,
'Step_empty2'
,
'Step_empty3'
,
'Step_mu41'
],
# empty step + emtpy sequence
115
'mv1dr'
: [
'Step_mu11Dr'
,
'Step_mu21'
,
'Step_mu31'
,
'Step_mu41'
],
116
#egamma
117
'ev1'
: [
'Step_em11'
,
'Step_em21'
,
'Step_em31'
],
118
'ev2'
: [
'Step_em11'
,
'Step_em22'
],
119
'ev3'
: [
'Step_em11'
,
'Step_em23'
],
120
'gv1'
: [
'Step_gam11'
],
121
'ev1dr'
: [
'Step_em11Dr'
,
'Step_em21Dr'
,
'Step_em31'
]
122
}
123
return
stepDictionary
124
125
126
127
def
Step_mu11
(self, flags):
128
return
self.getStep(flags,
"mu11"
,[ muCfg111 ])
129
130
def
Step_mu21
(self, flags):
131
return
self.getStep(flags,
"mu21"
,[ muCfg211 ])
132
133
def
Step_mu11Dr
(self, flags):
134
return
self.getStep(flags,
"mu11"
,[ muCfg111 ], comboTools=[dimuDrComboHypoTool])
135
136
def
Step_mu21Dr
(self, flags):
137
return
self.getStep(flags,
"mu21"
,[ muCfg211 ], comboTools=[dimuDrComboHypoTool])
138
139
def
Step_mu22
(self, flags):
140
return
self.getStep(flags,
"mu22"
,[ muCfg222 ])
141
142
def
Step_mu31
(self, flags):
143
return
self.getStep(flags,
"mu31"
,[ muCfg311 ])
144
145
def
Step_mu32
(self, flags):
146
return
self.getStep(flags,
"mu32"
,[ muCfg322 ])
147
148
def
Step_mu41
(self, flags):
149
return
self.getStep(flags,
"mu41"
,[ muCfg411 ])
150
151
def
Step_empty1
(self, flags):
152
return
self.getEmptyStep(
'empty1'
)
153
154
def
Step_empty2
(self, flags):
155
return
self.getEmptyStep(
'empty2'
)
156
157
def
Step_empty3
(self, flags):
158
seqName=
"EmptySequence"
159
emptySeqGen = createEmptyMenuSequenceCfg(flags, name=seqName)
160
return
self.getStep(flags,
'emptySeq'
, [emptySeqGen],name=seqName)
161
162
# Electrons
163
164
def
Step_em11
(self, flags):
165
return
self.getStep(flags,
"em11"
,[ elCfg111 ])
166
167
def
Step_em11Dr
(self, flags):
168
return
self.getStep(flags,
"em11"
,[ elCfg111 ], comboTools=[dimuDrComboHypoTool])
169
170
def
Step_em21
(self, flags):
171
return
self.getStep(flags,
"em21"
,[ elCfg211 ])
172
173
def
Step_em21Dr
(self, flags):
174
return
self.getStep(flags,
"em21"
,[ elCfg211 ], comboTools=[dimuDrComboHypoTool])
175
176
def
Step_em22
(self, flags):
177
return
self.getStep(flags,
"em22"
,[ elCfg222 ])
178
179
def
Step_em23
(self, flags):
180
return
self.getStep(flags,
"em23"
,[ elCfg223 ])
181
182
def
Step_em31
(self, flags):
183
return
self.getStep(flags,
"em31"
,[ elCfg311 ])
184
185
def
Step_gam11
(self, flags):
186
return
self.getStep(flags,
"gam11"
,[ gamCfg111 ])
187
python.HLT.Test.TestChainConfiguration.TestChainConfiguration
Definition
TestChainConfiguration.py:72
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_gam11
Step_gam11(self, flags)
Definition
TestChainConfiguration.py:185
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_mu31
Step_mu31(self, flags)
Definition
TestChainConfiguration.py:142
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_em11Dr
Step_em11Dr(self, flags)
Definition
TestChainConfiguration.py:167
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_mu11
Step_mu11(self, flags)
Muons.
Definition
TestChainConfiguration.py:127
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_em11
Step_em11(self, flags)
Definition
TestChainConfiguration.py:164
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_mu22
Step_mu22(self, flags)
Definition
TestChainConfiguration.py:139
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_mu11Dr
Step_mu11Dr(self, flags)
Definition
TestChainConfiguration.py:133
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_empty2
Step_empty2(self, flags)
Definition
TestChainConfiguration.py:154
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_em23
Step_em23(self, flags)
Definition
TestChainConfiguration.py:179
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_em21Dr
Step_em21Dr(self, flags)
Definition
TestChainConfiguration.py:173
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.getStepDictionary
getStepDictionary(self)
Definition
TestChainConfiguration.py:101
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_em31
Step_em31(self, flags)
Definition
TestChainConfiguration.py:182
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_mu21
Step_mu21(self, flags)
Definition
TestChainConfiguration.py:130
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_mu21Dr
Step_mu21Dr(self, flags)
Definition
TestChainConfiguration.py:136
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.__init__
__init__(self, chainDict)
Definition
TestChainConfiguration.py:74
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_empty1
Step_empty1(self, flags)
Definition
TestChainConfiguration.py:151
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_em22
Step_em22(self, flags)
Definition
TestChainConfiguration.py:176
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_empty3
Step_empty3(self, flags)
Definition
TestChainConfiguration.py:157
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_mu41
Step_mu41(self, flags)
Definition
TestChainConfiguration.py:148
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.assembleChainImpl
assembleChainImpl(self, flags)
Definition
TestChainConfiguration.py:80
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_mu32
Step_mu32(self, flags)
Definition
TestChainConfiguration.py:145
python.HLT.Test.TestChainConfiguration.TestChainConfiguration.Step_em21
Step_em21(self, flags)
Definition
TestChainConfiguration.py:170
python.HLT.Test.TestChainConfiguration.muCfg222
muCfg222(flags)
Definition
TestChainConfiguration.py:38
python.HLT.Test.TestChainConfiguration.muCfg322
muCfg322(flags)
Definition
TestChainConfiguration.py:32
python.HLT.Test.TestChainConfiguration.elCfg111
elCfg111(flags)
Definition
TestChainConfiguration.py:49
python.HLT.Test.TestChainConfiguration.elCfg223
elCfg223(flags)
Definition
TestChainConfiguration.py:58
python.HLT.Test.TestChainConfiguration.elCfg
elCfg(flags, step, reconame, hyponame)
Definition
TestChainConfiguration.py:43
python.HLT.Test.TestChainConfiguration.elCfg211
elCfg211(flags)
Definition
TestChainConfiguration.py:52
python.HLT.Test.TestChainConfiguration.elCfg222
elCfg222(flags)
Definition
TestChainConfiguration.py:55
python.HLT.Test.TestChainConfiguration.elCfg311
elCfg311(flags)
Definition
TestChainConfiguration.py:61
python.HLT.Test.TestChainConfiguration.muCfg411
muCfg411(flags)
Definition
TestChainConfiguration.py:35
python.HLT.Test.TestChainConfiguration.muCfg111
muCfg111(flags)
Definition
TestChainConfiguration.py:23
python.HLT.Test.TestChainConfiguration.gamCfg111
gamCfg111(flags)
Definition
TestChainConfiguration.py:64
python.HLT.Test.TestChainConfiguration.gamCfg
gamCfg(flags, step, reconame, hyponame)
Definition
TestChainConfiguration.py:46
python.HLT.Test.TestChainConfiguration.muCfg
muCfg(flags, step, reconame, hyponame)
Definition
TestChainConfiguration.py:20
python.HLT.Test.TestChainConfiguration.muCfg311
muCfg311(flags)
Definition
TestChainConfiguration.py:29
python.HLT.Test.TestChainConfiguration.muCfg211
muCfg211(flags)
Definition
TestChainConfiguration.py:26
Generated on
for ATLAS Offline Software by
1.17.0