2 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory
import CompFactory
7 the_tool = CompFactory.MuonGMR4.MuonGeoUtilityTool(name, **kwargs)
8 result.addPublicTool(the_tool, primary =
True)
13 the_tool = CompFactory.MuonGMR4.MdtReadoutGeomTool(name, **kwargs)
14 result.setPrivateTools(the_tool)
20 the_tool = CompFactory.MuonGMR4.RpcReadoutGeomTool(name, **kwargs)
21 result.setPrivateTools(the_tool)
27 the_tool = CompFactory.MuonGMR4.TgcReadoutGeomTool(name, **kwargs)
28 result.setPrivateTools(the_tool)
34 the_tool = CompFactory.MuonGMR4.sTgcReadoutGeomTool(name, **kwargs)
35 result.setPrivateTools(the_tool)
41 the_tool = CompFactory.MuonGMR4.MmReadoutGeomTool(name, **kwargs)
42 result.setPrivateTools(the_tool)
48 the_tool = CompFactory.MuonGMR4.ChamberAssembleTool(name, **kwargs)
49 result.setPrivateTools(the_tool)
54 if flags.Detector.GeometryMDT:
57 if flags.Detector.GeometryRPC:
60 if flags.Detector.GeometryTGC:
63 if flags.Detector.GeometrysTGC:
66 if flags.Detector.GeometryMM:
69 from AthenaConfiguration.Enums
import ProductionStep
70 if flags.Common.ProductionStep
is not ProductionStep.Simulation:
72 print(
"MuonDetectorToolCfg: Adding ChamberAssebmbleTool to MuonDetectorTool")
73 kwargs.setdefault(
"ReadoutEleBuilders", sub_detTools)
75 the_tool = CompFactory.MuonGMR4.MuonDetectorTool(name = name, **kwargs)
76 result.setPrivateTools(the_tool)
81 from AtlasGeoModel.GeoModelConfig
import GeoModelCfg
82 geoModelSvc = result.getPrimaryAndMerge(
GeoModelCfg(flags))
84 print(
"MuonGeoModelCfg: Adding MuonDetectorTool to GeoModelSvc")
89 if not flags.Muon.usePhaseIIGeoSetup:
return result
90 from MuonCondAlgR4.ConditionsConfig
import ActsMuonAlignCondAlgCfg
92 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsAlignStoreProviderAlgCfg
94 from ROOT.ActsTrk
import DetectorType
96 if flags.Detector.GeometryMDT:
98 name=
"ActsDetAlignmentAlgMdt",
99 CondAlignStore=
"MdtActsAlignContainer" if flags.Muon.enableAlignment
else "",
100 EventAlignStore=
"MdtActsAlignContainer",
101 SplitPhysVolCache =
False,
102 SplitActsTrfCache =
False,
103 FillAlignCache =
False,
104 LoadTrackingGeoSvc =
False,
105 DetectorType=DetectorType.Mdt))
106 if flags.Detector.GeometryRPC:
108 name=
"ActsDetAlignmentAlgRpc",
109 CondAlignStore=
"RpcActsAlignContainer" if flags.Muon.enableAlignment
else "",
110 EventAlignStore=
"RpcActsAlignContainer",
111 SplitPhysVolCache =
False,
112 SplitActsTrfCache =
False,
113 FillAlignCache =
False,
114 LoadTrackingGeoSvc =
False,
115 DetectorType=DetectorType.Rpc))
116 if flags.Detector.GeometryTGC:
118 name=
"ActsDetAlignmentAlgTgc",
119 CondAlignStore=
"TgcActsAlignContainer" if flags.Muon.enableAlignment
else "",
120 EventAlignStore=
"TgcActsAlignContainer",
121 SplitPhysVolCache =
False,
122 SplitActsTrfCache =
False,
123 FillAlignCache =
False,
124 LoadTrackingGeoSvc =
False,
125 DetectorType=DetectorType.Tgc))
126 if flags.Detector.GeometrysTGC:
128 name=
"ActsDetAlignmentAlgSTGC",
129 CondAlignStore=
"sTgcActsAlignContainer" if flags.Muon.enableAlignment
else "",
130 EventAlignStore=
"sTgcActsAlignContainer",
131 SplitPhysVolCache =
False,
132 SplitActsTrfCache =
False,
133 FillAlignCache =
False,
134 LoadTrackingGeoSvc =
False,
135 DetectorType=DetectorType.sTgc))
137 if flags.Detector.GeometryMM:
139 name=
"ActsDetAlignmentAlgMM",
140 CondAlignStore=
"MmActsAlignContainer" if flags.Muon.enableAlignment
or \
141 flags.Muon.applyMMPassivation
else "",
142 EventAlignStore=
"MmActsAlignContainer",
143 SplitPhysVolCache =
False,
144 SplitActsTrfCache =
False,
145 FillAlignCache =
False,
146 LoadTrackingGeoSvc =
False,
147 DetectorType=DetectorType.Mm))