Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Eta cut to HLT Egamma objects - BackportFrom126X to 124X #39791

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions HLTrigger/Egamma/plugins/HLTEgammaEtFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ HLTEgammaEtFilter::HLTEgammaEtFilter(const edm::ParameterSet& iConfig) : HLTFilt
inputTag_ = iConfig.getParameter<edm::InputTag>("inputTag");
etcutEB_ = iConfig.getParameter<double>("etcutEB");
etcutEE_ = iConfig.getParameter<double>("etcutEE");
minEtaCut_ = iConfig.getParameter<double>("minEtaCut");
maxEtaCut_ = iConfig.getParameter<double>("maxEtaCut");
ncandcut_ = iConfig.getParameter<int>("ncandcut");
l1EGTag_ = iConfig.getParameter<edm::InputTag>("l1EGCand");
inputToken_ = consumes<trigger::TriggerFilterObjectWithRefs>(inputTag_);
Expand All @@ -34,6 +36,8 @@ void HLTEgammaEtFilter::fillDescriptions(edm::ConfigurationDescriptions& descrip
desc.add<edm::InputTag>("l1EGCand", edm::InputTag("hltL1IsoRecoEcalCandidate"));
desc.add<double>("etcutEB", 1.0);
desc.add<double>("etcutEE", 1.0);
desc.add<double>("minEtaCut", -9999.0);
desc.add<double>("maxEtaCut", 9999.0);
desc.add<int>("ncandcut", 1);
descriptions.add("hltEgammaEtFilter", desc);
}
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 5 additions & 3 deletions HLTrigger/Egamma/plugins/HLTEgammaEtFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ class HLTEgammaEtFilter : public HLTFilter {
private:
edm::InputTag inputTag_; // input tag identifying product contains egammas
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> 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_;
};
Expand Down