Skip to content
Snippets Groups Projects
Commit aacd3f73 authored by John Chapman's avatar John Chapman
Browse files

ComponentAccumulator configuration of Pixel Geometry

parent 153342db
No related branches found
No related tags found
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27054Atr20369 210,!26342Monopole: Handle fractionally charged particles,!20770Configuration of ATLAS Detector Description using ComponentAccumulator
......@@ -45,5 +45,10 @@ atlas_add_component( PixelGeoModel
src/components/*.cxx
LINK_LIBRARIES GaudiKernel PixelGeoModelLib )
atlas_add_test( PixelGMConfig_test
SCRIPT test/PixelGMConfig_test.py
PROPERTIES TIMEOUT 300 )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_scripts( test/*.py )
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaCommon import CfgMgr
......@@ -10,3 +10,47 @@ def getPixelDetectorTool(name="PixelDetectorTool", **kwargs):
kwargs.setdefault("ServiceBuilderTool", "");
return CfgMgr.PixelDetectorTool(name, **kwargs)
############## ComponentAccumulator
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.AthConfigFlags import AthConfigFlags
from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
def PixelGeometryCfg( flags ):
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
acc,geoModelSvc = GeoModelCfg( flags )
from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
from PixelGeoModel.PixelGeoModelConf import PixelDetectorTool
pixelDetectorTool = PixelDetectorTool("PixelDetectorTool")
from BCM_GeoModel.BCM_GeoModelConf import InDetDD__BCM_Builder
bcmTool = InDetDD__BCM_Builder()
acc.addPublicTool( bcmTool )
pixelDetectorTool.BCM_Tool = bcmTool
from BLM_GeoModel.BLM_GeoModelConf import InDetDD__BLM_Builder
blmTool = InDetDD__BLM_Builder()
acc.addPublicTool( blmTool )
pixelDetectorTool.BLM_Tool = blmTool
if flags.GeoModel.Run=="RUN4":
from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatBuilderToolSLHC
InDetServMatBuilderToolSLHC = InDetServMatBuilderToolSLHC()
acc.addPublicTool( InDetServMatBuilderToolSLHC )
pixelDetectorTool.ServiceBuilderTool = InDetServMatBuilderToolSLHC
pixelDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
geoModelSvc.DetectorTools += [ pixelDetectorTool ]
acc.addService(geoModelSvc)
# Pixel module distortions
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/PixelDist","/Indet/PixelDist")) # Not used ???
# IBL stave distortions
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/IBLDist","/Indet/IBLDist",className="CondAttrListCollection"))
if flags.GeoModel.Align.Dynamic:
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection"))
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/PIX","/Indet/AlignL2/PIX",className="CondAttrListCollection"))
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer"))
else:
if (not flags.Detector.SimulatePixel) or flags.Detector.OverlayPixel:
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
else:
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align"))
return acc
#!/usr/bin/env python
"""Run tests on PixelGeoModel configuration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
"""
if __name__ == "__main__":
from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior=1
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.TestDefaults import defaultTestFiles
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.Detector.SimulatePixel = False
ConfigFlags.Detector.SimulateSCT = False
ConfigFlags.Detector.SimulateTRT = False
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.lock()
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
acc = PixelGeometryCfg(ConfigFlags)
f=open('PixelGeometryCfg.pkl','w')
acc.store(f)
f.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment