ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagAlgs
BTagging
python
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, 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
17
acc = ComponentAccumulator()
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
jetcol_no_suffix = JetCollection.replace(
"Jets"
,
""
)
32
BTaggingCollection = f
'BTagging_{jetcol_no_suffix}'
33
options = {}
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
44
45
# -- create the association algorithm
46
acc.addEventAlgo(CompFactory.Analysis.JetSecVertexingAlg(**options))
47
48
return
acc
python.JetSecVertexingAlgConfig.JetSecVertexingAlgCfg
JetSecVertexingAlgCfg(flags, BTagVxSecVertexInfoName, SVAlgName, JetCollection, TrackCollection, PrimaryVertexCollectionName="", SVFinder="", **options)
Definition
JetSecVertexingAlgConfig.py:8
Generated on
for ATLAS Offline Software by
1.17.0