ATLAS Offline Software
BuildGeoModelR2.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 # Script for testing the initialization of GeoModel descriptions of ATLAS
4 # subsystems in Run2 geometry layout
5 
6 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
7 from AthenaConfiguration.AllConfigFlags import initConfigFlags
8 from AthenaConfiguration.TestDefaults import defaultGeometryTags
9 from AtlasGeoModel.GeoModelConfig import GeoModelCfg
10 from Campaigns.Utils import Campaign
11 
12 flags = initConfigFlags()
13 
14 flags.Exec.MaxEvents = 1
15 
16 flags.Input.isMC = True
17 flags.Input.MCCampaign = Campaign.Unknown
18 
19 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
20 flags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
21 
22 flags.Detector.GeometryBpipe = True
23 flags.Detector.GeometryPixel = True
24 flags.Detector.GeometrySCT = True
25 flags.Detector.GeometryTRT = True
26 flags.Detector.GeometryLAr = True
27 flags.Detector.GeometryTile = True
28 flags.Detector.GeometryMuon = True
29 
30 flags.LAr.doAlign = False
31 
32 flags.lock()
33 
34 cfg = MainServicesCfg(flags)
35 cfg.merge(GeoModelCfg(flags))
36 
37 if flags.Detector.GeometryBpipe:
38  from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
39  cfg.merge(BeamPipeGeometryCfg(flags))
40 
41 if flags.Detector.GeometryPixel:
42  from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
43  cfg.merge(PixelReadoutGeometryCfg(flags))
44 
45 if flags.Detector.GeometrySCT:
46  from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
47  cfg.merge(SCT_ReadoutGeometryCfg(flags))
48 
49 if flags.Detector.GeometryTRT:
50  from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
51  cfg.merge(TRT_ReadoutGeometryCfg(flags))
52 
53 if flags.Detector.GeometryLAr:
54  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
55  cfg.merge(LArGMCfg(flags))
56 
57 if flags.Detector.GeometryTile:
58  from TileGeoModel.TileGMConfig import TileGMCfg
59  cfg.merge(TileGMCfg(flags))
60 
61 if flags.Detector.GeometryMuon:
62  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
63  cfg.merge(MuonGeoModelCfg(flags))
64 
65 cfg.run()
BeamPipeGMConfig.BeamPipeGeometryCfg
def BeamPipeGeometryCfg(flags)
Definition: BeamPipeGMConfig.py:5
TRT_GeoModelConfig.TRT_ReadoutGeometryCfg
def TRT_ReadoutGeometryCfg(flags)
Definition: TRT_GeoModelConfig.py:55
SCT_GeoModelConfig.SCT_ReadoutGeometryCfg
def SCT_ReadoutGeometryCfg(flags)
Definition: SCT_GeoModelConfig.py:42
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
PixelGeoModelConfig.PixelReadoutGeometryCfg
def PixelReadoutGeometryCfg(flags)
Definition: PixelGeoModelConfig.py:42
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7