ATLAS Offline Software
MuonCalibrationTesterConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def MdtCalibDbAlgTestCfg(flags, name = "MdtCalibDbAlgTest", **kwargs):
7  result = ComponentAccumulator()
8  theAlg = CompFactory.MuonValR4.MdtCalibDbAlgTest(name, **kwargs)
9  result.addEventAlgo(theAlg, primary=True)
10  return result
11 
12 if __name__=="__main__":
13  from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser, executeTest,setupHistSvcCfg,geoModelFileDefault
14  parser = SetupArgParser()
15  parser.add_argument("--setupRun4", default=True, action="store_true")
16  parser.set_defaults(nEvents = -1)
17  parser.set_defaults(outRootFile="MdtCalibDbAlgTest.root")
18  parser.set_defaults(inputFile=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/R4SimHits.pool.root"])
19  parser.set_defaults(eventPrintoutLevel = 1000)
20  parser.set_defaults(noMM=True)
21  parser.set_defaults(noSTGC=True)
22  parser.set_defaults(noRpc=True)
23  parser.set_defaults(noTgc=True)
24 
25  args = parser.parse_args()
26  args.geoModelFile = geoModelFileDefault(args.setupRun4)
27  from AthenaConfiguration.AllConfigFlags import initConfigFlags
28  flags = initConfigFlags()
29  flags.PerfMon.doFullMonMT = True
30  flags, cfg = setupGeoR4TestCfg(args,flags)
31 
32  from MuonConfig.MuonDataPrepConfig import xAODUncalibMeasPrepCfg
33  cfg.merge(xAODUncalibMeasPrepCfg(flags))
34 
35  cfg.merge(setupHistSvcCfg(flags,outFile=args.outRootFile,
36  outStream="MdtCalibDbAlgTest"))
37 
38 
39  cfg.merge(MdtCalibDbAlgTestCfg(flags))
40  executeTest(cfg)
41 
42 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
python.testGeoModel.geoModelFileDefault
def geoModelFileDefault(useR4Layout=False)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:5
python.testGeoModel.setupHistSvcCfg
def setupHistSvcCfg(flags, outFile="MdtGeoDump.root", outStream="GEOMODELTESTER")
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:58
python.testGeoModel.executeTest
def executeTest(cfg)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:192
python.testGeoModel.setupGeoR4TestCfg
def setupGeoR4TestCfg(args, flags=None)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:103
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.MuonDataPrepConfig.xAODUncalibMeasPrepCfg
def xAODUncalibMeasPrepCfg(flags)
Configuriation snippet to schedule all algorithms providing the Uncalibrated measurements.
Definition: MuonDataPrepConfig.py:29
MuonCalibrationTesterConfig.MdtCalibDbAlgTestCfg
def MdtCalibDbAlgTestCfg(flags, name="MdtCalibDbAlgTest", **kwargs)
Definition: MuonCalibrationTesterConfig.py:6