4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory
import CompFactory
6 from AthenaConfiguration.Enums
import BeamType, ProductionStep
9 from BeamPipeGeoModel.BeamPipeGMConfig
import BeamPipeGeometryCfg
14 beamPipeBuilder = CompFactory.InDet.BeamPipeBuilderCond(name, **kwargs) \
16 CompFactory.InDet.BeamPipeBuilder(name, **kwargs)
18 result.setPrivateTools(beamPipeBuilder)
24 kwargs.setdefault(
"BeamPipeMaterialBinsZ",
25 flags.ITk.trackingGeometry.beampipeMatZbins)
32 if flags.Common.ProductionStep != ProductionStep.Simulation:
33 from PixelGeoModel.PixelGeoModelConfig
import PixelReadoutGeometryCfg
36 from PixelGeoModel.PixelGeoModelConfig
import PixelSimulationGeometryCfg
39 kwargs.setdefault(
"PixelCase",
True)
40 kwargs.setdefault(
"Identification",
'Pixel')
41 kwargs.setdefault(
"SiDetManagerLocation",
'Pixel')
43 kwargs.setdefault(
"BarrelAdditionalLayerRadii", [130.0])
44 kwargs.setdefault(
"BarrelAdditionalLayerType", [0])
46 kwargs.setdefault(
"EndcapAdditionalLayerPositionsZ", [-1900., 1900.])
47 kwargs.setdefault(
"EndcapAdditionalLayerType", [1, 1])
49 kwargs.setdefault(
"BarrelLayerBinsZ", 1)
50 kwargs.setdefault(
"BarrelLayerBinsPhi", 1)
51 kwargs.setdefault(
"EndcapLayerBinsR", 1)
52 kwargs.setdefault(
"EndcapLayerBinsPhi", 1)
53 kwargs.setdefault(
"SetLayerAssociation",
True)
54 kwargs.setdefault(
"BarrelEnvelope", 0.0)
58 pixelLayerBuilder = CompFactory.InDet.SiLayerBuilderCond(name, **kwargs) \
60 CompFactory.InDet.SiLayerBuilder(name, **kwargs)
61 result.setPrivateTools(pixelLayerBuilder)
68 if flags.Common.ProductionStep != ProductionStep.Simulation:
69 from PixelGeoModelXml.ITkPixelGeoModelConfig
import (
70 ITkPixelReadoutGeometryCfg)
73 from PixelGeoModelXml.ITkPixelGeoModelConfig
import (
74 ITkPixelSimulationGeometryCfg)
77 kwargs.setdefault(
"PixelCase",
True)
78 kwargs.setdefault(
"SiDetManagerLocation",
'ITkPixel')
79 kwargs.setdefault(
"PixelReadKey",
'ITkPixelDetectorElementCollection')
80 kwargs.setdefault(
"SCT_ReadKey",
'ITkStripDetectorElementCollection')
81 kwargs.setdefault(
"UseRingLayout",
True)
83 kwargs.setdefault(
"BarrelLayerBinsZ",
84 flags.ITk.trackingGeometry.pixelBarrelMatZbins)
85 kwargs.setdefault(
"BarrelLayerBinsPhi",
86 flags.ITk.trackingGeometry.pixelBarrelMatPhiBins)
87 kwargs.setdefault(
"EndcapLayerBinsR",
88 flags.ITk.trackingGeometry.pixelEndcapMatRbins)
89 kwargs.setdefault(
"EndcapLayerBinsPhi",
90 flags.ITk.trackingGeometry.pixelEndcapMatPhiBins)
91 kwargs.setdefault(
"SetLayerAssociation",
True)
95 pixelLayerBuilder = CompFactory.InDet.SiLayerBuilderCond(name, **kwargs) \
97 CompFactory.InDet.SiLayerBuilder(name, **kwargs)
98 result.setPrivateTools(pixelLayerBuilder)
104 kwargs.setdefault(
"Identification",
'ITkPixelInner')
105 kwargs.setdefault(
"LayerIndicesBarrel", [0, 1])
106 kwargs.setdefault(
"LayerIndicesEndcap", [0, 1, 2])
108 kwargs.setdefault(
"EndcapAdditionalLayerPositionsZ", [-2250., 2250.])
109 kwargs.setdefault(
"EndcapAdditionalLayerType", [1, 1])
115 kwargs.setdefault(
"Identification",
'ITkPixelOuter')
116 kwargs.setdefault(
"EndcapEnvelope", 25.)
117 kwargs.setdefault(
"LayerIndicesBarrel", [2, 3, 4])
118 kwargs.setdefault(
"LayerIndicesEndcap", [3, 4, 5, 6, 7, 8])
123 if flags.Common.ProductionStep != ProductionStep.Simulation:
124 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_ReadoutGeometryCfg
127 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_SimulationGeometryCfg
130 kwargs.setdefault(
"PixelCase",
False)
131 kwargs.setdefault(
"Identification",
'SCT')
132 kwargs.setdefault(
"SiDetManagerLocation",
'SCT')
134 kwargs.setdefault(
"BarrelAdditionalLayerRadii", [])
135 kwargs.setdefault(
"BarrelAdditionalLayerType", [])
136 kwargs.setdefault(
"EndcapAdditionalLayerPositionsZ", [-2850., 2850.])
137 kwargs.setdefault(
"EndcapAdditionalLayerType", [0, 0])
138 kwargs.setdefault(
"BarrelLayerBinsZ", 1)
139 kwargs.setdefault(
"BarrelLayerBinsPhi", 1)
141 kwargs.setdefault(
"EndcapLayerBinsR", 1)
142 kwargs.setdefault(
"EndcapLayerBinsPhi", 1)
143 kwargs.setdefault(
"EndcapComplexRingBinning",
True)
144 kwargs.setdefault(
"SetLayerAssociation",
True)
145 kwargs.setdefault(
"BarrelEnvelope", 0.0)
149 SCT_LayerBuilder = CompFactory.InDet.SiLayerBuilderCond(name, **kwargs) \
151 CompFactory.InDet.SiLayerBuilder(name, **kwargs)
152 result.setPrivateTools(SCT_LayerBuilder)
158 if flags.Common.ProductionStep != ProductionStep.Simulation:
159 from StripGeoModelXml.ITkStripGeoModelConfig
import (
160 ITkStripReadoutGeometryCfg)
163 from StripGeoModelXml.ITkStripGeoModelConfig
import (
164 ITkStripSimulationGeometryCfg)
167 kwargs.setdefault(
"PixelCase",
False)
168 kwargs.setdefault(
"Identification",
'ITkStrip')
169 kwargs.setdefault(
"SiDetManagerLocation",
'ITkStrip')
170 kwargs.setdefault(
"PixelReadKey",
'ITkPixelDetectorElementCollection')
171 kwargs.setdefault(
"SCT_ReadKey",
'ITkStripDetectorElementCollection')
172 kwargs.setdefault(
"AddMoreSurfaces",
True)
174 kwargs.setdefault(
"BarrelLayerBinsZ",
175 flags.ITk.trackingGeometry.stripBarrelMatZbins)
176 kwargs.setdefault(
"BarrelLayerBinsPhi",
177 flags.ITk.trackingGeometry.stripBarrelMatPhiBins)
178 kwargs.setdefault(
"EndcapLayerBinsR",
179 flags.ITk.trackingGeometry.stripEndcapMatRbins)
180 kwargs.setdefault(
"EndcapLayerBinsPhi",
181 flags.ITk.trackingGeometry.stripEndcapMatPhiBins)
182 kwargs.setdefault(
"SetLayerAssociation",
True)
186 stripLayerBuilder = CompFactory.InDet.SiLayerBuilderCond(name, **kwargs) \
188 CompFactory.InDet.SiLayerBuilder(name, **kwargs)
189 result.setPrivateTools(stripLayerBuilder)
194 from TRT_GeoModel.TRT_GeoModelConfig
import TRT_ReadoutGeometryCfg
197 useFatras = flags.Common.ProductionStep
in \
198 [ProductionStep.Simulation, ProductionStep.FastChain] \
199 and flags.Sim.ISF.Simulator.usesFatras()
201 kwargs.setdefault(
"ModelLayersOnly",
202 not(flags.Beam.Type
is BeamType.Cosmics)
and \
206 kwargs.setdefault(
"BarrelLayerBinsZ", 1)
207 kwargs.setdefault(
"BarrelLayerBinsPhi", 1)
208 kwargs.setdefault(
"EndcapLayerBinsR", 1)
212 TRT_LayerBuilder = CompFactory.InDet.TRT_LayerBuilderCond(name, **kwargs) \
214 CompFactory.InDet.TRT_LayerBuilder(name, **kwargs)
215 result.setPrivateTools(TRT_LayerBuilder)
226 beamPipeBuilder = result.popToolsAndMerge(
228 result.addPublicTool(beamPipeBuilder)
235 if (useCond
and flags.Detector.GeometryID):
236 from InDetServMatGeoModel.InDetServMatGeoModelConfig
import (
237 InDetServiceMaterialCfg)
241 if flags.Detector.GeometryPixel:
242 pixelLayerBuilder = result.popToolsAndMerge(
244 result.addPublicTool(pixelLayerBuilder)
247 pixelLayerBinning = 2
250 layerbuilders += [pixelLayerBuilder]
251 binnings += [pixelLayerBinning]
254 if flags.Detector.GeometrySCT:
256 SCT_LayerBuilder = result.popToolsAndMerge(
258 result.addPublicTool(SCT_LayerBuilder)
264 layerbuilders += [SCT_LayerBuilder]
265 binnings += [SCT_LayerBinning]
268 if flags.Detector.GeometryTRT:
269 TRT_LayerBuilder = result.popToolsAndMerge(
274 result.addPublicTool(TRT_LayerBuilder)
279 useFatras = flags.Common.ProductionStep
in \
280 [ProductionStep.Simulation, ProductionStep.FastChain] \
281 and flags.Sim.ISF.Simulator.usesFatras()
282 if (flags.Beam.Type
is BeamType.Cosmics
or useFatras):
286 layerbuilders += [TRT_LayerBuilder]
287 binnings += [TRT_LayerBinning]
294 nameSuffix =
'Cond' if useCond
else ''
297 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
298 LayerArrayCreatorCfg)
299 layerArrayCreator = result.popToolsAndMerge(
301 result.addPublicTool(layerArrayCreator)
304 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
305 InDetTrackingVolumeHelperCfg)
306 trackingVolumeHelper = result.popToolsAndMerge(
309 result.addPublicTool(trackingVolumeHelper)
312 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
313 TrackingVolumeArrayCreatorCfg)
314 trackingVolumeArrayCreator = result.popToolsAndMerge(
316 name=
'InDetTrackingVolumeArrayCreator' + \
318 result.addPublicTool(trackingVolumeArrayCreator)
321 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
322 InDetCylinderVolumeCreatorCfg)
323 inDetCylinderVolumeCreator = result.popToolsAndMerge(
326 LayerArrayCreator = layerArrayCreator,
327 TrackingVolumeHelper = trackingVolumeHelper,
328 TrackingVolumeArrayCreator = trackingVolumeArrayCreator))
329 result.addPublicTool(inDetCylinderVolumeCreator)
331 from SubDetectorEnvelopes.SubDetectorEnvelopesConfig
import (
335 kwargs.setdefault(
"BeamPipeBuilder", beamPipeBuilder)
336 kwargs.setdefault(
"LayerBuilders", layerbuilders)
337 kwargs.setdefault(
"LayerBinningType", binnings)
338 kwargs.setdefault(
"ColorCodes", colors)
339 kwargs.setdefault(
"EnvelopeDefinitionSvc", envelopeDefinitionSvc)
340 kwargs.setdefault(
"VolumeEnclosureDiscPositions", [3000., 3450.])
341 kwargs.setdefault(
"TrackingVolumeCreator", inDetCylinderVolumeCreator)
342 kwargs.setdefault(
"LayerArrayCreator", layerArrayCreator)
343 kwargs.setdefault(
"ReplaceAllJointBoundaries",
True)
344 kwargs.setdefault(
"VolumeEnclosureCylinderRadii", [])
345 kwargs.setdefault(
"BuildBoundaryLayers",
True)
346 kwargs.setdefault(
"ExitVolumeName",
'InDet::Containers::InnerDetector')
351 geometryBuilder = CompFactory.InDet.RobustTrackingGeometryBuilderCond(name, **kwargs)
if useCond
else \
352 CompFactory.InDet.RobustTrackingGeometryBuilder(name, **kwargs)
353 result.setPrivateTools(geometryBuilder)
362 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
363 ITkBeamPipeProviderCfg)
364 beamPipeProvider = result.popToolsAndMerge(
366 result.addPublicTool(beamPipeProvider)
370 layerProviders = [beamPipeProvider]
371 binnings_barrel = [beamPipeBinning]
372 binnings_endcap = [beamPipeBinning]
376 if flags.Detector.GeometryITkPixel:
377 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
378 ITkPixelLayerProviderInnerCfg)
379 pixelProviderInner = result.popToolsAndMerge(
381 result.addPublicTool(pixelProviderInner)
384 pixelLayerBinning = 2
387 layerProviders += [pixelProviderInner]
388 binnings_barrel += [pixelLayerBinning]
389 binnings_endcap += [pixelLayerBinning]
392 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
393 ITkPixelLayerProviderOuterCfg)
394 pixelProviderOuter = result.popToolsAndMerge(
396 result.addPublicTool(pixelProviderOuter)
399 pixelLayerBinning = 2
402 layerProviders += [pixelProviderOuter]
403 binnings_barrel += [pixelLayerBinning]
404 binnings_endcap += [pixelLayerBinning]
407 if flags.Detector.GeometryITkStrip:
408 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
409 ITkStripLayerProviderCfg)
410 stripProvider = result.popToolsAndMerge(
412 result.addPublicTool(stripProvider)
415 stripLayerBinning = 2
418 layerProviders += [stripProvider]
419 binnings_barrel += [stripLayerBinning]
420 binnings_endcap += [stripLayerBinning]
424 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
425 LayerArrayCreatorCfg)
426 layerArrayCreator = result.popToolsAndMerge(
428 result.addPublicTool(layerArrayCreator)
431 from TrackingGeometryCondAlg.TrkDetDescrToolsConfig
import (
432 ITkCylinderVolumeCreatorCfg)
433 cylinderVolumeCreator = result.popToolsAndMerge(
435 result.addPublicTool(cylinderVolumeCreator)
437 from SubDetectorEnvelopes.SubDetectorEnvelopesConfig
import EnvelopeDefSvcCfg
440 kwargs.setdefault(
"LayerBuilders", layerProviders)
441 kwargs.setdefault(
"LayerBinningTypeCenter", binnings_barrel)
442 kwargs.setdefault(
"LayerBinningTypeEndcap", binnings_endcap)
443 kwargs.setdefault(
"ColorCodes", colors)
444 kwargs.setdefault(
"EnvelopeDefinitionSvc", envelopeDefinitionSvc)
445 kwargs.setdefault(
"TrackingVolumeCreator", cylinderVolumeCreator)
446 kwargs.setdefault(
"LayerArrayCreator", layerArrayCreator)
447 kwargs.setdefault(
"CheckForRingLayout",
True)
448 kwargs.setdefault(
"MinimalRadialGapForVolumeSplit",
449 flags.ITk.trackingGeometry.minimalRadialGapForVolumeSplit)
450 kwargs.setdefault(
"ReplaceAllJointBoundaries",
True)
451 kwargs.setdefault(
"BuildBoundaryLayers",
True)
452 kwargs.setdefault(
"ExitVolumeName",
'InDet::Containers::InnerDetector')
453 kwargs.setdefault(
"RemoveHGTD",
True)
454 kwargs.setdefault(
"ZminHGTD", 3420.)
458 GeometryBuilder = CompFactory.InDet.StagedTrackingGeometryBuilderCond(name, **kwargs)
if useCond
else \
459 CompFactory.InDet.StagedTrackingGeometryBuilder(name, **kwargs)
460 result.setPrivateTools(GeometryBuilder)