ATLAS Offline Software
NewLikelihoodToolConfig.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 def 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 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
NewLikelihoodToolConfig.NewLikelihoodToolCfg
def NewLikelihoodToolCfg(flags, name='NewLikelihoodTool', taggername='IP2D', scheme='', useBTagFlagsDefaults=True, **options)
Definition: NewLikelihoodToolConfig.py:6
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569