From 3238384d9a86544a8d8efd39f8411b62bd964a70 Mon Sep 17 00:00:00 2001 From: Luke Kreczko Date: Tue, 18 Jul 2017 14:50:17 +0100 Subject: [PATCH] fixing issue #19590 Former-commit-id: 4d41ee940c5ac3dfbf70c2adf1ac3d3b12d568d3 --- .../L1Trigger/interface/L1TStage2CaloLayer2Offline.h | 3 +++ .../L1Trigger/python/L1TStage2CaloLayer2Offline_cfi.py | 3 +++ DQMOffline/L1Trigger/src/L1TStage2CaloLayer2Offline.cc | 10 ++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/DQMOffline/L1Trigger/interface/L1TStage2CaloLayer2Offline.h b/DQMOffline/L1Trigger/interface/L1TStage2CaloLayer2Offline.h index db80788a6284c..fff032f5180da 100644 --- a/DQMOffline/L1Trigger/interface/L1TStage2CaloLayer2Offline.h +++ b/DQMOffline/L1Trigger/interface/L1TStage2CaloLayer2Offline.h @@ -123,6 +123,9 @@ class L1TStage2CaloLayer2Offline: public DQMEDAnalyzer { std::vector ettEfficiencyBins_; std::vector httEfficiencyBins_; + double recoHTTMaxEta_; + double recoMHTMaxEta_; + // TODO: add turn-on cuts (vectors of doubles) // Histograms MonitorElement* h_nVertex_; diff --git a/DQMOffline/L1Trigger/python/L1TStage2CaloLayer2Offline_cfi.py b/DQMOffline/L1Trigger/python/L1TStage2CaloLayer2Offline_cfi.py index e8a1e3e4dcad2..02ac53cc973da 100644 --- a/DQMOffline/L1Trigger/python/L1TStage2CaloLayer2Offline_cfi.py +++ b/DQMOffline/L1Trigger/python/L1TStage2CaloLayer2Offline_cfi.py @@ -71,6 +71,9 @@ mhtEfficiencyBins=cms.vdouble(mhtEfficiencyBins), ettEfficiencyBins=cms.vdouble(ettEfficiencyBins), httEfficiencyBins=cms.vdouble(httEfficiencyBins), + + recoHTTMaxEta=cms.double(2.5), + recoMHTMaxEta=cms.double(2.5), ) l1tStage2CaloLayer2OfflineDQMEmu = l1tStage2CaloLayer2OfflineDQM.clone( diff --git a/DQMOffline/L1Trigger/src/L1TStage2CaloLayer2Offline.cc b/DQMOffline/L1Trigger/src/L1TStage2CaloLayer2Offline.cc index 5dd4469f3359a..76e4caba09ccc 100644 --- a/DQMOffline/L1Trigger/src/L1TStage2CaloLayer2Offline.cc +++ b/DQMOffline/L1Trigger/src/L1TStage2CaloLayer2Offline.cc @@ -39,6 +39,8 @@ L1TStage2CaloLayer2Offline::L1TStage2CaloLayer2Offline(const edm::ParameterSet& mhtEfficiencyBins_(ps.getParameter < std::vector > ("mhtEfficiencyBins")), ettEfficiencyBins_(ps.getParameter < std::vector > ("ettEfficiencyBins")), httEfficiencyBins_(ps.getParameter < std::vector > ("httEfficiencyBins")), + recoHTTMaxEta_(ps.getParameter ("recoHTTMaxEta")), + recoMHTMaxEta_(ps.getParameter ("recoMHTMaxEta")), h_controlPlots_() { edm::LogInfo("L1TStage2CaloLayer2Offline") << "Constructor " @@ -174,8 +176,12 @@ void L1TStage2CaloLayer2Offline::fillEnergySums(edm::Event const& e, const unsig continue; } TVector2 jetVec(et * cos(jet->phi()), et * sin(jet->phi())); - recoHTT += et; - mht -= jetVec; + if(std::abs(jet->eta()) < recoHTTMaxEta_){ + recoHTT += et; + } + if(std::abs(jet->eta()) < recoMHTMaxEta_){ + mht -= jetVec; + } } recoETT = recoHTT; recoMHT = mht.Mod();