ATLAS Offline Software
Loading...
Searching...
No Matches
MuonPatternRecognitionConfig Namespace Reference

Functions

 MuonPhiHoughTransformAlgCfg (flags, name="MuonPhiHoughTransformAlg", **kwargs)
 MuonNSWSegmentFinderAlgCfg (flags, name="MuonNswSegmentFinderAlg", **kwargs)
 MuonEtaHoughTransformAlgCfg (flags, name="MuonEtaHoughTransformAlg", **kwargs)
 MuonSegmentFittingAlgCfg (flags, name="MuonSegmentFittingAlg", **kwargs)
 ActsMuonSegmentRefitAlgCfg (flags, name="ActsMuonSegmentRefitAlg", **kwargs)
 MuonPatternRecognitionCfg (flags, suffix="")
 Main config fragment for pattern recognition.

Function Documentation

◆ ActsMuonSegmentRefitAlgCfg()

ActsMuonSegmentRefitAlgCfg ( flags,
name = "ActsMuonSegmentRefitAlg",
** kwargs )

Definition at line 74 of file MuonPatternRecognitionConfig.py.

74def ActsMuonSegmentRefitAlgCfg(flags,name="ActsMuonSegmentRefitAlg", **kwargs):
75 result = ComponentAccumulator()
76 from MuonTrackFindingAlgs.TrackFindingConfig import SegmentSelectorCfg
77 kwargs.setdefault("SegmentSelectionTool", result.popToolsAndMerge(SegmentSelectorCfg(flags)))
78 from MuonSpacePointCalibrator.CalibrationConfig import MuonSpacePointCalibratorCfg
79 kwargs.setdefault("Calibrator", result.popToolsAndMerge(MuonSpacePointCalibratorCfg(flags)))
80 from ActsConfig.ActsGeometryConfig import ActsTrackingGeometrySvcCfg
81 result.merge(ActsTrackingGeometrySvcCfg(flags))
82 kwargs.setdefault("SegmentContainer", "MsSegments")
83 theAlg = CompFactory.MuonR4.SegmentActsRefitAlg(name, **kwargs)
84 result.addEventAlgo(theAlg, primary = True)
85 return result
86

◆ MuonEtaHoughTransformAlgCfg()

MuonEtaHoughTransformAlgCfg ( flags,
name = "MuonEtaHoughTransformAlg",
** kwargs )

Definition at line 30 of file MuonPatternRecognitionConfig.py.

30def MuonEtaHoughTransformAlgCfg(flags, name = "MuonEtaHoughTransformAlg", **kwargs):
31 result = ComponentAccumulator()
32 kwargs.setdefault("downWeightPrdMultiplicity", True)
33 theAlg = CompFactory.MuonR4.EtaHoughTransformAlg(name, **kwargs)
34 result.addEventAlgo(theAlg, primary=True)
35 return result
36

◆ MuonNSWSegmentFinderAlgCfg()

MuonNSWSegmentFinderAlgCfg ( flags,
name = "MuonNswSegmentFinderAlg",
** kwargs )

Definition at line 15 of file MuonPatternRecognitionConfig.py.

15def MuonNSWSegmentFinderAlgCfg(flags, name = "MuonNswSegmentFinderAlg", **kwargs):
16 result = ComponentAccumulator()
17 from MuonSpacePointCalibrator.CalibrationConfig import MuonSpacePointCalibratorCfg
18 calibrator_kwargs = {}
19 if flags.Input.isMC:
20 #See !90511, possibility to adjust precision strips with sTgcPrecCoordErrorScale and both eta and
21 #stereo MMG with mmStripErrorScale
22 calibrator_kwargs["sTgcNonPrecCoordErrorScale"] = 4.
23
24 kwargs.setdefault("Calibrator", result.popToolsAndMerge(MuonSpacePointCalibratorCfg(flags, **calibrator_kwargs)))
25 theAlg = CompFactory.MuonR4.NswSegmentFinderAlg(name, **kwargs)
26 result.addEventAlgo(theAlg, primary=True)
27 return result
28
29

◆ MuonPatternRecognitionCfg()

MuonPatternRecognitionCfg ( flags,
suffix = "" )

Main config fragment for pattern recognition.

The suffix allows to specify in the Event Filter whether the algothms run in RoI or FS.

Definition at line 88 of file MuonPatternRecognitionConfig.py.

