ATLAS Offline Software
MuonTLASequenceConfig.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 #
4 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
5 from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequence, SelectionCA, InEventRecoCA
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 from TrigEDMConfig.TriggerEDM import recordable
8 from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoToolFromDict
9 from TrigMuonHypo.TrigMuonHypoMonitoring import TrigMuonTLAHypoMonitoring
10 from .MuonRecoSequences import muonNames
11 
12 def getMuonCollections (chainPart):
13  muNames = muonNames().getNames('RoI')
14  muonName = muNames.EFCBName
15  if 'msonly' in chainPart['msonlyInfo']:
16  muonName = muNames.EFSAName
17 
18  return muonName
19 
20 @AccumulatorCache
21 def MuonTLASequenceCfg(flags, muons):
22 
23 
24  tlaMuonInputMakerAlg = CompFactory.InputMakerForRoI("IMTLAMuons"+muons)
25  tlaMuonInputMakerAlg.mergeUsingFeature = True
26  tlaMuonInputMakerAlg.RoITool = CompFactory.ViewCreatorPreviousROITool()
27  recoAcc = InEventRecoCA("MuonTLARecoSeq_"+ muons,inputMaker=tlaMuonInputMakerAlg)
28 
29  sequenceOut = recordable(muons+"_TLA")
30  # add the hypo
31  hypo = CompFactory.TrigMuonTLAHypoAlg("TrigMuonTLAHypoAlg_"+muons)
32  hypo.TLAOutputName = sequenceOut
33  hypo.MonTool = TrigMuonTLAHypoMonitoring(flags, "TrigMuonTLAHypoAlg/")
34 
35  selAcc = SelectionCA("TrigMuonTLAMainSeq_"+muons)
36  selAcc.mergeReco(recoAcc)
37  selAcc.addHypoAlgo(hypo)
38  return selAcc
39 
40 def MuonTLAMenuSequenceGenCfg( flags, muChainPart):
41  muonsIn = getMuonCollections(muChainPart)
42  selAcc=MuonTLASequenceCfg(flags, muons=muonsIn)
43 
44  return MenuSequence( flags,
45  selAcc,
46  HypoToolGen = TrigMuonEFMSonlyHypoToolFromDict
47  )
TrigMuonHypoMonitoring.TrigMuonTLAHypoMonitoring
def TrigMuonTLAHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:206
python.HLT.Muon.MuonTLASequenceConfig.getMuonCollections
def getMuonCollections(chainPart)
Definition: MuonTLASequenceConfig.py:12
python.TriggerEDM.recordable
def recordable(arg, runVersion=3)
Definition: TriggerEDM.py:34
python.HLT.Muon.MuonRecoSequences.muonNames
Definition: MuonRecoSequences.py:27
python.HLT.Muon.MuonTLASequenceConfig.MuonTLAMenuSequenceGenCfg
def MuonTLAMenuSequenceGenCfg(flags, muChainPart)
Definition: MuonTLASequenceConfig.py:40
python.HLT.Muon.MuonTLASequenceConfig.MuonTLASequenceCfg
def MuonTLASequenceCfg(flags, muons)
Definition: MuonTLASequenceConfig.py:21