311 from AthenaCommon.CFElements
import parOR
316 from HLTSeeding.HLTSeedingMonitoring
import CTPUnpackingMonitoring, L1DataConsistencyMonitoring
317 decoderAlg = CompFactory.HLTSeeding(
318 RoIBResult =
"RoIBResult" if flags.Trigger.enableL1CaloLegacy
or not flags.Trigger.enableL1MuonPhase1
else "",
319 L1TriggerResult =
"L1TriggerResult" if flags.Trigger.enableL1MuonPhase1
or flags.Trigger.enableL1CaloPhase1
else "",
320 HLTSeedingSummaryKey =
"HLTSeedingSummary",
321 ctpUnpacker = CompFactory.CTPUnpackingTool( ForceEnableAllChains = flags.Trigger.forceEnableAllChains,
326 if not flags.Trigger.forceEnableAllChains:
327 def checkConsistency(thrName):
328 '''Filter out threshold types for which HLT doesn't read TOBs from L1 readout'''
329 return thrName
not in [
'FSNOSEED',
'TE',
'XE',
'XS']
and not thrName.startswith(
'PROBE')
331 decoderAlg.L1DataConsistencyChecker = CompFactory.L1DataConsistencyChecker(
332 ThresholdToDecisionMap = dict([(k,v)
for k,v
in _mapL1ThresholdToDecisionCollection.items()
if checkConsistency(k)]),
334 ErrorOnMissingTOB = flags.Trigger.L1.errorOnMissingTOB )
337 from AthenaConfiguration.Enums
import Format
338 if flags.Input.Format
is Format.POOL:
339 transTypeKey = (
"TransientBSOutType",
"StoreGateSvc+TransientBSOutKey")
340 decoderAlg.ExtraInputs.add(transTypeKey)
342 decoderAlg.RoIBRoIUnpackers += [
346 if flags.Trigger.L1.doCalo:
347 if flags.Trigger.enableL1CaloPhase1:
349 if flags.Trigger.enableL1CaloLegacy:
352 if flags.Trigger.L1.doMuon:
353 if flags.Trigger.enableL1MuonPhase1:
360 decoderAlg.DoCostMonitoring = flags.Trigger.CostMonitoring.doCostMonitoring
361 decoderAlg.CostMonitoringChain = flags.Trigger.CostMonitoring.chain
362 decoderAlg.RoiZedWidthDefault = flags.Trigger.InDetTracking.RoiZedWidthDefault
364 if flags.Input.Format
is Format.BS
and not flags.Trigger.doLVL1:
366 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import L1TriggerByteStreamDecoderCfg
370 if flags.Trigger.enableL1MuonPhase1
or flags.Trigger.enableL1CaloPhase1:
373 acc.addEventAlgo( decoderAlg, sequenceName = seqName )
375 from TrigConfigSvc.TrigConfigSvcCfg
import TrigConfigSvcCfg, HLTPrescaleCondAlgCfg
380 from TriggerJobOpts.TriggerConfigFlags
import ROBPrefetching
381 if ROBPrefetching.InitialRoI
in flags.Trigger.ROBPrefetchingOptions:
382 allDecisionsSet =
set()
383 for roiUnpacker
in decoderAlg.RoIBRoIUnpackers + decoderAlg.xAODRoIUnpackers:
384 dec =
str(roiUnpacker.Decisions)
386 allDecisionsSet.add(dec)
388 from TrigGenericAlgs.TrigGenericAlgsConfig
import ROBPrefetchingAlgCfg_Si, ROBPrefetchingAlgCfg_Calo, ROBPrefetchingAlgCfg_Muon
389 acc.merge(
ROBPrefetchingAlgCfg_Si(flags,
"initialRoI", RoILinkName=
"initialRoI", ROBPrefetchingInputDecisions=allDecisions), sequenceName=seqName)
390 acc.merge(
ROBPrefetchingAlgCfg_Calo(flags,
"initialRoI", RoILinkName=
"initialRoI", ROBPrefetchingInputDecisions=allDecisions), sequenceName=seqName)
391 acc.merge(
ROBPrefetchingAlgCfg_Muon(flags,
"initialRoI", RoILinkName=
"initialRoI", ROBPrefetchingInputDecisions=allDecisions), sequenceName=seqName)