src
PhysicsTools
SelectorUtils
plugins
MaxAbsEtaCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
3
class
MaxAbsEtaCut
:
public
CutApplicatorBase
{
4
public
:
5
MaxAbsEtaCut
(
const
edm::ParameterSet
&
c
) :
CutApplicatorBase
(
c
),
_maxEta
(
c
.getParameter<double>(
"maxEta"
)) {}
6
7
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
{
return
std::abs
(
cand
->eta()); }
8
9
result_type
asCandidate
(
const
argument_type
&
cand
)
const
final
{
return
std::abs
(
cand
->eta()) <
_maxEta
; }
10
11
private
:
12
const
double
_maxEta
;
13
};
14
15
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
MaxAbsEtaCut
,
"MaxAbsEtaCut"
);
DummyCfis.c
c
Definition:
DummyCfis.py:86
MaxAbsEtaCut
Definition:
MaxAbsEtaCut.cc:3
MaxAbsEtaCut::MaxAbsEtaCut
MaxAbsEtaCut(const edm::ParameterSet &c)
Definition:
MaxAbsEtaCut.cc:5
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
edm::Ptr< Candidate >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
MaxAbsEtaCut::_maxEta
const double _maxEta
Definition:
MaxAbsEtaCut.cc:12
MaxAbsEtaCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
MaxAbsEtaCut.cc:7
edm::ParameterSet
Definition:
ParameterSet.h:48
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:123
cand
Definition:
decayParser.h:32
MaxAbsEtaCut::asCandidate
result_type asCandidate(const argument_type &cand) const final
Definition:
MaxAbsEtaCut.cc:9
CutApplicatorBase.h
Generated for CMSSW Reference Manual by
1.8.14