10 def IPTrackSelectorCfg(flags, name = 'IPTrackSelector', useBTagFlagsDefaults = True, **options ):
11 """Sets up a IPTrackSelector tool and returns it.
13 The following options have BTaggingFlags defaults:
15 useBLayerHitPrediction default: True
16 usepTDepTrackSel default: False
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."""
24 if useBTagFlagsDefaults:
25 trackToVertexTool = acc.popToolsAndMerge(
TrackToVertexCfg(flags,
'BTagTrackToVertexTool'))
26 defaults = {
'useBLayerHitPrediction' :
True,
28 'usepTDepTrackSel' :
False,
29 'trackToVertexTool' : trackToVertexTool}
31 for option
in defaults:
32 options.setdefault(option, defaults[option])
34 if flags.GeoModel.Run >= LHCPeriod.Run4:
36 options.setdefault(
"InDetEtaDependentCutsSvc", acc.getService(
"IDEtaDepCutsSvc_" + name))
38 options[
'name'] = name
39 acc.setPrivateTools(CompFactory.Analysis.TrackSelector(**options))