Skip to content
Snippets Groups Projects
Commit 1000a1cf authored by James Beacham's avatar James Beacham
Browse files

Merge branch '21.0_Loose-Selection-2' into '21.0'

Addition of Loose Selection for Release 21.0 for Inner Detector Validation (III)

See merge request !5069

Former-commit-id: d57d58cd9ec70419f96e1a5459267738957d1b30
parents 05fc5906 83ec2667
No related branches found
No related tags found
No related merge requests found
......@@ -377,19 +377,6 @@ def addExtraMonitoring() :
mon_manager = topSequence.getChildren()[mon_index]
from InDetPhysValMonitoring.InDetPhysValMonitoringTool import InDetPhysValMonitoringTool
from InDetRecExample.InDetKeys import InDetKeys
# for backward compatibility check whether DBM has been added already
if InDetPhysValFlags.doValidateTightPrimaryTracks() :
mon_manager.AthenaMonTools += [ toolFactory(InDetPhysValMonitoringTool.InDetPhysValMonitoringToolTightPrimary ) ]
if InDetPhysValFlags.doValidateGSFTracks() :
mon_manager.AthenaMonTools += [ toolFactory(InDetPhysValMonitoringTool.InDetPhysValMonitoringToolGSF ) ]
from InDetRecExample.InDetKeys import InDetKeys
# for backward compatibility check whether DBM has been added already
if InDetPhysValFlags.doValidateDBMTracks() and hasattr(InDetKeys,'DBMTrackParticles') :
mon_manager.AthenaMonTools += [ toolFactory(InDetPhysValMonitoringTool.InDetPhysValMonitoringToolDBM ) ]
except ImportError :
import sys,traceback
exc_type, exc_value, exc_traceback = sys.exc_info()
......@@ -455,10 +442,6 @@ def addDecoratorIfNeeded() :
# the monitoring manager exists already.
from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags
InDetPhysValFlags.init()
if InDetPhysValFlags.doValidateGSFTracks() or InDetPhysValFlags.doValidateDBMTracks() or InDetPhysValFlags.doValidateTightPrimaryTracks():
from RecExConfig.RecFlags import rec
rec.UserExecs += ['from InDetPhysValMonitoring.InDetPhysValDecoration import addExtraMonitoring;addExtraMonitoring();']
# from AthenaCommon.AppMgr import ServiceMgr as svcMgr
# print 'DEBUG addDecoratorIfNeeded add meta data %s.' % svcMgr.TagInfoMgr.ExtraTagValuePairs
......@@ -52,6 +52,11 @@ class doValidateGSFTracks(InDetPhysValFlagsJobProperty):
allowedTypes = ['bool']
StoredValue = False
class doValidateLooseTracks(InDetPhysValFlagsJobProperty):
statusOn = True
allowedTypes = ['bool']
StoredValue = False
class doValidateTightPrimaryTracks(InDetPhysValFlagsJobProperty):
statusOn = True
allowedTypes = ['bool']
......@@ -117,7 +122,8 @@ jobproperties.add_Container(InDetPhysValJobProperties)
_list_InDetPhysValJobProperties = [
Enabled,
doValidateDBMTracks,
doValidateGSFTracks,
doValidateGSFTracks,
doValidateLooseTracks,
doValidateTightPrimaryTracks,
doValidateTracksInJets
]
......
......@@ -85,6 +85,29 @@ class InDetPhysValMonitoringTool(object) :
from RecExConfig.RecFlags import rec
rec.UserExecs += ['from InDetPhysValMonitoring.InDetPhysValMonitoringTool import removePhysValExample;removePhysValExample();']
class InDetPhysValMonitoringToolLoose(InDetPhysValMonitoringTool) :
'''
InDetPhysValMonitoringTool for track particles which pass the loose selection
'''
#@injectNameArgument
#def __new__(cls, *args, **kwargs) :
# return InDetPhysValMonitoringTool.InDetPhysValMonitoringTool.__new__(cls,*args,**kwargs)
@checkKWArgs
def __init__(self, **kwargs) :
super(InDetPhysValMonitoringTool.InDetPhysValMonitoringToolLoose,self)\
.__init__(**_args( kwargs,
name = self.__class__.__name__))
# special parameters of the InDetPhysValMonitoringTool for monitoring loose tracks
self.SubFolder='Loose/'
self.useTrackSelection = True
from InDetPhysValMonitoring.TrackSelectionTool import InDetTrackSelectionTool
self.TrackSelectionTool = toolFactory(InDetTrackSelectionTool.InDetTrackSelectionToolLoose)
class InDetPhysValMonitoringToolTightPrimary(InDetPhysValMonitoringTool) :
'''
InDetPhysValMonitoringTool for track particles which pass the tight primary selection
......@@ -106,7 +129,6 @@ class InDetPhysValMonitoringTool(object) :
from InDetPhysValMonitoring.TrackSelectionTool import InDetTrackSelectionTool
self.TrackSelectionTool = toolFactory(InDetTrackSelectionTool.InDetTrackSelectionToolTightPrimary)
class InDetPhysValMonitoringToolGSF(InDetPhysValMonitoringTool) :
'''
InDetPhysValMonitoringTool for GSF track particles
......
......@@ -9,6 +9,23 @@ class InDetTrackSelectionTool(object) :
'''
def __init__(self) :
raise('must not be instantiated. Only child classes should be instantiated.')
class InDetTrackSelectionToolLoose(InDet__InDetTrackSelectionTool) :
'''
Default InDetTrackSelectionTool for InDetTrackParticles
'''
@injectNameArgument
def __new__(cls, *args, **kwargs) :
return InDet__InDetTrackSelectionTool.__new__(cls,*args,**kwargs)
@checkKWArgs
def __init__(self, **kwargs) :
super(InDetTrackSelectionTool.InDetTrackSelectionToolLoose,self)\
.__init__(**_args( kwargs,
name = self.__class__.__name__))
# special parameters of the InDetTrackSelectionToolLoose
self.CutLevel = "Loose"
class InDetTrackSelectionToolTightPrimary(InDet__InDetTrackSelectionTool) :
'''
......@@ -26,3 +43,5 @@ class InDetTrackSelectionTool(object) :
# special parameters of the InDetTrackSelectionToolTightPrimary
self.CutLevel = "TightPrimary"
......@@ -4,9 +4,27 @@ decoration = InDetPhysValMonitoring.InDetPhysValDecoration.addDecoratorIfNeeded(
# add ID physics validation monitoring tool
from InDetPhysValMonitoring.InDetPhysValMonitoringTool import InDetPhysValMonitoringTool
indet_mon_tool = InDetPhysValMonitoringTool.InDetPhysValMonitoringTool()
ToolSvc += [indet_mon_tool]
monMan.AthenaMonTools += [indet_mon_tool]
if InDetPhysValFlags.doValidateDBMTracks():
indet_mon_tool_DBM = InDetPhysValMonitoringTool.InDetPhysValMonitoringToolDBM()
ToolSvc += [ indet_mon_tool_DBM ]
monMan.AthenaMonTools += [ indet_mon_tool_DBM ]
ToolSvc += indet_mon_tool
monMan.AthenaMonTools += [indet_mon_tool]
if InDetPhysValFlags.doValidateGSFTracks():
indet_mon_tool_GSF = InDetPhysValMonitoringTool.InDetPhysValMonitoringToolGSF()
ToolSvc += [ indet_mon_tool_GSF ]
monMan.AthenaMonTools += [ indet_mon_tool_GSF ]
if InDetPhysValFlags.doValidateLooseTracks():
indet_mon_tool_Loose = InDetPhysValMonitoringTool.InDetPhysValMonitoringToolLoose()
ToolSvc += [ indet_mon_tool_Loose ]
monMan.AthenaMonTools += [ indet_mon_tool_Loose ]
if InDetPhysValFlags.doValidateTightPrimaryTracks():
indet_mon_tool_TightPrimary = InDetPhysValMonitoringTool.InDetPhysValMonitoringToolTightPrimary()
ToolSvc += [ indet_mon_tool_TightPrimary ]
monMan.AthenaMonTools += [ indet_mon_tool_TightPrimary ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment