ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagAlgs
BTagging
python
JetFitterTrackSelectorToolConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
4
from
AthenaConfiguration.ComponentFactory
import
CompFactory
5
6
from
BTagging.InDetJetFitterUtilsConfig
import
InDetJetFitterUtilsCfg
7
from
InDetConfig.InDetTrackSelectorToolConfig
import
InDetImprovedJetFitterTrackSelectorToolCfg
8
from
TrkConfig.AtlasExtrapolatorConfig
import
AtlasExtrapolatorCfg
9
10
def
InDetJetFitterTrackSelectorToolCfg
(flags, name, suffix="", useBTagFlagsDefaults = True, **options):
11
"""Sets up a InDetJetFitterTrackSelectorTool tool and returns it.
12
13
The following options have BTaggingFlags defaults:
14
15
revertFromPositiveToNegativeTags default: False
16
cutCompPrimaryVertexForPosLifetimeTracks default: 1e-1
17
cutCompPrimaryVertexForNegLifetimeTracks default: 5e-2
18
19
input: name: The name of the tool (should be unique).
20
useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
21
**options: Python dictionary with options for the tool.
22
output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
23
acc = ComponentAccumulator()
24
if
useBTagFlagsDefaults:
25
jetFitterExtrapolator= acc.popToolsAndMerge(AtlasExtrapolatorCfg(flags,
'JFExtrapolator'
+suffix))
26
inDetJetFitterUtils = acc.popToolsAndMerge(InDetJetFitterUtilsCfg(flags,
'InDetJFUtils'
+suffix))
27
inDetImprovedJetFitterTrackSelectorTool = acc.popToolsAndMerge(InDetImprovedJetFitterTrackSelectorToolCfg(flags,
'InDetImprovedJFTrackSelTool'
+suffix))
28
#revert the signed track IP sign if the suffix is 'FLIP_SIGN'.
29
defaults = {
'revertFromPositiveToNegativeTags'
:
True
if
(suffix==
"FLIP_SIGN"
)
else
False
,
30
'cutCompPrimaryVertexForPosLifetimeTracks'
: 0.1,
31
'cutCompPrimaryVertexForNegLifetimeTracks'
: 0.05,
32
'Extrapolator'
: jetFitterExtrapolator ,
33
'InDetJetFitterUtils'
: inDetJetFitterUtils,
34
'TrackSelector'
: inDetImprovedJetFitterTrackSelectorTool }
35
for
option
in
defaults:
36
options.setdefault(option, defaults[option])
37
38
options[
'name'
] = name
39
acc.setPrivateTools( CompFactory.InDet.JetFitterTrackSelectorTool(**options) )
40
return
acc
41
42
43
python.JetFitterTrackSelectorToolConfig.InDetJetFitterTrackSelectorToolCfg
InDetJetFitterTrackSelectorToolCfg(flags, name, suffix="", useBTagFlagsDefaults=True, **options)
Definition
JetFitterTrackSelectorToolConfig.py:10
Generated on
for ATLAS Offline Software by
1.17.0