10def 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
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