2 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory
import CompFactory
7 name: str =
"ActsTrackingGeometrySvc",
8 **kwargs) -> ComponentAccumulator:
11 from ROOT.ActsTrk
import DetectorType
12 kwargs.setdefault(
"NotAlignDetectors", [DetectorType.Trt,
16 if flags.Detector.GeometryBpipe:
17 from BeamPipeGeoModel.BeamPipeGMConfig
import BeamPipeGeometryCfg
19 kwargs.setdefault(
"BuildBeamPipe",
True)
21 if flags.Detector.GeometryPixel:
22 subDetectors += [
"Pixel"]
23 from PixelGeoModel.PixelGeoModelConfig
import PixelReadoutGeometryCfg
26 if flags.Detector.GeometrySCT:
27 subDetectors += [
"SCT"]
28 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_ReadoutGeometryCfg
31 if flags.Detector.GeometryTRT:
35 from TRT_GeoModel.TRT_GeoModelConfig
import TRT_ReadoutGeometryCfg
38 if flags.Detector.GeometryCalo:
47 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
49 from TileGeoModel.TileGMConfig
import TileGMCfg
52 if flags.Detector.GeometryITkPixel:
53 subDetectors += [
"ITkPixel"]
54 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
57 if flags.Detector.GeometryITkStrip:
58 subDetectors += [
"ITkStrip"]
59 from StripGeoModelXml.ITkStripGeoModelConfig
import ITkStripReadoutGeometryCfg
62 if flags.Detector.GeometryHGTD:
63 subDetectors += [
"HGTD"]
64 if flags.HGTD.Geometry.useGeoModelXml:
65 from HGTD_GeoModelXml.HGTD_GeoModelConfig
import HGTD_ReadoutGeometryCfg
67 from HGTD_GeoModel.HGTD_GeoModelConfig
import HGTD_ReadoutGeometryCfg
70 actsTrackingGeometrySvc = CompFactory.ActsTrackingGeometrySvc(name,
71 BuildSubDetectors=subDetectors,
73 if flags.Detector.GeometryITk:
74 if flags.Acts.TrackingGeometry.MaterialSource ==
"Default":
76 if flags.Detector.GeometryHGTD:
78 actsTrackingGeometrySvc.UseMaterialMap =
True
79 actsTrackingGeometrySvc.MaterialMapCalibFolder = flags.Acts.TrackingGeometry.MaterialCalibrationFolder
80 actsTrackingGeometrySvc.MaterialMapInputFile = \
81 "material-maps-" + flags.GeoModel.AtlasVersion +
"-" + extension +
".json"
82 elif flags.Acts.TrackingGeometry.MaterialSource.find(
".json") != -1:
83 actsTrackingGeometrySvc.UseMaterialMap =
True
84 actsTrackingGeometrySvc.MaterialMapCalibFolder = flags.Acts.TrackingGeometry.MaterialCalibrationFolder
85 actsTrackingGeometrySvc.MaterialMapInputFile = flags.Acts.TrackingGeometry.MaterialSource
87 acc.addService(actsTrackingGeometrySvc, primary =
True)
92 name: str =
"ActsPropStepRootWriterSvc",
93 **kwargs) -> ComponentAccumulator:
95 acc.addService(CompFactory.ActsPropStepRootWriterSvc(name, **kwargs))
100 name: str =
"ActsTrackingGeometryTool" ) -> ComponentAccumulator:
103 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
105 acc.setPrivateTools(CompFactory.ActsTrackingGeometryTool(name))
109 name: str =
"ActsExtrapolationTool",
110 **kwargs) -> ComponentAccumulator:
112 from MagFieldServices.MagFieldServicesConfig
import AtlasFieldCacheCondAlgCfg
115 acc.setPrivateTools(CompFactory.ActsExtrapolationTool(name, **kwargs))
120 name: str =
"ActsMaterialTrackWriterSvc",
121 **kwargs) -> ComponentAccumulator:
124 acc.addService(CompFactory.ActsMaterialTrackWriterSvc(name, **kwargs), primary=
True)
129 name: str =
"ActsMaterialStepConverterTool",
130 **kwargs ) -> ComponentAccumulator:
132 acc.addPublicTool(CompFactory.ActsMaterialStepConverterTool(name, **kwargs), primary=
True)
137 name: str =
"ActsSurfaceMappingTool",
138 **kwargs ) -> ComponentAccumulator:
141 acc.addPublicTool(CompFactory.ActsSurfaceMappingTool(name, **kwargs), primary=
True)
146 name: str =
"ActsVolumeMappingTool",
147 **kwargs ) -> ComponentAccumulator:
150 acc.addPublicTool(CompFactory.ActsVolumeMappingTool(name, **kwargs), primary=
True)
155 name: str =
"ActsMaterialJsonWriterTool",
156 **kwargs) -> ComponentAccumulator:
158 acc.addPublicTool(CompFactory.ActsMaterialJsonWriterTool(name, **kwargs), primary=
True)
163 name: str =
"ActsObjWriterTool",
164 **kwargs) -> ComponentAccumulator:
166 acc.addPublicTool(CompFactory.ActsObjWriterTool(name, **kwargs), primary=
True)
171 name: str =
"ActsExtrapolationAlg",
172 **kwargs) -> ComponentAccumulator:
175 if "ExtrapolationTool" not in kwargs:
179 acc.addEventAlgo(CompFactory.ActsExtrapolationAlg(name, **kwargs))
183 name: str =
"ActsWriteTrackingGeometry",
184 **kwargs) -> ComponentAccumulator:
187 if 'TrackingGeometryTool' not in kwargs:
190 if 'MaterialJsonWriterTool' not in kwargs:
192 OutputFile =
"geometry-maps.json",
193 processSensitives =
False,
194 processNonMaterial =
True) ))
197 if flags.Detector.GeometryBpipe:
198 subDetectors = [
"BeamPipe"]
200 if flags.Detector.GeometryPixel:
201 subDetectors += [
"Pixel"]
202 if flags.Detector.GeometryITkPixel:
203 subDetectors += [
"ITkPixel"]
205 if flags.Detector.GeometrySCT:
206 subDetectors += [
"SCT"]
207 if flags.Detector.GeometryITkStrip:
208 subDetectors += [
"ITkStrip"]
209 if flags.Detector.GeometryHGTD:
210 subDetectors += [
"HGTD"]
212 if 'ObjWriterTool' not in kwargs:
213 kwargs.setdefault(
"ObjWriterTool",
215 OutputDirectory =
"obj",
216 SubDetectors = subDetectors) ))
218 acc.addEventAlgo(CompFactory.ActsWriteTrackingGeometry(name, **kwargs))
222 name: str =
"ActsWriteTrackingGeometryTransformsAlg",
223 **kwargs: dict) -> ComponentAccumulator:
226 if 'TrackingGeometryTool' not in kwargs:
229 acc.addEventAlgo(CompFactory.ActsWriteTrackingGeometryTransforms(name,**kwargs))
233 name: str =
"ActsMaterialMapping",
234 **kwargs) -> ComponentAccumulator:
237 if 'MaterialStepConverterTool' not in kwargs:
240 if 'SurfaceMappingTool' not in kwargs:
243 if 'VolumeMappingTool' not in kwargs:
246 if 'MaterialJsonWriterTool' not in kwargs:
247 kwargs.setdefault(
"MaterialJsonWriterTool",
249 OutputFile =
"material-maps.json",
250 processSensitives =
False,
251 processNonMaterial =
False) ))
253 acc.addEventAlgo(CompFactory.ActsMaterialMapping(name, **kwargs))