ATLAS Offline Software
Loading...
Searching...
No Matches
python.L0MuonSimulationConfig Namespace Reference

Functions

 TMDBConfig (flags)
 MuonBytestream2RdoConfig (flags)
 MuonRdoToMuonDigitToolCfg (flags, name="MuonRdoToMuonDigitTool", **kwargs)
 MuonRdo2DigitConfig (flags)
 NSWTriggerConfig (flags)
 RPCTriggerConfig (flags)
 TGCTriggerConfig (flags)
 MuctpiConfig (flags)
 L0MuonSimulationCfg (flags)

Variables

 flags = initConfigFlags()
 Files
 MaxEvents
 NumThreads
 triggerMenuSetup
 enableL0Muon
 doEmulation
 acc = MainServicesCfg(flags)
 withDetails
 True
 summariseProps
 printDefaults

Function Documentation

◆ L0MuonSimulationCfg()

python.L0MuonSimulationConfig.L0MuonSimulationCfg ( flags)

Definition at line 288 of file L0MuonSimulationConfig.py.

288def L0MuonSimulationCfg(flags):
289 acc = ComponentAccumulator()
290
291 if flags.Trigger.L0MuonSim.doEmulation:
292 from L0MuonEmulation.L0MuonSmearingConfig import L0MuonSmearingCfg
293 acc.merge(L0MuonSmearingCfg(flags)) # L0MuonRoI truth emulation
294 return acc
295
296 # otherwise, run-3 step will run.
297 acc.merge(MuonBytestream2RdoConfig(flags)) # data prep for muon bytestream data
298 acc.merge(MuonRdo2DigitConfig(flags)) # input for rpc/tgc trigger simulation
299 acc.merge(RPCTriggerConfig(flags)) # rpc trigger simulation, including bis78 to prepare for bis78-tgc coincidence
300 acc.merge(TMDBConfig(flags)) # for tmdb decision to prepare for tile-muon coincidence
301 acc.merge(NSWTriggerConfig(flags)) # nsw trigger simulation to prepare input for nsw-tgc coincidence
302 acc.merge(TGCTriggerConfig(flags)) # tgc trigger simulation
303 acc.merge(MuctpiConfig(flags)) # muctpi simulation
304
305 return acc
306

◆ MuctpiConfig()

python.L0MuonSimulationConfig.MuctpiConfig ( flags)

Definition at line 261 of file L0MuonSimulationConfig.py.

261def MuctpiConfig(flags):
262 acc = ComponentAccumulator()
263 rpcRecRoiTool = CompFactory.LVL1.TrigT1RPCRecRoiTool("TrigT1RPCRecRoiTool", UseRun3Config=True)
264 tgcRecRoiTool = CompFactory.LVL1.TrigT1TGCRecRoiTool("TrigT1TGCRecRoiTool", UseRun3Config=True)
265 trigThresholdDecTool = CompFactory.LVL1.TrigThresholdDecisionTool(name="TrigThresholdDecisionTool",
266 RPCRecRoiTool = rpcRecRoiTool,
267 TGCRecRoiTool = tgcRecRoiTool)
268 muctpiTool = CompFactory.LVL1MUCTPIPHASE1.MUCTPI_AthTool(name="MUCTPI_AthTool",
269 MuCTPICTPLocation = 'L1MuCTPItoCTPLocation',
270 OverlapStrategyName = flags.Trigger.MUCTPI.OverlapStrategy,
271 LUTXMLFile = flags.Trigger.MUCTPI.LUTXMLFile,
272 BarrelRoIFile = flags.Trigger.MUCTPI.BarrelRoIFile,
273 EndcapForwardRoIFile = flags.Trigger.MUCTPI.EndcapForwardRoIFile,
274 Side0LUTFile = flags.Trigger.MUCTPI.Side0LUTFile,
275 Side1LUTFile = flags.Trigger.MUCTPI.Side1LUTFile,
276 InputSource = 'DIGITIZATION',
277 RPCRecRoiTool = rpcRecRoiTool,
278 TGCRecRoiTool = tgcRecRoiTool,
279 TrigThresholdDecisionTool = trigThresholdDecTool)
280 muctpiAlg = CompFactory.LVL1MUCTPIPHASE1.MUCTPI_AthAlg(name="MUCTPI_AthAlg",
281 MUCTPI_AthTool = muctpiTool)
282 acc.addEventAlgo(muctpiAlg)
283 from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg
284 acc.merge(L1ConfigSvcCfg(flags))
285 return acc
286
287

