ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCalibDbTesterR4.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3def MdtCalibTestAlgCfg(flags, name="MdtCalibDbTestAlg", **kwargs):
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 result = ComponentAccumulator()
7 result.addEventAlgo(CompFactory.Muon.MdtCalibTestAlg(name, **kwargs), primary = True)
8 return result
9
10if __name__ == "__main__":
11 from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser
12 from MuonConfig.MuonConfigUtils import executeTest
13 parser = SetupArgParser()
14 parser.add_argument("--rtJSON", help="Location of the RT json file", default="")
15 parser.add_argument("--t0JSON", help="Location of the T0 json file", default="")
16 parser.set_defaults(nEvents = 1)
17 parser.set_defaults(noMM=True)
18 parser.set_defaults(noSTGC=True)
19 parser.set_defaults(noRpc=True)
20 parser.set_defaults(noTgc=True)
21 parser.set_defaults(geoModelFile="RUN4")
22 from AthenaConfiguration.AllConfigFlags import initConfigFlags
23 flags = initConfigFlags()
24 flags.Muon.Calib.readMdtJSON = True
25
26 args = parser.parse_args()
27 flags, cfg = setupGeoR4TestCfg(args, flags)
28 from MuonConfig.MuonCalibrationConfig import MdtCalibDbAlgCfg
29 cfg.merge(MdtCalibDbAlgCfg(flags,RtJSON = args.rtJSON, TubeT0JSON = args.t0JSON))
30 cfg.merge(MdtCalibTestAlgCfg(flags))
31 executeTest(cfg)
MdtCalibTestAlgCfg(flags, name="MdtCalibDbTestAlg", **kwargs)