88def MuonPatternRecognitionCfg(flags, suffix = ""):
89 result = ComponentAccumulator()
90 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
91 result.merge(ActsGeometryContextAlgCfg(flags))
92
93 if flags.Muon.enableMLBucketFilter:
94 from MuonInference.InferenceConfig import GraphBucketFilterToolCfg, GraphInferenceAlgCfg
95 bucketTool = result.popToolsAndMerge(GraphBucketFilterToolCfg(flags))
96 result.merge(GraphInferenceAlgCfg(flags,
97 name = f"GraphInferenceAlg{suffix}",
98 InferenceTools=[bucketTool]))
99
100 segmentContainers = []
101 if flags.Detector.GeometrysTGC or flags.Detector.GeometryMM:
102 segmentContainers+=["MuonNswSegments"]
103 result.merge(MuonEtaHoughTransformAlgCfg(flags, name=f"MuonNswEtaHoughTransformAlg{suffix}",
104 EtaHoughMaxContainer = "MuonHoughNswMaxima",
105 SpacePointContainer = "NswSpacePoints"))
106 result.merge(MuonNSWSegmentFinderAlgCfg(flags, name=f"MuonNswSegmentFinderAlg{suffix}",
107 MuonNswSegmentWriteKey = segmentContainers[-1],
108 MuonNswSegmentSeedWriteKey = "MuonNswSegmentSeeds",
109 CombinatorialReadKey = "MuonHoughNswMaxima"))
110
111 if flags.Detector.GeometryMDT or flags.Detector.GeometryRPC or flags.Detector.GeometryTGC:
112 if flags.Muon.enableMLBucketFilter:
113 result.merge(MuonEtaHoughTransformAlgCfg(flags, name = f"MuonEtaHoughTransformAlg{suffix}",
114 SpacePointContainer = "FilteredMlBuckets"))
115 else:
116 result.merge(MuonEtaHoughTransformAlgCfg(flags, name = f"MuonEtaHoughTransformAlg{suffix}"))
117 result.merge(MuonPhiHoughTransformAlgCfg(flags, name = f"MuonPhiHoughTransformAlg{suffix}"))
118 segmentContainers+=["R4MuonSegments"]
119
120 result.merge(MuonSegmentFittingAlgCfg(flags,
121 name = f"MuonSegmentFittingAlg{suffix}",
122 OutSegmentContainer=segmentContainers[-1]))
123
124 from MuonSegmentCnv.MuonSegmentCnvConfig import xAODSegmentCnvAlgCfg
125 result.merge(xAODSegmentCnvAlgCfg(flags, name = f"MuonR4xAODSegmentCnvAlg{suffix}", InSegmentKeys = segmentContainers))
126 if flags.Muon.setupTruthAlgorithms:
127 from MuonTruthAlgsR4.MuonTruthAlgsConfig import RecoSegmentTruthAssocCfg
128 result.merge(RecoSegmentTruthAssocCfg(flags,
129 name=f"MsSegmentsTruthMatching{suffix}",
130 SegmentKey="MsSegments"))
131 return result

◆ MuonPhiHoughTransformAlgCfg()

MuonPhiHoughTransformAlgCfg ( flags,
name = "MuonPhiHoughTransformAlg",
** kwargs )

Definition at line 7 of file MuonPatternRecognitionConfig.py.

7def MuonPhiHoughTransformAlgCfg(flags, name = "MuonPhiHoughTransformAlg", **kwargs):
8 result = ComponentAccumulator()
9 kwargs.setdefault("downWeightPrdMultiplicity", True)
10 theAlg = CompFactory.MuonR4.PhiHoughTransformAlg(name, **kwargs)
11 result.addEventAlgo(theAlg, primary=True)
12 return result
13
14

◆ MuonSegmentFittingAlgCfg()

MuonSegmentFittingAlgCfg ( flags,
name = "MuonSegmentFittingAlg",
** kwargs )

Definition at line 37 of file MuonPatternRecognitionConfig.py.

37def MuonSegmentFittingAlgCfg(flags, name = "MuonSegmentFittingAlg", **kwargs):
38 result = ComponentAccumulator()
39 from MuonSpacePointCalibrator.CalibrationConfig import MuonSpacePointCalibratorCfg
40 kwargs.setdefault("Calibrator", result.popToolsAndMerge(MuonSpacePointCalibratorCfg(flags)))
41 kwargs.setdefault("ResoSeedHitAssoc", 5. )
42 kwargs.setdefault("RecoveryPull", 3.)
43 from ROOT.Muon.MuonStationIndex import StIndex
44 bsCutL = [2.] * StIndex.StIndexMax
45 bsCutR = [2.] * StIndex.StIndexMax
46
47 bsCutL[StIndex.BI] = bsCutR[StIndex.BI] = 1.5
48 bsCutL[StIndex.BM] = bsCutR[StIndex.BM] = 1.75
49
50 bsCutL[StIndex.EM] = bsCutL[StIndex.EO] = 2.75
51 bsCutR[StIndex.EM] = bsCutR[StIndex.EO] = 2.75
52 kwargs.setdefault("SeedMaxDistanceBsRadius" , bsCutR)
53 kwargs.setdefault("SeedMaxDistanceBsLength" , bsCutL)
54 # Configure T0 fitting, disabled by default
55 kwargs.setdefault("fitSegmentT0", False)
56 if kwargs["fitSegmentT0"]:
57 kwargs.setdefault("useHessianResidual", True)
58 kwargs.setdefault("recalibInFit", True)
59 kwargs.setdefault("maxIterations", 400)
60 # temporarily disable beamspot constraint when fitting T0, as it causes FPEs
61 kwargs.setdefault("doBeamspotConstraint", False)
62 # Configure pre-fitting, disabled by default
63 kwargs.setdefault("useFastPreFitter", False)
64 if kwargs.get("useFastPreFitter"):
65 kwargs.setdefault("useFastFitter", True)
66 # Configure main (full) fitting
67 kwargs.setdefault("useFastFitter", False)
68 kwargs.setdefault("recalibInFit", False)
69 kwargs.setdefault("doBeamspotConstraint", True)
70 theAlg = CompFactory.MuonR4.SegmentFittingAlg(name, **kwargs)
71 result.addEventAlgo(theAlg, primary=True)
72 return result
73