ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagTools
python
IPTrackSelectorConfig.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
from
AthenaConfiguration.Enums
import
LHCPeriod
6
from
TrackToVertex.TrackToVertexConfig
import
TrackToVertexCfg
7
from
InDetConfig.InDetEtaDependentCutsConfig
import
IDEtaDependentCuts_IPXD_SvcCfg
8
9
10
def
IPTrackSelectorCfg
(flags, name = 'IPTrackSelector', useBTagFlagsDefaults = True, **options ):
11
"""Sets up a IPTrackSelector tool and returns it.
12
13
The following options have BTaggingFlags defaults:
14
15
useBLayerHitPrediction default: True
16
usepTDepTrackSel default: False
17
nHitBLayer default: 0
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."""
23
acc = ComponentAccumulator()
24
if
useBTagFlagsDefaults:
25
trackToVertexTool = acc.popToolsAndMerge(TrackToVertexCfg(flags,
'BTagTrackToVertexTool'
))
26
defaults = {
'useBLayerHitPrediction'
:
True
,
27
'nHitBLayer'
: 0 ,
28
'usepTDepTrackSel'
:
False
,
29
'trackToVertexTool'
: trackToVertexTool}
30
31
for
option
in
defaults:
32
options.setdefault(option, defaults[option])
33
34
if
flags.GeoModel.Run >= LHCPeriod.Run4:
35
acc.merge(IDEtaDependentCuts_IPXD_SvcCfg(flags, name=
"IDEtaDepCutsSvc_"
+ name))
36
options.setdefault(
"InDetEtaDependentCutsSvc"
, acc.getService(
"IDEtaDepCutsSvc_"
+ name))
37
38
options[
'name'
] = name
39
acc.setPrivateTools(CompFactory.Analysis.TrackSelector(**options))
40
41
return
acc
IPTrackSelectorConfig.IPTrackSelectorCfg
IPTrackSelectorCfg(flags, name='IPTrackSelector', useBTagFlagsDefaults=True, **options)
Definition
IPTrackSelectorConfig.py:10
Generated on
for ATLAS Offline Software by
1.17.0