RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleTrkPtIsoCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
#include "
DataFormats/EgammaCandidates/interface/GsfElectron.h
"
3
#include "
DataFormats/EgammaCandidates/interface/ConversionFwd.h
"
4
#include "
DataFormats/EgammaCandidates/interface/Conversion.h
"
5
#include "
CommonTools/Egamma/interface/ConversionTools.h
"
6
#include "
RecoEgamma/EgammaTools/interface/EBEECutValues.h
"
7
8
class
GsfEleTrkPtIsoCut
:
public
CutApplicatorBase
{
9
public
:
10
GsfEleTrkPtIsoCut
(
const
edm::ParameterSet
&
c
);
11
12
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
final
;
13
14
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
;
15
16
CandidateType
candidateType
()
const
final {
return
ELECTRON
; }
17
18
private
:
19
EBEECutValues
slopeTerm_
;
20
EBEECutValues
slopeStart_
;
21
EBEECutValues
constTerm_
;
22
bool
useHEEPIso_
;
23
24
edm::Handle<double>
rhoHandle_
;
25
};
26
27
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
GsfEleTrkPtIsoCut
,
"GsfEleTrkPtIsoCut"
);
28
29
GsfEleTrkPtIsoCut::GsfEleTrkPtIsoCut
(
const
edm::ParameterSet
&
params
)
30
:
CutApplicatorBase
(
params
),
31
slopeTerm_(
params
,
"slopeTerm"
),
32
slopeStart_(
params
,
"slopeStart"
),
33
constTerm_(
params
,
"constTerm"
),
34
useHEEPIso_(
params
.getParameter<
bool
>(
"useHEEPIso"
)) {}
35
36
CutApplicatorBase::result_type
GsfEleTrkPtIsoCut::operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
37
const
float
isolTrkPt =
useHEEPIso_
?
cand
->dr03TkSumPtHEEP() :
cand
->dr03TkSumPt();
38
39
const
float
et
=
cand
->et();
40
const
float
cutValue =
41
et
>
slopeStart_
(
cand
) ?
slopeTerm_
(
cand
) * (
et
-
slopeStart_
(
cand
)) +
constTerm_
(
cand
) :
constTerm_
(
cand
);
42
return
isolTrkPt < cutValue;
43
}
44
45
double
GsfEleTrkPtIsoCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
46
reco::GsfElectronPtr
ele(
cand
);
47
return
useHEEPIso_
? ele->
dr03TkSumPtHEEP
() : ele->
dr03TkSumPt
();
48
}
electrons_cff.bool
bool
Definition:
electrons_cff.py:393
reco::GsfElectron::dr03TkSumPt
float dr03TkSumPt() const
Definition:
GsfElectron.h:529
GsfEleTrkPtIsoCut::useHEEPIso_
bool useHEEPIso_
Definition:
GsfEleTrkPtIsoCut.cc:22
GsfEleTrkPtIsoCut::constTerm_
EBEECutValues constTerm_
Definition:
GsfEleTrkPtIsoCut.cc:21
CalibrationSummaryClient_cfi.params
params
Definition:
CalibrationSummaryClient_cfi.py:14
EBEECutValues.h
GsfEleTrkPtIsoCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleTrkPtIsoCut.cc:45
reco::GsfElectron::dr03TkSumPtHEEP
float dr03TkSumPtHEEP() const
Definition:
GsfElectron.h:530
ConversionFwd.h
watchdog.const
const
Definition:
watchdog.py:83
edm::Handle< double >
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
GsfEleTrkPtIsoCut
Definition:
GsfEleTrkPtIsoCut.cc:8
GsfEleTrkPtIsoCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition:
GsfEleTrkPtIsoCut.cc:36
GsfEleTrkPtIsoCut::slopeStart_
EBEECutValues slopeStart_
Definition:
GsfEleTrkPtIsoCut.cc:20
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
GsfEleTrkPtIsoCut::slopeTerm_
EBEECutValues slopeTerm_
Definition:
GsfEleTrkPtIsoCut.cc:19
edm::ParameterSet
Definition:
ParameterSet.h:47
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:32
GsfEleTrkPtIsoCut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleTrkPtIsoCut.cc:16
EgHLTOffHistBins_cfi.et
et
Definition:
EgHLTOffHistBins_cfi.py:8
GsfEleTrkPtIsoCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition:
GsfEleTrkPtIsoCut.cc:24
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
edm::Ptr< reco::GsfElectron >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
EBEECutValuesT< double >
CutApplicatorBase.h
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
GsfEleTrkPtIsoCut::GsfEleTrkPtIsoCut
GsfEleTrkPtIsoCut(const edm::ParameterSet &c)
Definition:
GsfEleTrkPtIsoCut.cc:29
ConversionTools.h
Conversion.h
Generated for CMSSW Reference Manual by
1.8.16