Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:58:31

0001 #include "PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h"
0002 
0003 class MaxAbsEtaCut : public CutApplicatorBase {
0004 public:
0005   MaxAbsEtaCut(const edm::ParameterSet& c) : CutApplicatorBase(c), _maxEta(c.getParameter<double>("maxEta")) {}
0006 
0007   double value(const reco::CandidatePtr& cand) const final { return std::abs(cand->eta()); }
0008 
0009   result_type asCandidate(const argument_type& cand) const final { return std::abs(cand->eta()) < _maxEta; }
0010 
0011 private:
0012   const double _maxEta;
0013 };
0014 
0015 DEFINE_EDM_PLUGIN(CutApplicatorFactory, MaxAbsEtaCut, "MaxAbsEtaCut");