8def JetSecVertexingAlgCfg(flags, BTagVxSecVertexInfoName, SVAlgName, JetCollection, TrackCollection, PrimaryVertexCollectionName="", SVFinder="", **options):
9 """Adds a SecVtxTool instance and registers it.
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.
17 acc = ComponentAccumulator()
19 if SVFinder ==
'JetFitter':
21 if SVFinder ==
'JetFitterFlip':
22 JetSVLink =
'JFVtxFlip'
25 if SVFinder ==
'SV1Flip':
26 JetSVLink =
'SecVtxFlip'
30 varFactory = acc.popToolsAndMerge(MSVVariablesFactoryCfg(flags,
"MSVVarFactory"))
31 jetcol_no_suffix = JetCollection.replace(
"Jets",
"")
32 BTaggingCollection = f
'BTagging_{jetcol_no_suffix}'
34 options.setdefault(
'SecVtxFinderxAODBaseName', SVFinder)
35 options.setdefault(
'vxPrimaryCollectionName', PrimaryVertexCollectionName)
36 options[
'JetCollectionName'] = JetCollection
37 options[
'BTagVxSecVertexInfoName'] = BTagVxSecVertexInfoName
38 options[
'TrackCollectionName'] = TrackCollection
39 options[
'BTagJFVtxCollectionName'] = BTaggingCollection + JetSVLink
40 options[
'BTagSVCollectionName'] = BTaggingCollection + JetSVLink
41 options[
'JetSecVtxLinkName'] = JetCollection +
'.' + JetSVLink
42 options.setdefault(
'MSVVariableFactory', varFactory)
43 options[
'name'] = SVAlgName
46 acc.addEventAlgo(CompFactory.Analysis.JetSecVertexingAlg(**options))
JetSecVertexingAlgCfg(flags, BTagVxSecVertexInfoName, SVAlgName, JetCollection, TrackCollection, PrimaryVertexCollectionName="", SVFinder="", **options)