Skip to content

Commit

Permalink
Merge pull request #5 from folguera/fix_epalencia_l1t-1109_v3
Browse files Browse the repository at this point in the history
comment from rappoccio
  • Loading branch information
epalencia authored May 12, 2023
2 parents 0eeb772 + e7798ed commit a559c5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions L1Trigger/Phase2L1GMT/plugins/Phase2L1TGMTFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ class Phase2L1TGMTFilter : public edm::stream::EDProducer<> {
bool applyLowPtFilter_;
int ptBarrelMin_;
int ptEndcapMin_;
double etaBE_;
};

Phase2L1TGMTFilter::Phase2L1TGMTFilter(const edm::ParameterSet& iConfig)
: srcMuons_(consumes<std::vector<l1t::TrackerMuon> >(iConfig.getParameter<edm::InputTag>("srcMuons"))),
applyLowPtFilter_(iConfig.getParameter<bool>("applyLowPtFilter")),
ptBarrelMin_(iConfig.getParameter<int>("ptBarrelMin")),
ptEndcapMin_(iConfig.getParameter<int>("ptEndcapMin")) {
ptEndcapMin_(iConfig.getParameter<int>("ptEndcapMin")),
etaBE_(iConfig.getParameter<double>("etaBE")) {
produces<std::vector<l1t::TrackerMuon> >("l1tTkMuonsGmtLowPtFix").setBranchAlias("tkMuLowPtFix");
}

Expand All @@ -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()) {
Expand Down
4 changes: 3 additions & 1 deletion L1Trigger/Phase2L1GMT/python/gmt_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

)


Expand Down

0 comments on commit a559c5a

Please sign in to comment.