RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleFull5x5SigmaIEtaIEtaCut.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
GsfEleFull5x5SigmaIEtaIEtaCut
:
public
CutApplicatorBase
{
5
public
:
6
GsfEleFull5x5SigmaIEtaIEtaCut
(
const
edm::ParameterSet
&
c
);
7
8
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
final
;
9
10
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
;
11
12
CandidateType
candidateType
()
const
final {
return
ELECTRON
; }
13
14
private
:
15
float
_full5x5SigmaIEtaIEtaCutValueEB
;
16
float
_full5x5SigmaIEtaIEtaCutValueEE
;
17
float
_barrelCutOff
;
18
};
19
20
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
GsfEleFull5x5SigmaIEtaIEtaCut
,
"GsfEleFull5x5SigmaIEtaIEtaCut"
);
21
22
GsfEleFull5x5SigmaIEtaIEtaCut::GsfEleFull5x5SigmaIEtaIEtaCut
(
const
edm::ParameterSet
&
c
)
23
:
CutApplicatorBase
(
c
),
24
_full5x5SigmaIEtaIEtaCutValueEB(
c
.getParameter<double>(
"full5x5SigmaIEtaIEtaCutValueEB"
)),
25
_full5x5SigmaIEtaIEtaCutValueEE(
c
.getParameter<double>(
"full5x5SigmaIEtaIEtaCutValueEE"
)),
26
_barrelCutOff(
c
.getParameter<double>(
"barrelCutOff"
)) {}
27
28
CutApplicatorBase::result_type
GsfEleFull5x5SigmaIEtaIEtaCut::operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
29
// Figure out the cut value
30
const
float
full5x5SigmaIEtaIEtaCutValue =
31
(
std::abs
(
cand
->superCluster()->position().eta()) <
_barrelCutOff
?
_full5x5SigmaIEtaIEtaCutValueEB
32
:
_full5x5SigmaIEtaIEtaCutValueEE
);
33
34
// Apply the cut and return the result
35
return
cand
->full5x5_sigmaIetaIeta() < full5x5SigmaIEtaIEtaCutValue;
36
}
37
38
double
GsfEleFull5x5SigmaIEtaIEtaCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
39
reco::GsfElectronPtr
ele(
cand
);
40
return
ele->
full5x5_sigmaIetaIeta
();
41
}
GsfEleFull5x5SigmaIEtaIEtaCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition:
GsfEleFull5x5SigmaIEtaIEtaCut.cc:28
GsfEleFull5x5SigmaIEtaIEtaCut::_full5x5SigmaIEtaIEtaCutValueEB
float _full5x5SigmaIEtaIEtaCutValueEB
Definition:
GsfEleFull5x5SigmaIEtaIEtaCut.cc:15
watchdog.const
const
Definition:
watchdog.py:83
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
GsfEleFull5x5SigmaIEtaIEtaCut::_barrelCutOff
float _barrelCutOff
Definition:
GsfEleFull5x5SigmaIEtaIEtaCut.cc:17
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
edm::ParameterSet
Definition:
ParameterSet.h:47
GsfEleFull5x5SigmaIEtaIEtaCut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleFull5x5SigmaIEtaIEtaCut.cc:12
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
reco::GsfElectron::full5x5_sigmaIetaIeta
float full5x5_sigmaIetaIeta() const
Definition:
GsfElectron.h:479
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:32
GsfEleFull5x5SigmaIEtaIEtaCut
Definition:
GsfEleFull5x5SigmaIEtaIEtaCut.cc:4
edm::Ptr< reco::GsfElectron >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
GsfEleFull5x5SigmaIEtaIEtaCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleFull5x5SigmaIEtaIEtaCut.cc:38
GsfEleFull5x5SigmaIEtaIEtaCut::GsfEleFull5x5SigmaIEtaIEtaCut
GsfEleFull5x5SigmaIEtaIEtaCut(const edm::ParameterSet &c)
Definition:
GsfEleFull5x5SigmaIEtaIEtaCut.cc:22
GsfEleFull5x5SigmaIEtaIEtaCut::_full5x5SigmaIEtaIEtaCutValueEE
float _full5x5SigmaIEtaIEtaCutValueEE
Definition:
GsfEleFull5x5SigmaIEtaIEtaCut.cc:16
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CutApplicatorBase.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:56
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
Generated for CMSSW Reference Manual by
1.8.16