6def NewLikelihoodToolCfg( flags, name = 'NewLikelihoodTool', taggername = 'IP2D', scheme = '', useBTagFlagsDefaults = True, **options):
7 """Sets up a NewLikelihoodTool tool and returns it.
8
9 The following options have BTaggingFlags defaults:
10
11 taggerName default: "IP2D"
12
13 input: name: The name of the tool (should be unique).
14 useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
15 **options: Python dictionary with options for the tool.
16 output: The actual tool."""
17 acc = ComponentAccumulator()
18 if useBTagFlagsDefaults:
19 if taggername != 'SMT':
20 defaults = {'taggerName' : taggername }
21 else:
22 defaults = {'taggerName' : taggername,
23 'smoothNTimes' : 0,
24 'normalizedProb' : True,
25 'interpolate' : True }
26 if(flags.BTagging.RunModus ==
'reference'):
27 defaults['smoothNTimes'] = 1
28 for option in defaults:
29 options.setdefault(option, defaults[option])
30 options['name'] = name
31 if scheme == 'Trig':
32 options['HistosKey'] = 'JetTagTrigCalibHistosKey'
33 acc.setPrivateTools(CompFactory.Analysis.NewLikelihoodTool(**options))
34
35 return acc
36