From 6d0a80fdfcab408f963b1d6210830554fb2cadd3 Mon Sep 17 00:00:00 2001 From: hsert Date: Sat, 3 Feb 2024 10:03:00 +0100 Subject: [PATCH] tauPhase2HLT: fix for DeepTau Phase2 Training --- .../modules/hltHpsPFTauDeepTauProducer_cfi.py | 10 +++++----- HLTrigger/Configuration/python/HLT_75e33_cff.py | 3 +-- RecoTauTag/RecoTau/interface/DeepTauIdBase.h | 12 ++++++++---- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHpsPFTauDeepTauProducer_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHpsPFTauDeepTauProducer_cfi.py index 63011520f5598..e57e5d611a0c4 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHpsPFTauDeepTauProducer_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHpsPFTauDeepTauProducer_cfi.py @@ -7,13 +7,13 @@ pfcands = cms.InputTag( "particleFlowTmp" ), vertices = cms.InputTag( "hltPhase2PixelVertices" ), rho = cms.InputTag( "hltFixedGridRhoProducerFastjetAllTau" ), - graph_file = cms.vstring( 'core:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_core.pb', - 'inner:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_inner.pb', - 'outer:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_outer.pb' ), + graph_file = cms.vstring( 'core:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2026v2p5_core.pb', + 'inner:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2026v2p5_inner.pb', + 'outer:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2026v2p5_outer.pb' ), mem_mapped = cms.bool( False ), - year = cms.uint32( 2017 ), + year = cms.uint32( 2026 ), version = cms.uint32( 2 ), - sub_version = cms.uint32( 1 ), + sub_version = cms.uint32( 5 ), debug_level = cms.int32( 0 ), disable_dxy_pca = cms.bool( True ), disable_hcalFraction_workaround = cms.bool( False ), diff --git a/HLTrigger/Configuration/python/HLT_75e33_cff.py b/HLTrigger/Configuration/python/HLT_75e33_cff.py index e5ef776f07032..23f2d5afbfe3b 100644 --- a/HLTrigger/Configuration/python/HLT_75e33_cff.py +++ b/HLTrigger/Configuration/python/HLT_75e33_cff.py @@ -300,8 +300,7 @@ fragment.HLT_Diphoton30_23_IsoCaloId_L1Seeded, fragment.HLT_DoubleMediumChargedIsoPFTauHPS40_eta2p1, - ### Removed temporarily until solution of https://github.com/cms-sw/cmssw/issues/42862 - #fragment.HLT_DoubleMediumDeepTauPFTauHPS35_eta2p1, + fragment.HLT_DoubleMediumDeepTauPFTauHPS35_eta2p1, ### Removed temporarily until final decision on L1T tau Phase-2 #fragment.L1T_DoubleNNTau52, diff --git a/RecoTauTag/RecoTau/interface/DeepTauIdBase.h b/RecoTauTag/RecoTau/interface/DeepTauIdBase.h index c9d3ebbe85067..95e940afdfe67 100644 --- a/RecoTauTag/RecoTau/interface/DeepTauIdBase.h +++ b/RecoTauTag/RecoTau/interface/DeepTauIdBase.h @@ -1298,10 +1298,14 @@ class DeepTauIdBase : public Producer { if (sub_version_ == 1) get(dnn::footprintCorrection) = sp.scale(tau_funcs.getFootprintCorrectiondR03(tau, tau_ref), tauInputs_indices_[dnn::footprintCorrection]); - else if (sub_version_ == 5) - get(dnn::footprintCorrection) = - sp.scale(tau_funcs.getFootprintCorrection(tau, tau_ref), tauInputs_indices_[dnn::footprintCorrection]); - + else if (sub_version_ == 5) { + if (is_online_) + get(dnn::footprintCorrection) = + sp.scale(tau_funcs.getFootprintCorrectiondR03(tau, tau_ref), tauInputs_indices_[dnn::footprintCorrection]); + else + get(dnn::footprintCorrection) = + sp.scale(tau_funcs.getFootprintCorrection(tau, tau_ref), tauInputs_indices_[dnn::footprintCorrection]); + } get(dnn::neutralIsoPtSum) = sp.scale(tau_funcs.getNeutralIsoPtSum(tau, tau_ref), tauInputs_indices_[dnn::neutralIsoPtSum]); get(dnn::neutralIsoPtSumWeight_over_neutralIsoPtSum) =