ATLAS Offline Software
JetSecVertexingAlgConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from BTagging.MSVVariablesFactoryConfig import MSVVariablesFactoryCfg
6 
7 
8 def JetSecVertexingAlgCfg(flags, BTagVxSecVertexInfoName, SVAlgName, BTaggingCollection, JetCollection, TrackCollection, PrimaryVertexCollectionName="", SVFinder="", **options):
9  """Adds a SecVtxTool instance and registers it.
10 
11  input: name: The tool's name.
12  JetCollection The name of the jet collections.
13  ToolSvc: The ToolSvc instance.
14  options: Python dictionary of options to be passed to the SecVtxTool.
15  output: The tool."""
16 
18 
19  if SVFinder == 'JetFitter':
20  JetSVLink = 'JFVtx'
21  if SVFinder == 'JetFitterFlip':#Flip version of jetFitter
22  JetSVLink = 'JFVtxFlip'
23  if SVFinder == 'SV1':
24  JetSVLink = 'SecVtx'
25  if SVFinder == 'SV1Flip':
26  JetSVLink = 'SecVtxFlip'
27  if SVFinder == 'MSV':
28  JetSVLink = 'MSecVtx' # Maybe no used
29 
30  varFactory = acc.popToolsAndMerge(MSVVariablesFactoryCfg(flags, "MSVVarFactory"))
31 
32  options = {}
33  options.setdefault('SecVtxFinderxAODBaseName', SVFinder)
34  options.setdefault('vxPrimaryCollectionName', PrimaryVertexCollectionName)
35  options['JetCollectionName'] = JetCollection
36  options['BTagVxSecVertexInfoName'] = BTagVxSecVertexInfoName
37  options['TrackCollectionName'] = TrackCollection
38  options['BTagJFVtxCollectionName'] = BTaggingCollection + JetSVLink
39  options['BTagSVCollectionName'] = BTaggingCollection + JetSVLink
40  options['JetSecVtxLinkName'] = JetCollection + '.' + JetSVLink
41  options.setdefault('MSVVariableFactory', varFactory)
42  options['name'] = SVAlgName
43 
44  # -- create the association algorithm
45  acc.addEventAlgo(CompFactory.Analysis.JetSecVertexingAlg(**options))
46 
47  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MSVVariablesFactoryConfig.MSVVariablesFactoryCfg
def MSVVariablesFactoryCfg(flags, name, **options)
Definition: MSVVariablesFactoryConfig.py:6