ATLAS Offline Software
TrkExRungeKuttaPropagatorConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 # Configuration of RungeKuttaPropagator
4 # for track parameters propagation through magnetic field.
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
8 
9 def RungeKuttaPropagatorCfg(flags, name='AtlasRungeKuttaPropagator', **kwargs):
10  result = ComponentAccumulator()
11  acc = AtlasFieldCacheCondAlgCfg(flags)
12  result.merge(acc)
13 
14  kwargs.setdefault("IncludeBgradients", False) # Just so this doesn't seem unconfigured. Real fix is to use default name.
15  tool = CompFactory.Trk.RungeKuttaPropagator(name, **kwargs)
16  result.setPrivateTools(tool)
17  return result
18 
19 
20 def InDetPropagatorCfg(flags, name='InDetPropagator', **kwargs):
21  kwargs.setdefault("AccuracyParameter", 0.0001)
22  kwargs.setdefault("MaxStraightLineStep", .004) # Fixes a failed fit
23  return RungeKuttaPropagatorCfg(flags, name, **kwargs)
24 
25 
26 def GSFRungeKuttaPropagatorCfg(flags, name='GSFTrkPropagator', **kwargs):
27  kwargs.setdefault("AccuracyParameter", 0.0001)
28  return RungeKuttaPropagatorCfg(flags, name, **kwargs)
29 
30 
31 def MuonCombinedPropagatorCfg(flags, name='MuonCombinedPropagator', **kwargs):
32  if not flags.Muon.MuonTrigger:
33  kwargs.setdefault("AccuracyParameter", .000001)
34  kwargs.setdefault("IncludeBgradients", True)
35  kwargs.setdefault("MaxHelixStep", .001)
36  kwargs.setdefault("MaxStraightLineStep", .001)
37  return RungeKuttaPropagatorCfg(flags, name, **kwargs)
38 
39 
40 def ITkPropagatorCfg(flags, name='ITkPropagator', **kwargs):
41  kwargs.setdefault("AccuracyParameter", 0.0001)
42  kwargs.setdefault("MaxStraightLineStep", .004) # Fixes a failed fit
43  return RungeKuttaPropagatorCfg(flags, name, **kwargs)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrkExRungeKuttaPropagatorConfig.RungeKuttaPropagatorCfg
def RungeKuttaPropagatorCfg(flags, name='AtlasRungeKuttaPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:9
python.TrkExRungeKuttaPropagatorConfig.GSFRungeKuttaPropagatorCfg
def GSFRungeKuttaPropagatorCfg(flags, name='GSFTrkPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:26
python.TrkExRungeKuttaPropagatorConfig.MuonCombinedPropagatorCfg
def MuonCombinedPropagatorCfg(flags, name='MuonCombinedPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:31
python.TrkExRungeKuttaPropagatorConfig.ITkPropagatorCfg
def ITkPropagatorCfg(flags, name='ITkPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:40
python.TrkExRungeKuttaPropagatorConfig.InDetPropagatorCfg
def InDetPropagatorCfg(flags, name='InDetPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:20
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8