ATLAS Offline Software
TrackFindingConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 
5 
6 def SegmentSelectorCfg(flags, name="SegmentSelectionTool", **kwargs):
7  result = ComponentAccumulator()
8  the_tool = CompFactory.MuonR4.SegmentSelectionTool(name, **kwargs)
9  result.setPrivateTools(the_tool)
10  return result
11 
12 def MSTrackFitterCfg(flags, name="MSTrackFitTool", **kwargs):
13  result = ComponentAccumulator()
14  from ActsConfig.ActsConfigFlags import TrackFitterType
15  from ActsConfig.ActsTrackFittingConfig import ActsFitterCfg
16  from MuonSpacePointCalibrator.CalibrationConfig import MuonSpacePointCalibratorCfg
17  kwargs.setdefault("fitterKind", TrackFitterType.GlobalChiSquareFitter)
18  kwargs.setdefault("OutlierChi2Cut", 2000)
19  kwargs.setdefault("DoReFitFromPRD", False)
20  kwargs.setdefault("IncludeScattering", False)
21  kwargs.setdefault("IncludeELoss", False)
22 
23  kwargs.setdefault("MaxPropagationStep", 10000)
24  kwargs.setdefault("MaxSurfacesPerNavStep", 10000000)
25  kwargs.setdefault("DoStraightLine", True)
26 
27 
28  kwargs.setdefault("MuonCalibrationTool",result.popToolsAndMerge(MuonSpacePointCalibratorCfg(flags)))
29  fitTool = result.popToolsAndMerge(ActsFitterCfg(flags, name=name, **kwargs))
30  result.setPrivateTools(fitTool)
31  return result
32 
33 def MSTrackFinderAlgCfg(flags, name="MSTrackFinderAlg", **kwargs):
34  result = ComponentAccumulator()
35  from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
36  result.merge(AtlasFieldCacheCondAlgCfg(flags))
37  segmentKeys = []
38  if flags.Detector.GeometryMDT or flags.Detector.GeometryRPC or flags.Detector.GeometryTGC:
39  segmentKeys+=["MuonSegmentsFromR4"]
40  if flags.Detector.GeometryMM or flags.Detector.GeometrysTGC:
41  segmentKeys+=[]
42 
43  kwargs.setdefault("SegmentContainer", segmentKeys)
44  kwargs.setdefault("SegmentSelectionTool", result.popToolsAndMerge(SegmentSelectorCfg(flags)))
45  kwargs.setdefault("FittingTool", result.popToolsAndMerge(MSTrackFitterCfg(flags)))
46  from ActsConfig.ActsGeometryConfig import ActsExtrapolationToolCfg
47  kwargs.setdefault("ExtrapolationTool", result.popToolsAndMerge(ActsExtrapolationToolCfg(flags, MaxSteps=10000)))
48  from ActsConfig.ActsGeometryConfig import ActsTrackingGeometryToolCfg
49  kwargs.setdefault("TrackingGeometryTool", result.getPrimaryAndMerge(ActsTrackingGeometryToolCfg(flags)))
50 
51 
52  the_alg = CompFactory.MuonR4.MSTrackFindingAlg(name, **kwargs)
53  result.addEventAlgo(the_alg, primary = True)
54  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrackFindingConfig.MSTrackFinderAlgCfg
def MSTrackFinderAlgCfg(flags, name="MSTrackFinderAlg", **kwargs)
Definition: TrackFindingConfig.py:33
TrackFindingConfig.SegmentSelectorCfg
def SegmentSelectorCfg(flags, name="SegmentSelectionTool", **kwargs)
Definition: TrackFindingConfig.py:6
TrackFindingConfig.MSTrackFitterCfg
def MSTrackFitterCfg(flags, name="MSTrackFitTool", **kwargs)
Definition: TrackFindingConfig.py:12
ActsTrackFittingConfig.ActsFitterCfg
ComponentAccumulator ActsFitterCfg(flags, str name="ActsFitterTool", Optional[TrackFitterType] fitterKind=None, **kwargs)
Definition: ActsTrackFittingConfig.py:8
ActsGeometryConfig.ActsExtrapolationToolCfg
ComponentAccumulator ActsExtrapolationToolCfg(flags, str name="ActsExtrapolationTool", **kwargs)
Definition: ActsGeometryConfig.py:149
ActsGeometryConfig.ActsTrackingGeometryToolCfg
ComponentAccumulator ActsTrackingGeometryToolCfg(flags, str name="ActsTrackingGeometryTool")
Definition: ActsGeometryConfig.py:140
CalibrationConfig.MuonSpacePointCalibratorCfg
def MuonSpacePointCalibratorCfg(flags, name="MuonSpacePointCalibrator", **kwargs)
Definition: CalibrationConfig.py:6
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8