ATLAS Offline Software
Loading...
Searching...
No Matches
TrackFindingConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3from AthenaConfiguration.ComponentFactory import CompFactory
4
5
6def 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
12def 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", 200000)
19 kwargs.setdefault("DoReFitFromPRD", False)
20 kwargs.setdefault("IncludeScattering", False)
21 kwargs.setdefault("IncludeELoss", False)
22
23 kwargs.setdefault("MaxPropagationStep", 1000000)
24 kwargs.setdefault("MaxSurfacesPerNavStep", 10000000)
25 kwargs.setdefault("DoFreeToBoundCorrection", True)
26 kwargs.setdefault("MaxIterations", 100)
27
28
29 kwargs.setdefault("MuonCalibrationTool",result.popToolsAndMerge(MuonSpacePointCalibratorCfg(flags)))
30 fitTool = result.popToolsAndMerge(ActsFitterCfg(flags, name=name, **kwargs))
31 result.setPrivateTools(fitTool)
32 return result
33
34def TrackSummaryToolCfg(flags, name="MuonTrackSummaryTool", **kwargs) :
35 result = ComponentAccumulator()
36 theTool = CompFactory.MuonR4.TrackSummaryTool(name, **kwargs)
37 result.setPrivateTools(theTool)
38 return result
39
40def MSTrackFinderAlgCfg(flags, name="MSTrackFinderAlg", **kwargs):
41 result = ComponentAccumulator()
42 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
43 result.merge(AtlasFieldCacheCondAlgCfg(flags))
44
45 kwargs.setdefault("SegmentSelectionTool", result.popToolsAndMerge(SegmentSelectorCfg(flags)))
46 kwargs.setdefault("FittingTool", result.popToolsAndMerge(MSTrackFitterCfg(flags)))
47 from ActsConfig.ActsGeometryConfig import ActsExtrapolationToolCfg
48 kwargs.setdefault("ExtrapolationTool", result.popToolsAndMerge(ActsExtrapolationToolCfg(flags, MaxSteps=10000)))
49 from ActsConfig.ActsGeometryConfig import ActsTrackingGeometryToolCfg
50 kwargs.setdefault("TrackingGeometryTool", result.getPrimaryAndMerge(ActsTrackingGeometryToolCfg(flags)))
51 from MuonSpacePointCalibrator.CalibrationConfig import MuonSpacePointCalibratorCfg
52 kwargs.setdefault("Calibrator", result.popToolsAndMerge(MuonSpacePointCalibratorCfg(flags)))
53
54
55 the_alg = CompFactory.MuonR4.MsTrackFindingAlg(name, **kwargs)
56 result.addEventAlgo(the_alg, primary = True)
57
58
59 return result
MSTrackFitterCfg(flags, name="MSTrackFitTool", **kwargs)
TrackSummaryToolCfg(flags, name="MuonTrackSummaryTool", **kwargs)
MSTrackFinderAlgCfg(flags, name="MSTrackFinderAlg", **kwargs)
SegmentSelectorCfg(flags, name="SegmentSelectionTool", **kwargs)