From 4a73d2ba34927b89e043fded9c349c351f467685 Mon Sep 17 00:00:00 2001 From: fernanpe Date: Thu, 2 Nov 2023 09:57:33 +0100 Subject: [PATCH] updated HLTDeDxFilter --- RecoTracker/DeDx/plugins/HLTDeDxFilter.cc | 6 ++++-- RecoTracker/DeDx/plugins/HLTDeDxFilter.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RecoTracker/DeDx/plugins/HLTDeDxFilter.cc b/RecoTracker/DeDx/plugins/HLTDeDxFilter.cc index fa6b183f6c5bc..bc8af03bdb8a8 100644 --- a/RecoTracker/DeDx/plugins/HLTDeDxFilter.cc +++ b/RecoTracker/DeDx/plugins/HLTDeDxFilter.cc @@ -37,6 +37,7 @@ HLTDeDxFilter::HLTDeDxFilter(const edm::ParameterSet& iConfig) : HLTFilter(iConf minDEDx_ = iConfig.getParameter("minDEDx"); minPT_ = iConfig.getParameter("minPT"); minNOM_ = iConfig.getParameter("minNOM"); + minETA_ = iConfig.getParameter("minETA"); maxETA_ = iConfig.getParameter("maxETA"); minNumValidHits_ = iConfig.getParameter("minNumValidHits"); maxNHitMissIn_ = iConfig.getParameter("maxNHitMissIn"); @@ -68,6 +69,7 @@ void HLTDeDxFilter::fillDescriptions(edm::ConfigurationDescriptions& description desc.add("minDEDx", 0.0); desc.add("minPT", 0.0); desc.add("minNOM", 0.0); + desc.add("minETA", 0.0); desc.add("maxETA", 5.5); desc.add("minNumValidHits", 0); desc.add("maxNHitMissIn", 99); @@ -128,8 +130,8 @@ bool HLTDeDxFilter::hltFilter(edm::Event& iEvent, } for (unsigned int i = 0; i < trackCollection.size(); i++) { reco::TrackRef track = reco::TrackRef(trackCollectionHandle, i); - if (pt[i] > minPT_ && fabs(eta[i]) < maxETA_ && dEdxTrack[track].numberOfMeasurements() > minNOM_ && - dEdxTrack[track].dEdx() > minDEDx_) { + if (pt[i] > minPT_ && std::abs(eta[i]) >= minETA_ && std::abs(eta[i]) < maxETA_ && + dEdxTrack[track].numberOfMeasurements() > minNOM_ && dEdxTrack[track].dEdx() > minDEDx_) { if (track->numberOfValidHits() < minNumValidHits_) continue; if (track->hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::MISSING_INNER_HITS) > maxNHitMissIn_) diff --git a/RecoTracker/DeDx/plugins/HLTDeDxFilter.h b/RecoTracker/DeDx/plugins/HLTDeDxFilter.h index d098fd8e2e13f..8431ff2f8b837 100644 --- a/RecoTracker/DeDx/plugins/HLTDeDxFilter.h +++ b/RecoTracker/DeDx/plugins/HLTDeDxFilter.h @@ -32,6 +32,7 @@ class HLTDeDxFilter : public HLTFilter { double minDEDx_; double minPT_; double minNOM_; + double minETA_; double maxETA_; double minNumValidHits_; double maxNHitMissIn_;