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, executeTest
12 parser = SetupArgParser()
13 parser.add_argument("--rtJSON", help="Location of the RT json file", default="")
14 parser.add_argument("--t0JSON", help="Location of the T0 json file", default="")
15 parser.set_defaults(nEvents = 1)
16 parser.set_defaults(noMM=True)
17 parser.set_defaults(noSTGC=True)
18 parser.set_defaults(noRpc=True)
19 parser.set_defaults(noTgc=True)
20 parser.set_defaults(geoModelFile="RUN4")
21 from AthenaConfiguration.AllConfigFlags import initConfigFlags
22 flags = initConfigFlags()
23 flags.Muon.Calib.readMdtJSON = True
24
25 args = parser.parse_args()
26 flags, cfg = setupGeoR4TestCfg(args, flags)
27 from MuonConfig.MuonCalibrationConfig import MdtCalibDbAlgCfg
28 cfg.merge(MdtCalibDbAlgCfg(flags,RtJSON = args.rtJSON, TubeT0JSON = args.t0JSON))
29 cfg.merge(MdtCalibTestAlgCfg(flags))
30 executeTest(cfg)
MdtCalibTestAlgCfg(flags, name="MdtCalibDbTestAlg", **kwargs)