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