Main Page
Namespaces
Classes
Package Documentation
CVS Directory
WorkBook
Offline Guide
Release schedule
•
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 "
RecoEgamma/EgammaTools/interface/EleEnergyRetriever.h
"
4
#include "
RecoEgamma/EgammaTools/interface/EBEECutValues.h
"
5
6
class
GsfEleEmHadD1IsoRhoCut
:
public
CutApplicatorWithEventContentBase
{
7
public
:
8
GsfEleEmHadD1IsoRhoCut
(
const
edm::ParameterSet
&
c
);
9
10
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
final
;
11
12
void
setConsumes
(
edm::ConsumesCollector
&)
final
;
13
void
getEventContent
(
const
edm::EventBase
&)
final
;
14
15
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
;
16
17
CandidateType
candidateType
()
const
final {
return
ELECTRON
; }
18
19
private
:
20
float
rhoConstant_
;
21
EBEECutValues
slopeTerm_
;
22
EBEECutValues
slopeStart_
;
23
EBEECutValues
constTerm_
;
24
EleEnergyRetriever
energyRetriever_
;
25
26
edm::Handle<double>
rhoHandle_
;
27
};
28
29
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
GsfEleEmHadD1IsoRhoCut
,
"GsfEleEmHadD1IsoRhoCut"
);
30
31
GsfEleEmHadD1IsoRhoCut::GsfEleEmHadD1IsoRhoCut
(
const
edm::ParameterSet
&
params
)
32
:
CutApplicatorWithEventContentBase
(params),
33
rhoConstant_
(params.getParameter<double>(
"rhoConstant"
)),
34
slopeTerm_
(params,
"slopeTerm"
),
35
slopeStart_
(params,
"slopeStart"
),
36
constTerm_
(params,
"constTerm"
),
37
energyRetriever_
(params.getParameter<
std
::
string
>(
"energyType"
)) {
38
edm::InputTag
rhoTag
= params.
getParameter
<
edm::InputTag
>(
"rho"
);
39
contentTags_
.emplace(
"rho"
, rhoTag);
40
}
41
42
void
GsfEleEmHadD1IsoRhoCut::setConsumes
(
edm::ConsumesCollector
& cc) {
43
auto
rho
= cc.
consumes
<
double
>(
contentTags_
[
"rho"
]);
44
contentTokens_
.emplace(
"rho"
,
rho
);
45
}
46
47
void
GsfEleEmHadD1IsoRhoCut::getEventContent
(
const
edm::EventBase
&
ev
) {
48
ev.
getByLabel
(
contentTags_
[
"rho"
],
rhoHandle_
);
49
}
50
51
CutApplicatorBase::result_type
GsfEleEmHadD1IsoRhoCut::operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
52
const
double
rho
= (*rhoHandle_);
53
54
const
float
isolEmHadDepth1 = cand->
dr03EcalRecHitSumEt
() + cand->
dr03HcalDepth1TowerSumEt
();
55
56
const
float
sinTheta = cand->
p
() != 0. ? cand->
pt
() / cand->
p
() : 0.;
57
const
float
et
=
energyRetriever_
(*cand) * sinTheta;
58
59
const
float
cutValue =
60
et >
slopeStart_
(cand) ?
slopeTerm_
(cand) * (et -
slopeStart_
(cand)) +
constTerm_
(cand) :
constTerm_
(cand);
61
return
isolEmHadDepth1 < cutValue +
rhoConstant_
*
rho
;
62
}
63
64
double
GsfEleEmHadD1IsoRhoCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
65
reco::GsfElectronPtr
ele(cand);
66
return
ele->
dr03EcalRecHitSumEt
() + ele->
dr03HcalDepth1TowerSumEt
();
67
}
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
GsfEleEmHadD1IsoRhoCut::constTerm_
EBEECutValues constTerm_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:23
EgHLTOffHistBins_cfi.et
et
Definition:
EgHLTOffHistBins_cfi.py:8
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition:
CutApplicatorWithEventContentBase.h:35
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
GsfEleEmHadD1IsoRhoCut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleEmHadD1IsoRhoCut.cc:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
GsfEleEmHadD1IsoRhoCut::energyRetriever_
EleEnergyRetriever energyRetriever_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:24
edm::Handle< double >
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition:
LeafCandidate.h:146
std
Definition:
JetResolutionObject.h:76
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
GsfEleEmHadD1IsoRhoCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleEmHadD1IsoRhoCut.cc:64
EBEECutValuesT< double >
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
CalibrationSummaryClient_cfi.params
params
Definition:
CalibrationSummaryClient_cfi.py:14
GsfEleEmHadD1IsoRhoCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:26
watchdog.const
const
Definition:
watchdog.py:83
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
HLT_2018_cff.rhoTag
rhoTag
Definition:
HLT_2018_cff.py:13589
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
reco::GsfElectron::dr03HcalDepth1TowerSumEt
float dr03HcalDepth1TowerSumEt() const
Definition:
GsfElectron.h:524
GsfEleEmHadD1IsoRhoCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition:
GsfEleEmHadD1IsoRhoCut.cc:51
CutApplicatorWithEventContentBase.h
edm::Ptr< reco::GsfElectron >
EleEnergyRetriever
Definition:
EleEnergyRetriever.h:7
edm::EventBase
Definition:
EventBase.h:46
GsfEleEmHadD1IsoRhoCut::getEventContent
void getEventContent(const edm::EventBase &) final
Definition:
GsfEleEmHadD1IsoRhoCut.cc:47
GsfElectron.h
EBEECutValues.h
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition:
LeafCandidate.h:123
GsfEleEmHadD1IsoRhoCut::rhoConstant_
float rhoConstant_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:20
GsfEleEmHadD1IsoRhoCut
Definition:
GsfEleEmHadD1IsoRhoCut.cc:6
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition:
CutApplicatorWithEventContentBase.h:40
EleEnergyRetriever.h
GsfEleEmHadD1IsoRhoCut::GsfEleEmHadD1IsoRhoCut
GsfEleEmHadD1IsoRhoCut(const edm::ParameterSet &c)
Definition:
GsfEleEmHadD1IsoRhoCut.cc:31
reco::GsfElectron::dr03EcalRecHitSumEt
float dr03EcalRecHitSumEt() const
Definition:
GsfElectron.h:523
edm::EventBase::getByLabel
bool getByLabel(InputTag const &, Handle< T > &) const
Definition:
EventBase.h:92
edm::InputTag
Definition:
InputTag.h:15
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
GsfEleEmHadD1IsoRhoCut::slopeTerm_
EBEECutValues slopeTerm_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:21
edm::ParameterSet
Definition:
ParameterSet.h:36
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
cand
Definition:
decayParser.h:34
GsfEleEmHadD1IsoRhoCut::slopeStart_
EBEECutValues slopeStart_
Definition:
GsfEleEmHadD1IsoRhoCut.cc:22
GsfEleEmHadD1IsoRhoCut::setConsumes
void setConsumes(edm::ConsumesCollector &) final
Definition:
GsfEleEmHadD1IsoRhoCut.cc:42
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Generated for CMSSW Reference Manual by
1.8.11