8 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from AthenaConfiguration.AccumulatorCache
import AccumulatorCache
19 from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConfig
import RPCRecRoiToolCfg
20 from RegionSelector.RegSelToolConfig
import regSelTool_RPC_Cfg
22 recRoiTool = acc.popToolsAndMerge(
RPCRecRoiToolCfg(flags, useRun3Config=flags.Trigger.enableL1MuonPhase1))
23 RpcDataPreparator = CompFactory.getComp(
"TrigL2MuonSA::RpcDataPreparator")(
24 TrigT1RPCRecRoiTool = recRoiTool,
25 RpcClusterPreparator = CompFactory.getComp(
"TrigL2MuonSA::RpcClusterPreparator")(
26 TrigT1RPCRecRoiTool = recRoiTool),
30 return acc, RpcDataPreparator
38 TgcDataPreparator = CompFactory.getComp(
"TrigL2MuonSA::TgcDataPreparator")()
40 return acc, TgcDataPreparator
48 from RegionSelector.RegSelToolConfig
import regSelTool_MDT_Cfg
49 MdtDataPreparator = CompFactory.getComp(
"TrigL2MuonSA::MdtDataPreparator")(
52 return acc, MdtDataPreparator
60 CscDataPreparator = CompFactory.getComp(
"TrigL2MuonSA::CscDataPreparator")()
62 return acc, CscDataPreparator
69 from RegionSelector.RegSelToolConfig
import regSelTool_STGC_Cfg
70 StgcDataPreparator = CompFactory.getComp(
"TrigL2MuonSA::StgcDataPreparator")(
73 return acc, StgcDataPreparator
80 TrigL2MuonSA__MmDataPreparator=CompFactory.getComp(
"TrigL2MuonSA::MmDataPreparator")
81 MmDataPreparator = TrigL2MuonSA__MmDataPreparator()
82 from RegionSelector.RegSelToolConfig
import regSelTool_MM_Cfg
85 return acc, MmDataPreparator
92 from RegionSelector.RegSelToolConfig
import regSelTool_MDT_Cfg
93 RpcRoadDefiner = CompFactory.getComp(
"TrigL2MuonSA::RpcRoadDefiner")(
96 return acc, RpcRoadDefiner
103 from RegionSelector.RegSelToolConfig
import regSelTool_MDT_Cfg
104 TgcRoadDefiner = CompFactory.getComp(
"TrigL2MuonSA::TgcRoadDefiner")(
107 return acc, TgcRoadDefiner
113 from RegionSelector.RegSelToolConfig
import regSelTool_MDT_Cfg
114 ClusterRoadDefiner = CompFactory.getComp(
"TrigL2MuonSA::ClusterRoadDefiner")(
117 return acc, ClusterRoadDefiner
121 from MuonConfig.MuonCalibrationConfig
import MdtCalibrationToolCfg
138 if flags.Detector.GeometryCSC:
142 CscDataPreparator =
""
145 if flags.Detector.GeometrysTGC:
149 StgcDataPreparator =
""
152 if flags.Detector.GeometryMM:
156 MmDataPreparator =
""
160 acc.merge( rpcRDAcc )
164 acc.merge( tgcRDAcc )
171 TrigL2MuonSA__MuFastDataPreparator=CompFactory.getComp(
"TrigL2MuonSA::MuFastDataPreparator")
173 from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConfig
import RPCRecRoiToolCfg
174 MuFastDataPreparator = TrigL2MuonSA__MuFastDataPreparator( CSCDataPreparator = CscDataPreparator,
175 MDTDataPreparator = MdtDataPreparator,
176 RPCDataPreparator = RpcDataPreparator,
177 TGCDataPreparator = TgcDataPreparator,
178 STGCDataPreparator = StgcDataPreparator,
179 MMDataPreparator = MmDataPreparator,
180 RpcRoadDefiner = RpcRoadDefiner,
181 TgcRoadDefiner = TgcRoadDefiner,
182 ClusterRoadDefiner = ClusterRoadDefiner,
183 TrigT1RPCRecRoiTool = acc.popToolsAndMerge(
RPCRecRoiToolCfg(flags, useRun3Config=flags.Trigger.enableL1MuonPhase1)) )
186 TrigL2MuonSA__MuFastStationFitter,TrigL2MuonSA__PtFromAlphaBeta=CompFactory.getComps(
"TrigL2MuonSA::MuFastStationFitter",
"TrigL2MuonSA::PtFromAlphaBeta")
187 PtFromAlphaBeta = TrigL2MuonSA__PtFromAlphaBeta()
188 PtFromAlphaBeta.useCscPt =
True
189 PtFromAlphaBeta.AvoidMisalignedCSCs =
False
191 MuFastStationFitter = TrigL2MuonSA__MuFastStationFitter( PtFromAlphaBeta = PtFromAlphaBeta )
192 TrigL2MuonSA__MuFastPatternFinder,TrigL2MuonSA__MuFastTrackFitter,TrigL2MuonSA__MuFastTrackExtrapolator,TrigL2MuonSA__MuCalStreamerTool,TrigL2MuonSA__CscSegmentMaker=CompFactory.getComps(
"TrigL2MuonSA::MuFastPatternFinder",
"TrigL2MuonSA::MuFastTrackFitter",
"TrigL2MuonSA::MuFastTrackExtrapolator",
"TrigL2MuonSA::MuCalStreamerTool",
"TrigL2MuonSA::CscSegmentMaker")
193 MuFastPatternFinder = TrigL2MuonSA__MuFastPatternFinder(CalibrationTool=acc.popToolsAndMerge(
MdtCalibrationToolCfg(flags)))
194 MuFastTrackFitter = TrigL2MuonSA__MuFastTrackFitter()
195 MuFastTrackExtrapolator = TrigL2MuonSA__MuFastTrackExtrapolator()
197 from RegionSelector.RegSelToolConfig
import regSelTool_MDT_Cfg, regSelTool_TGC_Cfg
198 MuCalStreamerTool = TrigL2MuonSA__MuCalStreamerTool(
203 CscSegmentMaker = TrigL2MuonSA__CscSegmentMaker()
205 if not flags.Detector.GeometrysTGC
and not flags.Detector.GeometryMM:
206 MuFastStationFitter.NswStationFitter=
""
209 useNSW = ((
not flags.Muon.runCommissioningChain )
and (
not flags.Muon.disableNSWForL2SA ))
210 from TrigL2MuonSA.TrigL2MuonSAMonitoring
import TrigL2MuonSAMonitoring
211 from TrkConfig.AtlasExtrapolatorConfig
import AtlasExtrapolatorCfg
212 muFastAlg = CompFactory.MuFastSteering(
213 name =
"MuFastSteering_Muon"+setup,
214 DataPreparator = MuFastDataPreparator,
215 StationFitter = MuFastStationFitter,
216 PatternFinder = MuFastPatternFinder,
217 TrackFitter = MuFastTrackFitter,
218 TrackExtrapolator = MuFastTrackExtrapolator,
219 FtfRoadDefiner = CompFactory.TrigL2MuonSA.FtfRoadDefiner(
221 CalibrationStreamer = MuCalStreamerTool,
222 MuonCalibrationStream =
"MuonCalibrationStream"+setup,
223 CscSegmentMaker = CscSegmentMaker,
225 R_WIDTH_TGC_FAILED = 200,
226 R_WIDTH_RPC_FAILED = 400,
227 DoCalibrationStream =
False,
228 USE_ROIBASEDACCESS_CSC =
True,
234 USE_ROIBASEDACCESS_STGC=
False,
235 USE_ROIBASEDACCESS_MM =
False,
237 RpcErrToDebugStream =
True,
242 UseRun3Config = flags.Trigger.enableL1MuonPhase1,
243 UseEndcapInnerFromBarrel =
True,
247 TrigMuonBackExtrapolator=CompFactory.TrigMuonBackExtrapolator
252 if setup ==
'900GeV':
253 muFastAlg.WinPt = 4.0
254 muFastAlg.Scale_Road_BarrelInner = 3
255 muFastAlg.Scale_Road_BarrelMiddle = 3
256 muFastAlg.Scale_Road_BarrelOuter = 3
258 muFastAlg.WinPt = 6.0
259 muFastAlg.Scale_Road_BarrelInner = 1
260 muFastAlg.Scale_Road_BarrelMiddle = 1
261 muFastAlg.Scale_Road_BarrelOuter = 1
264 muFastAlg.DoCalibrationStream =
True
265 muFastAlg.MuonCalDataScouting =
False
266 muFastAlg.MuonCalBufferSize = 1024*1024
268 elif setup ==
'MuonCalibDataScouting':
269 muFastAlg.DoCalibrationStream =
True
270 muFastAlg.MuonCalDataScouting =
True
271 muFastAlg.MuonCalBufferSize = 1024*1024
273 elif setup ==
'l2mtmode':
274 muFastAlg.multitrackMode =
True
275 muFastAlg.doEndcapForl2mt =
False
277 elif setup ==
'IOmode':
279 muFastAlg.topoRoad =
False
280 muFastAlg.InsideOutMode =
True
282 return acc, muFastAlg
287 ptBarrelLUTSvc = CompFactory.getComp(
"TrigL2MuonSA::PtBarrelLUTSvc")(name =
'PtBarrelLUTSvc')
288 ptBarrelLUTSvc.LUTfile =
"pt_barrel.lut"
289 ptBarrelLUTSvc.SP_LUTfile =
"pt_barrelSP_new.lut"
291 acc.addService( ptBarrelLUTSvc )
293 return acc, ptBarrelLUTSvc
298 ptBarrelLUTSvc_MC = CompFactory.getComp(
"TrigL2MuonSA::PtBarrelLUTSvc")(name =
'PtBarrelLUTSvc_MC')
299 ptBarrelLUTSvc_MC.LUTfile =
"pt_barrel.mc10.lut"
300 acc.addService( ptBarrelLUTSvc_MC )
302 return acc, ptBarrelLUTSvc_MC
307 ptEndcapLUTSvc = CompFactory.getComp(
"TrigL2MuonSA::PtEndcapLUTSvc")(name =
'PtEndcapLUTSvc')
308 ptEndcapLUTSvc.FileName =
"pt_endcap.lut"
309 ptEndcapLUTSvc.EMeanLUT =
"pt_comb_mean.lut"
310 ptEndcapLUTSvc.ESigmaLUT =
"pt_comb_sigma.lut"
311 if flags.Detector.GeometrysTGC
or flags.Detector.GeometryMM:
312 ptEndcapLUTSvc.UseRun3LUT =
True
314 ptEndcapLUTSvc.UseRun3LUT =
False
315 acc.addService( ptEndcapLUTSvc )
317 return acc, ptEndcapLUTSvc
322 ptEndcapLUTSvc_MC = CompFactory.getComp(
"TrigL2MuonSA::PtEndcapLUTSvc")(name =
'PtEndcapLUTSvc_MC')
323 ptEndcapLUTSvc_MC.FileName =
"pt_endcap.mc10.lut"
324 ptEndcapLUTSvc_MC.EMeanLUT =
"pt_comb_mean.lut"
325 ptEndcapLUTSvc_MC.ESigmaLUT =
"pt_comb_sigma.lut"
326 if flags.Detector.GeometrysTGC
or flags.Detector.GeometryMM:
327 ptEndcapLUTSvc_MC.UseRun3LUT =
True
329 ptEndcapLUTSvc_MC.UseRun3LUT =
False
330 acc.addService( ptEndcapLUTSvc_MC )
332 return acc, ptEndcapLUTSvc_MC
338 alignmentBarrelLUTSvc = CompFactory.getComp(
"TrigL2MuonSA::AlignmentBarrelLUTSvc")(name =
'AlignmentBarrelLUTSvc')
339 alignmentBarrelLUTSvc.LUTfile =
"dZ_barrel.lut"
340 acc.addService( alignmentBarrelLUTSvc )
342 return acc, alignmentBarrelLUTSvc
351 from HLTSeeding.HLTSeedingConfig
import mapThresholdToL1RoICollection
356 acc.merge( muFastAcc )
364 acc.addEventAlgo(muFastFex)
370 if __name__ ==
"__main__":
371 from AthenaConfiguration.TestDefaults
import defaultTestFiles, defaultGeometryTags
372 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
374 flags.Input.Files = defaultTestFiles.RAW_RUN2
375 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
379 cfg.printConfig(withDetails=
True, summariseProps=
True)