ATLAS Offline Software
MuonHoughTransformTesterConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 if __name__=="__main__":
4  from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser, executeTest,setupHistSvcCfg
5  parser = SetupArgParser()
6  parser.add_argument("--noMonitorPlots", help="If set to true, there're no monitoring plots", default = False,
7  action='store_true')
8  parser.set_defaults(nEvents = -1)
9  #parser.set_defaults(noMM=True)
10  #parser.set_defaults(noSTGC=True)
11  parser.set_defaults(outRootFile="HoughTransformTester.root")
12  #parser.set_defaults(condTag="CONDBR2-BLKPA-2023-02")
13  parser.set_defaults(inputFile=[
14  #"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/TCT_Run3/data22_13p6TeV.00431493.physics_Main.daq.RAW._lb0525._SFO-16._0001.data"
15  "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/R3SimHits.pool.root"
16  ])
17  parser.set_defaults(eventPrintoutLevel = 500)
18 
19  args = parser.parse_args()
20  from AthenaConfiguration.AllConfigFlags import initConfigFlags
21  flags = initConfigFlags()
22  flags.PerfMon.doFullMonMT = True
23  flags.Muon.doFastMMDigitization = False
24  flags, cfg = setupGeoR4TestCfg(args,flags)
25 
26 
27  # from PerfMonVTune.PerfMonVTuneConfig import VTuneProfilerServiceCfg
28  cfg.merge(setupHistSvcCfg(flags,outFile=args.outRootFile,
29  outStream="MuonEtaHoughTransformTest"))
30 
31  from MuonConfig.MuonDataPrepConfig import xAODUncalibMeasPrepCfg
32  cfg.merge(xAODUncalibMeasPrepCfg(flags))
33 
34  from MuonSpacePointFormation.SpacePointFormationConfig import MuonSpacePointFormationCfg
35  cfg.merge(MuonSpacePointFormationCfg(flags))
36 
37  from MuonPatternRecognitionAlgs.MuonHoughTransformAlgConfig import MuonPatternRecognitionCfg, MuonSegmentFittingAlgCfg
38  from MuonPatternRecognitionTest.PatternTestConfig import MuonHoughTransformTesterCfg, PatternVisualizationToolCfg
39  cfg.merge(MuonPatternRecognitionCfg(flags))
40  cfg.merge(MuonSegmentFittingAlgCfg(flags))
41  cfg.merge(MuonHoughTransformTesterCfg(flags))
42 
43  if flags.Input.isMC:
44 
47  from IOVDbSvc.IOVDbSvcConfig import addOverride
48  cfg.merge(addOverride(flags, "/MDT/TWINMAPPING", "MDTTwinMapping_compactFormat_Run123"))
49 
50 
51 
52  if not args.noMonitorPlots:
53  cfg.getEventAlgo("MuonEtaHoughTransformAlg").VisualizationTool = cfg.popToolsAndMerge(PatternVisualizationToolCfg(flags,
54  CanvasPreFix="EtaHoughPlotValid",
55  AllCanvasName="AllEtaHoughiDiPuffPlots", displayTruthOnly = True,
56  saveSinglePDFs = True, saveSummaryPDF= True))
57  cfg.getEventAlgo("MuonPhiHoughTransformAlg").VisualizationTool = cfg.popToolsAndMerge(PatternVisualizationToolCfg(flags,
58  CanvasPreFix="PhiHoughPlotValid",
59  AllCanvasName="AllPhiHoughiDiPuffPlots", displayTruthOnly = True,
60  saveSinglePDFs = False, saveSummaryPDF= False))
61  cfg.getEventAlgo("MuonSegmentFittingAlg").VisualizationTool = cfg.popToolsAndMerge(PatternVisualizationToolCfg(flags,
62  CanvasPreFix="SegmentPlotValid",
63  AllCanvasName="AllSegmentFitPlots", displayTruthOnly = True,
64  saveSinglePDFs = True, saveSummaryPDF= False))
65 
66  executeTest(cfg)
67 
PatternTestConfig.PatternVisualizationToolCfg
def PatternVisualizationToolCfg(flags, name="PatternVisualizationTool", **kwargs)
Definition: PatternTestConfig.py:7
MuonHoughTransformAlgConfig.MuonSegmentFittingAlgCfg
def MuonSegmentFittingAlgCfg(flags, name="MuonSegmentFittingAlg", **kwargs)
Definition: MuonHoughTransformAlgConfig.py:21
python.MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
PatternTestConfig.MuonHoughTransformTesterCfg
def MuonHoughTransformTesterCfg(flags, name="MuonHoughTransformTester", **kwargs)
Definition: PatternTestConfig.py:28
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.IOVDbSvcConfig.addOverride
def addOverride(flags, folder, tag, db=None)
Definition: IOVDbSvcConfig.py:224
python.testGeoModel.setupGeoR4TestCfg
def setupGeoR4TestCfg(args, flags=None)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:103
MuonHoughTransformAlgConfig.MuonPatternRecognitionCfg
def MuonPatternRecognitionCfg(flags)
Definition: MuonHoughTransformAlgConfig.py:35
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
SpacePointFormationConfig.MuonSpacePointFormationCfg
def MuonSpacePointFormationCfg(flags)
Definition: SpacePointFormationConfig.py:20
python.MuonDataPrepConfig.xAODUncalibMeasPrepCfg
def xAODUncalibMeasPrepCfg(flags)
Configuriation snippet to schedule all algorithms providing the Uncalibrated measurements.
Definition: MuonDataPrepConfig.py:29