Skip to content
Snippets Groups Projects

ATLASRECTS-5666: Migration of JetFitter package to a modularised version in AthenaMT

Merged ATLASRECTS-5666: Migration of JetFitter package to a modularised version in AthenaMT
Merged Carlo Varni requested to merge cvarni/athena:MigrationJF into master
2 files
+ 44
28
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -357,7 +357,7 @@ def toolInDetJetFitterUtils(name, useBTagFlagsDefaults = True, **options):
from InDetSecVxFinderTool.InDetSecVxFinderToolConf import InDet__InDetJetFitterUtils
return InDet__InDetJetFitterUtils(**options)
def toolInDetJetFitterUtils_SV(name, suffix="", useBTagFlagsDefaults = True, **options):
def toolInDetJetFitterUtils_SV(name, useBTagFlagsDefaults = True, **options):
"""Sets up a InDetJetFitterUtils tool and returns it.
The following options have BTaggingFlags defaults:
@@ -737,17 +737,19 @@ def toolJetFitterTrackSelectorTool_SV(name, suffix="", useBTagFlagsDefaults = Tr
**options: Python dictionary with options for the tool.
output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
if useBTagFlagsDefaults:
inDetJetFitterUtils = toolInDetJetFitterUtils_SV('InDetJFUtils'+suffix,suffix)
inDetJetFitterUtils = toolInDetJetFitterUtils_SV('InDetJFUtils'+suffix)
ImprovedJetFitterTrackSelectorTool = toolInDetImprovedJetFitterTrackSelectorTool('ImprovedJFTrackSelTool'+suffix)
jetFitterExtrapolator = toolJetFitterExtrapolator('JFExtrapolator'+suffix)
defaults = { 'OutputLevel' : BTaggingFlags.OutputLevel,
'InDetJetFitterUtils' : inDetJetFitterUtils }
'InDetJetFitterUtils' : inDetJetFitterUtils,
'TrackSelector' : ImprovedJetFitterTrackSelectorTool,
'Extrapolator' : jetFitterExtrapolator }
for option in defaults:
options.setdefault(option, defaults[option])
options['name'] = name
options['name'] = name + suffix
from InDetSecVxFinderTool.InDetSecVxFinderToolConf import InDet__JetFitterTrackSelectorTool
return InDet__JetFitterTrackSelectorTool(**options)
#--------------------------------------------------------------------------
@@ -790,16 +792,20 @@ def toolJetFitterMultiStageFit_SV(name, suffix="", useBTagFlagsDefaults = True,
**options: Python dictionary with options for the tool.
output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
if useBTagFlagsDefaults:
inDetJetFitterUtils = toolInDetJetFitterUtils_SV('InDetJFUtils'+suffix,suffix)
improvedJetFitterInitializationHelper = toolImprovedJetFitterInitializationHelper('ImprovedJFInitHelper'+suffix)
inDetJetFitterUtils = toolInDetJetFitterUtils_SV('InDetJFUtils'+suffix)
inDetJetFitterRoutines = toolImprovedJetFitterRoutines('ImprovedJetFitterRoutines'+suffix)
defaults = { 'OutputLevel' : BTaggingFlags.OutputLevel,
'MaxNumDeleteIterations' : 30,
'VertexProbCut' : 0.001,
'MaxClusteringIterations' : 30,
'VertexClusteringProbabilityCut' : 0.005,
'InDetJetFitterUtils' : inDetJetFitterUtils }
'InDetJetFitterUtils' : inDetJetFitterUtils,
'JetFitterInitializationHelper': improvedJetFitterInitializationHelper,
'JetFitterRoutines': inDetJetFitterRoutines }
for option in defaults:
options.setdefault(option, defaults[option])
options['name'] = name
options['name'] = name + suffix
from InDetSecVxFinderTool.InDetSecVxFinderToolConf import InDet__JetFitterMultiStageFit
return InDet__JetFitterMultiStageFit(**options)
@@ -867,7 +873,7 @@ def toolJetFitterTwoTrackVtxFinderTool(name , useBTagFlagsDefaults = True, **opt
from InDetSecVxFinderTool.InDetSecVxFinderToolConf import InDet__JetFitterTwoTrackVtxFinderTool
return InDet__JetFitterTwoTrackVtxFinderTool(**options)
def toolJetFitterTwoTrackVtxFinderTool_SV(name , useBTagFlagsDefaults = True, **options):
def toolJetFitterTwoTrackVtxFinderTool_SV(name, suffix="" , useBTagFlagsDefaults = True, **options):
"""Sets up the new JetFitter TwoTrack Vtx Finder Tool and returns it.
OutputLevel default: BTaggingFlags.OutputLevel
@@ -882,7 +888,7 @@ def toolJetFitterTwoTrackVtxFinderTool_SV(name , useBTagFlagsDefaults = True, **
'SequentialVertexFitter' : inDetJetFitterSequentialVertexFitter }
for option in defaults:
options.setdefault(option, defaults[option])
options['name'] = name
options['name'] = name + suffix
from InDetSecVxFinderTool.InDetSecVxFinderToolConf import InDet__JetFitterTwoTrackVtxFinderTool
return InDet__JetFitterTwoTrackVtxFinderTool(**options)
@@ -921,12 +927,14 @@ def toolJetFitterV0FinderTool_SV(name , suffix="", useBTagFlagsDefaults = True,
**options: Python dictionary with options for the tool.
output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
if useBTagFlagsDefaults:
inDetJetFitterUtils = toolInDetJetFitterUtils_SV('InDetJFUtils'+suffix,suffix)
inDetJetFitterUtils = toolInDetJetFitterUtils_SV('InDetJFUtils'+suffix)
inDetMode3dTo1dFinder = toolJetFitterMode3dTo1dFinder('Mode3dTo1dFinder'+suffix)
defaults = { 'OutputLevel' : BTaggingFlags.OutputLevel,
'InDetJetFitterUtils' : inDetJetFitterUtils}
'InDetJetFitterUtils' : inDetJetFitterUtils,
'Mode3dFinder': inDetMode3dTo1dFinder }
for option in defaults:
options.setdefault(option, defaults[option])
options['name'] = name
options['name'] = name + suffix
from InDetSecVxFinderTool.InDetSecVxFinderToolConf import InDet__JetFitterV0FinderTool
return InDet__JetFitterV0FinderTool(**options)
Loading