diff --git a/DetectorDescription/GeoModel/GeoModelSvc/python/BuildGeoModelR2.py b/DetectorDescription/GeoModel/GeoModelSvc/python/BuildGeoModelR2.py new file mode 100644 index 0000000000000000000000000000000000000000..4dd66efb449849ce9b8f3db7129b16fa73f8db46 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelSvc/python/BuildGeoModelR2.py @@ -0,0 +1,65 @@ +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + +# Script for testing the initialization of GeoModel descriptions of ATLAS +# subsystems in Run2 geometry layout + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.MainServicesConfig import MainServicesCfg +from AthenaConfiguration.AllConfigFlags import initConfigFlags +from AtlasGeoModel.GeoModelConfig import GeoModelCfg +from Campaigns.Utils import Campaign + +flags = initConfigFlags() + +flags.Exec.MaxEvents = 1 + +flags.Input.isMC = True +flags.Input.MCCampaign = Campaign.Unknown + +flags.GeoModel.AtlasVersion='ATLAS-R2-2016-01-00-01' +flags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16" + +flags.Detector.GeometryBpipe = True +flags.Detector.GeometryPixel = True +flags.Detector.GeometrySCT = True +flags.Detector.GeometryTRT = True +flags.Detector.GeometryLAr = True +flags.Detector.GeometryTile = True +flags.Detector.GeometryMuon = True + +flags.LAr.doAlign = False + +flags.lock() + +cfg = MainServicesCfg(flags) +cfg.merge(GeoModelCfg(flags)) + +if flags.Detector.GeometryBpipe: + from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg + cfg.merge(BeamPipeGeometryCfg(flags)) + +if flags.Detector.GeometryPixel: + from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg + cfg.merge(PixelReadoutGeometryCfg(flags)) + +if flags.Detector.GeometrySCT: + from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg + cfg.merge(SCT_ReadoutGeometryCfg(flags)) + +if flags.Detector.GeometryTRT: + from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg + cfg.merge(TRT_ReadoutGeometryCfg(flags)) + +if flags.Detector.GeometryLAr: + from LArGeoAlgsNV.LArGMConfig import LArGMCfg + cfg.merge(LArGMCfg(flags)) + +if flags.Detector.GeometryTile: + from TileGeoModel.TileGMConfig import TileGMCfg + cfg.merge(TileGMCfg(flags)) + +if flags.Detector.GeometryMuon: + from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg + cfg.merge(MuonGeoModelCfg(flags)) + +cfg.run() diff --git a/DetectorDescription/GeoModel/GeoModelSvc/share/jobOptions.BuildGeometry.py b/DetectorDescription/GeoModel/GeoModelSvc/share/jobOptions.BuildGeometry.py deleted file mode 100755 index 6e1f8e603c5e76885f9e9e8dfaba625c0940d13b..0000000000000000000000000000000000000000 --- a/DetectorDescription/GeoModel/GeoModelSvc/share/jobOptions.BuildGeometry.py +++ /dev/null @@ -1,34 +0,0 @@ -# job options to build geometry of the ATLAS detector - -# Create an event selector: -import AthenaCommon.AtlasUnixGeneratorJob - -from AthenaCommon.GlobalFlags import globalflags -globalflags.DetGeo.set_Value_and_Lock('atlas') -globalflags.DataSource.set_Value_and_Lock('geant4') - -# Detector flags -from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() -DetFlags.Calo_setOn() -DetFlags.Tile_setOn() -DetFlags.Muon_setOn() -DetFlags.Lucid_setOn() -DetFlags.Print() - -# GeoModel -globalflags.DetDescrVersion = "ATLAS-R2-2016-01-00-01" -from AtlasGeoModel import SetGeometryVersion -from AtlasGeoModel import GeoModelInit - -# Generate one dummy event -from AthenaCommon.AppMgr import AppMgr as appMgr -appMgr.EvtMax = 1 - -# Set some conditions tag to avoud crashes -from IOVDbSvc.CondDB import conddb -conddb.setGlobalTag('OFLCOND-CSC-00-00-00') - -PoolSvc = Service("PoolSvc") -PoolSvc.SortReplicas = False -