RecoEgamma
PhotonIdentification
plugins
cuts
PhoHadronicOverEMCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
#include "
DataFormats/EgammaCandidates/interface/Photon.h
"
3
4
class
PhoHadronicOverEMCut
:
public
CutApplicatorBase
{
5
public
:
6
PhoHadronicOverEMCut
(
const
edm::ParameterSet
&
c
)
7
:
CutApplicatorBase
(
c
),
8
_hadronicOverEMCutValueEB
(
c
.getParameter<double>(
"hadronicOverEMCutValueEB"
)),
9
_hadronicOverEMCutValueEE
(
c
.getParameter<double>(
"hadronicOverEMCutValueEE"
)),
10
_barrelCutOff
(
c
.getParameter<double>(
"barrelCutOff"
)) {}
11
12
result_type
operator()
(
const
reco::PhotonPtr
&)
const
final
;
13
14
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
;
15
16
CandidateType
candidateType
()
const
final {
return
PHOTON
; }
17
18
private
:
19
const
float
_hadronicOverEMCutValueEB
,
_hadronicOverEMCutValueEE
,
_barrelCutOff
;
20
};
21
22
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
PhoHadronicOverEMCut
,
"PhoHadronicOverEMCut"
);
23
24
CutApplicatorBase::result_type
PhoHadronicOverEMCut::operator()
(
const
reco::PhotonPtr
&
cand
)
const
{
25
const
float
hadronicOverEMCutValue =
26
(
std::abs
(
cand
->superCluster()->eta()) <
_barrelCutOff
?
_hadronicOverEMCutValueEB
:
_hadronicOverEMCutValueEE
);
27
28
return
cand
->hadronicOverEm() < hadronicOverEMCutValue;
29
}
30
31
double
PhoHadronicOverEMCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
32
reco::PhotonPtr
pho(
cand
);
33
return
pho->hadronicOverEm();
34
}
PhoHadronicOverEMCut::candidateType
CandidateType candidateType() const final
Definition:
PhoHadronicOverEMCut.cc:16
CutApplicatorBase::PHOTON
Definition:
CutApplicatorBase.h:47
PhoHadronicOverEMCut::_hadronicOverEMCutValueEE
const float _hadronicOverEMCutValueEE
Definition:
PhoHadronicOverEMCut.cc:19
PhoHadronicOverEMCut::operator()
result_type operator()(const reco::PhotonPtr &) const final
Definition:
PhoHadronicOverEMCut.cc:24
PhoHadronicOverEMCut::_hadronicOverEMCutValueEB
const float _hadronicOverEMCutValueEB
Definition:
PhoHadronicOverEMCut.cc:19
watchdog.const
const
Definition:
watchdog.py:83
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
Photon.h
PhoHadronicOverEMCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
PhoHadronicOverEMCut.cc:31
PhoHadronicOverEMCut
Definition:
PhoHadronicOverEMCut.cc:4
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
PhoHadronicOverEMCut::_barrelCutOff
const float _barrelCutOff
Definition:
PhoHadronicOverEMCut.cc:19
edm::ParameterSet
Definition:
ParameterSet.h:36
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
PhoHadronicOverEMCut::PhoHadronicOverEMCut
PhoHadronicOverEMCut(const edm::ParameterSet &c)
Definition:
PhoHadronicOverEMCut.cc:6
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:34
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
edm::Ptr
Definition:
AssociationVector.h:31
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CutApplicatorBase.h
Generated for CMSSW Reference Manual by
1.8.16