ATLAS Offline Software
Loading...
Searching...
No Matches
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
6from AthenaConfiguration.MainServicesConfig import MainServicesCfg
7from AthenaConfiguration.AllConfigFlags import initConfigFlags
8from AthenaConfiguration.TestDefaults import defaultGeometryTags
9from AtlasGeoModel.GeoModelConfig import GeoModelCfg
10from Campaigns.Utils import Campaign
11
12flags = initConfigFlags()
13
14flags.Exec.MaxEvents = 1
15
16flags.Input.isMC = True
17flags.Input.MCCampaign = Campaign.Unknown
18
19flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
20flags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
21
22flags.Detector.GeometryBpipe = True
23flags.Detector.GeometryPixel = True
24flags.Detector.GeometrySCT = True
25flags.Detector.GeometryTRT = True
26flags.Detector.GeometryLAr = True
27flags.Detector.GeometryTile = True
28flags.Detector.GeometryMuon = True
29
30flags.LAr.doAlign = False
31
32flags.lock()
33
34cfg = MainServicesCfg(flags)
35cfg.merge(GeoModelCfg(flags))
36
37if flags.Detector.GeometryBpipe:
38 from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
39 cfg.merge(BeamPipeGeometryCfg(flags))
40
41if flags.Detector.GeometryPixel:
42 from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
43 cfg.merge(PixelReadoutGeometryCfg(flags))
44
45if flags.Detector.GeometrySCT:
46 from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
47 cfg.merge(SCT_ReadoutGeometryCfg(flags))
48
49if flags.Detector.GeometryTRT:
50 from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
51 cfg.merge(TRT_ReadoutGeometryCfg(flags))
52
53if flags.Detector.GeometryLAr:
54 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
55 cfg.merge(LArGMCfg(flags))
56
57if flags.Detector.GeometryTile:
58 from TileGeoModel.TileGMConfig import TileGMCfg
59 cfg.merge(TileGMCfg(flags))
60
61if flags.Detector.GeometryMuon:
62 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
63 cfg.merge(MuonGeoModelCfg(flags))
64
65cfg.run()