diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValDecoration.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValDecoration.py index 4a361bb77593f1186a8cd6d506496333fe8db8cc..126b87738266135bb6bb61670152cfe4c2c99b99 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValDecoration.py +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValDecoration.py @@ -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 - diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValJobProperties.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValJobProperties.py index 751cd8c30e4db6097fdd906e6460636d142eba00..c2cdc56117157d17d04e868d8cb44257432f8773 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValJobProperties.py +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValJobProperties.py @@ -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 ] diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py index e941f93a2bfb5b80f169c93c1439503e86748656..6e9d441c958ba0b25d4df77d73cc1df927073f23 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py @@ -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 diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/TrackSelectionTool.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/TrackSelectionTool.py index e24bf518dcd12185873b2cb598fd42a63d63724e..90b888e37f4197af26cfe7e0d07cc88c33e66dd0 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/TrackSelectionTool.py +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/TrackSelectionTool.py @@ -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" + + diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValInDet_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValInDet_jobOptions.py index 5072048d1ee398f6d6b830f2e9a8eb66e7ba4ebb..b3b8c897ca789dc37f07d5bbd972d77d4eb099bd 100644 --- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValInDet_jobOptions.py +++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValInDet_jobOptions.py @@ -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 ]