ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSegmentCnvConfig.py
Go to the documentation of this file.
1#Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6def MuonR4SegmentCnvAlgCfg(flags, name="MuonR4SegmentCnvAlg", **kwargs):
7 result = ComponentAccumulator()
8
9 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
10 result.merge(ActsGeometryContextAlgCfg(flags))
11
12 if not flags.Detector.GeometryMDT: kwargs.setdefault("MdtKey" ,"")
13 if not flags.Detector.GeometryRPC: kwargs.setdefault("RpcKey" ,"")
14 if not flags.Detector.GeometryTGC: kwargs.setdefault("TgcKey" ,"")
15 if not flags.Detector.GeometryMM: kwargs.setdefault("MmKey" ,"")
16 if not flags.Detector.GeometrysTGC: kwargs.setdefault("sTgcKey" ,"")
17
18 from MuonConfig.MuonRIO_OnTrackCreatorToolConfig import MuonClusterOnTrackCreatorCfg, MdtDriftCircleOnTrackCreatorCfg, TriggerChamberClusterOnTrackCreatorCfg
19
20 if flags.Detector.GeometryMDT:
21 kwargs.setdefault("MdtRotCreator", result.popToolsAndMerge(MdtDriftCircleOnTrackCreatorCfg(flags)))
22 if flags.Detector.GeometryRPC or flags.Detector.GeometryTGC \
23 or flags.Detector.GeometryMM or flags.Detector.GeometrysTGC:
24 kwargs.setdefault("ClusterRotCreator", result.popToolsAndMerge(MuonClusterOnTrackCreatorCfg(flags)))
25 if flags.Detector.GeometryRPC or flags.Detector.GeometryTGC:
26 kwargs.setdefault("CompetingRotCreator", result.getPrimaryAndMerge(TriggerChamberClusterOnTrackCreatorCfg(flags)))
27 from MuonConfig.MuonRecToolsConfig import MuonEDMPrinterToolCfg
28 kwargs.setdefault("printerTool", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags)))
29 the_alg = CompFactory.MuonR4.TrkSegmentCnvAlg(name, **kwargs)
30 result.addEventAlgo(the_alg, primary = True)
31 return result
32
33def xAODSegmentCnvToolCfg(flags, name="xAODSegmentCnvTool", **kwargs):
34 result = ComponentAccumulator()
35 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
36 result.merge(ActsGeometryContextAlgCfg(flags))
37
38 kwargs.setdefault("estimateHoles", flags.Muon.scheduleActsReco)
39
40 if kwargs["estimateHoles"]:
41 from ActsConfig.ActsGeometryConfig import ActsExtrapolationToolCfg
42 kwargs.setdefault("ExtrapolationTool", result.popToolsAndMerge(ActsExtrapolationToolCfg(flags,
43 MaxSteps=10000,
44 InteractionEloss = False,
45 InteractionMultiScatering = False,
46 FieldMode="StraightLine")))
47 the_tool = CompFactory.MuonR4.xAODSegmentCnvTool(name, **kwargs)
48 result.setPrivateTools(the_tool)
49 return result
50
51def xAODSegmentCnvAlgCfg(flags, name="MuonR4xAODSegmentCnvAlg", **kwargs):
52 result = ComponentAccumulator()
53 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
54 result.merge(ActsGeometryContextAlgCfg(flags))
55
56 kwargs.setdefault("SegmentCnvTool", result.popToolsAndMerge(xAODSegmentCnvToolCfg(flags)))
57
58 the_alg = CompFactory.MuonR4.xAODSegmentCnvAlg(name, **kwargs)
59 result.addEventAlgo(the_alg, primary = True)
60 return result
xAODSegmentCnvToolCfg(flags, name="xAODSegmentCnvTool", **kwargs)
xAODSegmentCnvAlgCfg(flags, name="MuonR4xAODSegmentCnvAlg", **kwargs)
MuonR4SegmentCnvAlgCfg(flags, name="MuonR4SegmentCnvAlg", **kwargs)