ATLAS Offline Software
MuonRecoChainTesterConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaborationation
2 
3 if __name__=="__main__":
4 
5  from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser, executeTest,setupHistSvcCfg
6  parser = SetupArgParser()
7  parser.set_defaults(nEvents = -1)
8  #parser.set_defaults(noMM=True)
9  parser.set_defaults(noSTGC=True)
10  parser.set_defaults(outRootFile="HoughTransformTester.root")
11  # parser.set_defaults(condTag="CONDBR2-BLKPA-2023-03")
12  parser.set_defaults(inputFile=[
13  "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/R3SimHits.pool.root"
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  ])
16  parser.set_defaults(eventPrintoutLevel = 500)
17  parser.add_argument("--monitorPlots", action='store_true', default=False,
18  help="Setup monitoring plots of the pattern recognition")
19  parser.add_argument("--runVtune",
20  help="runs VTune profiler service for the muon hough alg", action='store_true', default = False)
21 
22 
23  args = parser.parse_args()
24  from AthenaConfiguration.AllConfigFlags import initConfigFlags
25  flags = initConfigFlags()
26  flags.Muon.Align.UseAsBuilt = False
27  flags.Muon.Align.UseBLines = False
28 
29 
30  # flags.PerfMon.doFullMonMT = True
31  flags, cfg = setupGeoR4TestCfg(args,flags)
32 
33 
34  cfg.merge(setupHistSvcCfg(flags,outFile=args.outRootFile,
35  outStream="MuonEtaHoughTransformTest"))
36 
37  from MuonConfig.MuonDataPrepConfig import xAODUncalibMeasPrepCfg
38  cfg.merge(xAODUncalibMeasPrepCfg(flags))
39 
40  from MuonSpacePointFormation.SpacePointFormationConfig import MuonSpacePointFormationCfg
41  cfg.merge(MuonSpacePointFormationCfg(flags))
42 
43 
44  from MuonPatternRecognitionTest.PatternTestConfig import LegacyMuonRecoChainCfg
45  cfg.merge(LegacyMuonRecoChainCfg(flags))
46 
47  from MuonPatternRecognitionAlgs.MuonHoughTransformAlgConfig import MuonPatternRecognitionCfg, MuonSegmentFittingAlgCfg
48  cfg.merge(MuonPatternRecognitionCfg(flags))
49  cfg.merge(MuonSegmentFittingAlgCfg(flags))
50 
51  from MuonPatternRecognitionTest.PatternTestConfig import MuonR4PatternRecoChainCfg, MuonR4SegmentRecoChainCfg
52  cfg.merge(MuonR4PatternRecoChainCfg(flags))
53 
54 
55  cfg.merge(MuonR4SegmentRecoChainCfg(flags))
56 
57  from MuonPatternRecognitionTest.PatternTestConfig import MuonRecoChainTesterCfg
58  cfg.merge(MuonRecoChainTesterCfg(flags))
59  if args.runVtune:
60  from PerfMonVTune.PerfMonVTuneConfig import VTuneProfilerServiceCfg
61  cfg.merge(VTuneProfilerServiceCfg(flags, ProfiledAlgs=["MuonHoughTransformAlg"]))
62 
63  if args.monitorPlots:
64  from MuonPatternRecognitionTest.PatternTestConfig import PatternVisualizationToolCfg
65  cfg.getEventAlgo("MuonEtaHoughTransformAlg").VisualizationTool = cfg.popToolsAndMerge(PatternVisualizationToolCfg(flags,
66  CanvasPreFix="EtaHoughPlotValid",
67  AllCanvasName="AllEtaHoughiDiPuffPlots",
68  TruthSegDecors=["HabemusZ"],
69  displayTruthOnly = False,
70  saveSinglePDFs = True, saveSummaryPDF= True))
71  cfg.getEventAlgo("MuonPhiHoughTransformAlg").VisualizationTool = cfg.popToolsAndMerge(PatternVisualizationToolCfg(flags,
72  CanvasPreFix="PhiHoughPlotValid",
73  AllCanvasName="AllPhiHoughiDiPuffPlots",
74  TruthSegDecors=["HabemusZ"],
75  displayTruthOnly = False,
76  saveSinglePDFs = False, saveSummaryPDF= False))
77  cfg.getEventAlgo("MuonSegmentFittingAlg").VisualizationTool = cfg.popToolsAndMerge(PatternVisualizationToolCfg(flags,
78  CanvasPreFix="SegmentPlotValid",
79  AllCanvasName="AllSegmentFitPlots",
80  TruthSegDecors=["HabemusZ"],
81  displayTruthOnly = False,
82  saveSinglePDFs = False, saveSummaryPDF= False))
83  executeTest(cfg)
84 
PatternTestConfig.MuonRecoChainTesterCfg
def MuonRecoChainTesterCfg(flags, name="MuonRecoChainTester", **kwargs)
Definition: PatternTestConfig.py:21
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
python.testGeoModel.setupHistSvcCfg
def setupHistSvcCfg(flags, outFile="MdtGeoDump.root", outStream="GEOMODELTESTER")
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:58
PerfMonVTuneConfig.VTuneProfilerServiceCfg
def VTuneProfilerServiceCfg(flags, **kwargs)
Definition: PerfMonVTuneConfig.py:11
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
MuonHoughTransformAlgConfig.MuonPatternRecognitionCfg
def MuonPatternRecognitionCfg(flags)
Definition: MuonHoughTransformAlgConfig.py:35
PatternTestConfig.LegacyMuonRecoChainCfg
def LegacyMuonRecoChainCfg(flags)
Definition: PatternTestConfig.py:36
PatternTestConfig.MuonR4PatternRecoChainCfg
def MuonR4PatternRecoChainCfg(flags)
Definition: PatternTestConfig.py:97
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
PatternTestConfig.MuonR4SegmentRecoChainCfg
def MuonR4SegmentRecoChainCfg(flags)
Definition: PatternTestConfig.py:129