173 Configures an algorithm(s) that should be run after the selection process
174 Returns: ca, algorithm
176 acc = ComponentAccumulator()
177 from TrigOutputHandling.TrigOutputHandlingConfig
import DecisionSummaryMakerAlgCfg
178 decisionSummaryAlg = DecisionSummaryMakerAlgCfg(flags)
179 chainToLastCollection = {}
183 for stepName, stepHypos
in sorted( hypos.items(), key=
lambda x :
__stepNumber(x[0]) ):
190 orderedStepHypos = sorted(stepHypos, key=
lambda hypo:
not __isCombo(hypo))
192 chainToCollectionInStep = {}
193 for hypo
in orderedStepHypos:
195 for chain
in hypoChains:
196 if chain
not in chainToCollectionInStep:
197 chainToCollectionInStep[chain] = hypoOutputKeys
198 chainToLastCollection.update( chainToCollectionInStep )
200 from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig
import HLTMenuConfig
201 from HLTSeeding.HLTSeedingConfig
import mapThresholdToL1DecisionCollection
202 if len(HLTMenuConfig.dicts()) == 0:
203 __log.warning(
"No HLT menu, chains w/o algorithms are not handled")
205 for chainName, chainDict
in HLTMenuConfig.dicts().items():
206 if chainName
not in chainToLastCollection:
207 __log.debug(
"The chain %s is not mentioned in any step", chainName)
209 assert len(chainDict[
'chainParts']) == 1,
"Chains w/o the steps can not have multiple parts in chainDict, it makes no sense: %s"%chainName
210 chainToLastCollection[chainName] = [ mapThresholdToL1DecisionCollection( chainDict[
'chainParts'][0][
'L1threshold'] ) ]
212 for c, cont
in chainToLastCollection.items():
213 __log.debug(
"Final decision of chain %s will be read from %d %s", c, len(cont), str(cont))
215 collectionsWithFinalDecisions = []
216 for chain, collections
in chainToLastCollection.items():
217 for c
in collections:
218 if c
not in collectionsWithFinalDecisions:
219 collectionsWithFinalDecisions.append(c)
220 __log.debug(
"Final keys %s", collectionsWithFinalDecisions)
221 decisionSummaryAlg.FinalDecisionKeys = collectionsWithFinalDecisions
222 decisionSummaryAlg.FinalStepDecisions = dict(chainToLastCollection)
223 decisionSummaryAlg.DecisionsSummaryKey =
"HLTNav_Summary"
224 decisionSummaryAlg.SetFilterStatus = flags.Trigger.writeBS
225 return acc, decisionSummaryAlg
230 Configures components needed for monitoring chains
232 acc = ComponentAccumulator()
233 TrigSignatureMoni, DecisionCollectorTool=CompFactory.getComps(
"TrigSignatureMoni",
"DecisionCollectorTool",)
235 mon.CountLegFeatures = flags.Trigger.doPerLegFeatureCounts
236 mon.L1Decisions =
"HLTSeedingSummary"
237 mon.FinalDecisionKey =
"HLTNav_Summary"
239 __log.warning(
"Menu is not configured")
245 for stepName, stepHypos
in sorted( hypos.items(), key=
lambda x :
__stepNumber(x[0])):
246 assert __stepNumber(stepName) == stepCounter,
"There are steps that have no hypos, decisions counting is not going to work"
248 stepDecisionKeys = []
249 stepFeatureDecisionKeys = []
250 stepLegFeatureDecisionKeys = []
251 for hypo
in stepHypos:
254 stepDecisionKeys.extend( hypoOutputKeys )
255 stepFeatureDecisionKeys.extend( hypoOutputKeys )
258 dcEventTool =
DecisionCollectorTool(
"EventDecisionCollector" + stepName, Decisions=list(dict.fromkeys(stepDecisionKeys)))
259 dcFeatureTool =
DecisionCollectorTool(
"FeatureDecisionCollector" + stepName, Decisions=list(dict.fromkeys(stepFeatureDecisionKeys)))
260 if flags.Trigger.doPerLegFeatureCounts:
261 dcFeatureTool.Decisions = list(dcFeatureTool.Decisions) + list(dict.fromkeys(stepLegFeatureDecisionKeys))
262 __log.debug(
"The step monitoring decisions in %s %s", dcEventTool.getName(), dcEventTool.Decisions)
263 __log.debug(
"The step monitoring decisions in %s %s", dcFeatureTool.getName(), dcFeatureTool.Decisions)
264 mon.DecisionCollectorTools += [ dcEventTool ]
265 mon.FeatureCollectorTools += [ dcFeatureTool ]
268 if flags.Trigger.Online.isPartition:
269 from TrigServices.TrigServicesConfig
import TrigServicesCfg
270 onlineServicesAcc = TrigServicesCfg(flags)
271 hltEventLoopMgr = onlineServicesAcc.getPrimary()
273 hltEventLoopMgr.TrigErrorMonTool.AlgToChainTool = CompFactory.TrigCompositeUtils.AlgToChainTool()
274 hltEventLoopMgr.TrigErrorMonTool.MonTool.defineHistogram(
275 'ErrorChainName,ErrorCode', path=
'EXPERT', type=
'TH2I',
276 title=
'Error StatusCodes per chain;Chain name;StatusCode',
277 xbins=1, xmin=0, xmax=1, ybins=1, ymin=0, ymax=1)
279 acc.merge(onlineServicesAcc)
281 mon.L1Decisions = hltSeeding.HLTSeedingSummaryKey
283 if flags.Trigger.doValidationMonitoring:
284 from DecisionHandling.DecisionHandlingConfig
import setupFilterMonitoring
285 for algs
in filters.values():
287 setupFilterMonitoring( flags, alg )
347 Returns CA with algorithms and/or tools required to do the serialisation
349 decObj - list of all navigation objects
350 decObjHypoOut - list of decisions produced by hypos
351 hypos - the {stepName: hypoList} dictionary with all hypo algorithms - used to find the PEB decision keys
352 offline - if true CA contains algorithms that need to be merged to output stream sequence,
353 if false the CA contains a tool that needs to be added to HltEventLoopMgr
355 from TrigEDMConfig
import DataScoutingInfo
356 from TrigEDMConfig.TriggerEDM
import getRun3BSList
357 from TrigEDMConfig.TriggerEDMDefs
import allowTruncation
358 from TrigOutputHandling.TrigOutputHandlingConfig
import TriggerEDMSerialiserToolCfg, StreamTagMakerToolCfg, TriggerBitsMakerToolCfg
361 collectionsToBS = getRun3BSList(flags, [
"BS"] + DataScoutingInfo.getAllDataScoutingIdentifiers())
364 serialiser = TriggerEDMSerialiserToolCfg(flags)
366 for typekey, bsfragments, props
in collectionsToBS:
368 moduleIDs = sorted(DataScoutingInfo.getFullHLTResultID()
if f ==
'BS' else
369 DataScoutingInfo.getDataScoutingResultID(f)
370 for f
in bsfragments)
372 __log.debug(
'adding to serialiser list: %s, modules: %s', typekey, moduleIDs)
373 serialiser.addCollection(typekey, moduleIDs, allowTruncation = allowTruncation
in props)
376 stmaker = StreamTagMakerToolCfg()
377 bitsmaker = TriggerBitsMakerToolCfg()
381 for hypoList
in hypos.values():
382 for hypo
in hypoList:
383 if hypo.getFullJobOptName().startswith(
'PEBInfoWriterAlg/'):
384 PEBKeys.append(str(hypo.HypoOutputDecisions))
386 PEBKeys = sorted(
set(PEBKeys))
387 __log.debug(
'Setting StreamTagMakerTool.PEBDecisionKeys = %s', PEBKeys)
388 stmaker.PEBDecisionKeys = PEBKeys
390 acc = ComponentAccumulator()
394 from TrigOutputHandling.TrigOutputHandlingConfig
import HLTResultMTMakerCfg
395 HLTResultMTMakerAlg=CompFactory.HLTResultMTMakerAlg
396 hltResultMakerTool = HLTResultMTMakerCfg(flags)
397 hltResultMakerTool.StreamTagMaker = stmaker
398 hltResultMakerTool.MakerTools = [bitsmaker, serialiser]
400 hltResultMakerAlg.ResultMaker = hltResultMakerTool
403 if flags.Input.Format
is Format.BS:
404 from TriggerJobOpts.TriggerByteStreamConfig
import ByteStreamReadCfg
405 readBSAcc = ByteStreamReadCfg(flags)
406 readBSAcc.getEventAlgo(
'SGInputLoader').Load.add(
407 (
'ByteStreamMetadataContainer',
'InputMetaDataStore+ByteStreamMetadata'))
411 hltResultMakerAlg.ResultMaker.ExtraROBs = []
412 hltResultMakerAlg.ResultMaker.ExtraSubDets = []
415 decmaker = CompFactory.getComp(
"TrigDec::TrigDecisionMakerMT")(
"TrigDecMakerMT")
419 from TrigConfigSvc.TrigConfigSvcCfg
import L1PrescaleCondAlgCfg
420 acc.merge(L1PrescaleCondAlgCfg(flags))
423 from TriggerJobOpts.TriggerByteStreamConfig
import ByteStreamWriteCfg
424 writingOutputs = [
"HLT::HLTResultMT#HLTResultMT"]
425 writingInputs = [(
"HLT::HLTResultMT",
"HLTResultMT"),
426 (
"xAOD::TrigDecision",
"xTrigDecision")]
429 if flags.Trigger.doLVL1:
430 if flags.Trigger.enableL1MuonPhase1
or flags.Trigger.enableL1CaloPhase1:
431 writingOutputs += [
'xAOD::TrigCompositeContainer#L1TriggerResult']
432 writingInputs += [(
'xAOD::TrigCompositeContainer',
'StoreGateSvc+L1TriggerResult')]
433 if flags.Trigger.enableL1CaloLegacy
or not flags.Trigger.enableL1MuonPhase1:
434 writingOutputs += [
'ROIB::RoIBResult#RoIBResult']
435 writingInputs += [(
'ROIB::RoIBResult',
'StoreGateSvc+RoIBResult')]
436 if flags.Trigger.CTP.UseEDMxAOD:
437 writingOutputs += [
'xAOD::CTPResult#CTPResult']
438 writingInputs += [(
'xAOD::CTPResult',
'StoreGateSvc+CTPResult')]
440 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import L1TriggerByteStreamEncoderCfg
441 acc.merge(L1TriggerByteStreamEncoderCfg(flags))
443 writingAcc = ByteStreamWriteCfg(flags, type_names=writingOutputs, extra_inputs=writingInputs)
444 writingAcc.addEventAlgo(hltResultMakerAlg)
445 writingAcc.addEventAlgo(decmaker)
446 acc.merge(writingAcc)
449 from TrigServices.TrigServicesConfig
import TrigServicesCfg
450 onlineServicesAcc = TrigServicesCfg(flags)
451 hltEventLoopMgr = onlineServicesAcc.getPrimary()
452 hltEventLoopMgr.ResultMaker.StreamTagMaker = stmaker
453 hltEventLoopMgr.ResultMaker.MakerTools = [serialiser, bitsmaker]
454 onlineServicesAcc.getEventAlgo(
'SGInputLoader').Load.add(
455 (
'ByteStreamMetadataContainer',
'InputMetaDataStore+ByteStreamMetadata'))
456 acc.merge(onlineServicesAcc)
462 acc = ComponentAccumulator()
464 from TrigEDMConfig.TriggerEDM
import getTriggerEDMList
467 bitsmaker = CompFactory.TriggerBitsMakerTool()
468 decmaker = CompFactory.TrigDec.TrigDecisionMakerMT(
"TrigDecMakerMT", BitsMakerTool = bitsmaker, UseEDMxAOD=flags.Trigger.CTP.UseEDMxAOD)
469 acc.addEventAlgo( decmaker )
472 from .TriggerRecoConfig
import TriggerMetadataWriterCfg
473 metadataAcc, metadataOutputs = TriggerMetadataWriterCfg(flags)
474 acc.merge( metadataAcc )
477 from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig
import RoIBResultToxAODCfg
478 xRoIBResultAcc, xRoIBResultOutputs = RoIBResultToxAODCfg(flags)
479 acc.merge(xRoIBResultAcc)
484 for doit, outputType, edmSet
in [( flags.Output.doWriteRDO,
'RDO', flags.Trigger.ESDEDMSet),
485 ( flags.Output.doWriteESD,
'ESD', flags.Trigger.ESDEDMSet),
486 ( flags.Output.doWriteAOD,
'AOD', flags.Trigger.AODEDMSet)]:
487 if not doit:
continue
489 edmList = getTriggerEDMList(flags, key=edmSet)
493 for edmType, edmKeys
in edmList.items():
494 itemsToRecord.extend([edmType+
'#'+collKey
for collKey
in edmKeys])
497 itemsToRecord.append(
'xAOD::EventInfo#EventInfo')
498 itemsToRecord.append(
'xAOD::EventAuxInfo#EventInfoAux.')
501 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg, outputStreamName
502 acc.merge(OutputStreamCfg(flags, outputType, ItemList=itemsToRecord,
503 disableEventTag=
True, takeItemsFromInput=(outputType ==
'RDO')))
504 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
505 acc.merge(SetupMetaDataForStreamCfg(flags, outputType,
506 createMetadata=[MetadataCategory.TriggerMenuMetaData]))
508 alg = acc.getEventAlgo(outputStreamName(outputType))
511 (
"xAOD::TrigDecision", str(decmaker.TrigDecisionKey)),
512 (
"xAOD::TrigConfKeys", metadataOutputs)} |
set(xRoIBResultOutputs)
518 """Configure the view merging algorithm"""
520 from TrigEDMConfig.TriggerEDMDefs
import InViews
521 from TrigEDMConfig.TriggerEDM
import getRawTriggerEDMList
523 acc = ComponentAccumulator()
524 mergingTool = CompFactory.HLTEDMCreator(
"ViewsMergingTool")
525 alg = CompFactory.HLTEDMCreatorAlg(
"EDMCreatorAlg",
526 OutputTools = [mergingTool])
529 needMerging = [x
for x
in getRawTriggerEDMList(flags)
if len(x) >= 4
and
530 any(isinstance(v, InViews)
for v
in x[3])]
531 __log.info(
"These collections need merging: %s",
" ".join([ c[0]
for c
in needMerging ]))
533 for coll
in needMerging:
534 collType, collName = coll[0].
split(
"#")
535 collType = collType.split(
":")[-1]
536 possibleViews = [ str(v)
for v
in coll[3]
if isinstance(v, InViews) ]
537 for viewsColl
in possibleViews:
538 attrView = getattr(mergingTool, collType+
"Views", [])
539 attrInView = getattr(mergingTool, collType+
"InViews", [])
540 attrName = getattr(mergingTool, collType, [])
541 attrView.append( viewsColl )
542 attrInView.append( collName )
543 attrName.append( collName )
545 setattr(mergingTool, collType+
"Views", attrView )
546 setattr(mergingTool, collType+
"InViews", attrInView )
547 setattr(mergingTool, collType, attrName )
548 producer = [ maker
for maker
in viewMakers
if maker.Views == viewsColl ]
549 if len(producer) == 0:
550 __log.warning(
"The producer of %s for %s not in the menu, its outputs won't ever make it out of the HLT", viewsColl, coll)
552 if len(producer) > 1:
553 for pr
in producer[1:]:
554 if pr != producer[0]:
555 __log.error(
"Several View making algorithms produce the same output collection %s: %s", viewsColl,
' '.join([p.getName()
for p
in producer ]))
558 acc.addEventAlgo(alg)
653def triggerRunCfg( flags, menu=None ):
655 top of the trigger config (for real triggering online or on MC)
658 acc = ComponentAccumulator()
660 # L1ConfigSvc needed for HLTSeeding
661 from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg
663 acc.merge( L1ConfigSvcCfg(flags) )
665 acc.addSequence( seqOR( "HLTTop") )
667 # HLTPreSeq only used for CostMon so far, skip if CostMon disabled
668 if flags.Trigger.CostMonitoring.doCostMonitoring:
669 acc.addSequence( parOR("HLTPreSeq"), parentName="HLTTop" )
671 from TrigCostMonitor.TrigCostMonitorConfig import TrigCostMonitorCfg
672 acc.merge( TrigCostMonitorCfg( flags ), sequenceName="HLTPreSeq" )
675 acc.addSequence( parOR("HLTBeginSeq"), parentName="HLTTop" )
676 # bit of a hack as for "legacy" type JO a seq name for cache creators has to be given,
677 # in newJO realm the seqName will be removed as a comp fragment shoudl be unaware of where it will be attached
679 if flags.Trigger.doCFEmulationTest:
680 from TriggerMenuMT.CFtest.EmuStepProcessingConfig import emulateHLTSeedingCfg
681 hltSeedingAcc = emulateHLTSeedingCfg(flags)
683 acc.merge( triggerIDCCacheCreatorsCfg( flags, seqName="AthAlgSeq" ), sequenceName="HLTBeginSeq" )
685 if flags.Trigger.doRuntimeNaviVal: # Validate we can parse the menu with the standalone chain parser
686 acc.addEventAlgo( CompFactory.TrigChainNameParserChecker(), sequenceName="HLTBeginSeq" )
688 from HLTSeeding.HLTSeedingConfig import HLTSeedingCfg
689 hltSeedingAcc = HLTSeedingCfg( flags )
691 if flags.Input.isMC and (flags.Input.Format is not Format.BS):
692 from AthenaConfiguration.Enums import LHCPeriod
693 if flags.GeoModel.Run > LHCPeriod.Run3:
694 from InDetConfig.TrackRecoConfig import SiDetectorElementStatusCfg
695 acc.merge(SiDetectorElementStatusCfg( flags), sequenceName="HLTBeginSeq")
697 # TODO, once moved to newJO the algorithm can be added to hltSeedingAcc and merging will be sufficient here
698 acc.merge( hltSeedingAcc, sequenceName="HLTBeginSeq" )
700 # detour to the menu here, (missing now, instead a temporary hack)
702 menuAcc = menu( flags )
703 HLTSteps = menuAcc.getSequence( "HLTAllSteps" )
704 __log.info( "Configured menu with %d steps", len(HLTSteps.Members))
705 acc.merge( menuAcc, sequenceName="HLTTop")
707 # collect hypothesis algorithms from all sequence
708 hypos = collectHypos( HLTSteps )
709 filters = collectFilters( HLTSteps )
710 acc.addSequence( parOR("HLTEndSeq"), parentName="HLTTop" )
711 acc.addSequence( seqAND("HLTFinalizeSeq"), parentName="HLTEndSeq" )
713 nfilters = sum(len(v) for v in filters.values())
714 nhypos = sum(len(v) for v in hypos.values())
715 __log.info( "Algorithms counting: Number of Filter algorithms: %d - Number of Hypo algoirthms: %d", nfilters , nhypos)
717 summaryAcc, summaryAlg = triggerSummaryCfg( flags, hypos )
718 acc.merge( summaryAcc, sequenceName="HLTFinalizeSeq" )
719 if flags.Trigger.doCFEmulationTest:
720 summaryAlg.Prescaler=CompFactory.PrescalingEmulationTool()
721 acc.addEventAlgo( summaryAlg, sequenceName="HLTFinalizeSeq" )
722 acc.merge( triggerEndOfEventCfg(flags), sequenceName="HLTFinalizeSeq" )
724 #once menu is included we should configure monitoring here as below
725 hltSeedingAlg = hltSeedingAcc.getEventAlgo("HLTSeeding")
727 monitoringAcc, monitoringAlg = triggerMonitoringCfg( flags, hypos, filters, hltSeedingAlg )
728 acc.merge( monitoringAcc, sequenceName="HLTEndSeq" )
729 acc.addEventAlgo( monitoringAlg, sequenceName="HLTEndSeq" )
731 decObj, decObjHypoOut = collectDecisionObjects( hypos, filters, hltSeedingAlg, summaryAlg )
734 # configure components need to normalise output before writing out
735 viewMakers = collectViewMakers( HLTSteps )
737 # Add HLT Navigation to EDM list
738 # TODO: DO NOT directly modify TriggerHLTListRun3
739 from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTListRun3, addHLTNavigationToEDMList
740 __log.info( "Number of EDM items before adding navigation: %d", len(TriggerHLTListRun3))
741 addHLTNavigationToEDMList(flags, TriggerHLTListRun3, decObj, decObjHypoOut)
742 __log.info( "Number of EDM items after adding navigation: %d", len(TriggerHLTListRun3))
744 # Add Extra to EDM list
745 # TODO: DO NOT directly modify TriggerHLTListRun3
746 if flags.Trigger.ExtraEDMList:
747 from TrigEDMConfig.TriggerEDM import _addExtraCollectionsToEDMList
748 __log.info( "Adding extra collections to EDM: %s", str(flags.Trigger.ExtraEDMList))
749 _addExtraCollectionsToEDMList(TriggerHLTListRun3, flags.Trigger.ExtraEDMList)
751 # Configure output writing
752 outputAcc, edmSet = triggerOutputCfg( flags, hypos )
753 acc.merge( outputAcc, sequenceName="HLTTop" )
755 # Cost monitoring should be finished between acceptedEventTopSeq and EDMCreator
756 from TrigCostMonitor.TrigCostMonitorConfig import TrigCostMonitorFinalizeCfg
757 costFinalizeAlg = TrigCostMonitorFinalizeCfg(flags)
758 if costFinalizeAlg: # None if Cost Monitoring is turned off
759 acc.addEventAlgo(costFinalizeAlg, sequenceName="HLTFinalizeSeq" )
762 # The order is important: 1) view merging, 2) gap filling
763 acc.merge( triggerMergeViewsCfg(flags, viewMakers), sequenceName="HLTFinalizeSeq" )
764 # For BS output, the EDM gap-filling is done in Reco. Online we only ensure a
765 # consistent set of decision objects (TrigCompositeContainer):
766 acc.merge( triggerEDMGapFillerCfg(flags, [edmSet] if edmSet!='BS' else [],
767 decObj, decObjHypoOut), sequenceName="HLTFinalizeSeq" )
769 if flags.Trigger.doOnlineNavigationCompactification:
770 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import getTrigNavSlimmingMTOnlineConfig
771 onlineSlimAlg = getTrigNavSlimmingMTOnlineConfig(flags)
772 acc.addEventAlgo( onlineSlimAlg, sequenceName="HLTFinalizeSeq" )
774 # Cleanup menu config to allow garbage collection (ATR-28855)
775 from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig import HLTMenuConfig
776 HLTMenuConfig.destroy()
806def triggerEndOfEventCfg(flags):
807 from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig import HLTMenuConfig
809 acceptedEventChainDicts = [cd for cd in HLTMenuConfig.dictsList() \
810 if 'Calib' in cd['signatures'] \
811 and 'acceptedevts' in cd['chainParts'][0]['purpose']]
813 acc = ComponentAccumulator()
815 # If no relevant chains or just not desired, can shortcut and return empty CA
816 if not (flags.Trigger.enableEndOfEventProcessing and acceptedEventChainDicts):
819 # Add end-of-event sequences executed conditionally on the DecisionSummaryMakerAlg filter status
820 endOfEventRoIMaker = CompFactory.EndOfEventROIConfirmerAlg('EndOfEventROIConfirmerAlg')
821 acc.addEventAlgo( endOfEventRoIMaker )
822 acc.addSequence( parOR("acceptedEventTopSeq") )
823 acc.getSequence("acceptedEventTopSeq").IgnoreFilterPassed=True
825 # Define the alg configuration by purpose
826 def EndOfEventSeqCfg(flags, prescaleChain, purposes):
827 acc = ComponentAccumulator()
828 seqLabel = prescaleChain.replace('HLT_acceptedevts','')
829 seqName = 'acceptedEventSeq'+seqLabel
830 acc.addSequence( seqAND(seqName) )
832 endOfEventFilterAlg = CompFactory.EndOfEventFilterAlg('EndOfEventFilterAlg'+seqLabel, ChainName=prescaleChain)
833 acc.addEventAlgo(endOfEventFilterAlg, sequenceName=seqName)
834 # The LAr Noise Burst end-of-event sequence
835 if 'larnoiseburst' in purposes:
836 # Add stream filter to EndOfEventFilterAlg
837 # Only accept events going to streams that already do full calo reco
838 # CosmicCalo explicitly requested [ATR-26096]
839 endOfEventFilterAlg.StreamFilter = ['Main','VBFDelayed','TLA','DarkJetPEBTLA','FTagPEBTLA','CosmicCalo']
841 from TriggerMenuMT.HLT.CalibCosmicMon.CalibChainConfiguration import getLArNoiseBurstRecoCfg
842 acc.merge(getLArNoiseBurstRecoCfg(flags), sequenceName=seqName)
843 elif any(purpose.startswith("met") for purpose in purposes):
844 from TriggerMenuMT.HLT.MET.EndOfEvent import getMETRecoSequences
845 metcfg, rois, streams = getMETRecoSequences(flags, purposes)
846 endOfEventFilterAlg.StreamFilter = streams
847 endOfEventRoIMaker.RoIs = [x for x in rois if x not in endOfEventRoIMaker.RoIs]
848 acc.merge(metcfg, sequenceName=seqName)
853 for acceptedEventChainDict in acceptedEventChainDicts:
854 # Common config for each chain
855 prescaleChain = acceptedEventChainDict['chainName']
856 # Now add chain-specific end-of-event sequences executed conditionally on the prescale
857 purposes = acceptedEventChainDict['chainParts'][0]['purpose']
859 acc.merge(EndOfEventSeqCfg(flags, prescaleChain, purposes), sequenceName="acceptedEventTopSeq")