Main Page
Namespaces
Classes
Package Documentation
RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleHadronicOverEMEnergyScaledCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorWithEventContentBase.h
"
2
#include "
DataFormats/EgammaCandidates/interface/GsfElectron.h
"
3
4
class
GsfEleHadronicOverEMEnergyScaledCut
:
public
CutApplicatorWithEventContentBase
{
5
public
:
6
GsfEleHadronicOverEMEnergyScaledCut
(
const
edm::ParameterSet
&
c
) :
7
CutApplicatorWithEventContentBase
(c),
8
barrelC0_
(c.getParameter<double>(
"barrelC0"
)),
9
barrelCE_
(c.getParameter<double>(
"barrelCE"
)),
10
barrelCr_
(c.getParameter<double>(
"barrelCr"
)),
11
endcapC0_
(c.getParameter<double>(
"endcapC0"
)),
12
endcapCE_
(c.getParameter<double>(
"endcapCE"
)),
13
endcapCr_
(c.getParameter<double>(
"endcapCr"
)),
14
barrelCutOff_
(c.getParameter<double>(
"barrelCutOff"
))
15
{
16
edm::InputTag
rhoTag
= c.
getParameter
<
edm::InputTag
>(
"rho"
);
17
contentTags_
.emplace(
"rho"
,rhoTag);
18
19
}
20
21
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
final
;
22
23
void
setConsumes
(
edm::ConsumesCollector
&)
final
;
24
void
getEventContent
(
const
edm::EventBase
&)
final
;
25
26
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
;
27
28
CandidateType
candidateType
() const final {
29
return
ELECTRON
;
30
}
31
32
private
:
33
const
float
barrelC0_
,
barrelCE_
,
barrelCr_
,
endcapC0_
,
endcapCE_
,
endcapCr_
,
barrelCutOff_
;
34
edm::Handle<double>
rhoHandle_
;
35
};
36
37
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
38
GsfEleHadronicOverEMEnergyScaledCut
,
39
"GsfEleHadronicOverEMEnergyScaledCut"
);
40
41
void
GsfEleHadronicOverEMEnergyScaledCut::setConsumes
(
edm::ConsumesCollector
& cc) {
42
auto
rho
= cc.
consumes
<
double
>(
contentTags_
[
"rho"
]);
43
contentTokens_
.emplace(
"rho"
,
rho
);
44
}
45
46
void
GsfEleHadronicOverEMEnergyScaledCut::getEventContent
(
const
edm::EventBase
&
ev
) {
47
ev.
getByLabel
(
contentTags_
[
"rho"
],
rhoHandle_
);
48
}
49
50
51
CutApplicatorBase::result_type
GsfEleHadronicOverEMEnergyScaledCut::operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
52
53
const
double
rho
=
rhoHandle_
.
isValid
() ? (
float
)(*
rhoHandle_
) : 0;
54
const
float
energy
= cand->
superCluster
()->energy();
55
const
float
c0
= (
std::abs
(cand->
superCluster
()->position().eta()) <
barrelCutOff_
?
barrelC0_
:
endcapC0_
);
56
const
float
cE = (
std::abs
(cand->
superCluster
()->position().eta()) <
barrelCutOff_
?
barrelCE_
:
endcapCE_
);
57
const
float
cR = (
std::abs
(cand->
superCluster
()->position().eta()) <
barrelCutOff_
?
barrelCr_
:
endcapCr_
);
58
return
cand->
hadronicOverEm
() < c0 + cE/energy + cR*rho/
energy
;
59
}
60
61
double
GsfEleHadronicOverEMEnergyScaledCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
62
reco::GsfElectronPtr
ele(cand);
63
return
ele->
hadronicOverEm
();
64
}
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition:
ConsumesCollector.h:49
DDAxes::rho
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CutApplicatorWithEventContentBase
Definition:
CutApplicatorWithEventContentBase.h:19
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:48
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition:
CutApplicatorWithEventContentBase.h:44
EnergyCorrector.c
c
Definition:
EnergyCorrector.py:44
edm::Handle< double >
GsfEleHadronicOverEMEnergyScaledCut::barrelCE_
const float barrelCE_
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:33
GsfEleHadronicOverEMEnergyScaledCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:51
GsfEleHadronicOverEMEnergyScaledCut::barrelCr_
const float barrelCr_
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:33
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
GsfEleHadronicOverEMEnergyScaledCut::barrelC0_
const float barrelC0_
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:33
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition:
CutApplicatorWithEventContentBase.h:39
GsfEleHadronicOverEMEnergyScaledCut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:28
GsfEleHadronicOverEMEnergyScaledCut::barrelCutOff_
const float barrelCutOff_
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:33
reco::GsfElectron::hadronicOverEm
float hadronicOverEm() const
Definition:
GsfElectron.h:495
GsfEleHadronicOverEMEnergyScaledCut::GsfEleHadronicOverEMEnergyScaledCut
GsfEleHadronicOverEMEnergyScaledCut(const edm::ParameterSet &c)
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:6
edmplugin::PluginFactory
Definition:
PluginFactory.h:33
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CutApplicatorWithEventContentBase.h
edm::Ptr< reco::GsfElectron >
objects.autophobj.float
float
Definition:
autophobj.py:147
GsfEleHadronicOverEMEnergyScaledCut
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:4
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:74
edm::EventBase
Definition:
EventBase.h:46
GsfEleHadronicOverEMEnergyScaledCut::endcapC0_
const float endcapC0_
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:33
GsfElectron.h
GsfEleHadronicOverEMEnergyScaledCut::setConsumes
void setConsumes(edm::ConsumesCollector &) final
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:41
randomXiThetaGunProducer_cfi.energy
energy
Definition:
randomXiThetaGunProducer_cfi.py:6
GsfEleHadronicOverEMEnergyScaledCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:61
edm::EventBase::getByLabel
bool getByLabel(InputTag const &, Handle< T > &) const
Definition:
EventBase.h:92
edm::InputTag
Definition:
InputTag.h:15
GsfEleHadronicOverEMEnergyScaledCut::endcapCE_
const float endcapCE_
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:33
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
reco::GsfElectron::superCluster
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition:
GsfElectron.h:185
GsfEleHadronicOverEMEnergyScaledCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:34
fftjetpileupestimator_calo_uncalib_cfi.c0
c0
Definition:
fftjetpileupestimator_calo_uncalib_cfi.py:8
edm::ParameterSet
Definition:
ParameterSet.h:36
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:121
cand
Definition:
decayParser.h:34
GsfEleHadronicOverEMEnergyScaledCut::getEventContent
void getEventContent(const edm::EventBase &) final
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:46
GsfEleHadronicOverEMEnergyScaledCut::endcapCr_
const float endcapCr_
Definition:
GsfEleHadronicOverEMEnergyScaledCut.cc:33
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
HiL1Corrector_cff.rhoTag
rhoTag
Definition:
HiL1Corrector_cff.py:7
Generated for CMSSW Reference Manual by
1.8.11