diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt index 971210f30a5b092fdedcab1c5eeac7c5d3aa3ffd..381c82e426106eb4dfe7c2471added4c34603383 100644 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( InDetTrackingGeometry ) @@ -12,5 +12,3 @@ atlas_add_component( InDetTrackingGeometry src/components/*.cxx LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AthenaBaseComps CxxUtils GeoPrimitives GaudiKernel InDetIdentifier TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry BeamPipeGeoModelLib StoreGateLib Identifier InDetReadoutGeometry PixelReadoutGeometryLib SCT_ReadoutGeometry TRT_ReadoutGeometry TrkDetDescrGeoModelCnv TrkSurfaces TrkVolumes SubDetectorEnvelopesLib ) -# Install files from the package: -atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredInDetTrackingGeometryBuilder.py b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredInDetTrackingGeometryBuilder.py deleted file mode 100644 index c942261ff7a862f7521d5c948d6f4b9532ac14bb..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredInDetTrackingGeometryBuilder.py +++ /dev/null @@ -1,203 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -###################################################### -# ConfiguredInDetTrackingGeometry module -# -# it inherits from RobustTrackingGeometryBuilderConf and performs -# standard configuration -# -###################################################### - -# import the Extrapolator configurable -from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__RobustTrackingGeometryBuilder -from AthenaCommon.DetFlags import DetFlags - -# define the class -class ConfiguredInDetTrackingGeometryBuilder( InDet__RobustTrackingGeometryBuilder ): - # constructor - def __init__(self,name = 'InDetTrackingGeometryBuilder', - namePrefix = '', - setLayerAssociation = True, - buildTrtStrawLayers = False): - - # get the ToolSvc - from AthenaCommon.AppMgr import ToolSvc, ServiceMgr - - # the Detector flags to be imported - from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags - - # beampipe - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__BeamPipeBuilder - BeamPipeBuilder = InDet__BeamPipeBuilder(name=namePrefix+'BeamPipeBuilder') - BeamPipeBuilder.BeamPipeRadius = TrkDetFlags.BeamPipeRadius() - BeamPipeBuilder.BeamPipeThickness = TrkDetFlags.BeamPipeThickness() - BeamPipeBuilder.BeamPipeMaterialBinsZ = TrkDetFlags.BeamPipeLayerMaterialBinsZ() - BeamPipeBuilder.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - ToolSvc += BeamPipeBuilder - - # the layer builders - layerbuilders = [] - binnings = [] - colors = [] - - # @TODO put DetFlags isOn here, but make sure that this is really when the detector is not built - - # PIXEL building - if DetFlags.pixel_on(): - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__SiLayerBuilder - PixelLayerBuilder = InDet__SiLayerBuilder(name=namePrefix+'PixelLayerBuilder') - PixelLayerBuilder.PixelCase = True - PixelLayerBuilder.Identification = 'Pixel' - PixelLayerBuilder.SiDetManagerLocation = 'Pixel' - # additionall layers - handle with care ! - PixelLayerBuilder.BarrelAdditionalLayerRadii = [ 130. ] # The PST - PixelLayerBuilder.BarrelAdditionalLayerType = [ 0 ] # -- will shift volume boundary to PST - PixelLayerBuilder.EndcapAdditionalLayerPositionsZ = [ -1900. , 1900. ] # DBM - PixelLayerBuilder.EndcapAdditionalLayerType = [ 1 , 1 ] # DBM - # Pixel barrel specifications - PixelLayerBuilder.BarrelLayerBinsZ = TrkDetFlags.PixelBarrelLayerMaterialBinsZ() - PixelLayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.PixelBarrelLayerMaterialBinsPhi() - PixelLayerBuilder.EndcapLayerBinsR = TrkDetFlags.PixelEndcapLayerMaterialBinsR() - PixelLayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.PixelEndcapLayerMaterialBinsPhi() - PixelLayerBuilder.BarrelEnvelope = 0.0 - - # set the layer association - PixelLayerBuilder.SetLayerAssociation = setLayerAssociation - # output level - PixelLayerBuilder.OutputLevel = TrkDetFlags.PixelBuildingOutputLevel() - # the binning type of the layers - PixelLayerBinning = 2 - # add it to tool service - ToolSvc += PixelLayerBuilder - # put them to the caches - layerbuilders += [ PixelLayerBuilder ] - binnings += [ PixelLayerBinning ] - colors += [ 3 ] - - if DetFlags.SCT_on(): - # SCT building - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__SiLayerBuilder - SCT_LayerBuilder = InDet__SiLayerBuilder(name=namePrefix+'SCT_LayerBuilder') - SCT_LayerBuilder.PixelCase = False - SCT_LayerBuilder.Identification = 'SCT' - SCT_LayerBuilder.SiDetManagerLocation = 'SCT' - # additionall layers - handle with care ! - SCT_LayerBuilder.EndcapAdditionalLayerPositionsZ = [ -2850. , 2850. ] - SCT_LayerBuilder.EndcapAdditionalLayerType = [ 0 , 0 ] - # SCT barrel specifications - SCT_LayerBuilder.BarrelLayerBinsZ = TrkDetFlags.SCT_BarrelLayerMaterialBinsZ() - SCT_LayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.SCT_BarrelLayerMaterialBinsPhi() - # SCT endcap specifications - SCT_LayerBuilder.EndcapLayerBinsR = TrkDetFlags.SCT_EndcapLayerMaterialBinsR() - SCT_LayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.SCT_EndcapLayerMaterialBinsPhi() - SCT_LayerBuilder.EndcapComplexRingBinning = TrkDetFlags.SCT_EndcapLayerDynamicRings() - SCT_LayerBuilder.BarrelEnvelope = 0.0 - # set the layer association - SCT_LayerBuilder.SetLayerAssociation = setLayerAssociation - # output level - SCT_LayerBuilder.OutputLevel = TrkDetFlags.SCT_BuildingOutputLevel() - # the binning type of the layer - SCT_LayerBinning = 2 - # SCT -> ToolSvc - ToolSvc += SCT_LayerBuilder - # put them to the caches - layerbuilders += [ SCT_LayerBuilder ] - binnings += [ SCT_LayerBinning ] - colors += [ 4 ] - - if DetFlags.TRT_on(): - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__TRT_LayerBuilder - TRT_LayerBuilder = InDet__TRT_LayerBuilder(name=namePrefix+'TRT_LayerBuilder') - # TRT barrel specifications - TRT_LayerBuilder.ModelBarrelLayers = TrkDetFlags.TRT_BarrelModelLayers() - TRT_LayerBuilder.BarrelLayerBinsZ = TrkDetFlags.TRT_BarrelLayerMaterialBinsZ() - TRT_LayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.TRT_BarrelLayerMaterialBinsPhi() - # SCT endcap specifications - TRT_LayerBuilder.ModelEndcapLayers = TrkDetFlags.TRT_EndcapModelLayers() - TRT_LayerBuilder.EndcapLayerBinsR = TrkDetFlags.TRT_EndcapLayerMaterialBinsR() - TRT_LayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.TRT_EndcapLayerMaterialBinsPhi() - # set the binning from bi-aequidistant to arbitrary for complex TRT volumes - TRT_LayerBinning = 1 - if buildTrtStrawLayers or TrkDetFlags.TRT_BuildStrawLayers() : - TRT_LayerBinning = 2 - TRT_LayerBuilder.ModelLayersOnly = False - # output level - TRT_LayerBuilder.OutputLevel = TrkDetFlags.TRT_BuildingOutputLevel() - # TRT -> ToolSvc - ToolSvc += TRT_LayerBuilder - # put them to the caches - layerbuilders += [ TRT_LayerBuilder ] - binnings += [ TRT_LayerBinning ] - colors += [ 5 ] - - - # helpers for the InDetTrackingGeometry Builder : layer array creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__LayerArrayCreator - InDetLayerArrayCreator = Trk__LayerArrayCreator(name = 'InDetLayerArrayCreator') - InDetLayerArrayCreator.EmptyLayerMode = 2 # deletes empty material layers from arrays - InDetLayerArrayCreator.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to ToolSvc - ToolSvc += InDetLayerArrayCreator - - # helpers for the InDetTrackingGeometry Builder : volume array creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeArrayCreator - InDetTrackingVolumeArrayCreator = Trk__TrackingVolumeArrayCreator(name = 'InDetTrackingVolumeArrayCreator') - InDetTrackingVolumeArrayCreator.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to ToolSvc - ToolSvc += InDetTrackingVolumeArrayCreator - - # helpers for the InDetTrackingGeometry Builder : tracking voluem helper for glueing - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeHelper - InDetTrackingVolumeHelper = Trk__TrackingVolumeHelper(name ='InDetTrackingVolumeHelper') - InDetTrackingVolumeHelper.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # the material bins - InDetTrackingVolumeHelper.BarrelLayerBinsZ = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - InDetTrackingVolumeHelper.BarrelLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - InDetTrackingVolumeHelper.EndcapLayerBinsR = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - InDetTrackingVolumeHelper.EndcapLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - # add to ToolSvc - ToolSvc += InDetTrackingVolumeHelper - - # helpers for the InDetTrackingGeometry Builder : cylinder volume creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__CylinderVolumeCreator - InDetCylinderVolumeCreator = Trk__CylinderVolumeCreator(name = 'InDetCylinderVolumeCreator') - # give him the layer array creator - InDetCylinderVolumeCreator.LayerArrayCreator = InDetLayerArrayCreator - InDetCylinderVolumeCreator.TrackingVolumeArrayCreator = InDetTrackingVolumeArrayCreator - InDetCylinderVolumeCreator.TrackingVolumeHelper = InDetTrackingVolumeHelper - # specifiy the binning, passive layers, entry layers - InDetCylinderVolumeCreator.PassiveLayerThickness = TrkDetFlags.InDetPassiveLayerThickness() - InDetCylinderVolumeCreator.PassiveLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - InDetCylinderVolumeCreator.PassiveLayerBinsRZ = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - # output level - InDetCylinderVolumeCreator.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to ToolSvc - ToolSvc += InDetCylinderVolumeCreator - - # the envelope definition service - from SubDetectorEnvelopes.SubDetectorEnvelopesConf import DetDescrDBEnvelopeSvc - AtlasEnvelopeSvc = DetDescrDBEnvelopeSvc('AtlasEnvelopeSvcDefinitionSvc') - # set the output level for the Envelope service - AtlasEnvelopeSvc.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to SvcMgr - ServiceMgr += AtlasEnvelopeSvc - - # the tracking geometry builder - InDet__RobustTrackingGeometryBuilder.__init__(self,namePrefix+name,\ - BeamPipeBuilder = BeamPipeBuilder,\ - LayerBuilders = layerbuilders, - LayerBinningType = binnings, - ColorCodes = colors, - BarrelEntryLayers = [ 2, 2, 2 ], - EndcapEntryLayers = [ 1, 0, 1 ], - EnvelopeDefinitionSvc = AtlasEnvelopeSvc, - VolumeEnclosureDiscPositions = [ 3000., 3450. ], - TrackingVolumeCreator = InDetCylinderVolumeCreator, - LayerArrayCreator = InDetLayerArrayCreator, - BuildBoundaryLayers = TrkDetFlags.InDetBuildMaterialBoundaries(), - ReplaceAllJointBoundaries = TrkDetFlags.InDetBuildJointBoundaries(), - OutputLevel = TrkDetFlags.InDetBuildingOutputLevel(), - ExitVolumeName = TrkDetFlags.InDetContainerName(), - MagneticFieldMode = TrkDetFlags.MagneticFieldMode()) - - diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredInDetTrackingGeometryBuilderCond.py b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredInDetTrackingGeometryBuilderCond.py deleted file mode 100644 index decd93fb0b7591dd86786f2bd6aa9a8911f58c8d..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredInDetTrackingGeometryBuilderCond.py +++ /dev/null @@ -1,208 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -###################################################### -# ConfiguredInDetTrackingGeometry module -# -# it inherits from RobustTrackingGeometryBuilderConf and performs -# standard configuration -# -###################################################### - -# import the Extrapolator configurable -from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__RobustTrackingGeometryBuilderCond -from AthenaCommon.DetFlags import DetFlags - -# define the class -class ConfiguredInDetTrackingGeometryBuilderCond( InDet__RobustTrackingGeometryBuilderCond ): - # constructor - # the name must already contain the prefix and suffix if desired - def __init__(self, - name = 'InDetTrackingGeometryBuilderCond', - namePrefix = '', - nameSuffix= 'Cond', - setLayerAssociation = True, - buildTrtStrawLayers = False): - - # get the ToolSvc - from AthenaCommon.AppMgr import ToolSvc, ServiceMgr - - # the Detector flags to be imported - from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags - - # beampipe - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__BeamPipeBuilderCond - BeamPipeBuilder = InDet__BeamPipeBuilderCond(name=namePrefix+'BeamPipeBuilder'+nameSuffix) - BeamPipeBuilder.BeamPipeRadius = TrkDetFlags.BeamPipeRadius() - BeamPipeBuilder.BeamPipeThickness = TrkDetFlags.BeamPipeThickness() - BeamPipeBuilder.BeamPipeMaterialBinsZ = TrkDetFlags.BeamPipeLayerMaterialBinsZ() - BeamPipeBuilder.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - ToolSvc += BeamPipeBuilder - - # the layer builders - layerbuilders = [] - binnings = [] - colors = [] - - # @TODO put DetFlags isOn here, but make sure that this is really when the detector is not built - - # PIXEL building - if DetFlags.pixel_on(): - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__SiLayerBuilderCond - PixelLayerBuilder = InDet__SiLayerBuilderCond(name=namePrefix+'PixelLayerBuilder'+nameSuffix) - PixelLayerBuilder.PixelCase = True - PixelLayerBuilder.Identification = 'Pixel' - PixelLayerBuilder.SiDetManagerLocation = 'Pixel' - # additionall layers - handle with care ! - PixelLayerBuilder.BarrelAdditionalLayerRadii = [ 130. ] # The PST - PixelLayerBuilder.BarrelAdditionalLayerType = [ 0 ] # -- will shift volume boundary to PST - PixelLayerBuilder.BarrelEnvelope = 0.0 - PixelLayerBuilder.EndcapAdditionalLayerPositionsZ = [ -1900. , 1900. ] # DBM - PixelLayerBuilder.EndcapAdditionalLayerType = [ 1 , 1 ] # DBM - # Pixel barrel specifications - PixelLayerBuilder.BarrelLayerBinsZ = TrkDetFlags.PixelBarrelLayerMaterialBinsZ() - PixelLayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.PixelBarrelLayerMaterialBinsPhi() - PixelLayerBuilder.EndcapLayerBinsR = TrkDetFlags.PixelEndcapLayerMaterialBinsR() - PixelLayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.PixelEndcapLayerMaterialBinsPhi() - - # set the layer association - PixelLayerBuilder.SetLayerAssociation = setLayerAssociation - # output level - PixelLayerBuilder.OutputLevel = TrkDetFlags.PixelBuildingOutputLevel() - # the binning type of the layers - PixelLayerBinning = 2 - # add it to tool service - ToolSvc += PixelLayerBuilder - # put them to the caches - layerbuilders += [ PixelLayerBuilder ] - binnings += [ PixelLayerBinning ] - colors += [ 3 ] - - if DetFlags.SCT_on(): - # SCT building - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__SiLayerBuilderCond - SCT_LayerBuilder = InDet__SiLayerBuilderCond(name=namePrefix+'SCT_LayerBuilder'+nameSuffix) - SCT_LayerBuilder.PixelCase = False - SCT_LayerBuilder.Identification = 'SCT' - SCT_LayerBuilder.SiDetManagerLocation = 'SCT' - # additionall layers - handle with care ! - SCT_LayerBuilder.EndcapAdditionalLayerPositionsZ = [ -2850. , 2850. ] - SCT_LayerBuilder.EndcapAdditionalLayerType = [ 0 , 0 ] - # SCT barrel specifications - SCT_LayerBuilder.BarrelLayerBinsZ = TrkDetFlags.SCT_BarrelLayerMaterialBinsZ() - SCT_LayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.SCT_BarrelLayerMaterialBinsPhi() - SCT_LayerBuilder.BarrelEnvelope = 0.0 - # SCT endcap specifications - SCT_LayerBuilder.EndcapLayerBinsR = TrkDetFlags.SCT_EndcapLayerMaterialBinsR() - SCT_LayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.SCT_EndcapLayerMaterialBinsPhi() - SCT_LayerBuilder.EndcapComplexRingBinning = TrkDetFlags.SCT_EndcapLayerDynamicRings() - # set the layer association - SCT_LayerBuilder.SetLayerAssociation = setLayerAssociation - # output level - SCT_LayerBuilder.OutputLevel = TrkDetFlags.SCT_BuildingOutputLevel() - # the binning type of the layer - SCT_LayerBinning = 2 - # SCT -> ToolSvc - ToolSvc += SCT_LayerBuilder - # put them to the caches - layerbuilders += [ SCT_LayerBuilder ] - binnings += [ SCT_LayerBinning ] - colors += [ 4 ] - - if DetFlags.TRT_on(): - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__TRT_LayerBuilderCond - TRT_LayerBuilder = InDet__TRT_LayerBuilderCond(name=namePrefix+'TRT_LayerBuilder'+nameSuffix) - # TRT barrel specifications - TRT_LayerBuilder.ModelBarrelLayers = TrkDetFlags.TRT_BarrelModelLayers() - TRT_LayerBuilder.BarrelLayerBinsZ = TrkDetFlags.TRT_BarrelLayerMaterialBinsZ() - TRT_LayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.TRT_BarrelLayerMaterialBinsPhi() - # SCT endcap specifications - TRT_LayerBuilder.ModelEndcapLayers = TrkDetFlags.TRT_EndcapModelLayers() - TRT_LayerBuilder.EndcapLayerBinsR = TrkDetFlags.TRT_EndcapLayerMaterialBinsR() - TRT_LayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.TRT_EndcapLayerMaterialBinsPhi() - # set the binning from bi-aequidistant to arbitrary for complex TRT volumes - TRT_LayerBinning = 1 - if buildTrtStrawLayers or TrkDetFlags.TRT_BuildStrawLayers() : - TRT_LayerBinning = 2 - TRT_LayerBuilder.ModelLayersOnly = False - # output level - TRT_LayerBuilder.OutputLevel = TrkDetFlags.TRT_BuildingOutputLevel() - # TRT -> ToolSvc - ToolSvc += TRT_LayerBuilder - # put them to the caches - layerbuilders += [ TRT_LayerBuilder ] - binnings += [ TRT_LayerBinning ] - colors += [ 5 ] - - - # helpers for the InDetTrackingGeometry Builder : layer array creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__LayerArrayCreator - InDetLayerArrayCreator = Trk__LayerArrayCreator(name = namePrefix+'InDetLayerArrayCreator'+nameSuffix) - InDetLayerArrayCreator.EmptyLayerMode = 2 # deletes empty material layers from arrays - InDetLayerArrayCreator.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to ToolSvc - ToolSvc += InDetLayerArrayCreator - - # helpers for the InDetTrackingGeometry Builder : volume array creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeArrayCreator - InDetTrackingVolumeArrayCreator = Trk__TrackingVolumeArrayCreator(name = namePrefix+'InDetTrackingVolumeArrayCreator'+nameSuffix) - InDetTrackingVolumeArrayCreator.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to ToolSvc - ToolSvc += InDetTrackingVolumeArrayCreator - - # helpers for the InDetTrackingGeometry Builder : tracking voluem helper for glueing - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeHelper - InDetTrackingVolumeHelper = Trk__TrackingVolumeHelper(name = namePrefix+'InDetTrackingVolumeHelper'+nameSuffix) - InDetTrackingVolumeHelper.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # the material bins - InDetTrackingVolumeHelper.BarrelLayerBinsZ = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - InDetTrackingVolumeHelper.BarrelLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - InDetTrackingVolumeHelper.EndcapLayerBinsR = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - InDetTrackingVolumeHelper.EndcapLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - # add to ToolSvc - ToolSvc += InDetTrackingVolumeHelper - - # helpers for the InDetTrackingGeometry Builder : cylinder volume creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__CylinderVolumeCreator - InDetCylinderVolumeCreator = Trk__CylinderVolumeCreator(name = namePrefix+'InDetCylinderVolumeCreator'+nameSuffix) - # give him the layer array creator - InDetCylinderVolumeCreator.LayerArrayCreator = InDetLayerArrayCreator - InDetCylinderVolumeCreator.TrackingVolumeArrayCreator = InDetTrackingVolumeArrayCreator - InDetCylinderVolumeCreator.TrackingVolumeHelper = InDetTrackingVolumeHelper - # specifiy the binning, passive layers, entry layers - InDetCylinderVolumeCreator.PassiveLayerThickness = TrkDetFlags.InDetPassiveLayerThickness() - InDetCylinderVolumeCreator.PassiveLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - InDetCylinderVolumeCreator.PassiveLayerBinsRZ = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - # output level - InDetCylinderVolumeCreator.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to ToolSvc - ToolSvc += InDetCylinderVolumeCreator - - # the envelope definition service - from SubDetectorEnvelopes.SubDetectorEnvelopesConf import DetDescrDBEnvelopeSvc - AtlasEnvelopeSvc = DetDescrDBEnvelopeSvc('AtlasEnvelopeSvcDefinitionSvc') - # set the output level for the Envelope service - AtlasEnvelopeSvc.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to SvcMgr - ServiceMgr += AtlasEnvelopeSvc - - if name.find('CondCond')>=0 : - raise Exception('invalid name composition %s ' % name) - # the tracking geometry builder - super(ConfiguredInDetTrackingGeometryBuilderCond,self).__init__(name,\ - BeamPipeBuilder = BeamPipeBuilder,\ - LayerBuilders = layerbuilders, - LayerBinningType = binnings, - ColorCodes = colors, - BarrelEntryLayers = [ 2, 2, 2 ], - EndcapEntryLayers = [ 1, 0, 1 ], - EnvelopeDefinitionSvc = AtlasEnvelopeSvc, - VolumeEnclosureDiscPositions = [ 3000., 3450. ], - TrackingVolumeCreator = InDetCylinderVolumeCreator, - LayerArrayCreator = InDetLayerArrayCreator, - BuildBoundaryLayers = TrkDetFlags.InDetBuildMaterialBoundaries(), - ReplaceAllJointBoundaries = TrkDetFlags.InDetBuildJointBoundaries(), - OutputLevel = TrkDetFlags.InDetBuildingOutputLevel(), - ExitVolumeName = TrkDetFlags.InDetContainerName(), - MagneticFieldMode = TrkDetFlags.MagneticFieldMode()) - - diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredStagedTrackingGeometryBuilder.py b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredStagedTrackingGeometryBuilder.py deleted file mode 100644 index d08c510b9be551682cd57fb122d971266c52034c..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredStagedTrackingGeometryBuilder.py +++ /dev/null @@ -1,225 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -###################################################### -# ConfiguredStagedTrackingGeometry module -# -# it inherits from RobustTrackingGeometryBuilderConf and performs -# standard configuration -# -###################################################### - -# import the Extrapolator configurable -from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__StagedTrackingGeometryBuilder - -# define the class -class ConfiguredStagedTrackingGeometryBuilder( InDet__StagedTrackingGeometryBuilder ): - # constructor - def __init__(self,name = 'InDetTrackingGeometryBuilder', - namePrefix = '', - setLayerAssociation = True, - buildTrtStrawLayers = False): - - # get the ToolSvc - from AthenaCommon.AppMgr import ToolSvc, ServiceMgr - from AthenaCommon.DetFlags import DetFlags - - # the Detector flags to be imported - from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags - - # beampipe - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__BeamPipeBuilder - BeamPipeBuilder = InDet__BeamPipeBuilder(name=namePrefix+'BeamPipeBuilder') - BeamPipeBuilder.BeamPipeRadius = TrkDetFlags.BeamPipeRadius() - BeamPipeBuilder.BeamPipeThickness = TrkDetFlags.BeamPipeThickness() - BeamPipeBuilder.BeamPipeMaterialBinsZ = TrkDetFlags.BeamPipeLayerMaterialBinsZ() - BeamPipeBuilder.OutputLevel = TrkDetFlags.BeamPipeBuildingOutputLevel() - ToolSvc += BeamPipeBuilder - - # the layer providers - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__LayerProvider - BeamPipeProvider = Trk__LayerProvider(name=namePrefix+'BeamPipeProvider') - BeamPipeProvider.LayerBuilder = BeamPipeBuilder - ToolSvc += BeamPipeProvider - - # binning of the beam pipe - BeamPipeBinning = 2 - - # the layer builders - layerProviders = [ BeamPipeProvider ] - binningsCenter = [ BeamPipeBinning ] - binningsEndcap = [ BeamPipeBinning ] - colors = [ 2 ] - - # PIXEL building - if DetFlags.pixel_on() : - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__SiLayerBuilder - PixelLayerBuilder = InDet__SiLayerBuilder(name=namePrefix+'PixelLayerBuilder') - PixelLayerBuilder.PixelCase = True - PixelLayerBuilder.Identification = 'Pixel' - PixelLayerBuilder.SiDetManagerLocation = 'Pixel' - # Pixel barrel specifications - PixelLayerBuilder.BarrelLayerBinsZ = TrkDetFlags.PixelBarrelLayerMaterialBinsZ() - PixelLayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.PixelBarrelLayerMaterialBinsPhi() - PixelLayerBuilder.BarrelEnvelope = 0.0 - PixelLayerBuilder.EndcapLayerBinsR = TrkDetFlags.PixelEndcapLayerMaterialBinsR() - PixelLayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.PixelEndcapLayerMaterialBinsPhi() - PixelLayerBuilder.EndcapRingLayout = TrkDetFlags.PixelRingLayout() - # set the layer association - PixelLayerBuilder.SetLayerAssociation = setLayerAssociation - # output level - PixelLayerBuilder.OutputLevel = TrkDetFlags.PixelBuildingOutputLevel() - # the binning type of the layers - PixelLayerBinning = 2 - # add it to tool service - ToolSvc += PixelLayerBuilder - - # the layer providers - PixelLayerProvider = Trk__LayerProvider(name=namePrefix+'PixelLayerProvider') - PixelLayerProvider.LayerBuilder = PixelLayerBuilder - ToolSvc += PixelLayerProvider - layerProviders += [ PixelLayerProvider ] - binningsCenter += [ PixelLayerBinning ] - binningsEndcap += [ PixelLayerBinning ] - colors += [ 3 ] - - # SCT building - if DetFlags.SCT_on() : - SCT_LayerBuilder = InDet__SiLayerBuilder(name=namePrefix+'SCT_LayerBuilder') - SCT_LayerBuilder.PixelCase = False - SCT_LayerBuilder.Identification = 'SCT' - SCT_LayerBuilder.SiDetManagerLocation = 'SCT' - # additionall layers - handle with care ! - SCT_LayerBuilder.EndcapAdditionalLayerPositionsZ = [ -2850. , 2850. ] - SCT_LayerBuilder.EndcapAdditionalLayerType = [ 0 , 0 ] - # SCT barrel specifications - SCT_LayerBuilder.BarrelLayerBinsZ = TrkDetFlags.SCT_BarrelLayerMaterialBinsZ() - SCT_LayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.SCT_BarrelLayerMaterialBinsPhi() - SCT_LayerBuilder.BarrelEnvelope = 0.0 - # SCT endcap specifications - SCT_LayerBuilder.EndcapLayerBinsR = TrkDetFlags.SCT_EndcapLayerMaterialBinsR() - SCT_LayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.SCT_EndcapLayerMaterialBinsPhi() - SCT_LayerBuilder.EndcapComplexRingBinning = TrkDetFlags.SCT_EndcapLayerDynamicRings() - # set the layer association - SCT_LayerBuilder.SetLayerAssociation = setLayerAssociation - # output level - SCT_LayerBuilder.OutputLevel = TrkDetFlags.SCT_BuildingOutputLevel() - # the binning type of the layer - SCT_LayerBinning = 2 - # SCT -> ToolSvc - ToolSvc += SCT_LayerBuilder - - # the layer providers - SCT_LayerProvider = Trk__LayerProvider(name=namePrefix+'SCT_LayerProvider') - SCT_LayerProvider.LayerBuilder = SCT_LayerBuilder - ToolSvc += SCT_LayerProvider - - # put them to the caches - layerProviders += [ SCT_LayerProvider ] - binningsCenter += [ SCT_LayerBinning ] - binningsEndcap += [ SCT_LayerBinning ] - colors += [ 4 ] - - # TRT building - if DetFlags.TRT_on() : - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__TRT_LayerBuilder - TRT_LayerBuilder = InDet__TRT_LayerBuilder(name=namePrefix+'TRT_LayerBuilder') - # TRT barrel specifications - TRT_LayerBuilder.ModelBarrelLayers = TrkDetFlags.TRT_BarrelModelLayers() - TRT_LayerBuilder.BarrelLayerBinsZ = TrkDetFlags.TRT_BarrelLayerMaterialBinsZ() - TRT_LayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.TRT_BarrelLayerMaterialBinsPhi() - # SCT endcap specifications - TRT_LayerBuilder.ModelEndcapLayers = TrkDetFlags.TRT_EndcapModelLayers() - TRT_LayerBuilder.EndcapLayerBinsR = TrkDetFlags.TRT_EndcapLayerMaterialBinsR() - TRT_LayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.TRT_EndcapLayerMaterialBinsPhi() - # set the binning from bi-aequidistant to arbitrary for complex TRT volumes - TRT_LayerBinning = 1 - if buildTrtStrawLayers or TrkDetFlags.TRT_BuildStrawLayers() : - TRT_LayerBinning = 2 - TRT_LayerBuilder.ModelLayersOnly = False - # output level - TRT_LayerBuilder.OutputLevel = TrkDetFlags.TRT_BuildingOutputLevel() - # TRT -> ToolSvc - ToolSvc += TRT_LayerBuilder - - - # the layer providers - TRT_LayerProvider = Trk__LayerProvider(name=namePrefix+'TRT_LayerProvider') - TRT_LayerProvider.LayerBuilder = TRT_LayerBuilder - ToolSvc += TRT_LayerProvider - - # put them to the caches - layerProviders += [ TRT_LayerProvider ] - binningsCenter += [ TRT_LayerBinning ] - binningsEndcap += [ TRT_LayerBinning ] - colors += [ 5 ] - - - # helpers for the InDetTrackingGeometry Builder : layer array creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__LayerArrayCreator - InDetLayerArrayCreator = Trk__LayerArrayCreator(name = 'InDetLayerArrayCreator') - InDetLayerArrayCreator.EmptyLayerMode = 2 # deletes empty material layers from arrays - InDetLayerArrayCreator.OutputLevel = TrkDetFlags.InDetBuildingHelperOutputLevel() - # add to ToolSvc - ToolSvc += InDetLayerArrayCreator - - # helpers for the InDetTrackingGeometry Builder : volume array creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeArrayCreator - InDetTrackingVolumeArrayCreator = Trk__TrackingVolumeArrayCreator(name = 'InDetTrackingVolumeArrayCreator') - InDetTrackingVolumeArrayCreator.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to ToolSvc - ToolSvc += InDetTrackingVolumeArrayCreator - - # helpers for the InDetTrackingGeometry Builder : tracking voluem helper for glueing - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeHelper - InDetTrackingVolumeHelper = Trk__TrackingVolumeHelper(name ='InDetTrackingVolumeHelper') - InDetTrackingVolumeHelper.OutputLevel = TrkDetFlags.InDetBuildingHelperOutputLevel() - # the material bins - InDetTrackingVolumeHelper.BarrelLayerBinsZ = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - InDetTrackingVolumeHelper.BarrelLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - InDetTrackingVolumeHelper.EndcapLayerBinsR = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - InDetTrackingVolumeHelper.EndcapLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - # add to ToolSvc - ToolSvc += InDetTrackingVolumeHelper - - # helpers for the InDetTrackingGeometry Builder : cylinder volume creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__CylinderVolumeCreator - InDetCylinderVolumeCreator = Trk__CylinderVolumeCreator(name = 'InDetCylinderVolumeCreator') - # give him the layer array creator - InDetCylinderVolumeCreator.LayerArrayCreator = InDetLayerArrayCreator - InDetCylinderVolumeCreator.TrackingVolumeArrayCreator = InDetTrackingVolumeArrayCreator - InDetCylinderVolumeCreator.TrackingVolumeHelper = InDetTrackingVolumeHelper - # specifiy the binning, passive layers, entry layers - InDetCylinderVolumeCreator.PassiveLayerThickness = TrkDetFlags.InDetPassiveLayerThickness() - InDetCylinderVolumeCreator.PassiveLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - InDetCylinderVolumeCreator.PassiveLayerBinsRZ = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - # output level - InDetCylinderVolumeCreator.OutputLevel = TrkDetFlags.InDetBuildingHelperOutputLevel() - # add to ToolSvc - ToolSvc += InDetCylinderVolumeCreator - - # the envelope definition service - from SubDetectorEnvelopes.SubDetectorEnvelopesConf import DetDescrDBEnvelopeSvc - AtlasEnvelopeSvc = DetDescrDBEnvelopeSvc('AtlasEnvelopeSvcDefinitionSvc') - # set the output level for the Envelope service - AtlasEnvelopeSvc.OutputLevel = TrkDetFlags.InDetBuildingHelperOutputLevel() - # add to SvcMgr - ServiceMgr += AtlasEnvelopeSvc - - # the tracking geometry builder - InDet__StagedTrackingGeometryBuilder.__init__(self,namePrefix+name,\ - LayerBuilders = layerProviders, - LayerBinningTypeCenter = binningsCenter, - LayerBinningTypeEndcap = binningsEndcap, - ColorCodes = colors, - EnvelopeDefinitionSvc = AtlasEnvelopeSvc, - VolumeEnclosureDiscPositions = [ 3000., 3450. ], - TrackingVolumeCreator = InDetCylinderVolumeCreator, - LayerArrayCreator = InDetLayerArrayCreator, - CheckForRingLayout = True, - BuildBoundaryLayers = TrkDetFlags.InDetBuildMaterialBoundaries(), - ReplaceAllJointBoundaries = TrkDetFlags.InDetBuildJointBoundaries(), - OutputLevel = TrkDetFlags.InDetBuildingOutputLevel(), - ExitVolumeName = TrkDetFlags.InDetContainerName(), - MagneticFieldMode = TrkDetFlags.MagneticFieldMode()) - - diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredStagedTrackingGeometryBuilderCond.py b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredStagedTrackingGeometryBuilderCond.py deleted file mode 100644 index ff05fd9c1f6cc62e1c740c9bc727400d82e5dfd6..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/python/ConfiguredStagedTrackingGeometryBuilderCond.py +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -###################################################### -# ConfiguredStagedTrackingGeometry module -# -# it inherits from RobustTrackingGeometryBuilderConf and performs -# standard configuration -# -###################################################### - -# import the Extrapolator configurable -from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__StagedTrackingGeometryBuilderCond - -# define the class -class ConfiguredStagedTrackingGeometryBuilderCond( InDet__StagedTrackingGeometryBuilderCond ): - # constructor - def __init__(self,name = 'InDetTrackingGeometryBuilder', - namePrefix = '', - nameSuffix = 'Cond', - setLayerAssociation = True, - buildTrtStrawLayers = False): - - # get the ToolSvc - from AthenaCommon.AppMgr import ToolSvc, ServiceMgr - from AthenaCommon.DetFlags import DetFlags - - # the Detector flags to be imported - from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags - - # beampipe - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__BeamPipeBuilderCond - BeamPipeBuilder = InDet__BeamPipeBuilderCond(name=namePrefix+'BeamPipeBuilder'+nameSuffix) - BeamPipeBuilder.BeamPipeRadius = TrkDetFlags.BeamPipeRadius() - BeamPipeBuilder.BeamPipeThickness = TrkDetFlags.BeamPipeThickness() - BeamPipeBuilder.BeamPipeMaterialBinsZ = TrkDetFlags.BeamPipeLayerMaterialBinsZ() - BeamPipeBuilder.OutputLevel = TrkDetFlags.BeamPipeBuildingOutputLevel() - ToolSvc += BeamPipeBuilder - - # the layer providers - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__LayerProviderCond - BeamPipeProvider = Trk__LayerProviderCond(name=namePrefix+'BeamPipeProvider'+nameSuffix) - BeamPipeProvider.LayerBuilder = BeamPipeBuilder - ToolSvc += BeamPipeProvider - - # binning of the beam pipe - BeamPipeBinning = 2 - - # the layer builders - layerProviders = [ BeamPipeProvider ] - binningsCenter = [ BeamPipeBinning ] - binningsEndcap = [ BeamPipeBinning ] - colors = [ 2 ] - - # PIXEL building - if DetFlags.pixel_on() : - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__SiLayerBuilderCond - PixelLayerBuilder = InDet__SiLayerBuilderCond(name=namePrefix+'PixelLayerBuilder'+nameSuffix) - PixelLayerBuilder.PixelCase = True - PixelLayerBuilder.Identification = 'Pixel' - PixelLayerBuilder.SiDetManagerLocation = 'Pixel' - # Pixel barrel specifications - PixelLayerBuilder.BarrelLayerBinsZ = TrkDetFlags.PixelBarrelLayerMaterialBinsZ() - PixelLayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.PixelBarrelLayerMaterialBinsPhi() - PixelLayerBuilder.BarrelEnvelope = 0.0 - PixelLayerBuilder.EndcapLayerBinsR = TrkDetFlags.PixelEndcapLayerMaterialBinsR() - PixelLayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.PixelEndcapLayerMaterialBinsPhi() - PixelLayerBuilder.EndcapRingLayout = TrkDetFlags.PixelRingLayout() - # set the layer association - PixelLayerBuilder.SetLayerAssociation = setLayerAssociation - # output level - PixelLayerBuilder.OutputLevel = TrkDetFlags.PixelBuildingOutputLevel() - # the binning type of the layers - PixelLayerBinning = 2 - # add it to tool service - ToolSvc += PixelLayerBuilder - - # the layer providers - PixelLayerProvider = Trk__LayerProviderCond(name=namePrefix+'PixelLayerProvider'+nameSuffix) - PixelLayerProvider.LayerBuilder = PixelLayerBuilder - ToolSvc += PixelLayerProvider - layerProviders += [ PixelLayerProvider ] - binningsCenter += [ PixelLayerBinning ] - binningsEndcap += [ PixelLayerBinning ] - colors += [ 3 ] - - # SCT building - if DetFlags.SCT_on() : - SCT_LayerBuilder = InDet__SiLayerBuilderCond(name=namePrefix+'SCT_LayerBuilder'+nameSuffix) - SCT_LayerBuilder.PixelCase = False - SCT_LayerBuilder.Identification = 'SCT' - SCT_LayerBuilder.SiDetManagerLocation = 'SCT' - # additionall layers - handle with care ! - SCT_LayerBuilder.EndcapAdditionalLayerPositionsZ = [ -2850. , 2850. ] - SCT_LayerBuilder.EndcapAdditionalLayerType = [ 0 , 0 ] - # SCT barrel specifications - SCT_LayerBuilder.BarrelLayerBinsZ = TrkDetFlags.SCT_BarrelLayerMaterialBinsZ() - SCT_LayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.SCT_BarrelLayerMaterialBinsPhi() - SCT_LayerBuilder.BarrelEnvelope = 0.0 - # SCT endcap specifications - SCT_LayerBuilder.EndcapLayerBinsR = TrkDetFlags.SCT_EndcapLayerMaterialBinsR() - SCT_LayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.SCT_EndcapLayerMaterialBinsPhi() - SCT_LayerBuilder.EndcapComplexRingBinning = TrkDetFlags.SCT_EndcapLayerDynamicRings() - # set the layer association - SCT_LayerBuilder.SetLayerAssociation = setLayerAssociation - # output level - SCT_LayerBuilder.OutputLevel = TrkDetFlags.SCT_BuildingOutputLevel() - # the binning type of the layer - SCT_LayerBinning = 2 - # SCT -> ToolSvc - ToolSvc += SCT_LayerBuilder - - # the layer providers - SCT_LayerProvider = Trk__LayerProviderCond(name=namePrefix+'SCT_LayerProvider'+nameSuffix) - SCT_LayerProvider.LayerBuilder = SCT_LayerBuilder - ToolSvc += SCT_LayerProvider - - # put them to the caches - layerProviders += [ SCT_LayerProvider ] - binningsCenter += [ SCT_LayerBinning ] - binningsEndcap += [ SCT_LayerBinning ] - colors += [ 4 ] - - # TRT building - if DetFlags.TRT_on() : - from InDetTrackingGeometry.InDetTrackingGeometryConf import InDet__TRT_LayerBuilderCond - TRT_LayerBuilder = InDet__TRT_LayerBuilderCond(name=namePrefix+'TRT_LayerBuilder'+nameSuffix) - # TRT barrel specifications - TRT_LayerBuilder.ModelBarrelLayers = TrkDetFlags.TRT_BarrelModelLayers() - TRT_LayerBuilder.BarrelLayerBinsZ = TrkDetFlags.TRT_BarrelLayerMaterialBinsZ() - TRT_LayerBuilder.BarrelLayerBinsPhi = TrkDetFlags.TRT_BarrelLayerMaterialBinsPhi() - # SCT endcap specifications - TRT_LayerBuilder.ModelEndcapLayers = TrkDetFlags.TRT_EndcapModelLayers() - TRT_LayerBuilder.EndcapLayerBinsR = TrkDetFlags.TRT_EndcapLayerMaterialBinsR() - TRT_LayerBuilder.EndcapLayerBinsPhi = TrkDetFlags.TRT_EndcapLayerMaterialBinsPhi() - # set the binning from bi-aequidistant to arbitrary for complex TRT volumes - TRT_LayerBinning = 1 - if buildTrtStrawLayers or TrkDetFlags.TRT_BuildStrawLayers() : - TRT_LayerBinning = 2 - TRT_LayerBuilder.ModelLayersOnly = False - # output level - TRT_LayerBuilder.OutputLevel = TrkDetFlags.TRT_BuildingOutputLevel() - # TRT -> ToolSvc - ToolSvc += TRT_LayerBuilder - - - # the layer providers - TRT_LayerProvider = Trk__LayerProviderCond(name=namePrefix+'TRT_LayerProvider'+nameSuffix) - TRT_LayerProvider.LayerBuilder = TRT_LayerBuilder - ToolSvc += TRT_LayerProvider - - # put them to the caches - layerProviders += [ TRT_LayerProvider ] - binningsCenter += [ TRT_LayerBinning ] - binningsEndcap += [ TRT_LayerBinning ] - colors += [ 5 ] - - - # helpers for the InDetTrackingGeometry Builder : layer array creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__LayerArrayCreator - InDetLayerArrayCreator = Trk__LayerArrayCreator(name = namePrefix+'InDetLayerArrayCreator'+nameSuffix) - InDetLayerArrayCreator.EmptyLayerMode = 2 # deletes empty material layers from arrays - InDetLayerArrayCreator.OutputLevel = TrkDetFlags.InDetBuildingHelperOutputLevel() - # add to ToolSvc - ToolSvc += InDetLayerArrayCreator - - # helpers for the InDetTrackingGeometry Builder : volume array creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeArrayCreator - InDetTrackingVolumeArrayCreator = Trk__TrackingVolumeArrayCreator(name = namePrefix+'InDetTrackingVolumeArrayCreator'+nameSuffix) - InDetTrackingVolumeArrayCreator.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel() - # add to ToolSvc - ToolSvc += InDetTrackingVolumeArrayCreator - - # helpers for the InDetTrackingGeometry Builder : tracking voluem helper for glueing - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeHelper - InDetTrackingVolumeHelper = Trk__TrackingVolumeHelper(name = namePrefix+'InDetTrackingVolumeHelper'+nameSuffix) - InDetTrackingVolumeHelper.OutputLevel = TrkDetFlags.InDetBuildingHelperOutputLevel() - # the material bins - InDetTrackingVolumeHelper.BarrelLayerBinsZ = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - InDetTrackingVolumeHelper.BarrelLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - InDetTrackingVolumeHelper.EndcapLayerBinsR = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - InDetTrackingVolumeHelper.EndcapLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - # add to ToolSvc - ToolSvc += InDetTrackingVolumeHelper - - # helpers for the InDetTrackingGeometry Builder : cylinder volume creator - from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__CylinderVolumeCreator - InDetCylinderVolumeCreator = Trk__CylinderVolumeCreator(name = namePrefix+'InDetCylinderVolumeCreator'+nameSuffix) - # give him the layer array creator - InDetCylinderVolumeCreator.LayerArrayCreator = InDetLayerArrayCreator - InDetCylinderVolumeCreator.TrackingVolumeArrayCreator = InDetTrackingVolumeArrayCreator - InDetCylinderVolumeCreator.TrackingVolumeHelper = InDetTrackingVolumeHelper - # specifiy the binning, passive layers, entry layers - InDetCylinderVolumeCreator.PassiveLayerThickness = TrkDetFlags.InDetPassiveLayerThickness() - InDetCylinderVolumeCreator.PassiveLayerBinsPhi = TrkDetFlags.InDetPassiveLayerMaterialBinsPhi() - InDetCylinderVolumeCreator.PassiveLayerBinsRZ = TrkDetFlags.InDetPassiveLayerMaterialBinsRz() - # output level - InDetCylinderVolumeCreator.OutputLevel = TrkDetFlags.InDetBuildingHelperOutputLevel() - # add to ToolSvc - ToolSvc += InDetCylinderVolumeCreator - - # the envelope definition service - from SubDetectorEnvelopes.SubDetectorEnvelopesConf import DetDescrDBEnvelopeSvc - AtlasEnvelopeSvc = DetDescrDBEnvelopeSvc('AtlasEnvelopeSvcDefinitionSvc') - # set the output level for the Envelope service - AtlasEnvelopeSvc.OutputLevel = TrkDetFlags.InDetBuildingHelperOutputLevel() - # add to SvcMgr - ServiceMgr += AtlasEnvelopeSvc - - # the tracking geometry builder - InDet__StagedTrackingGeometryBuilderCond.__init__(self,namePrefix+name+nameSuffix,\ - LayerBuilders = layerProviders, - LayerBinningTypeCenter = binningsCenter, - LayerBinningTypeEndcap = binningsEndcap, - ColorCodes = colors, - EnvelopeDefinitionSvc = AtlasEnvelopeSvc, - VolumeEnclosureDiscPositions = [ 3000., 3450. ], - TrackingVolumeCreator = InDetCylinderVolumeCreator, - LayerArrayCreator = InDetLayerArrayCreator, - CheckForRingLayout = True, - BuildBoundaryLayers = TrkDetFlags.InDetBuildMaterialBoundaries(), - ReplaceAllJointBoundaries = TrkDetFlags.InDetBuildJointBoundaries(), - OutputLevel = TrkDetFlags.InDetBuildingOutputLevel(), - ExitVolumeName = TrkDetFlags.InDetContainerName(), - MagneticFieldMode = TrkDetFlags.MagneticFieldMode()) - -