RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleSCMaxAbsEtaCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
#include "
DataFormats/EgammaCandidates/interface/GsfElectron.h
"
3
4
class
GsfEleSCMaxAbsEtaCut
:
public
CutApplicatorBase
{
5
public
:
6
GsfEleSCMaxAbsEtaCut
(
const
edm::ParameterSet
&
c
) :
CutApplicatorBase
(
c
),
_maxEta
(
c
.getParameter<
bool
>(
"maxEta"
)) {}
7
8
result_type
operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
final
{
9
const
reco::SuperClusterRef
& scref =
cand
->superCluster();
10
return
std::abs
(scref->eta()) <
_maxEta
;
11
}
12
13
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
{
14
reco::GsfElectronPtr
ele(
cand
);
15
const
reco::SuperClusterRef
& scref = ele->
superCluster
();
16
return
std::abs
(scref->eta());
17
}
18
19
CandidateType
candidateType
()
const
final {
return
ELECTRON
; }
20
21
private
:
22
const
double
_maxEta
;
23
};
24
25
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
GsfEleSCMaxAbsEtaCut
,
"GsfEleSCMaxAbsEtaCut"
);
GsfEleSCMaxAbsEtaCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleSCMaxAbsEtaCut.cc:13
GsfEleSCMaxAbsEtaCut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleSCMaxAbsEtaCut.cc:19
electrons_cff.bool
bool
Definition:
electrons_cff.py:393
GsfEleSCMaxAbsEtaCut::GsfEleSCMaxAbsEtaCut
GsfEleSCMaxAbsEtaCut(const edm::ParameterSet &c)
Definition:
GsfEleSCMaxAbsEtaCut.cc:6
watchdog.const
const
Definition:
watchdog.py:83
edm::Ref< SuperClusterCollection >
GsfEleSCMaxAbsEtaCut::operator()
result_type operator()(const reco::GsfElectronPtr &cand) const final
Definition:
GsfEleSCMaxAbsEtaCut.cc:8
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
GsfEleSCMaxAbsEtaCut
Definition:
GsfEleSCMaxAbsEtaCut.cc:4
edm::ParameterSet
Definition:
ParameterSet.h:47
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:32
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
GsfEleSCMaxAbsEtaCut::_maxEta
const double _maxEta
Definition:
GsfEleSCMaxAbsEtaCut.cc:22
edm::Ptr< reco::GsfElectron >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
reco::GsfElectron::superCluster
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition:
GsfElectron.h:163
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CutApplicatorBase.h
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
Generated for CMSSW Reference Manual by
1.8.16