ATLAS Offline Software
AtlasExtrapolationEngineConfig.py
Go to the documentation of this file.
1 
2 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 
4 # New configuration for ATLAS extrapolator
5 # Based heavily on AtlasExtrapolationEngine.py
6 
7 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory import CompFactory
9 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
10 
11 # import the ExtrapolationEngine configurable
12 ExEngine=CompFactory.Trk.ExtrapolationEngine
13 
14 def AtlasExtrapolationEngineCfg( flags, name = 'Extrapolation', nameprefix='Atlas' ):
15  result=ComponentAccumulator()
16 
17  acc = AtlasFieldCacheCondAlgCfg(flags)
18  result.merge(acc)
19 
20  # get the correct TrackingGeometry setup
21  from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg
22  result.merge( TrackingGeometryCondAlgCfg(flags) )
23  geom_cond_key = 'AtlasTrackingGeometry'
24 
25  from TrkConfig.TrkExRungeKuttaPropagatorConfig import RungeKuttaPropagatorCfg
26  AtlasRungeKuttaPropagator = acc.popToolsAndMerge(RungeKuttaPropagatorCfg(flags, name='AtlasRungeKuttaPropagator'))
27 
28  # from the Propagator create a Propagation engine to handle path length
29  Trk__PropagationEngine=CompFactory.Trk.PropagationEngine
30  staticPropagator = Trk__PropagationEngine(name = nameprefix+'StaticPropagation')
31  # give the tools it needs
32  staticPropagator.Propagator = AtlasRungeKuttaPropagator
33  # configure output formatting
34  staticPropagator.OutputPrefix = '[SP] - '
35  staticPropagator.OutputPostfix = ' - '
36  result.addPublicTool(staticPropagator) #TODO remove one day
37 
38  # load the material effects engine
39  Trk__MaterialEffectsEngine=CompFactory.Trk.MaterialEffectsEngine
40  materialEffectsEngine = Trk__MaterialEffectsEngine(name = nameprefix+'MaterialEffects')
41  # configure output formatting
42  materialEffectsEngine.OutputPrefix = '[ME] - '
43  materialEffectsEngine.OutputPostfix = ' - '
44  result.addPublicTool(materialEffectsEngine) #TODO remove one day
45 
46 
47  # load the static navigation engine
48  Trk__StaticNavigationEngine=CompFactory.Trk.StaticNavigationEngine
49  staticNavigator = Trk__StaticNavigationEngine(name = nameprefix+'StaticNavigation')
50  # give the tools it needs
51  staticNavigator.PropagationEngine = staticPropagator
52  staticNavigator.MaterialEffectsEngine = materialEffectsEngine
53  staticNavigator.TrackingGeometryReadKey = geom_cond_key
54  # Geometry name
55  # configure output formatting
56  staticNavigator.OutputPrefix = '[SN] - '
57  staticNavigator.OutputPostfix = ' - '
58  # add to tool service
59  result.addPublicTool(staticNavigator) #TODO remove one day
60 
61  # load the Static ExtrapolationEngine
62  Trk__StaticEngine=CompFactory.Trk.StaticEngine
63  staticExtrapolator = Trk__StaticEngine(name = nameprefix+'StaticExtrapolation')
64  # give the tools it needs
65  staticExtrapolator.PropagationEngine = staticPropagator
66  staticExtrapolator.MaterialEffectsEngine = materialEffectsEngine
67  staticExtrapolator.NavigationEngine = staticNavigator
68  # configure output formatting
69  staticExtrapolator.OutputPrefix = '[SE] - '
70  staticExtrapolator.OutputPostfix = ' - '
71  # add to tool service
72  result.addPublicTool(staticExtrapolator) #TODO remove one day
73 
74  # call the base class constructor
75  extrapolator = ExEngine(name=nameprefix+'Extrapolation',
76  ExtrapolationEngines = [ staticExtrapolator ],
77  PropagationEngine = staticPropagator,
78  NavigationEngine = staticNavigator,
79  TrackingGeometryReadKey = geom_cond_key,
80  OutputPrefix = '[ME] - ',
81  OutputPostfix = ' - ')
82 
83  result.addPublicTool(extrapolator, primary=True)
84  return result
85 
python.AtlasExtrapolationEngineConfig.AtlasExtrapolationEngineCfg
def AtlasExtrapolationEngineCfg(flags, name='Extrapolation', nameprefix='Atlas')
Definition: AtlasExtrapolationEngineConfig.py:14
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
AtlasTrackingGeometryCondAlgConfig.TrackingGeometryCondAlgCfg
def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMaterialValidation=False, **kwargs)
Definition: AtlasTrackingGeometryCondAlgConfig.py:131
python.TrkExRungeKuttaPropagatorConfig.RungeKuttaPropagatorCfg
def RungeKuttaPropagatorCfg(flags, name='AtlasRungeKuttaPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:9
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8
python.AtlasExtrapolationEngineConfig.ExEngine
ExEngine
Definition: AtlasExtrapolationEngineConfig.py:12