◆ MuonBytestream2RdoConfig()

python.L0MuonSimulationConfig.MuonBytestream2RdoConfig ( flags)

Definition at line 44 of file L0MuonSimulationConfig.py.

44def MuonBytestream2RdoConfig(flags):
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_RawDataProviderTool(name = "RPC_RawDataProviderTool" + 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.MuonRawDataProvider(name = f"TgcRawDataProvider{postFix}",
73 ProviderTool = MuonTgcRawDataProviderTool,
74 UseHashIds = True,
75 DecodePerRoI = True)
76 acc.addEventAlgo(TgcRawDataProvider)
77 # for sTGC
78 if flags.Detector.GeometrysTGC:
79 from MuonConfig.MuonBytestreamDecodeConfig import sTgcRODDecoderCfg
80 MuonsTgcRawDataProviderTool = CompFactory.Muon.STGC_RawDataProviderTool(name = "STGC_RawDataProviderToolMT"+postFix,
81 Decoder = acc.popToolsAndMerge(sTgcRODDecoderCfg(flags,
82 name = "sTgcROD_Decoder"+postFix)),
83 RdoLocation = "sTGCRDO_L1")
84 sTgcRawDataProvider = CompFactory.Muon.MuonRawDataProvider(name = f"sTgcRawDataProvider{postFix}",
85 ProviderTool = MuonsTgcRawDataProviderTool,
86 UseHashIds = False,
87 DecodePerRoI = False)
88 acc.addEventAlgo(sTgcRawDataProvider)
89
90 # for MM
91 if flags.Detector.GeometryMM:
92 from MuonConfig.MuonBytestreamDecodeConfig import MmRDODDecoderCfg
93 Muon_MM_RawDataProviderTool = CompFactory.Muon.MM_RawDataProviderTool
94 MuonMmRawDataProviderTool = Muon_MM_RawDataProviderTool(name = "MM_RawDataProviderTool"+postFix,
95 Decoder = acc.popToolsAndMerge(MmRDODDecoderCfg(flags,
96 name="MM_RODDecoder"+postFix)),
97 RdoLocation = "MMRDO_L1")
98 MmRawDataProvider = CompFactory.Muon.MuonRawDataProvider(name = f"MmRawDataProvider{postFix}",
99 ProviderTool = MuonMmRawDataProviderTool,
100 UseHashIds = False,
101 DecodePerRoI = False)
102 acc.addEventAlgo(MmRawDataProvider)
103
104 return acc
105
106

◆ MuonRdo2DigitConfig()

python.L0MuonSimulationConfig.MuonRdo2DigitConfig ( flags)

Definition at line 126 of file L0MuonSimulationConfig.py.

126def MuonRdo2DigitConfig(flags):
127 acc = ComponentAccumulator()
128
129 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
130 acc.merge( AtlasFieldCacheCondAlgCfg(flags) )
131 # Read RPCPAD and TGCRDO from the input POOL file (for BS it comes from [Rpc|Tgc]RawDataProvider)
132 suffix = "" if flags.Input.Format is Format.POOL else "_L1"
133 RPCRdoName = "RPCPAD"+suffix
134 TGCRdoName = "TGCRDO"+suffix
135 MMRdoName = "MMRDO"+suffix
136 sTGCRdoName = "sTGCRDO"+suffix
137
138 if flags.Input.Format is Format.POOL:
139 rdoInputs = [
140 ('TgcRdoContainer','TGCRDO')
141 ]
142 if "RPCPAD" in flags.Input.Collections:
143 rdoInputs += [
144 ('RpcPadContainer','RPCPAD')
145 ]
146 # Read MMRDO and sTGCRDO
147 if flags.Detector.GeometrysTGC or flags.Detector.GeometryMM:
148 rdoInputs += [
149 ('Muon::MM_RawDataContainer','MMRDO'),
150 ('Muon::STGC_RawDataContainer','sTGCRDO')
151 ]
152 if flags.Muon.enableNRPC:
153 rdoInputs += [
154 ('xAOD::NRPCRDOContainer' , 'NRPCRDO'),
155 ('xAOD::NRPCRDOAuxContainer', 'NRPCRDOAux.')
156 ]
157 from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
158 acc.merge(SGInputLoaderCfg(flags, Load=rdoInputs))
159
160 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
161 acc.merge(MuonGeoModelCfg(flags))
162
163 from MuonConfig.MuonByteStreamCnvTestConfig import RpcRdoToRpcDigitCfg, TgcRdoToTgcDigitCfg, STGC_RdoToDigitCfg, MM_RdoToDigitCfg
164
165 acc.merge(RpcRdoToRpcDigitCfg(flags, RpcDigitContainer = "RPC_DIGITS_L1", RpcRdoContainer = RPCRdoName ))
166 acc.merge(TgcRdoToTgcDigitCfg(flags, TgcDigitContainer = "TGC_DIGITS_L1", TgcRdoContainer = TGCRdoName ))
167 if flags.Detector.GeometrysTGC:
168 acc.merge(STGC_RdoToDigitCfg(flags, sTgcRdoContainer = sTGCRdoName, sTgcDigitContainer = "sTGC_DIGITS_L1"))
169 if flags.Detector.GeometryMM:
170 acc.merge(MM_RdoToDigitCfg(flags, MmRdoContainer = MMRdoName, MmDigitContainer = "MM_DIGITS_L1" ))
171
172 return acc
173

◆ MuonRdoToMuonDigitToolCfg()

python.L0MuonSimulationConfig.MuonRdoToMuonDigitToolCfg ( flags,
name = "MuonRdoToMuonDigitTool",
** kwargs )

Definition at line 107 of file L0MuonSimulationConfig.py.

107def MuonRdoToMuonDigitToolCfg(flags, name="MuonRdoToMuonDigitTool", **kwargs ):
108 result = ComponentAccumulator()
109 kwargs.setdefault("DecodeSTGC_RDO", flags.Detector.GeometrysTGC)
110 kwargs.setdefault("DecodeMM_RDO", flags.Detector.GeometryMM)
111 kwargs.setdefault("DecodeNrpcRDO", flags.Muon.enableNRPC)
112 from MuonConfig.MuonByteStreamCnvTestConfig import STgcRdoDecoderCfg, MMRdoDecoderCfg, MdtRdoDecoderCfg
113 kwargs.setdefault( "stgcRdoDecoderTool", result.popToolsAndMerge(STgcRdoDecoderCfg(flags))
114 if flags.Detector.GeometrysTGC else "" )
115 kwargs.setdefault("mmRdoDecoderTool", result.popToolsAndMerge(MMRdoDecoderCfg(flags))
116 if flags.Detector.GeometryMM else "" )
117 kwargs.setdefault("mdtRdoDecoderTool", result.popToolsAndMerge(MdtRdoDecoderCfg(flags)))
118 #Set N BCs and central BC consistently with RPC readout settings
119 rpcrdo_decode = CompFactory.Muon.RpcRDO_Decoder("RpcRDO_Decoder", BCZERO=flags.Trigger.L1MuonSim.RPCNBCZ)
120 kwargs.setdefault("rpcRdoDecoderTool", rpcrdo_decode)
121
122 the_tool = CompFactory.MuonRdoToMuonDigitTool (name, **kwargs)
123 result.setPrivateTools(the_tool)
124 return result
125

◆ NSWTriggerConfig()

python.L0MuonSimulationConfig.NSWTriggerConfig ( flags)

Definition at line 174 of file L0MuonSimulationConfig.py.

174def NSWTriggerConfig(flags):
175 acc = ComponentAccumulator()
176 if not flags.Detector.GeometrysTGC and not flags.Detector.GeometryMM:
177 return acc
178
179 if flags.Input.Format is Format.POOL and flags.Input.isMC:
180 rdoInputs = [
181 ('McEventCollection','TruthEvent'), # for MM trigger
182 ('TrackRecordCollection','MuonEntryLayer'), # for MM trigger
183 ]
184 if not flags.Muon.usePhaseIIGeoSetup:
185 rdoInputs += [
186 ('MuonSimDataCollection','sTGC_SDO') # for sTGC Pad trigger
187 ]
188 from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
189 acc.merge(SGInputLoaderCfg(flags, Load=rdoInputs))
190
191 PadEmulatorTool = CompFactory.NSWL1.PadEmulatorTool("NSWL1__PadEmulatorTool", DoNtuple=flags.Trigger.L1MuonSim.WritesTGCBranches, IsMC = flags.Input.isMC, sTGC_DigitContainerName="sTGC_DIGITS_L1")
192 MMTriggerTool = CompFactory.NSWL1.MMTriggerTool("NSWL1__MMTriggerTool",DoNtuple=flags.Trigger.L1MuonSim.WriteMMBranches, IsMC = flags.Input.isMC, MmDigitContainer="MM_DIGITS_L1")
193 TriggerProcessorTool = CompFactory.NSWL1.TriggerProcessorTool("NSWL1__TriggerProcessorTool")
194
195 nswAlg = CompFactory.NSWL1.NSWL1Simulation("NSWL1Simulation",
196 DoNtuple = flags.Trigger.L1MuonSim.WriteNSWDebugNtuple,
197 DoMM = flags.Trigger.L1MuonSim.doMMTrigger,
198 DoMMDiamonds = flags.Trigger.L1MuonSim.doMMTrigger,
199 DosTGC = flags.Trigger.L1MuonSim.doPadTrigger or flags.Trigger.L1MuonSim.doStripTrigger,
200 DoPad = flags.Trigger.L1MuonSim.doPadTrigger,
201 PadEmulatorTool = PadEmulatorTool,
202 DoStrip = flags.Trigger.L1MuonSim.doStripTrigger,
203 MMTriggerTool = MMTriggerTool,
204 TriggerProcessorTool = TriggerProcessorTool,
205 NSWTrigRDOContainerName = "L1_NSWTrigContainer" )
206 acc.addEventAlgo(nswAlg)
207 return acc
208

◆ RPCTriggerConfig()

python.L0MuonSimulationConfig.RPCTriggerConfig ( flags)

Definition at line 209 of file L0MuonSimulationConfig.py.

209def RPCTriggerConfig(flags):
210 acc = ComponentAccumulator()
211 rpcAlg = CompFactory.TrigT1RPC("TrigT1RPC",
212 Hardware = True,
213 DataDetail = False,
214 RPCbytestream = False,
215 RPCbytestreamFile = "",
216 RPCDigitContainer = "RPC_DIGITS_L1",
217 useRun3Config = True,
218 NOBXS=flags.Trigger.L1MuonSim.RPCNBX,
219 BCZERO=flags.Trigger.L1MuonSim.RPCNBCZ)
220 acc.addEventAlgo(rpcAlg)
221 from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg
222 acc.merge( RPCCablingConfigCfg(flags) ) # trigger roads
223 return acc
224

◆ TGCTriggerConfig()

python.L0MuonSimulationConfig.TGCTriggerConfig ( flags)

Definition at line 225 of file L0MuonSimulationConfig.py.

225def TGCTriggerConfig(flags):
226 acc = ComponentAccumulator()
227 tgcAlg = CompFactory.LVL1TGCTrigger.LVL1TGCTrigger("LVL1TGCTrigger",
228 InputData_perEvent = "TGC_DIGITS_L1",
229 InputRDO = "TGCRDO" if flags.Input.isMC else "TGCRDO_L1",
230 useRun3Config = True,
231 TileMuRcv_Input = "rerunTileMuRcvCnt",
232 TILEMU = True)
233 if (flags.Detector.GeometrysTGC or flags.Detector.GeometryMM):
234 tgcAlg.MaskFileName12 = "TrigT1TGCMaskedChannel.noFI._12.db"
235 tgcAlg.USENSW = True
236 tgcAlg.NSWSideInfo = "AC"
237 tgcAlg.NSWTrigger_Input = "L1_NSWTrigContainer"
238 tgcAlg.FORCENSWCOIN = not flags.Trigger.L1MuonSim.NSWVetoMode
239 tgcAlg.USEBIS78 = flags.Trigger.L1MuonSim.doBIS78
240 else:
241 tgcAlg.MaskFileName12 = "TrigT1TGCMaskedChannel._12.db"
242
243 if flags.Input.Format is Format.BS:
244 from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
245 readBSConfig = ByteStreamReadCfg(flags, ['ByteStreamMetadataContainer/ByteStreamMetadata'])
246 acc.merge(readBSConfig)
247 else:
248 tgcAlg.ByteStreamMetadataRHKey = ''
249 acc.addEventAlgo(tgcAlg)
250
251 from PathResolver import PathResolver
252 bwCW_Run3_filePath=PathResolver.FindCalibFile("TrigT1TGC_CW/BW/CW_BW_Run3.v01.db")
253 acc.merge(addFolders(flags, '<db>sqlite://;schema={0};dbname=OFLP200</db> /TGC/TRIGGER/CW_BW_RUN3'.format(bwCW_Run3_filePath),
254 tag='TgcTriggerCwBwRun3-01',
255 className='CondAttrListCollection'))
256 acc.addCondAlgo(CompFactory.TGCTriggerCondAlg())
257 from MuonConfig.MuonCablingConfig import TGCCablingConfigCfg
258 acc.merge( TGCCablingConfigCfg(flags) )
259 return acc
260
static std::string FindCalibFile(const std::string &logical_file_name)

◆ TMDBConfig()

python.L0MuonSimulationConfig.TMDBConfig ( flags)

Definition at line 8 of file L0MuonSimulationConfig.py.

8def TMDBConfig(flags):
9 acc = ComponentAccumulator()
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

Variable Documentation

◆ acc

python.L0MuonSimulationConfig.acc = MainServicesCfg(flags)

Definition at line 321 of file L0MuonSimulationConfig.py.

◆ doEmulation

python.L0MuonSimulationConfig.doEmulation

Definition at line 316 of file L0MuonSimulationConfig.py.

◆ enableL0Muon

python.L0MuonSimulationConfig.enableL0Muon

Definition at line 315 of file L0MuonSimulationConfig.py.

◆ Files

python.L0MuonSimulationConfig.Files

Definition at line 311 of file L0MuonSimulationConfig.py.

◆ flags

python.L0MuonSimulationConfig.flags = initConfigFlags()

Definition at line 310 of file L0MuonSimulationConfig.py.

◆ MaxEvents

python.L0MuonSimulationConfig.MaxEvents

Definition at line 312 of file L0MuonSimulationConfig.py.

◆ NumThreads

python.L0MuonSimulationConfig.NumThreads

Definition at line 313 of file L0MuonSimulationConfig.py.

◆ printDefaults

python.L0MuonSimulationConfig.printDefaults

Definition at line 331 of file L0MuonSimulationConfig.py.

◆ summariseProps

python.L0MuonSimulationConfig.summariseProps

Definition at line 331 of file L0MuonSimulationConfig.py.

◆ triggerMenuSetup

python.L0MuonSimulationConfig.triggerMenuSetup

Definition at line 314 of file L0MuonSimulationConfig.py.

◆ True

python.L0MuonSimulationConfig.True

Definition at line 331 of file L0MuonSimulationConfig.py.

◆ withDetails

python.L0MuonSimulationConfig.withDetails

Definition at line 331 of file L0MuonSimulationConfig.py.