RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleSigmaIEtaIEtaCut.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
GsfEleSigmaIEtaIEtaCut
:
public
CutApplicatorBase
{
5
public
:
6
GsfEleSigmaIEtaIEtaCut
(
const
edm::ParameterSet
&
c
)
7
:
CutApplicatorBase
(
c
),
8
_sigmaIEtaIEtaCutValueEB
(
c
.getParameter<double>(
"sigmaIEtaIEtaCutValueEB"
)),
9
_sigmaIEtaIEtaCutValueEE
(
c
.getParameter<double>(
"sigmaIEtaIEtaCutValueEE"
)),
10
_barrelCutOff
(
c
.getParameter<double>(
"barrelCutOff"
)) {}
11
12
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
final
;
13
14
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
;
15
16
CandidateType
candidateType
()
const
final {
return
ELECTRON
; }
17
18
private
:
19
const
double
_sigmaIEtaIEtaCutValueEB
,
_sigmaIEtaIEtaCutValueEE
,
_barrelCutOff
;
20
};
21
22
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
GsfEleSigmaIEtaIEtaCut
,
"GsfEleSigmaIEtaIEtaCut"
);
23
24
CutApplicatorBase::result_type
GsfEleSigmaIEtaIEtaCut::operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
25
const
float
sigmaIEtaIEtaCutValue =
26
(
std::abs
(
cand
->superCluster()->position().eta()) <
_barrelCutOff
?
_sigmaIEtaIEtaCutValueEB
27
:
_sigmaIEtaIEtaCutValueEE
);
28
return
cand
->sigmaIetaIeta() < sigmaIEtaIEtaCutValue;
29
}
30
31
double
GsfEleSigmaIEtaIEtaCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
32
reco::GsfElectronPtr
ele(
cand
);
33
return
ele->
sigmaIetaIeta
();
34
}
GsfEleSigmaIEtaIEtaCut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleSigmaIEtaIEtaCut.cc:16
watchdog.const
const
Definition:
watchdog.py:83
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
GsfEleSigmaIEtaIEtaCut::_sigmaIEtaIEtaCutValueEB
const double _sigmaIEtaIEtaCutValueEB
Definition:
GsfEleSigmaIEtaIEtaCut.cc:19
GsfEleSigmaIEtaIEtaCut::_barrelCutOff
const double _barrelCutOff
Definition:
GsfEleSigmaIEtaIEtaCut.cc:19
GsfEleSigmaIEtaIEtaCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition:
GsfEleSigmaIEtaIEtaCut.cc:24
GsfEleSigmaIEtaIEtaCut::GsfEleSigmaIEtaIEtaCut
GsfEleSigmaIEtaIEtaCut(const edm::ParameterSet &c)
Definition:
GsfEleSigmaIEtaIEtaCut.cc:6
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
GsfEleSigmaIEtaIEtaCut::_sigmaIEtaIEtaCutValueEE
const double _sigmaIEtaIEtaCutValueEE
Definition:
GsfEleSigmaIEtaIEtaCut.cc:19
edm::ParameterSet
Definition:
ParameterSet.h:47
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:32
edm::Ptr< reco::GsfElectron >
reco::GsfElectron::sigmaIetaIeta
float sigmaIetaIeta() const
Definition:
GsfElectron.h:418
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:46
GsfEleSigmaIEtaIEtaCut
Definition:
GsfEleSigmaIEtaIEtaCut.cc:4
GsfEleSigmaIEtaIEtaCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleSigmaIEtaIEtaCut.cc:31
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
Generated for CMSSW Reference Manual by
1.8.16