From d923874d7bdd8add8f0ff64ddb3cf69fdc719e52 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 16 Feb 2021 15:49:50 +0000 Subject: [PATCH 1/2] Updates to RICH reco. configuration needed for n-1 scale factor calibration task --- .../python/RecoConf/rich_reconstruction.py | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Hlt/RecoConf/python/RecoConf/rich_reconstruction.py b/Hlt/RecoConf/python/RecoConf/rich_reconstruction.py index d82ac5f6d60..604c9b6de94 100644 --- a/Hlt/RecoConf/python/RecoConf/rich_reconstruction.py +++ b/Hlt/RecoConf/python/RecoConf/rich_reconstruction.py @@ -40,8 +40,8 @@ from PyConf.Algorithms import ( Rich__Future__Rec__TrackFilter as TrackFilter, ) from PyConf.Tools import TrackSTEPExtrapolator -from RichFutureRecSys.ConfiguredRichReco import (defaultNSigmaCuts, - defaultMaxCKThetaResolutions) +from RichFutureRecSys.ConfiguredRichReco import ( + defaultNSigmaCuts, defaultMinMaxCKThetaCuts, defaultMaxCKThetaResolutions) def default_rich_reco_options(): @@ -122,6 +122,14 @@ def default_rich_reco_options(): "nSigmaCuts": defaultNSigmaCuts(), + # Min/Max photon CK theta angle cuts + "MinMaxCKThetaCuts": + defaultMinMaxCKThetaCuts(), + + # Disable n-1 scale factors + "DisableRefInScaleFactor": + False, + #=========================================================== # Settings for the global PID minimisation #=========================================================== @@ -492,17 +500,28 @@ def make_rich_photons(track_name, rad_opts = get_radiator_bool_opts(options, track_name) det_opts = get_detector_bool_opts(options, track_name) + # Disable scale factors + if options["DisableRefInScaleFactor"]: + from Configurables import UpdateManagerSvc + UpdateManagerSvc().ConditionsOverride += [ + "Conditions/Environment/Rich1/RefractivityScaleFactor := double CurrentScaleFactor = 1.0;", + "Conditions/Environment/Rich2/RefractivityScaleFactor := double CurrentScaleFactor = 1.0;" + ] + # Photon Reco. photSel = options["PhotonSelection"] tkCKRes = options["TkCKResTreatment"] tktype = shortTrackType(track_name) nSigmaC = options["nSigmaCuts"][photSel][tkCKRes][tktype] + minMaxCKTheta = options["MinMaxCKThetaCuts"][photSel] photReco = PhotonReco( name="RichPhotonReco" + track_name, Detectors=det_opts, Radiators=rad_opts, PreSelNSigma=nSigmaC[0], NSigma=nSigmaC[1], + MinAllowedCherenkovTheta=minMaxCKTheta["Min"], + MaxAllowedCherenkovTheta=minMaxCKTheta["Max"], TruncateCKAngles=options["TruncateCKAngles"], TrackSegmentsLocation=track_conf["TrackSegments"], CherenkovAnglesLocation=track_conf["SignalCKAngles"], -- GitLab From 1fb0a45f176282943e5645fbd34a75c68726188f Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 17 Feb 2021 14:33:50 +0000 Subject: [PATCH 2/2] Remove setting of UpdateManagerSvc overrides to disable RICH n-1 scale factors. Move to top level task configuration. --- Hlt/RecoConf/python/RecoConf/rich_reconstruction.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Hlt/RecoConf/python/RecoConf/rich_reconstruction.py b/Hlt/RecoConf/python/RecoConf/rich_reconstruction.py index 604c9b6de94..42e8c689588 100644 --- a/Hlt/RecoConf/python/RecoConf/rich_reconstruction.py +++ b/Hlt/RecoConf/python/RecoConf/rich_reconstruction.py @@ -126,10 +126,6 @@ def default_rich_reco_options(): "MinMaxCKThetaCuts": defaultMinMaxCKThetaCuts(), - # Disable n-1 scale factors - "DisableRefInScaleFactor": - False, - #=========================================================== # Settings for the global PID minimisation #=========================================================== @@ -500,14 +496,6 @@ def make_rich_photons(track_name, rad_opts = get_radiator_bool_opts(options, track_name) det_opts = get_detector_bool_opts(options, track_name) - # Disable scale factors - if options["DisableRefInScaleFactor"]: - from Configurables import UpdateManagerSvc - UpdateManagerSvc().ConditionsOverride += [ - "Conditions/Environment/Rich1/RefractivityScaleFactor := double CurrentScaleFactor = 1.0;", - "Conditions/Environment/Rich2/RefractivityScaleFactor := double CurrentScaleFactor = 1.0;" - ] - # Photon Reco. photSel = options["PhotonSelection"] tkCKRes = options["TkCKResTreatment"] -- GitLab