From eaa2c4c57eb55561ae1f8e60dd39f898b1a519f2 Mon Sep 17 00:00:00 2001 From: Santiago Date: Fri, 12 May 2023 11:46:00 +0200 Subject: [PATCH 1/2] make eta parameter configurable --- L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc | 8 +++++--- L1Trigger/Phase2L1GMT/python/gmt_cfi.py | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc b/L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc index a1ef355ad98e6..c58b54d0b254b 100644 --- a/L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc +++ b/L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc @@ -32,13 +32,15 @@ class Phase2L1TGMTFilter : public edm::stream::EDProducer<> { bool applyLowPtFilter_; int ptBarrelMin_; int ptEndcapMin_; + float etaBE_; }; Phase2L1TGMTFilter::Phase2L1TGMTFilter(const edm::ParameterSet& iConfig) : srcMuons_(consumes >(iConfig.getParameter("srcMuons"))), applyLowPtFilter_(iConfig.getParameter("applyLowPtFilter")), ptBarrelMin_(iConfig.getParameter("ptBarrelMin")), - ptEndcapMin_(iConfig.getParameter("ptEndcapMin")) { + ptEndcapMin_(iConfig.getParameter("ptEndcapMin")), + etaBE_(iConfig..getParameter("etaBE")) { produces >("l1tTkMuonsGmtLowPtFix").setBranchAlias("tkMuLowPtFix"); } @@ -63,8 +65,8 @@ void Phase2L1TGMTFilter::produce(edm::Event& iEvent, const edm::EventSetup& iSet auto mu = muonHandle->at(i); bool noSAMatch = true; if (applyLowPtFilter_) { - if ((fabs(mu.phEta()) < 0.9 && mu.phPt() < ptBarrelMin_) || - (fabs(mu.phEta()) > 0.9 && mu.phPt() < ptEndcapMin_)) { + if ((fabs(mu.phEta()) < etaBE_ && mu.phPt() < ptBarrelMin_) || + (fabs(mu.phEta()) > etaBE_ && mu.phPt() < ptEndcapMin_)) { // if quality is already set to 0 don't continue the loop. for (const auto& r : mu.muonRef()) { if (r.isNonnull()) { diff --git a/L1Trigger/Phase2L1GMT/python/gmt_cfi.py b/L1Trigger/Phase2L1GMT/python/gmt_cfi.py index 1b9272bfad128..0c2008095889a 100644 --- a/L1Trigger/Phase2L1GMT/python/gmt_cfi.py +++ b/L1Trigger/Phase2L1GMT/python/gmt_cfi.py @@ -81,7 +81,9 @@ srcMuons = cms.InputTag("l1tTkMuonsGmt",""), applyLowPtFilter = cms.bool(True), ptBarrelMin = cms.int32(8), - ptEndcapMin = cms.int32(8) + ptEndcapMin = cms.int32(8), + etaBE = cms.double(0.9) + ) From e7798ed828279b1db2f8f37ce8f4b07d3749c61c Mon Sep 17 00:00:00 2001 From: Santiago Date: Fri, 12 May 2023 12:18:12 +0200 Subject: [PATCH 2/2] switched to double to accomodate getparameter --- L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc b/L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc index c58b54d0b254b..ea0d9617e7cb7 100644 --- a/L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc +++ b/L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc @@ -32,7 +32,7 @@ class Phase2L1TGMTFilter : public edm::stream::EDProducer<> { bool applyLowPtFilter_; int ptBarrelMin_; int ptEndcapMin_; - float etaBE_; + double etaBE_; }; Phase2L1TGMTFilter::Phase2L1TGMTFilter(const edm::ParameterSet& iConfig) @@ -40,7 +40,7 @@ Phase2L1TGMTFilter::Phase2L1TGMTFilter(const edm::ParameterSet& iConfig) applyLowPtFilter_(iConfig.getParameter("applyLowPtFilter")), ptBarrelMin_(iConfig.getParameter("ptBarrelMin")), ptEndcapMin_(iConfig.getParameter("ptEndcapMin")), - etaBE_(iConfig..getParameter("etaBE")) { + etaBE_(iConfig.getParameter("etaBE")) { produces >("l1tTkMuonsGmtLowPtFix").setBranchAlias("tkMuLowPtFix"); }