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_TestChain6_mEmpty3_TestChain10_mv1_L12MU5VF \
61 HLT_2TestChain4_mv1_dr_L12MU5VF'
62 data[
'l1emroi'][1] =
'1,1,0,EM3,EM7,EM20,EM30,EM100; 2.,-1.2,0,EM3,EM7; 3.,0.2,0,EM3;'
63 data[
'emclusters'][1]=
'eta:1,phi:1,et:180000; eta:2,phi:-1.2,et:6000; eta:3.,phi:0.2,et:3000;'
64 data[
'l1muroi'][1] =
'2,0.5,0,MU5VF; 3,0.5,0,MU5VF;'
65 data[
'msmu'][1] =
'eta:2,phi:0.5,pt:1500,pt2:1500; eta:3,phi:0.5,pt:1500,pt2:1500;'
68 data[
'ctp'] [2] =
'HLT_TestChain6_mv1_L1MU5VF \
69 HLT_TestChain8_mv1_L1MU8F \
70 HLT_TestChain10_mv2_L1MU8F \
71 HLT_TestChain8_mv1step_L1MU8F \
72 HLT_TestChain5_ev1_L1EM3 \
73 HLT_TestChain8_ev1_L1EM3 \
74 HLT_TestChain8_mEmpty2_L1MU8F \
75 HLT_TestChain8_mEmpty3_L1MU8F \
76 HLT_TestChain6_mEmpty3_TestChain10_mv1_L12MU5VF \
77 HLT_TestChain6_mv1_TestChain10_ev1_L12eEM10L_MU8F \
78 HLT_TestChain6_mv2_TestChain8_ev2_L12eEM10L_MU8F \
79 HLT_2TestChain6_mv1_L12MU5VF \
80 HLT_2TestChain6_mEmpty1_L12MU5VF \
81 HLT_TestChain6_mv1_TestChain10_mv1_L12MU5VF \
82 HLT_2TestChain4_mv1_dr_L12MU5VF HLT_e5_e8_L12EM3 \
83 HLT_TestChain5_ev1_TestChain8_ev1_2TestChain6_mv1_L12EM8VH_MU8F \
84 HLT_TestChain10_mEmpty1_TestChain6_mEmpty1_L12MU5VF \
85 HLT_TestChain10_mv1_TestChain6_mEmpty1_L1MU5VF \
86 HLT_TestChain5_ev1_TestChain8_ev1_merge_L12EM3 \
87 HLT_TestChain5_ev1_TestChain8_ev1_L12EM3 \
88 HLT_TestChain6_mv1_TestChain5_ev1_dr_L12MU5VF'
89 data[
'l1emroi'][2] =
'0.5,0.1,0,EM3,EM7,EM15,EM20,EM30,EM100; 1,-1.2,0,EM3,EM7,EM15,EM20,EM30;'
90 data[
'emclusters'][2]=
'eta:0.5,phi:0.1,et:120000; eta:1,phi:-1.2,et:65000;'
91 data[
'l1muroi'][2] =
'-1.2,0.7,0,MU5VF,MU8VF; -1.1,0.6,0,MU5VF,MU8F,MU8VF;1.1,0.6,0,MU5VF;'
92 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;'
95 data[
'ctp'] [3] =
'HLT_TestChain20_mv1_L1MU8F \
96 HLT_TestChain10_mv1_L1MU8F \
97 HLT_TestChain8_mv1_L1MU8F \
98 HLT_TestChain8_mEmpty3_L1MU8F \
99 HLT_TestChain8_mEmpty2_L1MU8F \
100 HLT_TestChain6_mEmpty3_TestChain8_mv1_L12MU5VF \
101 HLT_TestChain8_mv1step_L1MU8F \
102 HLT_TestChain8_ev1_L1EM3 \
103 HLT_TestChain6_mv1_TestChain10_ev1_L12eEM10L_MU8F\
104 HLT_TestChain6_mv2_TestChain8_ev2_L12eEM10L_MU8F'
105 data[
'l1emroi'][3] =
'-0.6,1.7,0,EM3,EM7;'
106 data[
'emclusters'][3]=
'eta:-0.6,phi:1.7,et:9000;'
107 data[
'l1muroi'][3] =
'-1.7,-0.2,0,MU5VF,MU8F,MU8VF;'
108 data[
'msmu'][3] =
'eta:-1.7,phi:-0.2,pt:29500,pt2:8500;'
112 data[
'tracks'] = [
'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;',
113 'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;',
114 '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;',
115 'eta:-0.6,phi:1.7,et:9000;']
117 data[
'mucomb'] = [
';',
119 'eta:-1.2,phi:0.7,pt:6600; eta:-1.1,phi:0.6,pt:8600;',
122 data[
'electrons'] = [
';',
123 'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;',
126 data[
'photons'] = [
';',
127 'eta:1,phi:1,pt:130000;',
131 from TriggerMenuMT.CFtest.TestUtils
import writeEmulationFiles
138 generates chains without menu, directly adding Chain configuration to HLTConfig
139 maskbits used to enable signature-lke group of chains
141 log.info(
"generateChainsManually mask=0x%d",maskbit)
142 from TriggerMenuMT.CFtest.TestUtils
import makeChain, makeChainStep
143 from TriggerMenuMT.HLT.Config.MenuComponents
import EmptyMenuSequence
144 doMuon = maskbit & 0x1
145 doElectron = maskbit>>1 & 0x1
146 doCombo = maskbit>>2 & 0x1
152 from TriggerMenuMT.CFtest.HLTSignatureConfig
import muMenuSequence
154 mu11 = functools.partial(muMenuSequence, flags,step=
"1",reconame=
"v1", hyponame=
"v1")
155 mu12 = functools.partial(muMenuSequence,flags,step=
"1",reconame=
"v2", hyponame=
"v2")
158 mu21 = functools.partial(muMenuSequence,flags,step=
"2",reconame=
"v1", hyponame=
"v1")
159 mu22 = functools.partial(muMenuSequence,flags,step=
"2",reconame=
"v2", hyponame=
"v2")
161 mu31 = functools.partial(muMenuSequence,flags,step=
"3",reconame=
"v1", hyponame=
"v1")
162 mu32 = functools.partial(muMenuSequence,flags,step=
"3",reconame=
"v2", hyponame=
"v2")
164 mu41 = functools.partial(muMenuSequence,flags,step=
"4",reconame=
"v1", hyponame=
"v1")
166 step_mu11 = makeChainStep(
"Step1_mu11", [mu11] )
167 step_mu21 = makeChainStep(
"Step2_mu21", [mu21] )
168 step_mu22 = makeChainStep(
"Step2_mu22", [mu22] )
169 step_mu31 = makeChainStep(
"Step3_mu31", [mu31] )
170 step_mu32 = makeChainStep(
"Step3_mu32", [mu32] )
171 step_mu41 = makeChainStep(
"Step4_mu41", [mu41] )
173 step_empy= makeChainStep(
"Step2_mu1empty", isEmpty=
True)
176 makeChain(flags, name=
'HLT_TestChain8_mv1step_L1MU8F', L1Thresholds=[
"MU5VF"], ChainSteps=[step_mu11]),
177 makeChain(flags, name=
'HLT_TestChain8_mv1_L1MU8F', L1Thresholds=[
"MU8F"], ChainSteps=[step_mu11 , step_mu21 , step_mu31, step_mu41] ),
178 makeChain(flags, name=
'HLT_TestChain20_mv1_L1MU8F', L1Thresholds=[
"MU8F"], ChainSteps=[step_mu11 , step_mu21 , step_mu31, step_mu41] ),
179 makeChain(flags, name=
'HLT_TestChain10_mv2_L1MU8F', L1Thresholds=[
"MU8F"], ChainSteps=[step_mu11 , step_mu22 , step_mu31] ),
180 makeChain(flags, name=
'HLT_TestChain8_mEmpty2_L1MU8F', L1Thresholds=[
"MU5VF"], ChainSteps=[step_mu11 , step_empy , step_mu32, step_mu41] )
184 HLTChains += MuChains
189 from TriggerMenuMT.CFtest.HLTSignatureConfig
import elMenuSequence, gamMenuSequence
190 el11 = functools.partial(elMenuSequence,flags,step=
"1",reconame=
"v1", hyponame=
"v1")
191 el21 = functools.partial(elMenuSequence,flags,step=
"2",reconame=
"v1", hyponame=
"v1")
192 el22 = functools.partial(elMenuSequence,flags,step=
"2",reconame=
"v2", hyponame=
"v2")
193 el23 = functools.partial(elMenuSequence,flags,step=
"2",reconame=
"v2", hyponame=
"v3")
194 el31 = functools.partial(elMenuSequence,flags,step=
"3",reconame=
"v1", hyponame=
"v1")
195 el41 = functools.partial(elMenuSequence,flags,step=
"4",reconame=
"v1", hyponame=
"v1")
198 gamm11 = functools.partial(gamMenuSequence,flags,
"1", reconame=
"v1", hyponame=
"v1")
201 makeChain(flags, name=
'HLT_TestChain5_ev1_L1EM3', L1Thresholds=[
"EM3"], ChainSteps=[ makeChainStep(
"Step1_em11", [el11]), makeChainStep(
"Step2_em21", [el21]), makeChainStep(
"Step3_em31", [el31])] ),
202 makeChain(flags, name=
'HLT_TestChain8_ev1_L1EM3', L1Thresholds=[
"EM3"], ChainSteps=[ makeChainStep(
"Step1_em11", [el11]), makeChainStep(
"Step2_em21", [el21]), makeChainStep(
"Step3_em31", [el31]) ] ),
203 makeChain(flags, name=
'HLT_TestChain5_ev2_L1EM7', L1Thresholds=[
"EM7"], ChainSteps=[ makeChainStep(
"Step1_em11", [el11]), makeChainStep(
"Step2_em22", [el22]) ] ),
204 makeChain(flags, name=
'HLT_TestChain5_ev3_L1EM7', L1Thresholds=[
"EM7"], ChainSteps=[ makeChainStep(
"Step1_em11", [el11]), makeChainStep(
"Step2_em23", [el23]) ] ),
205 makeChain(flags, name=
'HLT_TestChain5_gv1_L1EM7', L1Thresholds=[
"EM7"], ChainSteps=[ makeChainStep(
"Step1_gam11", [gamm11]) ] )
208 HLTChains += ElChains
214 emptySeq1 = functools.partial(EmptyMenuSequence,
"step1EmptySeqence")
215 emptySeq2 = functools.partial(EmptyMenuSequence,
"step2EmptySeqence")
218 from TriggerMenuMT.CFtest.HLTSignatureConfig
import elMenuSequence
219 el11 = functools.partial(elMenuSequence,flags,step=
"1",reconame=
"v1", hyponame=
"v1")
220 el21 = functools.partial(elMenuSequence,flags,step=
"2",reconame=
"v1", hyponame=
"v1")
221 el41 = functools.partial(elMenuSequence,flags,step=
"4",reconame=
"v1", hyponame=
"v1")
224 from TriggerMenuMT.CFtest.HLTSignatureConfig
import muMenuSequence
226 mu11 = functools.partial(muMenuSequence,flags,step=
"1",reconame=
"v1", hyponame=
"v1")
227 mu12 = functools.partial(muMenuSequence,flags,step=
"1",reconame=
"v2", hyponame=
"v2")
229 mu21 = functools.partial(muMenuSequence,flags,step=
"2",reconame=
"v1", hyponame=
"v1")
230 mu22 = functools.partial(muMenuSequence,flags,step=
"2",reconame=
"v2", hyponame=
"v2")
232 mu31 = functools.partial(muMenuSequence,flags,step=
"3",reconame=
"v1", hyponame=
"v1")
233 mu32 = functools.partial(muMenuSequence,flags,step=
"3",reconame=
"v2", hyponame=
"v2")
235 mu41 = functools.partial(muMenuSequence,flags,step=
"4",reconame=
"v1", hyponame=
"v1")
238 from TriggerMenuMT.CFtest.HLTSignatureHypoTools
import dimuDrComboHypoTool
243 makeChain(flags, name=
'HLT_TestChain6_mv1_TestChain10_ev1_L12eEM10L_MU8F', L1Thresholds=[
"MU5VF",
"EM3"], ChainSteps=[
244 makeChainStep(
"Step1_mu_em_serial", [mu11, emptySeq1]),
245 makeChainStep(
"Step2_mu_em_serial", [emptySeq2, el21]),
246 makeChainStep(
"Step3_mu_em_serial", isEmpty=
True),
247 makeChainStep(
"Step4_mu_em_serial", [mu41, el41])] ),
249 makeChain(flags, name=
'HLT_TestChain6_mv2_TestChain8_ev2_L12eEM10L_MU8F', L1Thresholds=[
"MU5VF",
"EM3"], ChainSteps=[
250 makeChainStep(
"Step1_mu2_em", [mu12, el11]),
251 makeChainStep(
"Step2_mu_em", [mu21, el21])] ),
253 makeChain(flags, name=
'HLT_TestChain5_ev1_TestChain8_ev1_L12EM3', L1Thresholds=[
"EM3",
"EM3"], ChainSteps=[
254 makeChainStep(
"Step1_2emAs", [el11, el11]),
255 makeChainStep(
"Step2_2emAs", [el21, el21]) ]),
257 makeChain(flags, name=
'HLT_TestChain5_ev1_TestChain8_ev1_2TestChain6_mv1_L12EM8VH_MU8F', L1Thresholds=[
"EM8VH",
"EM8VH",
"MU8F"], ChainSteps=[
258 makeChainStep(
"Step1_2em_2mu", [el11,el11,mu11]),
259 makeChainStep(
"Step2_2em_2mu", [el21,el21,mu21]) ]),
261 makeChain(flags, name=
'HLT_2TestChain6_mv1_L12MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[
262 makeChainStep(
"Step1_2mu", [mu11]),
263 makeChainStep(
"Step2_2mu", [mu21]) ]),
265 makeChain(flags, name=
'HLT_3TestChain6_mv1_L12MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[
266 makeChainStep(
"Step1_2mu", [mu11]),
267 makeChainStep(
"Step2_2mu", [mu21]) ]),
269 makeChain(flags, name=
'HLT_TestChain6_mv1_TestChain10_mv1_L12MU5VF', L1Thresholds=[
"MU5VF",
"MU5VF"], ChainSteps=[
270 makeChainStep(
"Step1_2muAs", [mu11,mu11]),
271 makeChainStep(
"Step2_2muAs", [mu21,mu21]) ]),
273 makeChain(flags, name=
'HLT_2TestChain6_mEmpty1_L12MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[
274 makeChainStep(
"Step1_2mu_empty", isEmpty=
True),
275 makeChainStep(
"Step2_2mu", [mu21]) ]),
277 makeChain(flags, name=
'HLT_TestChain6_mv1_TestChain5_ev1dr_L12MU5VF', L1Thresholds=[
"MU5VF",
"EM3"], ChainSteps=[
278 makeChainStep(
"Step1_mu_em", [mu11, el11], comboToolConfs=[dimuDrComboHypoTool]),
279 makeChainStep(
"Step2_mu_em", [mu21, el21], comboToolConfs=[dimuDrComboHypoTool])] ),
282 makeChain(flags, name=
'HLT_2TestChain4_mv1dr_L12MU5VF', L1Thresholds=[
"MU5VF"], ChainSteps=[
283 makeChainStep(
"Step1_2mu", [mu11], comboToolConfs=[dimuDrComboHypoTool]),
284 makeChainStep(
"Step2_2mu22", [mu22]) ] ),
288 makeChain(flags, name=
'HLT_TestChain10_mEmpty1_TestChain6_mEmpty1_L12MU5VF', L1Thresholds=[
"MU5VF",
"MU5VF"], ChainSteps=[
289 makeChainStep(
"Step1_2muAs_empty", isEmpty=
True),
290 makeChainStep(
"Step2_2muAs", [mu21, mu21]) ])
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