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

Addition of a parameter in HLTMuonTrkFilter to cut on absEta #5767

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions HLTrigger/Muon/interface/HLTMuonTrkFilter.h
Expand Up @@ -31,6 +31,7 @@ class HLTMuonTrkFilter : public HLTFilter {
unsigned int m_requiredTypeMask;
double m_maxNormalizedChi2;
double m_minPt;
double m_maxAbsEta;
muon::SelectionType m_trkMuonId;
bool m_saveTags;

Expand Down
3 changes: 3 additions & 0 deletions HLTrigger/Muon/src/HLTMuonTrkFilter.cc
Expand Up @@ -38,6 +38,7 @@ HLTMuonTrkFilter::HLTMuonTrkFilter(const edm::ParameterSet& iConfig) : HLTFilter
m_requiredTypeMask = iConfig.getParameter<unsigned int>("requiredTypeMask");
m_trkMuonId = muon::SelectionType(iConfig.getParameter<unsigned int>("trkMuonId"));
m_minPt = iConfig.getParameter<double>("minPt");
m_maxAbsEta = iConfig.getParameter<double>("maxAbsEta");
}

void
Expand All @@ -54,6 +55,7 @@ HLTMuonTrkFilter::fillDescriptions(edm::ConfigurationDescriptions& descriptions)
desc.add<unsigned int>("requiredTypeMask",0);
desc.add<unsigned int>("trkMuonId",0);
desc.add<double>("minPt",24);
desc.add<double>("maxAbsEta",2.4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 1e99, so as to reproduce the old behaviour for old/unchanged py configs

descriptions.add("hltMuonTrkFilter",desc);
}

Expand Down Expand Up @@ -82,6 +84,7 @@ HLTMuonTrkFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup, t
}
if ( muon.isTrackerMuon() && !muon::isGoodMuon(muon,m_trkMuonId) ) continue;
if ( muon.pt() < m_minPt ) continue;
if ( fabs(muon.eta()) > m_maxAbsEta ) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be std::abs instead of fabs!

filteredMuons.push_back(i);
}

Expand Down