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 DetectorType=DetectorType.Mdt))
105 if flags.Detector.GeometryRPC:
107 name=
"ActsDetAlignmentAlgRpc",
108 CondAlignStore=
"RpcActsAlignContainer" if flags.Muon.enableAlignment
else "",
109 EventAlignStore=
"RpcActsAlignContainer",
110 SplitPhysVolCache =
False,
111 SplitActsTrfCache =
False,
112 FillAlignCache =
False,
113 DetectorType=DetectorType.Rpc))
114 if flags.Detector.GeometryTGC:
116 name=
"ActsDetAlignmentAlgTgc",
117 CondAlignStore=
"TgcActsAlignContainer" if flags.Muon.enableAlignment
else "",
118 EventAlignStore=
"TgcActsAlignContainer",
119 SplitPhysVolCache =
False,
120 SplitActsTrfCache =
False,
121 FillAlignCache =
False,
122 DetectorType=DetectorType.Tgc))
123 if flags.Detector.GeometrysTGC:
125 name=
"ActsDetAlignmentAlgSTGC",
126 CondAlignStore=
"sTgcActsAlignContainer" if flags.Muon.enableAlignment
else "",
127 EventAlignStore=
"sTgcActsAlignContainer",
128 SplitPhysVolCache =
False,
129 SplitActsTrfCache =
False,
130 FillAlignCache =
False,
131 DetectorType=DetectorType.sTgc))
133 if flags.Detector.GeometryMM:
135 name=
"ActsDetAlignmentAlgMM",
136 CondAlignStore=
"MmActsAlignContainer" if flags.Muon.enableAlignment
or \
137 flags.Muon.applyMMPassivation
else "",
138 EventAlignStore=
"MmActsAlignContainer",
139 SplitPhysVolCache =
False,
140 SplitActsTrfCache =
False,
141 FillAlignCache =
False,
142 DetectorType=DetectorType.Mm))