ATLAS Offline Software
BTagTrackToVertexToolConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
6 
7 def BTagTrackToVertexToolCfg(flags, name = 'BTagTrackToVertexTool', useBTagFlagsDefaults = True, **options ):
8  """Sets up a BTagTrackToVertexTool tool and returns it.
9 
10  input: name: The name of the tool (should be unique).
11  useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
12  Note however that this tool has no BTaggingFlags defaults; the option is
13  here only for consistency.
14 
15  **options: Python dictionary with options for the tool.
16  output: The actual tool."""
17 
18  acc = ComponentAccumulator()
19  if useBTagFlagsDefaults:
20  accExtrapolator = AtlasExtrapolatorCfg(flags, 'AtlasExtrapolator')
21  atlasExtrapolator = accExtrapolator.popPrivateTools()
22  acc.merge(accExtrapolator)
23  options.setdefault('Extrapolator', atlasExtrapolator)
24  options['name'] = name
25  acc.setPrivateTools(CompFactory.Reco.TrackToVertex( **options))
26 
27  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
BTagTrackToVertexToolConfig.BTagTrackToVertexToolCfg
def BTagTrackToVertexToolCfg(flags, name='BTagTrackToVertexTool', useBTagFlagsDefaults=True, **options)
Definition: BTagTrackToVertexToolConfig.py:7
python.AtlasExtrapolatorConfig.AtlasExtrapolatorCfg
def AtlasExtrapolatorCfg(flags, name='AtlasExtrapolator')
Definition: AtlasExtrapolatorConfig.py:63