ATLAS Offline Software
BTagLightSecVertexingConfig.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 JetTagTools.JetFitterVariablesFactoryConfig import JetFitterVariablesFactoryCfg
6 #from BTagging.MSVVariablesFactoryConfig import MSVVariablesFactoryCfg
7 
8 def BTagLightSecVtxToolCfg(flags, Name, JetCollection, VxSecVertexInfoNameList, secVtxFinderxAODBaseNameList, secVtxFinderTrackNameList, PrimaryVertexCollectionName="", TimeStamp = "", **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  If outputObjs is set, then it is filled with objects written to SG."""
17  acc = ComponentAccumulator()
18 
19  OutputFilesJFVxname = "JFVtx"
20  OutputFilesJFVxFlipname = "JFVtxFlip"
21  OutputFilesSVname = "SecVtx"
22  OutputFilesSVFlipname = 'SecVtxFlip'
23  if TimeStamp:
24  TimeStamp = '_' + TimeStamp
25 
26  jetFitterVF = acc.popToolsAndMerge(JetFitterVariablesFactoryCfg('JFVarFactory'))
27 
28  #Keep this commented out for the moment: ATLASRECTS-5247
29  #inDetVKalMultiVxInJetTool = acc.popToolsAndMerge(InDetVKalVxInJetToolCfg("IDVKalMultiVxInJet", MSV = True))
30  #secVtxFinderList.append(inDetVKalMultiVxInJetTool)
31  #secVtxFinderTrackNameList.append('BTagTrackToJetAssociatorBB')
32  #secVtxFinderxAODBaseNameList.append('MSV')
33  #varFactory = acc.popToolsAndMerge(MSVVariablesFactoryCfg("MSVVarFactory"))
34 
35  options = {}
36  options.setdefault('SecVtxFinderTrackNameList', secVtxFinderTrackNameList)
37  options.setdefault('SecVtxFinderxAODBaseNameList', secVtxFinderxAODBaseNameList)
38  options['BTagVxSecVertexInfoNames'] = VxSecVertexInfoNameList
39  options.setdefault('vxPrimaryCollectionName', PrimaryVertexCollectionName)
40  options.setdefault('JetFitterVariableFactory', jetFitterVF)
41  options['JetSecVtxLinkName'] = JetCollection + '.' + OutputFilesSVname
42  options['JetJFVtxLinkName'] = JetCollection + '.' + OutputFilesJFVxname
43 
44  if flags.BTagging.RunFlipTaggers is True:
45  options['JetJFFlipVtxLinkName'] = JetCollection + '.' + OutputFilesJFVxFlipname
46  options['JetSecVtxFlipLinkName'] = JetCollection + '.' + OutputFilesSVFlipname
47 
48  #options.setdefault('MSVVariableFactory', varFactory)
49  options['name'] = Name+TimeStamp
50 
51  tool = CompFactory.Analysis.BTagLightSecVertexing(**options)
52 
53  acc.setPrivateTools(tool)
54 
55  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
JetFitterVariablesFactoryConfig.JetFitterVariablesFactoryCfg
def JetFitterVariablesFactoryCfg(name, useBTagFlagsDefaults=True, **options)
Definition: JetFitterVariablesFactoryConfig.py:6
python.BTagLightSecVertexingConfig.BTagLightSecVtxToolCfg
def BTagLightSecVtxToolCfg(flags, Name, JetCollection, VxSecVertexInfoNameList, secVtxFinderxAODBaseNameList, secVtxFinderTrackNameList, PrimaryVertexCollectionName="", TimeStamp="", **options)
Definition: BTagLightSecVertexingConfig.py:8