3 from AthenaCommon.Logging
import logging
4 from AthenaConfiguration.ComponentAccumulator
import CompFactory
7 log = logging.getLogger(
'EmuStepProcessingConfig')
12 set Emu menu and reproduce generateMT
14 log.info(
"generateEmuMenu")
15 from TriggerMenuMT.HLT.Menu
import Dev_pp_run3_v1
16 from TriggerMenuMT.HLT.Menu
import Dev_pp_run3_emu_v1
17 from TriggerMenuMT.HLT.Config.GenerateMenuMT
import GenerateMenuMT
20 Dev_pp_run3_v1.setupMenu = Dev_pp_run3_emu_v1.setupMenu
24 chains = menu.generateAllChainConfigs(flags)
31 log.info(
"generateEmuEvents")
34 'noreco': [
';',
';',
';',
';'],
35 'emclusters': [
';',
';',
';',
';'],
36 'msmu': [
';',
';',
';',
';'],
37 'ctp': [
';',
';',
';',
';'],
38 'l1emroi': [
';',
';',
';',
';'],
39 'l1muroi': [
';',
';',
';',
';']
43 data[
'ctp'] [0] =
'HLT_TestChain5_ev1_L1EM3 \
44 HLT_TestChain8_ev1_L1EM3 \
46 data[
'l1emroi'][0] =
';'
47 data[
'emclusters'][0]=
';'
48 data[
'l1muroi'][0] =
';'
53 data[
'ctp'] [1] =
'HLT_TestChain5_ev1_L1EM3 \
54 HLT_TestChain8_ev1_L1EM3 \
55 HLT_TestChain5_gv1_L1EM7 \
56 HLT_TestChain5_ev3_L1EM7 \
57 HLT_2TestChain6_mv1_L12MU5VF \
58 HLT_TestChain10_mv2_L1MU8F \
59 HLT_TestChain6_mv1_TestChain10_mv1_L12MU5VF \
60 HLT_2TestChain4_mv1_dr_L12MU5VF'
61 data[
'l1emroi'][1] =
'1,1,0,EM3,EM7,EM20,EM30,EM100; 2.,-1.2,0,EM3,EM7; 3.,0.2,0,EM3;'
62 data[
'emclusters'][1]=
'eta:1,phi:1,et:180000; eta:1,phi:-1.2,et:6000; eta:0.5,phi:-1.2,et:3000;'
63 data[
'l1muroi'][1] =
'2,0.5,0,MU5VF; 3,0.5,0,MU5VF;'
64 data[
'msmu'][1] =
'eta:-1.2,phi:0.7,pt:1500,pt2:1500; eta:-1.1,phi:0.6,pt:1500,pt2:1500;'
67 data[
'ctp'] [2] =
'HLT_TestChain6_mv1_L1MU5VF \
68 HLT_TestChain8_mv1_L1MU8F \
69 HLT_TestChain10_mv2_L1MU8F \
70 HLT_TestChain8_mv1step_L1MU5VF \
71 HLT_TestChain5_ev1_L1EM3 \
72 HLT_TestChain8_ev1_L1EM3 \
73 HLT_TestChain6_mEmpty2_L1MU5VF \
74 HLT_TestChain6_mv1_TestChain10_ev1_L12eEM10L_MU8F \
75 HLT_TestChain6_mv2_TestChain8_ev2_L12eEM10L_MU8F \
76 HLT_2TestChain6_mv1_L12MU5VF \
77 HLT_2TestChain6_mEmpty1_L12MU5VF \
78 HLT_TestChain6_mv1_TestChain10_mv1_L12MU5VF \
79 HLT_2TestChain4_mv1_dr_L12MU5VF HLT_e5_e8_L12EM3 \
80 HLT_TestChain5_ev1_TestChain8_ev1_2TestChain6_mv1_L12EM8VH_MU8F \
81 HLT_TestChain10_mEmpty1_TestChain6_mEmpty1_L12MU5VF \
82 HLT_TestChain10_mv1_TestChain6_mEmpty1_L1MU5VF \
83 HLT_TestChain5_ev1_TestChain8_ev1_merge_L12EM3 \
84 HLT_TestChain5_ev1_TestChain8_ev1_L12EM3 \
85 HLT_TestChain6_mv1_TestChain5_ev1_dr_L12MU5VF'
86 data[
'l1emroi'][2] =
'2,0.2,0,EM3,EM7,EM15,EM20,EM30,EM100; 1,-1.1,0,EM3,EM7,EM15,EM20,EM30;'
87 data[
'emclusters'][2]=
'eta:0.5,phi:0,et:120000; eta:1,phi:-1.2,et:65000;'
88 data[
'l1muroi'][2] =
'2,0.5,0,MU5VF,MU8VF; 3,0.5,0,MU5VF,MU8F,MU8VF;2.2,0.6,0,MU5VF;'
89 data[
'msmu'][2] =
'eta:-1.2,phi:0.7,pt:6500,pt2:8500; eta:-1.1,phi:0.6,pt:10500,pt2:8500;eta:-1.1,phi:0.6,pt:8500,pt2:8500;'
92 data[
'ctp'] [3] =
'HLT_TestChain20_mv1_L1MU8F \
93 HLT_TestChain10_mv1_L1MU8F \
94 HLT_TestChain8_mv1_L1MU8F \
95 HLT_TestChain8_mv1step_L1MU5VF \
96 HLT_TestChain8_ev1_L1EM3 \
97 HLT_TestChain6_mv1_TestChain10_ev1_L12eEM10L_MU8F\
98 HLT_TestChain6_mv2_TestChain8_ev2_L12eEM10L_MU8F'
99 data[
'l1emroi'][3] =
'1,1.5,0,EM3,EM7;'
100 data[
'emclusters'][3]=
'eta:-0.6,phi:1.7,et:9000;'
101 data[
'l1muroi'][3] =
'2,-0.1,0,MU5VF,MU8F,MU8VF;'
102 data[
'msmu'][3] =
'eta:-1.7,phi:-0.2,pt:29500,pt2:8500;'
106 data[
'tracks'] = [
'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;',
107 'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;',
108 'eta:0.5,phi:0,pt:130000; eta:1,phi:-1.2,pt:60000;eta:-1.2,phi:0.7,pt:6700; eta:-1.1,phi:0.6,pt:8600;',
109 'eta:-0.6,phi:1.7,et:9000;']
111 data[
'mucomb'] = [
';',
113 'eta:-1.2,phi:0.7,pt:6600; eta:-1.1,phi:0.6,pt:8600;',
116 data[
'electrons'] = [
';',
117 'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;',
120 data[
'photons'] = [
';',
121 'eta:1,phi:1,pt:130000;',
125 from TriggerMenuMT.CFtest.TestUtils
import writeEmulationFiles
132 generates chains without menu, directly adding Chain configuration to HLTConfig
133 maskbits used to enable signature-lke group of chains
135 log.info(
"generateChainsManually mask=0x%d",maskbit)
136 from TriggerMenuMT.CFtest.TestUtils
import makeChain, makeChainStep
137 from TriggerMenuMT.HLT.Config.MenuComponents
import EmptyMenuSequence
138 doMuon = maskbit & 0x1
139 doElectron = maskbit>>1 & 0x1
140 doCombo = maskbit>>2 & 0x1
146 from TriggerMenuMT.CFtest.HLTSignatureConfig
import muMenuSequence
148 mu11 = functools.partial(muMenuSequence, flags,step=
"1",reconame=
"v1", hyponame=
"v1")
149 mu12 = functools.partial(muMenuSequence,flags,step=
"1",reconame=
"v2", hyponame=
"v2")
152 mu21 = functools.partial(muMenuSequence,flags,step=
"2",reconame=
"v1", hyponame=
"v1")
153 mu22 = functools.partial(muMenuSequence,flags,step=
"2",reconame=
"v2", hyponame=
"v2")
155 mu31 = functools.partial(muMenuSequence,flags,step=
"3",reconame=
"v1", hyponame=
"v1")
156 mu32 = functools.partial(muMenuSequence,flags,step=
"3",reconame=
"v2", hyponame=
"v2")
158 mu41 = functools.partial(muMenuSequence,flags,step=
"4",reconame=
"v1", hyponame=
"v1")
160 step_mu11 = makeChainStep(
"Step1_mu11", [mu11] )
161 step_mu21 = makeChainStep(
"Step2_mu21", [mu21] )
162 step_mu22 = makeChainStep(
"Step2_mu22", [mu22] )
163 step_mu31 = makeChainStep(
"Step3_mu31", [mu31] )
164 step_mu32 = makeChainStep(
"Step3_mu32", [mu32] )
165 step_mu41 = makeChainStep(
"Step4_mu41", [mu41] )
167 step_empy= makeChainStep(
"Step2_mu1empty", multiplicity=[])
170 makeChain(flags, name=
'HLT_TestChain8_mv1step_L1MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[step_mu11]),
171 makeChain(flags, name=
'HLT_TestChain8_mv1_L1MU8F', L1Thresholds=[
"MU8F"], ChainSteps=[step_mu11 , step_mu21 , step_mu31, step_mu41] ),
172 makeChain(flags, name=
'HLT_TestChain20_mv1_L1MU8F', L1Thresholds=[
"MU8F"], ChainSteps=[step_mu11 , step_mu21 , step_mu31, step_mu41] ),
173 makeChain(flags, name=
'HLT_TestChain10_mv2_L1MU8F', L1Thresholds=[
"MU8F"], ChainSteps=[step_mu11 , step_mu22 , step_mu31] ),
174 makeChain(flags, name=
'HLT_TestChain6_mEmpty2_L1MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[step_mu11 , step_empy , step_mu32, step_mu41] )
178 HLTChains += MuChains
183 from TriggerMenuMT.CFtest.HLTSignatureConfig
import elMenuSequence, gamMenuSequence
184 el11 = functools.partial(elMenuSequence,flags,step=
"1",reconame=
"v1", hyponame=
"v1")
185 el21 = functools.partial(elMenuSequence,flags,step=
"2",reconame=
"v1", hyponame=
"v1")
186 el22 = functools.partial(elMenuSequence,flags,step=
"2",reconame=
"v2", hyponame=
"v2")
187 el23 = functools.partial(elMenuSequence,flags,step=
"2",reconame=
"v2", hyponame=
"v3")
188 el31 = functools.partial(elMenuSequence,flags,step=
"3",reconame=
"v1", hyponame=
"v1")
189 el41 = functools.partial(elMenuSequence,flags,step=
"4",reconame=
"v1", hyponame=
"v1")
192 gamm11 = functools.partial(gamMenuSequence,flags,
"1", reconame=
"v1", hyponame=
"v1")
195 makeChain(flags, name=
'HLT_TestChain5_ev1_L1EM3', L1Thresholds=[
"EM3"], ChainSteps=[ makeChainStep(
"Step1_em11", [el11]), makeChainStep(
"Step2_em21", [el21]), makeChainStep(
"Step3_em31", [el31])] ),
196 makeChain(flags, name=
'HLT_TestChain8_ev1_L1EM3', L1Thresholds=[
"EM3"], ChainSteps=[ makeChainStep(
"Step1_em11", [el11]), makeChainStep(
"Step2_em21", [el21]), makeChainStep(
"Step3_em31", [el31]) ] ),
197 makeChain(flags, name=
'HLT_TestChain5_ev2_L1EM7', L1Thresholds=[
"EM7"], ChainSteps=[ makeChainStep(
"Step1_em11", [el11]), makeChainStep(
"Step2_em22", [el22]) ] ),
198 makeChain(flags, name=
'HLT_TestChain5_ev3_L1EM7', L1Thresholds=[
"EM7"], ChainSteps=[ makeChainStep(
"Step1_em11", [el11]), makeChainStep(
"Step2_em23", [el23]) ] ),
199 makeChain(flags, name=
'HLT_TestChain5_gv1_L1EM7', L1Thresholds=[
"EM7"], ChainSteps=[ makeChainStep(
"Step1_gam11", [gamm11]) ] )
202 HLTChains += ElChains
208 emptySeq1 = functools.partial(EmptyMenuSequence,
"step1EmptySeqence")
209 emptySeq2 = functools.partial(EmptyMenuSequence,
"step2EmptySeqence")
212 from TriggerMenuMT.CFtest.HLTSignatureConfig
import elMenuSequence
213 el11 = functools.partial(elMenuSequence,flags,step=
"1",reconame=
"v1", hyponame=
"v1")
214 el21 = functools.partial(elMenuSequence,flags,step=
"2",reconame=
"v1", hyponame=
"v1")
215 el41 = functools.partial(elMenuSequence,flags,step=
"4",reconame=
"v1", hyponame=
"v1")
218 from TriggerMenuMT.CFtest.HLTSignatureConfig
import muMenuSequence
220 mu11 = functools.partial(muMenuSequence,flags,step=
"1",reconame=
"v1", hyponame=
"v1")
221 mu12 = functools.partial(muMenuSequence,flags,step=
"1",reconame=
"v2", hyponame=
"v2")
223 mu21 = functools.partial(muMenuSequence,flags,step=
"2",reconame=
"v1", hyponame=
"v1")
224 mu22 = functools.partial(muMenuSequence,flags,step=
"2",reconame=
"v2", hyponame=
"v2")
226 mu31 = functools.partial(muMenuSequence,flags,step=
"3",reconame=
"v1", hyponame=
"v1")
227 mu32 = functools.partial(muMenuSequence,flags,step=
"3",reconame=
"v2", hyponame=
"v2")
229 mu41 = functools.partial(muMenuSequence,flags,step=
"4",reconame=
"v1", hyponame=
"v1")
232 from TriggerMenuMT.CFtest.HLTSignatureHypoTools
import dimuDrComboHypoTool
241 makeChain(flags, name=
'HLT_TestChain6_mv1_TestChain10_ev1_L12eEM10L_MU8F', L1Thresholds=[
"MU5VF",
"EM3"], ChainSteps=[
242 makeChainStep(
"Step1_mu_em_serial", [mu11, emptySeq1], multiplicity=[1,1]),
243 makeChainStep(
"Step2_mu_em_serial", [emptySeq2, el21], multiplicity=[1,1]),
244 makeChainStep(
"Step3_mu_em_serial", multiplicity=[]),
245 makeChainStep(
"Step4_mu_em_serial", [mu41, el41], multiplicity=[1,1])] ),
247 makeChain(flags, name=
'HLT_TestChain6_mv2_TestChain8_ev2_L12eEM10L_MU8F', L1Thresholds=[
"MU5VF",
"EM3"], ChainSteps=[
248 makeChainStep(
"Step1_mu2_em", [mu12, el11], multiplicity=[1,1]),
249 makeChainStep(
"Step2_mu_em", [mu21, el21], multiplicity=[1,1])] ),
251 makeChain(flags, name=
'HLT_TestChain5_ev1_TestChain8_ev1_L12EM3', L1Thresholds=[
"EM3",
"EM3"], ChainSteps=[
252 makeChainStep(
"Step1_2emAs", [el11, el11], multiplicity=[1,1]),
253 makeChainStep(
"Step2_2emAs", [el21, el21], multiplicity=[1,1]) ]),
255 makeChain(flags, name=
'HLT_TestChain5_ev1_TestChain8_ev1_2TestChain6_mv1_L12EM8VH_MU8F', L1Thresholds=[
"EM8VH",
"EM8VH",
"MU8F"], ChainSteps=[
256 makeChainStep(
"Step1_2em_2mu", [el11,el11,mu11], multiplicity=[1,1,2]),
257 makeChainStep(
"Step2_2em_2mu", [el21,el21,mu21], multiplicity=[1,1,2]) ]),
259 makeChain(flags, name=
'HLT_2TestChain6_mv1_L12MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[
260 makeChainStep(
"Step1_2mu", [mu11], multiplicity=[2]),
261 makeChainStep(
"Step2_2mu", [mu21], multiplicity=[2]) ]),
263 makeChain(flags, name=
'HLT_3TestChain6_mv1_L12MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[
264 makeChainStep(
"Step1_2mu", [mu11], multiplicity=[3]),
265 makeChainStep(
"Step2_2mu", [mu21], multiplicity=[3]) ]),
267 makeChain(flags, name=
'HLT_TestChain6_mv1_TestChain10_mv1_L12MU5VF', L1Thresholds=[
"MU5VF",
"MU5VF"], ChainSteps=[
268 makeChainStep(
"Step1_2muAs", [mu11,mu11], multiplicity=[1,1]),
269 makeChainStep(
"Step2_2muAs", [mu21,mu21], multiplicity=[1,1]) ]),
271 makeChain(flags, name=
'HLT_2TestChain6_mEmpty1_L12MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[
272 makeChainStep(
"Step1_2mu_empty", multiplicity=[]),
273 makeChainStep(
"Step2_2mu", [mu21], multiplicity=[2]) ]),
275 makeChain(flags, name=
'HLT_TestChain6_mv1_TestChain5_ev1dr_L12MU5VF', L1Thresholds=[
"MU5VF",
"EM3"], ChainSteps=[
276 makeChainStep(
"Step1_mu_em", [mu11, el11], multiplicity=[1,1], comboToolConfs=[dimuDrComboHypoTool]),
277 makeChainStep(
"Step2_mu_em", [mu21, el21], multiplicity=[1,1], comboToolConfs=[dimuDrComboHypoTool])] ),
280 makeChain(flags, name=
'HLT_2TestChain4_mv1dr_L12MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[
281 makeChainStep(
"Step1_2mu", [mu11], multiplicity=[2], comboToolConfs=[dimuDrComboHypoTool]),
282 makeChainStep(
"Step2_2mu22", [mu22], multiplicity=[2]) ] ),
286 makeChain(flags, name=
'HLT_TestChain10_mEmpty1_TestChain6_mEmpty1_L12MU5VF', L1Thresholds=[
"MU5VF",
"MU5VF"], ChainSteps=[
287 makeChainStep(
"Step1_2muAs_empty", multiplicity=[]),
288 makeChainStep(
"Step2_2muAs", [mu21, mu21], multiplicity=[1,1]) ])
293 HLTChains += CombChains
302 copy of HLTSeeding/python/HLTSeedingConfig.py to allow seeding with emulated data with CA
305 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
308 decoderAlg = CompFactory.HLTSeeding()
309 decoderAlg.RoIBResult =
"RoIBResult"
310 decoderAlg.L1TriggerResult =
""
311 decoderAlg.HLTSeedingSummaryKey =
"HLTSeedingSummary"
313 decoderAlg.ctpUnpacker = CompFactory.CTPUnpackingEmulationTool( ForceEnableAllChains=
False , InputFilename=
"ctp.dat" )
315 from TrigEDMConfig.TriggerEDM
import recordable
316 from HLTSeeding.HLTSeedingConfig
import mapThresholdToL1RoICollection, mapThresholdToL1DecisionCollection, createKeyWriterTool
317 decoderAlg.RoIBRoIUnpackers += [
323 decoderAlg.prescaler = CompFactory.PrescalingEmulationTool()
325 decoderAlg.DoCostMonitoring =
False
330 decoderAlg.RoIBRoIUnpackers = [emUnpacker, muUnpacker]
332 acc.addEventAlgo( decoderAlg, sequenceName = seqName )
334 from TrigConfigSvc.TrigConfigSvcCfg
import TrigConfigSvcCfg, HLTPrescaleCondAlgCfg