From ebcb39270cd9075b6b5ef7455c0080a07713694b Mon Sep 17 00:00:00 2001 From: Sascha Stahl <sascha.stahl@cern.ch> Date: Wed, 20 Apr 2016 06:58:12 +0200 Subject: [PATCH] Use TrackSys to configure public tools --- Hlt/HltConf/doc/release.notes | 3 ++ Hlt/HltConf/python/HltConf/Configuration.py | 7 ++++- Hlt/HltTracking/doc/release.notes | 4 +++ .../python/HltTracking/HltRecoConf.py | 15 ++++++++-- .../python/HltTracking/HltSharedTracking.py | 29 ------------------- 5 files changed, 25 insertions(+), 33 deletions(-) diff --git a/Hlt/HltConf/doc/release.notes b/Hlt/HltConf/doc/release.notes index 7f20f26eb..274a4d278 100755 --- a/Hlt/HltConf/doc/release.notes +++ b/Hlt/HltConf/doc/release.notes @@ -4,6 +4,9 @@ ! Purpose : HLT Configuration ! ----------------------------------------------------------------------------- +! 2016-04-20 - Sascha Stahl + - Propagate DataType to HltRecoConf + !========================= HltConf v13r9 2016-04-18 ========================= ! 2016-04-18 - Roel Aaij diff --git a/Hlt/HltConf/python/HltConf/Configuration.py b/Hlt/HltConf/python/HltConf/Configuration.py index b08bbab7a..fb4e8bbd3 100755 --- a/Hlt/HltConf/python/HltConf/Configuration.py +++ b/Hlt/HltConf/python/HltConf/Configuration.py @@ -15,6 +15,8 @@ from HltMonitoring import HltMonitoringConf from HltOutput import HltOutputConf from HltPersistReco import HltPersistRecoConf from ThresholdUtils import overwriteThresholds, Name2Threshold +from Configurables import HltRecoConf + def __forAll__( c, prop_value_dict, types=['FilterDesktop','CombineParticles',"DVAlgorithm", "DaVinciAlgorithm", "DaVinciHistoAlgorithm", "DaVinciTupleAlgorithm", "*" ] ) : """ Find all configurable algorithms and set certain properties @@ -72,7 +74,8 @@ class HltConf(LHCbConfigurableUser): , HltMonitoringConf , HltAfterburnerConf , HltPersistRecoConf - , HltOutputConf ] + , HltOutputConf + , HltRecoConf] __slots__ = { "L0TCK" : None , 'ForceSingleL0Configuration' : True @@ -246,6 +249,8 @@ class HltConf(LHCbConfigurableUser): decoder = DecoderDB[n] decoder.setup().VetoObjects = [ loc for loc in decoder.listOutputs() ] + # Configure HltRecoConf with correct DataType + self.setOtherProps(HltRecoConf(),[ "DataType" ]) # # dispatch Hlt1 configuration, don't do this if there are no HLT1 lines # diff --git a/Hlt/HltTracking/doc/release.notes b/Hlt/HltTracking/doc/release.notes index 547edc226..3eb97fcb8 100755 --- a/Hlt/HltTracking/doc/release.notes +++ b/Hlt/HltTracking/doc/release.notes @@ -4,6 +4,10 @@ ! Purpose : Steering the tracking by Hlt !----------------------------------------------------------------------------- +! 2016-04-20 - Sascha Stahl + - Use configuration of public tracking tools from TrackSys. + - Moved configuration of STTools to HltRecoConf. + !========================= HltTracking v13r17 2016-04-18 ========================= ! 2016-04-15 - Marian Stahl diff --git a/Hlt/HltTracking/python/HltTracking/HltRecoConf.py b/Hlt/HltTracking/python/HltTracking/HltRecoConf.py index 61b346d21..7f3317c82 100644 --- a/Hlt/HltTracking/python/HltTracking/HltRecoConf.py +++ b/Hlt/HltTracking/python/HltTracking/HltRecoConf.py @@ -25,9 +25,11 @@ from Gaudi.Configuration import * from LHCbKernel.Configuration import * from GaudiKernel.SystemOfUnits import MeV, mm, m - +from Configurables import TrackSys class HltRecoConf(LHCbConfigurableUser): - __slots__ = { "Forward_HPT_MinPt" : 500. * MeV + __used_configurables__ = [ TrackSys ] + __slots__ = { "DataType" : "2016" + , "Forward_HPT_MinPt" : 500. * MeV , "Forward_HPT_MinP" : 3000. * MeV , "Forward_LPT_Muon_MinPt" : 300. * MeV , "Forward_LPT_Muon_MinP" : 3000. * MeV @@ -51,7 +53,6 @@ class HltRecoConf(LHCbConfigurableUser): , "CalculateProbNN" : True , "AddGhostProb" : True , "InitFits" : True - , "CacheStatesInStateProvider" : False , "BeamGasMode" : False , "VeloTrackingZMin" : -2000. #minimum velo tracking range , "VeloTrackingZMax" : +2000. #maximum velo tracking range @@ -87,10 +88,18 @@ class HltRecoConf(LHCbConfigurableUser): log.debug("HltReco configuration") import GaudiKernel.ProcessJobOptions GaudiKernel.ProcessJobOptions.PrintOff() + # Configure the PV refitting correctly from Configurables import LoKi__PVReFitter LoKi__PVReFitter("LoKi::PVReFitter").CheckTracksByLHCbIDs = True + # Configure TrackSys + self.setOtherProps(TrackSys(),[ "DataType" ]) + TrackSys().HltMode = True + + # Configure the position tool for lite (and full) clusters + from STTools import STOfflineConf + STOfflineConf.DefaultConf().configureTools() MatchVeloMuonOptions = {"MaxChi2DoFX" : 10., "XWindow" : 200., diff --git a/Hlt/HltTracking/python/HltTracking/HltSharedTracking.py b/Hlt/HltTracking/python/HltTracking/HltSharedTracking.py index 5a7d8cedc..97f0fbd19 100755 --- a/Hlt/HltTracking/python/HltTracking/HltSharedTracking.py +++ b/Hlt/HltTracking/python/HltTracking/HltSharedTracking.py @@ -28,12 +28,6 @@ from Configurables import PVOfflineTool from HltLine.HltLine import bindMembers from Configurables import PatSeeding, PatSeedingTool -############################################################################################# -# Configure the position tool for lite (and full) clusters -############################################################################################# -from Configurables import STOnlinePosition -from STTools import STOfflineConf -STOfflineConf.DefaultConf().configureTools() ############################################################################################# # Configure pattern recognition algorithms ############################################################################################# @@ -45,30 +39,7 @@ from Configurables import ToolSvc, TrackMasterExtrapolator, TrackStateProvider, from Configurables import SimplifiedMaterialLocator from Configurables import HltRecoConf -## Simplified Material for public MasterExtrapolator and TrackStateProvider -ToolSvc().addTool(TrackMasterExtrapolator, "TrackMasterExtrapolator") -ToolSvc().TrackMasterExtrapolator.addTool(SimplifiedMaterialLocator, name="MaterialLocator") -ToolSvc().TrackMasterExtrapolator.MaterialLocator.addTool( StateThickMSCorrectionTool, name= "StateMSCorrectionTool" ) -ToolSvc().addTool(TrackStateProvider, "TrackStateProvider") -ToolSvc().TrackStateProvider.addTool(TrackMasterExtrapolator,name="Extrapolator") -ToolSvc().TrackStateProvider.Extrapolator.addTool(SimplifiedMaterialLocator, name="MaterialLocator") -ToolSvc().TrackStateProvider.Extrapolator.MaterialLocator.addTool( StateThickMSCorrectionTool, name= "StateMSCorrectionTool" ) -ToolSvc().TrackStateProvider.addTool(TrackInterpolator,"Interpolator") -ToolSvc().TrackStateProvider.Interpolator.addTool(TrackMasterExtrapolator,name="Extrapolator") -ToolSvc().TrackStateProvider.addTool(TrackInterpolator,"Interpolator") -ToolSvc().TrackStateProvider.Interpolator.Extrapolator.addTool(SimplifiedMaterialLocator, name="MaterialLocator") -ToolSvc().TrackStateProvider.Interpolator.Extrapolator.MaterialLocator.addTool( StateThickMSCorrectionTool, name= "StateMSCorrectionTool") -if HltRecoConf().getProp("NewMSinFit"): - ToolSvc().TrackMasterExtrapolator.MaterialLocator.StateMSCorrectionTool.UseRossiAndGreisen = True - ToolSvc().TrackStateProvider.Extrapolator.MaterialLocator.StateMSCorrectionTool.UseRossiAndGreisen = True - ToolSvc().TrackStateProvider.Interpolator.Extrapolator.MaterialLocator.StateMSCorrectionTool.UseRossiAndGreisen = True -if HltRecoConf().getProp("CacheStatesInStateProvider"): - ToolSvc().TrackStateProvider.CacheStatesOnDemand = True -else: - ToolSvc().TrackStateProvider.CacheStatesOnDemand = False - #### Velo Tracking - # the full Velo reconstruction def recoVelo(OutputTracksName=HltSharedTrackLoc["Velo"]): recoVelo = FastVeloTracking( 'FastVeloHlt', OutputTracksName = OutputTracksName) -- GitLab