Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleEmHadD1IsoRhoCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorWithEventContentBase.h
"
2
#include "
DataFormats/EgammaCandidates/interface/GsfElectron.h
"
3
#include "
DataFormats/EgammaCandidates/interface/ConversionFwd.h
"
4
#include "
DataFormats/EgammaCandidates/interface/Conversion.h
"
5
#include "
RecoEgamma/EgammaTools/interface/ConversionTools.h
"
6
7
#include "
RecoEgamma/ElectronIdentification/interface/EBEECutValues.h
"
8
9
class
GsfEleEmHadD1IsoRhoCut
:
public
CutApplicatorWithEventContentBase
{
10
public
:
11
GsfEleEmHadD1IsoRhoCut
(
const
edm::ParameterSet
&
c
);
12
13
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
override
final
;
14
15
void
setConsumes
(
edm::ConsumesCollector
&)
override
final
;
16
void
getEventContent
(
const
edm::EventBase
&)
override
final
;
17
18
CandidateType
candidateType
()
const
override final {
19
return
ELECTRON
;
20
}
21
22
private
:
23
float
rhoConstant_
;
24
EBEECutValues
slopeTerm_
;
25
EBEECutValues
slopeStart_
;
26
EBEECutValues
constTerm_
;
27
28
29
edm::Handle<double>
rhoHandle_
;
30
31
};
32
33
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
34
GsfEleEmHadD1IsoRhoCut
,
35
"GsfEleEmHadD1IsoRhoCut"
);
36
37
GsfEleEmHadD1IsoRhoCut::GsfEleEmHadD1IsoRhoCut
(
const
edm::ParameterSet
& params) :
38
CutApplicatorWithEventContentBase
(params),
39
rhoConstant_(params.getParameter<double>(
"rhoConstant"
)),
40
slopeTerm_(params,
"slopeTerm"
),
41
slopeStart_(params,
"slopeStart"
),
42
constTerm_(params,
"constTerm"
){
43
edm::InputTag
rhoTag = params.
getParameter
<
edm::InputTag
>(
"rho"
);
44
contentTags_
.emplace(
"rho"
,rhoTag);
45
46
}
47
48
void
GsfEleEmHadD1IsoRhoCut::setConsumes
(
edm::ConsumesCollector
& cc) {
49
auto
rho
= cc.
consumes
<
double
>(
contentTags_
[
"rho"
]);
50
contentTokens_
.emplace(
"rho"
,
rho
);
51
}
52
53
void
GsfEleEmHadD1IsoRhoCut::getEventContent
(
const
edm::EventBase
&
ev
) {
54
ev.
getByLabel
(
contentTags_
[
"rho"
],
rhoHandle_
);
55
}
56
57
CutApplicatorBase::result_type
58
GsfEleEmHadD1IsoRhoCut::
59
operator()
(
const
reco::GsfElectronPtr
& cand)
const
{
60
const
double
rho
= (*rhoHandle_);
61
62
const
float
isolEmHadDepth1 = cand->dr03EcalRecHitSumEt() + cand->dr03HcalDepth1TowerSumEt();
63
64
const
float
et = cand->et();
65
const
float
cutValue = et >
slopeStart_
(cand) ?
slopeTerm_
(cand)*(et-
slopeStart_
(cand)) +
constTerm_
(cand) :
constTerm_
(cand);
66
return
isolEmHadDepth1 < cutValue +
rhoConstant_
*
rho
;
67
}
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition:
ConsumesCollector.h:41
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CutApplicatorWithEventContentBase
Definition:
CutApplicatorWithEventContentBase.h:18
GsfEleEmHadD1IsoRhoCut::constTerm_
EBEECutValues constTerm_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:26
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:48
GsfEleEmHadD1IsoRhoCut::candidateType
CandidateType candidateType() const overridefinal
Definition:
GsfEleEmHadD1IsoRhoCut.cc:18
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition:
CutApplicatorWithEventContentBase.h:40
rho
Definition:
DDAxes.h:10
edm::Handle< double >
Conversion.h
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:90
EnergyCorrector.c
tuple c
Definition:
EnergyCorrector.py:43
GsfEleEmHadD1IsoRhoCut::getEventContent
void getEventContent(const edm::EventBase &) overridefinal
Definition:
GsfEleEmHadD1IsoRhoCut.cc:53
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition:
CutApplicatorWithEventContentBase.h:35
GsfEleEmHadD1IsoRhoCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:29
EBEECutValues
Definition:
EBEECutValues.h:12
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
ConversionTools.h
CutApplicatorWithEventContentBase.h
edm::Ptr< reco::GsfElectron >
edm::EventBase
Definition:
EventBase.h:45
GsfElectron.h
EBEECutValues.h
GsfEleEmHadD1IsoRhoCut::rhoConstant_
float rhoConstant_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:23
GsfEleEmHadD1IsoRhoCut
Definition:
GsfEleEmHadD1IsoRhoCut.cc:9
GsfEleEmHadD1IsoRhoCut::GsfEleEmHadD1IsoRhoCut
GsfEleEmHadD1IsoRhoCut(const edm::ParameterSet &c)
Definition:
GsfEleEmHadD1IsoRhoCut.cc:37
compareJSON.const
string const
Definition:
compareJSON.py:14
ConversionFwd.h
edm::EventBase::getByLabel
bool getByLabel(InputTag const &, Handle< T > &) const
Definition:
EventBase.h:87
edm::InputTag
Definition:
InputTag.h:17
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
GsfEleEmHadD1IsoRhoCut::slopeTerm_
EBEECutValues slopeTerm_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:24
edm::ParameterSet
Definition:
ParameterSet.h:35
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
GsfEleEmHadD1IsoRhoCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const overridefinal
Definition:
GsfEleEmHadD1IsoRhoCut.cc:59
GsfEleEmHadD1IsoRhoCut::slopeStart_
EBEECutValues slopeStart_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:25
GsfEleEmHadD1IsoRhoCut::setConsumes
void setConsumes(edm::ConsumesCollector &) overridefinal
Definition:
GsfEleEmHadD1IsoRhoCut.cc:48
edm::ConsumesCollector
Definition:
ConsumesCollector.h:32
Generated for CMSSW Reference Manual by
1.8.5