ATLAS Offline Software
Lvl1MuonSimulationConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.Enums import Format
6 from IOVDbSvc.IOVDbSvcConfig import addFolders
7 
8 def TMDBConfig(flags):
10 
11  # Read MuRcvRawChCnt from the input file (for POOL directly, for BS via converter)
12  if flags.Input.Format is Format.POOL:
13  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
14  acc.merge(SGInputLoaderCfg(flags, ["TileRawChannelContainer/MuRcvRawChCnt"]))
15  else:
16  from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
17  acc.merge(ByteStreamReadCfg(flags, ["TileRawChannelContainer/MuRcvRawChCnt"]))
18 
19  from TileConditions.TileInfoLoaderConfig import TileInfoLoaderCfg
20  acc.merge( TileInfoLoaderCfg(flags) )
21 
22  from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
23  acc.merge(TileCablingSvcCfg(flags))
24 
25  from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
26  acc.merge( TileEMScaleCondAlgCfg(flags) )
27 
28  tmdbAlg = CompFactory.TileMuonReceiverDecision('TileMuonReceiverDecision'
29  , TileRawChannelContainer = "MuRcvRawChCnt" # input
30  , TileMuonReceiverContainer = "rerunTileMuRcvCnt" # output
31  , ManualRunPeriod = 2 # forcing Run 2 format (=2) for now, until TGC implements Run 3 format (=3)
32  # run 2 thresholds
33  , MuonReceiverEneThreshCellD6Low = 500
34  , MuonReceiverEneThreshCellD6andD5Low = 500
35  , MuonReceiverEneThreshCellD6High = 600
36  , MuonReceiverEneThreshCellD6andD5High = 600
37  # run 3 thresholds
38  , MuonReceiverEneThreshCellD5 = 500
39  , MuonReceiverEneThreshCellD6 = 500
40  , MuonReceiverEneThreshCellD5andD6 = 500)
41  acc.addEventAlgo(tmdbAlg)
42  return acc
43 
45  acc = ComponentAccumulator()
46  if flags.Input.isMC:
47  return acc
48 
49  postFix = "_L1MuonSim"
50  from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheNames
51  cacheCreator = CompFactory.MuonCacheCreator(RpcCacheKey = MuonCacheNames.RpcCache,
52  TgcCacheKey = MuonCacheNames.TgcCache,
53  MdtCsmCacheKey = MuonCacheNames.MdtCsmCache,
54  CscCacheKey = (MuonCacheNames.CscCache if flags.Detector.GeometryCSC else ""))
55  acc.addEventAlgo(cacheCreator)
56  # for RPC
57  RPCRodDecoder = CompFactory.Muon.RpcROD_Decoder(name = "RpcROD_Decoder" + postFix, NOBXS=flags.Trigger.L1MuonSim.RPCNBX)
58  MuonRpcRawDataProviderTool = CompFactory.Muon.RPC_RawDataProviderToolMT(name = "RPC_RawDataProviderToolMT" + postFix,
59  RpcContainerCacheKey = MuonCacheNames.RpcCache,
60  WriteOutRpcSectorLogic = False,
61  Decoder = RPCRodDecoder,
62  RdoLocation = "RPCPAD_L1" )
63  RpcRawDataProvider = CompFactory.Muon.RpcRawDataProvider(name = "RpcRawDataProvider" + postFix,
64  ProviderTool = MuonRpcRawDataProviderTool)
65  acc.addEventAlgo(RpcRawDataProvider)
66  # for TGC
67  TGCRodDecoder = CompFactory.Muon.TGC_RodDecoderReadout(name = "TGC_RodDecoderReadout" + postFix)
68  MuonTgcRawDataProviderTool = CompFactory.Muon.TGC_RawDataProviderToolMT(name = "TGC_RawDataProviderToolMT" + postFix,
69  TgcContainerCacheKey = MuonCacheNames.TgcCache,
70  Decoder = TGCRodDecoder,
71  RdoLocation = "TGCRDO_L1")
72  TgcRawDataProvider = CompFactory.Muon.TgcRawDataProvider(name = "TgcRawDataProvider" + postFix,
73  ProviderTool = MuonTgcRawDataProviderTool)
74  acc.addEventAlgo(TgcRawDataProvider)
75  # for sTGC
76  if flags.Detector.GeometrysTGC:
77  Muon__STGC_RawDataProviderToolMT=CompFactory.Muon.STGC_RawDataProviderToolMT
78  from MuonConfig.MuonBytestreamDecodeConfig import sTgcRODDecoderCfg
79  MuonsTgcRawDataProviderTool = Muon__STGC_RawDataProviderToolMT(name = "STGC_RawDataProviderToolMT"+postFix,
80  Decoder = acc.popToolsAndMerge(sTgcRODDecoderCfg(flags,
81  name = "sTgcROD_Decoder"+postFix)),
82  RdoLocation = "sTGCRDO_L1")
83  Muon__sTgcRawDataProvider=CompFactory.Muon.sTgcRawDataProvider
84  sTgcRawDataProvider = Muon__sTgcRawDataProvider(name = "sTgcRawDataProvider"+postFix,
85  ProviderTool = MuonsTgcRawDataProviderTool )
86  acc.addEventAlgo(sTgcRawDataProvider)
87 
88  # for MM
89  if flags.Detector.GeometryMM:
90  from MuonConfig.MuonBytestreamDecodeConfig import MmRDODDecoderCfg
91  Muon_MM_RawDataProviderToolMT = CompFactory.Muon.MM_RawDataProviderToolMT
92  MuonMmRawDataProviderTool = Muon_MM_RawDataProviderToolMT(name = "MM_RawDataProviderToolMT"+postFix,
93  Decoder = acc.popToolsAndMerge(MmRDODDecoderCfg(flags,
94  name="MM_RODDecoder"+postFix)),
95  RdoLocation = "MMRDO_L1")
96  Muon__MmRawDataProvider = CompFactory.Muon.MM_RawDataProvider
97  MmRawDataProvider = Muon__MmRawDataProvider(name = "MmRawDataProvider"+postFix, ProviderTool = MuonMmRawDataProviderTool )
98  acc.addEventAlgo(MmRawDataProvider)
99 
100  if flags.Trigger.L1MuonSim.EmulateNSW and flags.Trigger.L1MuonSim.NSWVetoMode:
101  # for MDT
102  MDTRodDecoder = CompFactory.MdtROD_Decoder(name = "MdtROD_Decoder" + postFix)
103  MuonMdtRawDataProviderTool = CompFactory.Muon.MDT_RawDataProviderToolMT(name = "MDT_RawDataProviderToolMT" + postFix,
104  CsmContainerCacheKey = MuonCacheNames.MdtCsmCache,
105  Decoder = MDTRodDecoder,
106  RdoLocation = "MDTCSM_L1")
107  MdtRawDataProvider = CompFactory.Muon.MdtRawDataProvider(name = "MdtRawDataProvider" + postFix,
108  ProviderTool = MuonMdtRawDataProviderTool)
109  acc.addEventAlgo(MdtRawDataProvider)
110  # for CSC
111  if flags.Detector.GeometryCSC:
112  CSCRodDecoder = CompFactory.Muon.CscROD_Decoder(name = "CscROD_Decoder" + postFix,
113  IsCosmics = False,
114  IsOldCosmics = False )
115  MuonCscRawDataProviderTool = CompFactory.Muon.CSC_RawDataProviderToolMT(name = "CSC_RawDataProviderToolMT" + postFix,
116  CscContainerCacheKey = MuonCacheNames.CscCache,
117  Decoder = CSCRodDecoder,
118  RdoLocation = "CSCRDO_L1" )
119  CscRawDataProvider = CompFactory.Muon.CscRawDataProvider(name = "CscRawDataProvider" + postFix,
120  ProviderTool = MuonCscRawDataProviderTool)
121  acc.addEventAlgo(CscRawDataProvider)
122 
123  return acc
124 
125 def MuonRdo2PrdConfig(flags):
126  acc = ComponentAccumulator()
127  if not flags.Trigger.L1MuonSim.EmulateNSW or not flags.Trigger.L1MuonSim.NSWVetoMode:
128  return acc
129  postFix = "_L1MuonSim"
130  suffix = "" if flags.Input.isMC else "_L1"
131  if flags.Input.Format is Format.POOL:
132  rdoInputs = [
133  ('RpcPadContainer','RPCPAD'),
134  ('TgcRdoContainer','TGCRDO'),
135  ('CscRawDataContainer','CSCRDO'),
136  ('MdtCsmContainer','MDTCSM')
137  ]
138  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
139  acc.merge(SGInputLoaderCfg(flags, Load=rdoInputs))
140 
141  if flags.Detector.GeometryCSC:
142  from MuonConfig.MuonRdoDecodeConfig import CscRDODecodeCfg
143  acc.merge(CscRDODecodeCfg(flags,name= "CscRdoToCscPrepData" + postFix, RDOContainer = "CSCRDO"+suffix))
144  CscClusterBuilderTool = CompFactory.CscThresholdClusterBuilderTool(name = "CscThresholdClusterBuilderTool" + postFix)
145  CscClusterBuilder = CompFactory.CscThresholdClusterBuilder(name = "CscThresholdClusterBuilder"+postFix,
146  cluster_builder = CscClusterBuilderTool)
147  acc.addEventAlgo(CscClusterBuilder)
148 
149  from MuonConfig.MuonRdoDecodeConfig import MdtRDODecodeCfg
150  acc.merge(MdtRDODecodeCfg(flags, name = "MdtRdoToMdtPrepData" + postFix,
151  RDOContainer = "MDTCSM"+suffix ))
152 
153  from MuonConfig.MuonRdoDecodeConfig import RpcRDODecodeCfg
154  acc.merge(RpcRDODecodeCfg(flags, name = "RpcRdoToRpcPrepData" + postFix,
155  RDOContainer = "RPCPAD"+suffix))
156 
157  from MuonConfig.MuonRdoDecodeConfig import TgcRDODecodeCfg
158  acc.merge(TgcRDODecodeCfg(flags, name = "TgcRdoToPrepData" + postFix,
159  RDOContainer = "TGCRDO"+suffix))
160  return acc
161 
163  acc = ComponentAccumulator()
164  if not flags.Trigger.L1MuonSim.EmulateNSW or not flags.Trigger.L1MuonSim.NSWVetoMode:
165  return acc
166  postFix = "_L1MuonSim"
167  theMuonLayerHough = CompFactory.MuonLayerHoughAlg("MuonLayerHoughAlg" + postFix,
168  TgcPrepDataContainer = "TGC_Measurements",
169  RpcPrepDataContainer = "RPC_Measurements",
170  CscPrepDataContainer = ("CSC_Clusters" if flags.Detector.GeometryCSC else ""),
171  MdtPrepDataContainer = "MDT_DriftCircles",
172  sTgcPrepDataContainer = ("STGC_Measurements" if flags.Detector.GeometrysTGC else ""),
173  MMPrepDataContainer = ("MM_Measurements" if flags.Detector.GeometryMM else "") )
174  acc.addEventAlgo(theMuonLayerHough)
175  theSegmentFinderAlg = CompFactory.MuonSegmentFinderAlg("MuonSegmentFinderAlg" + postFix)
176  if not flags.Detector.GeometryCSC:
177  theSegmentFinderAlg.CSC_clusterkey = ""
178  theSegmentFinderAlg.Csc2dSegmentMaker = ""
179  theSegmentFinderAlg.Csc4dSegmentMaker = ""
180  acc.addEventAlgo(theSegmentFinderAlg)
181  xAODMuonSegmentCnv = CompFactory.xAODMaker.MuonSegmentCnvAlg("MuonSegmentCnvAlg" + postFix)
182  acc.addEventAlgo(xAODMuonSegmentCnv)
183  return acc
184 
185 
186 
187 def MuonRdoToMuonDigitToolCfg(flags, name="MuonRdoToMuonDigitTool", **kwargs ):
188  result = ComponentAccumulator()
189  kwargs.setdefault("DecodeSTGC_RDO", flags.Detector.GeometrysTGC)
190  kwargs.setdefault("DecodeMM_RDO", flags.Detector.GeometryMM)
191  kwargs.setdefault("DecodeNrpcRDO", flags.Muon.enableNRPC)
192  from MuonConfig.MuonByteStreamCnvTestConfig import STgcRdoDecoderCfg, MMRdoDecoderCfg, MdtRdoDecoderCfg
193  kwargs.setdefault( "stgcRdoDecoderTool", result.popToolsAndMerge(STgcRdoDecoderCfg(flags))
194  if flags.Detector.GeometrysTGC else "" )
195  kwargs.setdefault("mmRdoDecoderTool", result.popToolsAndMerge(MMRdoDecoderCfg(flags))
196  if flags.Detector.GeometryMM else "" )
197  kwargs.setdefault("mdtRdoDecoderTool", result.popToolsAndMerge(MdtRdoDecoderCfg(flags)))
198  #Set N BCs and central BC consistently with RPC readout settings
199  rpcrdo_decode = CompFactory.Muon.RpcRDO_Decoder("RpcRDO_Decoder", BCZERO=flags.Trigger.L1MuonSim.RPCNBCZ)
200  kwargs.setdefault("rpcRdoDecoderTool", rpcrdo_decode)
201 
202  the_tool = CompFactory.MuonRdoToMuonDigitTool (name, **kwargs)
203  result.setPrivateTools(the_tool)
204  return result
205 
207  acc = ComponentAccumulator()
208 
209  from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
210  acc.merge( AtlasFieldCacheCondAlgCfg(flags) )
211  # Read RPCPAD and TGCRDO from the input POOL file (for BS it comes from [Rpc|Tgc]RawDataProvider)
212  suffix = "" if flags.Input.Format is Format.POOL else "_L1"
213  RPCRdoName = "RPCPAD"+suffix
214  TGCRdoName = "TGCRDO"+suffix
215  MMRdoName = "MMRDO"+suffix
216  sTGCRdoName = "sTGCRDO"+suffix
217 
218  if flags.Input.Format is Format.POOL:
219  rdoInputs = [
220  ('RpcPadContainer','RPCPAD'),
221  ('TgcRdoContainer','TGCRDO')
222  ]
223  # Read MMRDO and sTGCRDO
224  if flags.Detector.GeometrysTGC or flags.Detector.GeometryMM:
225  rdoInputs += [
226  ('Muon::MM_RawDataContainer','MMRDO'),
227  ('Muon::STGC_RawDataContainer','sTGCRDO')
228  ]
229  if flags.Muon.enableNRPC and ("NRPCRDO" in flags.Input.Collections):
230  rdoInputs += [
231  ('xAOD::NRPCRDOContainer' , 'NRPCRDO'),
232  ('xAOD::NRPCRDOAuxContainer', 'NRPCRDOAux.')
233  ]
234  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
235  acc.merge(SGInputLoaderCfg(flags, Load=rdoInputs))
236 
237  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
238  acc.merge(MuonGeoModelCfg(flags))
239 
240  from MuonConfig.MuonByteStreamCnvTestConfig import RpcRdoToRpcDigitCfg, TgcRdoToTgcDigitCfg, STGC_RdoToDigitCfg, MM_RdoToDigitCfg
241 
242  acc.merge(RpcRdoToRpcDigitCfg(flags, RpcDigitContainer = "RPC_DIGITS_L1", RpcRdoContainer = RPCRdoName ))
243  acc.merge(TgcRdoToTgcDigitCfg(flags, TgcDigitContainer = "TGC_DIGITS_L1", TgcRdoContainer = TGCRdoName ))
244  if flags.Detector.GeometrysTGC:
245  acc.merge(STGC_RdoToDigitCfg(flags, sTgcRdoContainer = sTGCRdoName, sTgcDigitContainer = "sTGC_DIGITS_L1"))
246  if flags.Detector.GeometryMM:
247  acc.merge(MM_RdoToDigitCfg(flags, MmRdoContainer = MMRdoName, MmDigitContainer = "MM_DIGITS_L1" ))
248 
249  return acc
250 
251 def NSWTriggerConfig(flags):
252  acc = ComponentAccumulator()
253  if not flags.Detector.GeometrysTGC and not flags.Detector.GeometryMM:
254  return acc
255 
256  if flags.Input.Format is Format.POOL and flags.Input.isMC:
257  rdoInputs = [
258  ('McEventCollection','TruthEvent'), # for MM trigger
259  ('TrackRecordCollection','MuonEntryLayer'), # for MM trigger
260  ('MuonSimDataCollection','sTGC_SDO') # for sTGC Pad trigger
261  ]
262  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
263  acc.merge(SGInputLoaderCfg(flags, Load=rdoInputs))
264 
265  PadTdsTool = CompFactory.NSWL1.PadTdsOfflineTool("NSWL1__PadTdsOfflineTool", IsMC = flags.Input.isMC, sTGC_DigitContainerName="sTGC_DIGITS_L1")
266  PadTriggerLogicTool = CompFactory.NSWL1.PadTriggerLogicOfflineTool("NSWL1__PadTriggerLogicOfflineTool")
267  StripTdsTool = CompFactory.NSWL1.StripTdsOfflineTool("NSWL1__StripTdsOfflineTool", IsMC=flags.Input.isMC, sTGC_DigitContainerName="sTGC_DIGITS_L1")
268  StripClusterTool = CompFactory.NSWL1.StripClusterTool("NSWL1__StripClusterTool", IsMC=flags.Input.isMC)
269  StripSegmentTool = CompFactory.NSWL1.StripSegmentTool("NSWL1__StripSegmentTool")
270  MMTriggerTool = CompFactory.NSWL1.MMTriggerTool("NSWL1__MMTriggerTool",DoNtuple=flags.Trigger.L1MuonSim.WriteMMBranches, IsMC = flags.Input.isMC, MmDigitContainer="MM_DIGITS_L1")
271  TriggerProcessorTool = CompFactory.NSWL1.TriggerProcessorTool("NSWL1__TriggerProcessorTool")
272 
273  dosTGC = flags.Trigger.L1MuonSim.doPadTrigger or flags.Trigger.L1MuonSim.doStripTrigger
274  if dosTGC:
275  from RegionSelector.RegSelToolConfig import regSelTool_STGC_Cfg
276  stgcRegSel = acc.popToolsAndMerge(regSelTool_STGC_Cfg( flags )) # noqa: F841 (adds a conditions algo as a side-effect)
277 
278  nswAlg = CompFactory.NSWL1.NSWL1Simulation("NSWL1Simulation",
279  DoNtuple = flags.Trigger.L1MuonSim.WriteNSWDebugNtuple,
280  DoMM = flags.Trigger.L1MuonSim.doMMTrigger,
281  DoMMDiamonds = flags.Trigger.L1MuonSim.doMMTrigger,
282  DosTGC = dosTGC,
283  DoPad = flags.Trigger.L1MuonSim.doPadTrigger,
284  DoStrip = flags.Trigger.L1MuonSim.doStripTrigger,
285  PadTdsTool = PadTdsTool,
286  PadTriggerTool = PadTriggerLogicTool,
287  StripTdsTool = StripTdsTool,
288  StripClusterTool = StripClusterTool,
289  StripSegmentTool = StripSegmentTool,
290  MMTriggerTool = MMTriggerTool,
291  TriggerProcessorTool = TriggerProcessorTool,
292  NSWTrigRDOContainerName = "L1_NSWTrigContainer" )
293  acc.addEventAlgo(nswAlg)
294  return acc
295 
296 def RPCTriggerConfig(flags):
297  acc = ComponentAccumulator()
298  rpcAlg = CompFactory.TrigT1RPC("TrigT1RPC",
299  Hardware = True,
300  DataDetail = False,
301  RPCbytestream = False,
302  RPCbytestreamFile = "",
303  RPCDigitContainer = "RPC_DIGITS_L1",
304  useRun3Config = True,
305  NOBXS=flags.Trigger.L1MuonSim.RPCNBX,
306  BCZERO=flags.Trigger.L1MuonSim.RPCNBCZ)
307  acc.addEventAlgo(rpcAlg)
308  from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg
309  acc.merge( RPCCablingConfigCfg(flags) ) # trigger roads
310  return acc
311 
312 def TGCTriggerConfig(flags):
313  acc = ComponentAccumulator()
314  tgcAlg = CompFactory.LVL1TGCTrigger.LVL1TGCTrigger("LVL1TGCTrigger",
315  InputData_perEvent = "TGC_DIGITS_L1",
316  InputRDO = "TGCRDO" if flags.Input.isMC else "TGCRDO_L1",
317  useRun3Config = True,
318  TileMuRcv_Input = "rerunTileMuRcvCnt",
319  TILEMU = True)
320  if (flags.Detector.GeometrysTGC or flags.Detector.GeometryMM):
321  tgcAlg.MaskFileName12 = "TrigT1TGCMaskedChannel.noFI._12.db"
322  tgcAlg.USENSW = True
323  tgcAlg.NSWSideInfo = "AC"
324  tgcAlg.NSWTrigger_Input = "L1_NSWTrigContainer"
325  tgcAlg.FORCENSWCOIN = not flags.Trigger.L1MuonSim.NSWVetoMode
326  tgcAlg.USEBIS78 = flags.Trigger.L1MuonSim.doBIS78
327  else:
328  tgcAlg.MaskFileName12 = "TrigT1TGCMaskedChannel._12.db"
329 
330  if flags.Trigger.L1MuonSim.EmulateNSW:
331  tgcAlg.MuctpiPhase1LocationTGC = "L1MuctpiStoreTGCint"
332 
333  if flags.Input.Format is Format.BS:
334  from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
335  readBSConfig = ByteStreamReadCfg(flags, ['ByteStreamMetadataContainer/ByteStreamMetadata'])
336  acc.merge(readBSConfig)
337  else:
338  tgcAlg.ByteStreamMetadataRHKey = ''
339  acc.addEventAlgo(tgcAlg)
340 
341  from PathResolver import PathResolver
342  bwCW_Run3_filePath=PathResolver.FindCalibFile("TrigT1TGC_CW/BW/CW_BW_Run3.v01.db")
343  acc.merge(addFolders(flags, '<db>sqlite://;schema={0};dbname=OFLP200</db> /TGC/TRIGGER/CW_BW_RUN3'.format(bwCW_Run3_filePath),
344  tag='TgcTriggerCwBwRun3-01',
345  className='CondAttrListCollection'))
346  acc.addCondAlgo(CompFactory.TGCTriggerCondAlg())
347  from MuonConfig.MuonCablingConfig import TGCCablingConfigCfg
348  acc.merge( TGCCablingConfigCfg(flags) )
349  return acc
350 
351 def TGCModifierConfig(flags):
352  acc = ComponentAccumulator()
353  if not flags.Trigger.L1MuonSim.EmulateNSW:
354  return acc
355  recTool = CompFactory.LVL1.TrigT1TGCRecRoiTool("TrigT1TGCRecRoiToolLegacy")
356  recTool.UseRun3Config=False # this is intentional
357  tgcModifier = CompFactory.LVL1TGCTrigger.TGCOutputModifier("TGCOutputModifier",
358  TrigT1TGCRecRoiTool=recTool,
359  InputMuctpiLocation = "L1MuctpiStoreTGCint",
360  OutputMuctpiLocation = "L1MuctpiStoreTGC",
361  EmulateA = True,
362  EmulateC = True,
363  NSWVetoMode = flags.Trigger.L1MuonSim.NSWVetoMode )
364  acc.addEventAlgo(tgcModifier)
365  return acc
366 
367 def MuctpiConfig(flags):
368  acc = ComponentAccumulator()
369  rpcRecRoiTool = CompFactory.LVL1.TrigT1RPCRecRoiTool("TrigT1RPCRecRoiTool", UseRun3Config=True)
370  tgcRecRoiTool = CompFactory.LVL1.TrigT1TGCRecRoiTool("TrigT1TGCRecRoiTool", UseRun3Config=True)
371  trigThresholdDecTool = CompFactory.LVL1.TrigThresholdDecisionTool(name="TrigThresholdDecisionTool",
372  RPCRecRoiTool = rpcRecRoiTool,
373  TGCRecRoiTool = tgcRecRoiTool)
374  muctpiTool = CompFactory.LVL1MUCTPIPHASE1.MUCTPI_AthTool(name="MUCTPI_AthTool",
375  MuCTPICTPLocation = 'L1MuCTPItoCTPLocation',
376  OverlapStrategyName = flags.Trigger.MUCTPI.OverlapStrategy,
377  LUTXMLFile = flags.Trigger.MUCTPI.LUTXMLFile,
378  BarrelRoIFile = flags.Trigger.MUCTPI.BarrelRoIFile,
379  EndcapForwardRoIFile = flags.Trigger.MUCTPI.EndcapForwardRoIFile,
380  Side0LUTFile = flags.Trigger.MUCTPI.Side0LUTFile,
381  Side1LUTFile = flags.Trigger.MUCTPI.Side1LUTFile,
382  InputSource = 'DIGITIZATION',
383  RPCRecRoiTool = rpcRecRoiTool,
384  TGCRecRoiTool = tgcRecRoiTool,
385  TrigThresholdDecisionTool = trigThresholdDecTool)
386  muctpiAlg = CompFactory.LVL1MUCTPIPHASE1.MUCTPI_AthAlg(name="MUCTPI_AthAlg",
387  MUCTPI_AthTool = muctpiTool)
388  acc.addEventAlgo(muctpiAlg)
389  from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg
390  acc.merge(L1ConfigSvcCfg(flags))
391  return acc
392 
393 
395  acc = ComponentAccumulator()
396 
397  acc.merge(MuonBytestream2RdoConfig(flags)) # data prep for muon bytestream data
398  acc.merge(MuonRdo2DigitConfig(flags)) # input for rpc/tgc trigger simulation
399  acc.merge(RPCTriggerConfig(flags)) # rpc trigger simulation, including bis78 to prepare for bis78-tgc coincidence
400  acc.merge(TMDBConfig(flags)) # for tmdb decision to prepare for tile-muon coincidence
401  acc.merge(NSWTriggerConfig(flags)) # nsw trigger simulation to prepare input for nsw-tgc coincidence
402  acc.merge(TGCTriggerConfig(flags)) # tgc trigger simulation
403  acc.merge(MuonRdo2PrdConfig(flags)) # data prep for nsw-tgc coincidence emulator
404  acc.merge(RecoMuonSegmentSequence(flags)) # segment reco for nsw-tgc coincidence emulator
405  acc.merge(TGCModifierConfig(flags)) # overwrite output from tgc by nsw-tgc coincidence emulator
406  acc.merge(MuctpiConfig(flags)) # muctpi simulation
407 
408  return acc
409 
410 if __name__ == "__main__":
411  import sys
412  from AthenaConfiguration.AllConfigFlags import initConfigFlags
413  flags = initConfigFlags()
414  flags.Input.Files = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.RDO.e8514_e8528_s4159_s4114_r14799_tid34171421_00/RDO.34171421._000011.pool.root.1']
415  flags.Exec.MaxEvents = 5
416  flags.Concurrency.NumThreads = 1
417  flags.Trigger.triggerMenuSetup = 'Dev_pp_run3_v1'
418  flags.fillFromArgs()
419  flags.lock()
420 
421  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
422  acc = MainServicesCfg(flags)
423 
424  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
425  acc.merge(PoolReadCfg(flags))
426 
427  from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu
428  generateL1Menu(flags)
429 
430  acc.merge(Lvl1MuonSimulationCfg(flags))
431 
432  acc.printConfig(withDetails=True, summariseProps=True, printDefaults=True)
433  sys.exit(acc.run().isFailure())
python.Lvl1MuonSimulationConfig.MuonRdoToMuonDigitToolCfg
def MuonRdoToMuonDigitToolCfg(flags, name="MuonRdoToMuonDigitTool", **kwargs)
Definition: Lvl1MuonSimulationConfig.py:187
MuonByteStreamCnvTestConfig.MM_RdoToDigitCfg
def MM_RdoToDigitCfg(flags, name="MM_RdoToDigitAlg", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:140
PathResolver::FindCalibFile
static std::string FindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.h:63
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
python.Lvl1MuonSimulationConfig.TGCTriggerConfig
def TGCTriggerConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:312
RegSelToolConfig.regSelTool_STGC_Cfg
def regSelTool_STGC_Cfg(flags)
Definition: RegSelToolConfig.py:185
MuonRdoDecodeConfig.CscRDODecodeCfg
def CscRDODecodeCfg(flags, name="CscRdoToCscPrepData", RDOContainer=None, **kwargs)
Definition: MuonRdoDecodeConfig.py:314
MuonByteStreamCnvTestConfig.RpcRdoToRpcDigitCfg
def RpcRdoToRpcDigitCfg(flags, name="RpcRdoToRpcDigitAlg", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:44
MuonBytestreamDecodeConfig.sTgcRODDecoderCfg
def sTgcRODDecoderCfg(flags, name="sTgcROD_Decoder", **kwargs)
Definition: MuonBytestreamDecodeConfig.py:222
python.TrigConfigSvcCfg.generateL1Menu
def generateL1Menu(flags)
Definition: TrigConfigSvcCfg.py:189
python.Lvl1MuonSimulationConfig.NSWTriggerConfig
def NSWTriggerConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:251
MuonBytestreamDecodeConfig.MmRDODDecoderCfg
def MmRDODDecoderCfg(flags, name="MmROD_Decoder", **kwargs)
Definition: MuonBytestreamDecodeConfig.py:332
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
MuonByteStreamCnvTestConfig.TgcRdoToTgcDigitCfg
def TgcRdoToTgcDigitCfg(flags, name="TgcRdoToTgcDigitAlg", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:91
python.TileInfoLoaderConfig.TileInfoLoaderCfg
def TileInfoLoaderCfg(flags, **kwargs)
Definition: TileInfoLoaderConfig.py:11
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
python.Lvl1MuonSimulationConfig.RPCTriggerConfig
def RPCTriggerConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:296
MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:312
MuonCablingConfig.TGCCablingConfigCfg
def TGCCablingConfigCfg(flags)
Definition: MuonCablingConfig.py:86
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:86
python.TileEMScaleConfig.TileEMScaleCondAlgCfg
def TileEMScaleCondAlgCfg(flags, **kwargs)
Definition: TileEMScaleConfig.py:10
python.Lvl1MuonSimulationConfig.Lvl1MuonSimulationCfg
def Lvl1MuonSimulationCfg(flags)
Definition: Lvl1MuonSimulationConfig.py:394
python.Lvl1MuonSimulationConfig.MuctpiConfig
def MuctpiConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:367
python.Lvl1MuonSimulationConfig.RecoMuonSegmentSequence
def RecoMuonSegmentSequence(flags)
Definition: Lvl1MuonSimulationConfig.py:162
python.TrigConfigSvcCfg.L1ConfigSvcCfg
def L1ConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:203
python.Lvl1MuonSimulationConfig.MuonRdo2PrdConfig
def MuonRdo2PrdConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:125
MuonRdoDecodeConfig.RpcRDODecodeCfg
def RpcRDODecodeCfg(flags, name="RpcRdoToRpcPrepData", RDOContainer=None, **kwargs)
Definition: MuonRdoDecodeConfig.py:140
python.Lvl1MuonSimulationConfig.MuonRdo2DigitConfig
def MuonRdo2DigitConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:206
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.Lvl1MuonSimulationConfig.TMDBConfig
def TMDBConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:8
MuonByteStreamCnvTestConfig.MdtRdoDecoderCfg
def MdtRdoDecoderCfg(flags, name="MDT_RDO_Decoder", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:348
MuonRdoDecodeConfig.TgcRDODecodeCfg
def TgcRDODecodeCfg(flags, name="TgcRdoToTgcPrepData", RDOContainer=None, **kwargs)
Definition: MuonRdoDecodeConfig.py:166
python.Lvl1MuonSimulationConfig.MuonBytestream2RdoConfig
def MuonBytestream2RdoConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:44
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8
python.Lvl1MuonSimulationConfig.TGCModifierConfig
def TGCModifierConfig(flags)
Definition: Lvl1MuonSimulationConfig.py:351
MuonByteStreamCnvTestConfig.STgcRdoDecoderCfg
def STgcRdoDecoderCfg(flags, name="STGC_RDO_Decoder", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:332
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:71
MuonRdoDecodeConfig.MdtRDODecodeCfg
def MdtRDODecodeCfg(flags, name="MdtRdoToMdtPrepData", RDOContainer=None, **kwargs)
Definition: MuonRdoDecodeConfig.py:272
MuonCablingConfig.RPCCablingConfigCfg
def RPCCablingConfigCfg(flags)
Definition: MuonCablingConfig.py:33
python.TileCablingSvcConfig.TileCablingSvcCfg
def TileCablingSvcCfg(flags)
Definition: TileCablingSvcConfig.py:11
MuonByteStreamCnvTestConfig.STGC_RdoToDigitCfg
def STGC_RdoToDigitCfg(flags, name="STGC_RdoToDigitAlg", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:116
MuonByteStreamCnvTestConfig.MMRdoDecoderCfg
def MMRdoDecoderCfg(flags, name="MM_RDO_Decoder", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:340