4 Run material validation to check material maps for tracking geometry.
8 from AthenaCommon.Logging
import log
9 from argparse
import ArgumentParser
10 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
14 parser = ArgumentParser(
"RunMaterialValidationITk.py")
15 parser.add_argument(
"detectors", metavar=
"detectors", type=str, nargs=
"*",
16 help=
"Specify the list of detectors")
17 parser.add_argument(
"--localgeo", default=
False, action=
"store_true",
18 help=
"Use local geometry Xml files")
19 parser.add_argument(
"-V",
"--verboseAccumulators", default=
False,
21 help=
"Print full details of the AlgSequence")
22 parser.add_argument(
"-S",
"--verboseStoreGate", default=
False,
24 help=
"Dump the StoreGate(s) each event iteration")
25 parser.add_argument(
"--maxEvents",default=10, type=int,
26 help=
"The number of events to run. 0 skips execution")
27 parser.add_argument(
"--geometrytag",default=
"ATLAS-P2-RUN4-03-00-00", type=str,
28 help=
"The geometry tag to use")
29 parser.add_argument(
"--noLocalMaterial", action=
"store_true", default=
False,
30 help=
"Do NOT use local material maps")
31 args = parser.parse_args()
34 print(
"----MaterialValidation for ITk geometry----")
36 print(
"Using Geometry Tag: "+args.geometrytag)
38 print(
"...overridden by local Geometry Xml files")
41 flags.Input.isMC =
True
42 flags.Input.Files = []
45 flags.ITk.Geometry.AllLocal =
True
47 flags.GeoModel.AtlasVersion = args.geometrytag
48 flags.IOVDb.GlobalTag =
"OFLCOND-SIM-00-00-00"
49 flags.GeoModel.Align.Dynamic =
False
50 flags.TrackingGeometry.MaterialSource =
"COOL"
52 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
53 detectors = args.detectors
if 'detectors' in args
and args.detectors
else [
'ITkPixel',
'ITkStrip',
'HGTD']
54 detectors.append(
'Bpipe')
57 flags.Detector.GeometryCalo =
False
58 flags.Detector.GeometryMuon =
False
61 flags.Concurrency.NumThreads = 1
62 flags.Concurrency.NumConcurrentEvents = 1
64 if not args.noLocalMaterial:
65 flags.ITk.trackingGeometry.loadLocalDbForMaterialMaps=
True
66 LocalDataBaseName = flags.ITk.trackingGeometry.localDatabaseName
67 flags.IOVDb.DBConnection=
'sqlite://;schema='+LocalDataBaseName+
';dbname=OFLP200'
69 log.debug(
'Lock config flags now.')
72 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
76 if args.verboseAccumulators:
77 cfg.printConfig(withDetails=
True)
78 if args.verboseStoreGate:
79 cfg.getService(
"StoreGateSvc").Dump =
True
81 log.debug(
'Dumping of flags now.')
84 from TrkDetDescrAlgs.TrkDetDescrAlgsConfig
import MaterialValidationCfg
87 cfg.printConfig(withDetails =
True, summariseProps =
True)
90 cfg.run(maxEvents=args.maxEvents)