ATLAS Offline Software
Loading...
Searching...
No Matches
RunActsWriteTrackingGeometry.py
Go to the documentation of this file.
1#!/usr/bin/env python
2# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3"""
4Dump the ACTS tracking geometry to a file.
5"""
6
7from AthenaCommon.Logging import log
8from argparse import ArgumentParser
9from AthenaConfiguration.AllConfigFlags import initConfigFlags
10
11parser = ArgumentParser("RunActsWriteTrackingGeometry.py")
12parser.add_argument(
13 "-V",
14 "--verboseAccumulators",
15 default=False,
16 action="store_true",
17 help="Print full details of the AlgSequence",
18)
19parser.add_argument(
20 "-S",
21 "--verboseStoreGate",
22 default=False,
23 action="store_true",
24 help="Dump the StoreGate(s) each event iteration",
25)
26parser.add_argument(
27 "--geometrytag",
28 default="",
29 type=str,
30 help="The geometry tag to use. If not specified, the default RUN4 tag will be used.",
31)
32args = parser.parse_args()
33
34flags = initConfigFlags()
35
36flags.Input.isMC = True
37flags.Input.Files = []
38
39from AthenaConfiguration.TestDefaults import defaultGeometryTags, defaultConditionsTags
40
41flags.GeoModel.AtlasVersion = args.geometrytag if args.geometrytag else defaultGeometryTags.RUN4
42flags.IOVDb.GlobalTag = defaultConditionsTags.RUN4_MC
43
44flags.Detector.GeometryBpipe = True
45flags.Detector.GeometryHGTD = True
46flags.Detector.GeometryITkPixel = True
47flags.Detector.GeometryITkStrip = True
48flags.Detector.GeometryCalo = False
49from MuonGeoModelTestR4.testGeoModel import MuonPhaseIITestDefaults
50flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R4
51flags.GeoModel.SQLiteDB = False
52flags.Detector.GeometryMuon = False
53
54flags.GeoModel.Align.Dynamic = False
55flags.Acts.TrackingGeometry.UseBlueprint = True
56flags.Acts.TrackingGeometry.KeepGoingOnMaterialMergeFailure = True
57flags.Acts.TrackingGeometry.ITkHgtdMaterialSource = "Default"
58
59# Geometry dump runs serially
60flags.Concurrency.NumThreads = 1
61flags.Concurrency.NumConcurrentEvents = 1
62
63flags.lock()
64flags.dump()
65
66log.debug("Lock config flags now.")
67
68from AthenaConfiguration.MainServicesConfig import MainServicesCfg
69
70cfg = MainServicesCfg(flags)
71
72if args.verboseAccumulators:
73 cfg.printConfig(withDetails=True)
74if args.verboseStoreGate:
75 cfg.getService("StoreGateSvc").Dump = True
76
77from ActsConfig.ActsGeometryConfig import ActsWriteTrackingGeometryCfg
78
79cfg.merge(ActsWriteTrackingGeometryCfg(flags, name="ActsWriteTrackingGeometry"))
80
81cfg.printConfig(withDetails=True, summariseProps=True)
82
83cfg.run(1)