ATLAS Offline Software
TrigT1MuctpiPhase1Config.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentFactory import CompFactory
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaCommon.Logging import logging
5 
6 #Muon RecRoiTools
7 from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConfig import RPCRecRoiToolCfg, TGCRecRoiToolCfg
8 
9 def TrigThresholdDecisionToolCfg(flags, name="TrigThresholdDecisionTool"):
10  acc = ComponentAccumulator()
11  tool = CompFactory.getComp("LVL1::TrigThresholdDecisionTool")(name)
12  tool.RPCRecRoiTool = acc.popToolsAndMerge(RPCRecRoiToolCfg(flags))
13  tool.TGCRecRoiTool = acc.popToolsAndMerge(TGCRecRoiToolCfg(flags))
14  acc.setPrivateTools(tool)
15  return acc
16 
17 
18 def MUCTPI_AthToolCfg(flags, name):
19  acc = ComponentAccumulator()
20  tool = CompFactory.getComp("LVL1MUCTPIPHASE1::MUCTPI_AthTool")(name)
21  tool.RPCRecRoiTool = acc.popToolsAndMerge(RPCRecRoiToolCfg(flags))
22  tool.TGCRecRoiTool = acc.popToolsAndMerge(TGCRecRoiToolCfg(flags))
23  tool.TrigThresholdDecisionTool = acc.popToolsAndMerge(TrigThresholdDecisionToolCfg(flags))
24  #tool.MUCTPI_xAODLocation = ["LVL1MuonRoIsBCm2", "LVL1MuonRoIsBCm1", "LVL1MuonRoIs", "LVL1MuonRoIsBCp1", "LVL1MuonRoIsBCp2"]
25  # Create a logger:
26  logger = logging.getLogger( "MUCTPI_AthTool" )
27 
28  # Set properties of the LUT overlap handling:
29  tool.OverlapStrategyName = flags.Trigger.MUCTPI.OverlapStrategy
30 
31  # Decide which LUT to use, based on which run we are simulating:
32  tool.LUTXMLFile = flags.Trigger.MUCTPI.LUTXMLFile
33  logger.info( "Configuring MuCTPI simulation with configuration file: %s", tool.LUTXMLFile )
34 
35  if flags.Trigger.doHLT:
36  # Check the RoI EDM containers are registered in HLT outputs
37  from TrigEDMConfig.TriggerEDM import recordable
38  for key in tool.MUCTPI_xAODLocation:
39  logger.info( "Configuring MuCTPI simulation with configuration outputs: %s", key )
40  assert key==recordable(key), f'recordable() check failed for {key}'
41  logger.info( "Configuring MuCTPI: post flags.Trigger.doHLT" )
42 
43  acc.setPrivateTools(tool)
44  return acc
45 
46 
47 def MUCTPI_AthAlgCfg(flags):
48  acc = ComponentAccumulator()
49  alg = CompFactory.getComp("LVL1MUCTPIPHASE1::MUCTPI_AthAlg")(name="MUCTPI_AthAlg")
50  alg.MUCTPI_AthTool = acc.popToolsAndMerge(MUCTPI_AthToolCfg(flags, name="MUCTPI_AthTool"))
51  acc.addEventAlgo(alg)
52  return acc
TrigT1MuonRecRoiToolConfig.RPCRecRoiToolCfg
def RPCRecRoiToolCfg(flags, name="RPCRecRoiTool", useRun3Config=True)
Definition: TrigT1MuonRecRoiToolConfig.py:8
python.TrigT1MuctpiPhase1Config.TrigThresholdDecisionToolCfg
def TrigThresholdDecisionToolCfg(flags, name="TrigThresholdDecisionTool")
Definition: TrigT1MuctpiPhase1Config.py:9
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrigT1MuctpiPhase1Config.MUCTPI_AthToolCfg
def MUCTPI_AthToolCfg(flags, name)
Definition: TrigT1MuctpiPhase1Config.py:18
python.TriggerEDM.recordable
def recordable(arg, runVersion=3)
Definition: TriggerEDM.py:30
TrigT1MuonRecRoiToolConfig.TGCRecRoiToolCfg
def TGCRecRoiToolCfg(flags, name="TGCRecRoiTool", useRun3Config=True)
Definition: TrigT1MuonRecRoiToolConfig.py:20
python.TrigT1MuctpiPhase1Config.MUCTPI_AthAlgCfg
def MUCTPI_AthAlgCfg(flags)
Definition: TrigT1MuctpiPhase1Config.py:47