From d91612c3f39f0f526d9bd8d7d1bc9094cdac8414 Mon Sep 17 00:00:00 2001 From: "A.R.Sahasransu" Date: Wed, 19 Oct 2022 16:57:00 +0200 Subject: [PATCH] Add Eta cut to HLT Egamma objects. Will squash soon. Co-authored-by: Marino Missiroli --- HLTrigger/Egamma/plugins/HLTEgammaEtFilter.cc | 7 +++++++ HLTrigger/Egamma/plugins/HLTEgammaEtFilter.h | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/HLTrigger/Egamma/plugins/HLTEgammaEtFilter.cc b/HLTrigger/Egamma/plugins/HLTEgammaEtFilter.cc index 3bfb06692b775..332d377a04e70 100644 --- a/HLTrigger/Egamma/plugins/HLTEgammaEtFilter.cc +++ b/HLTrigger/Egamma/plugins/HLTEgammaEtFilter.cc @@ -22,6 +22,8 @@ HLTEgammaEtFilter::HLTEgammaEtFilter(const edm::ParameterSet& iConfig) : HLTFilt inputTag_ = iConfig.getParameter("inputTag"); etcutEB_ = iConfig.getParameter("etcutEB"); etcutEE_ = iConfig.getParameter("etcutEE"); + minEtaCut_ = iConfig.getParameter("minEtaCut"); + maxEtaCut_ = iConfig.getParameter("maxEtaCut"); ncandcut_ = iConfig.getParameter("ncandcut"); l1EGTag_ = iConfig.getParameter("l1EGCand"); inputToken_ = consumes(inputTag_); @@ -34,6 +36,8 @@ void HLTEgammaEtFilter::fillDescriptions(edm::ConfigurationDescriptions& descrip desc.add("l1EGCand", edm::InputTag("hltL1IsoRecoEcalCandidate")); desc.add("etcutEB", 1.0); desc.add("etcutEE", 1.0); + desc.add("minEtaCut", -9999.0); + desc.add("maxEtaCut", 9999.0); desc.add("ncandcut", 1); descriptions.add("hltEgammaEtFilter", desc); } @@ -72,6 +76,9 @@ bool HLTEgammaEtFilter::hltFilter(edm::Event& iEvent, for (auto& recoecalcand : recoecalcands) { ref = recoecalcand; + if ((ref->eta() < minEtaCut_) or (ref->eta() > maxEtaCut_)) + continue; + if ((fabs(ref->eta()) < 1.479 && ref->et() >= etcutEB_) || (fabs(ref->eta()) >= 1.479 && ref->et() >= etcutEE_)) { n++; // std::cout << "Passed eta: " << ref->eta() << std::endl; diff --git a/HLTrigger/Egamma/plugins/HLTEgammaEtFilter.h b/HLTrigger/Egamma/plugins/HLTEgammaEtFilter.h index 435b69cec1be5..c876b134d7233 100644 --- a/HLTrigger/Egamma/plugins/HLTEgammaEtFilter.h +++ b/HLTrigger/Egamma/plugins/HLTEgammaEtFilter.h @@ -31,9 +31,11 @@ class HLTEgammaEtFilter : public HLTFilter { private: edm::InputTag inputTag_; // input tag identifying product contains egammas edm::EDGetTokenT inputToken_; - double etcutEB_; // Barrel Et threshold in GeV - double etcutEE_; // Endcap Et threshold in GeV - int ncandcut_; // number of egammas required + double etcutEB_; // Barrel Et threshold in GeV + double etcutEE_; // Endcap Et threshold in GeV + double minEtaCut_; // Min pseudorapidity cut + double maxEtaCut_; // Max pseudorapidity cut + int ncandcut_; // number of egammas required edm::InputTag l1EGTag_; };