ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTLASequenceConfig.py
Go to the documentation of this file.
2# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3#
4from AthenaConfiguration.AccumulatorCache import AccumulatorCache
5from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequence, SelectionCA, InEventRecoCA
6from AthenaConfiguration.ComponentFactory import CompFactory
7from TrigEDMConfig.TriggerEDM import recordable
8from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoToolFromDict
9from TrigMuonHypo.TrigMuonHypoMonitoring import TrigMuonTLAHypoMonitoring
10from .MuonRecoSequences import muonNames
11
12def 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
21def 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
40def MuonTLAMenuSequenceGenCfg( flags, muChainPart):
41 muonsIn = getMuonCollections(muChainPart)
42 selAcc=MuonTLASequenceCfg(flags, muons=muonsIn)
43
44 return MenuSequence( flags,
45 selAcc,
46 HypoToolGen = TrigMuonEFMSonlyHypoToolFromDict
47 )