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"
);
MaxAbsEtaCut::_maxEta
const double _maxEta
Definition:
MaxAbsEtaCut.cc:12
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
MaxAbsEtaCut::asCandidate
result_type asCandidate(const argument_type &cand) const final
Definition:
MaxAbsEtaCut.cc:9
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
MaxAbsEtaCut
Definition:
MaxAbsEtaCut.cc:3
edm::ParameterSet
Definition:
ParameterSet.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:32
MaxAbsEtaCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
MaxAbsEtaCut.cc:7
edm::Ptr< Candidate >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CutApplicatorBase.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:56
MaxAbsEtaCut::MaxAbsEtaCut
MaxAbsEtaCut(const edm::ParameterSet &c)
Definition:
MaxAbsEtaCut.cc:5
Generated for CMSSW Reference Manual by
1.8.16