2 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory
import CompFactory
9 if flags.Detector.EnableMDT:
10 containerNames+=[
"xMdtSimHits"]
11 if flags.Detector.EnableMM:
12 containerNames+=[
"xMmSimHits"]
13 if flags.Detector.EnableRPC:
14 containerNames+=[
"xRpcSimHits"]
15 if flags.Detector.EnableTGC:
16 containerNames+=[
"xTgcSimHits"]
17 if flags.Detector.EnablesTGC:
18 containerNames+=[
"xStgcSimHits"]
19 kwargs.setdefault(
"SimHitKeys", containerNames)
21 the_alg = CompFactory.ActsTrk.MuonDetectorNavTest(name, **kwargs)
22 result.addEventAlgo(the_alg, primary =
True)
25 if __name__==
"__main__":
26 from MuonGeoModelTestR4.testGeoModel
import setupGeoR4TestCfg, SetupArgParser, executeTest,setupHistSvcCfg
28 parser.set_defaults(inputFile=[
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/R3SimHits.pool.root"])
29 parser.set_defaults(outRootFile=
"MuonNavigationTestR4.root")
30 parser.set_defaults(nEvents=10)
31 parser.add_argument(
"--dumpDetector", help=
"Save dump detector visualization", action=
'store_true', default=
False )
32 parser.add_argument(
"--dumpPassive", help=
"Save detector visualization", action=
'store_true', default=
False )
33 parser.add_argument(
"--dumpDetectorVolumes", help=
"Save detector visualization", action=
'store_true', default=
False )
34 parser.add_argument(
"--noSensitives", help=
"Do not use sensitive detectors", action=
'store_true', default=
False )
35 parser.add_argument(
"--dumpMaterialSurfaces", help=
"Save material surfaces visualization", action=
'store_true', default=
False )
38 args = parser.parse_args()
39 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
41 flags.PerfMon.doFullMonMT =
True
44 cfg.merge(
setupHistSvcCfg(flags, outFile=args.outRootFile, outStream=
"MuonNavigationTestR4"))
45 from ActsGeometry.DetectorVolumeSvcCfg
import DetectorVolumeSvcCfg
47 from MagFieldServices.MagFieldServicesConfig
import AtlasFieldCacheCondAlgCfg
50 cfg.getPublicTool(
"MuonDetectorBuilderTool").dumpDetector = args.dumpDetector
51 cfg.getPublicTool(
"MuonDetectorBuilderTool").dumpPassive = args.dumpPassive
52 cfg.getPublicTool(
"MuonDetectorBuilderTool").dumpDetectorVolumes = args.dumpDetectorVolumes
53 cfg.getPublicTool(
"MuonDetectorBuilderTool").BuildSensitives =
not args.noSensitives
54 cfg.getPublicTool(
"MuonDetectorBuilderTool").dumpMaterialSurfaces = args.dumpMaterialSurfaces