RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleFull5x5E2x5OverE5x5Cut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
#include "
DataFormats/EgammaCandidates/interface/GsfElectron.h
"
3
#include "
RecoEgamma/EgammaTools/interface/EBEECutValues.h
"
4
5
class
GsfEleFull5x5E2x5OverE5x5Cut
:
public
CutApplicatorBase
{
6
public
:
7
GsfEleFull5x5E2x5OverE5x5Cut
(
const
edm::ParameterSet
&
c
);
8
9
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
final
;
10
11
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
;
12
13
CandidateType
candidateType
()
const
final {
return
ELECTRON
; }
14
15
private
:
16
EBEECutValues
minE1x5OverE5x5Cut_
;
17
EBEECutValues
minE2x5OverE5x5Cut_
;
18
};
19
20
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
GsfEleFull5x5E2x5OverE5x5Cut
,
"GsfEleFull5x5E2x5OverE5x5Cut"
);
21
22
GsfEleFull5x5E2x5OverE5x5Cut::GsfEleFull5x5E2x5OverE5x5Cut
(
const
edm::ParameterSet
&
params
)
23
:
CutApplicatorBase
(
params
),
24
minE1x5OverE5x5Cut_(
params
,
"minE1x5OverE5x5"
),
25
minE2x5OverE5x5Cut_(
params
,
"minE2x5OverE5x5"
) {}
26
27
CutApplicatorBase::result_type
GsfEleFull5x5E2x5OverE5x5Cut::operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
28
const
double
e5x5 =
cand
->full5x5_e5x5();
29
const
double
e2x5OverE5x5 = e5x5 != 0 ?
cand
->full5x5_e2x5Max() / e5x5 : 0;
30
const
double
e1x5OverE5x5 = e5x5 != 0 ?
cand
->full5x5_e1x5() / e5x5 : 0;
31
32
return
e1x5OverE5x5 >
minE1x5OverE5x5Cut_
(
cand
) || e2x5OverE5x5 >
minE2x5OverE5x5Cut_
(
cand
);
33
}
34
35
double
GsfEleFull5x5E2x5OverE5x5Cut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
36
reco::GsfElectronPtr
ele(
cand
);
37
//btw we broke somebodies nice model of assuming every cut is 1D....
38
//what this is returning is fairly meaningless...
39
return
ele->
full5x5_e1x5
() ? ele->
full5x5_e2x5Max
() / ele->
full5x5_e1x5
() : 0.;
40
}
CalibrationSummaryClient_cfi.params
params
Definition:
CalibrationSummaryClient_cfi.py:14
EBEECutValues.h
reco::GsfElectron::full5x5_e2x5Max
float full5x5_e2x5Max() const
Definition:
GsfElectron.h:446
watchdog.const
const
Definition:
watchdog.py:83
GsfEleFull5x5E2x5OverE5x5Cut::minE1x5OverE5x5Cut_
EBEECutValues minE1x5OverE5x5Cut_
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:16
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
GsfEleFull5x5E2x5OverE5x5Cut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:13
GsfEleFull5x5E2x5OverE5x5Cut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:35
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
edm::ParameterSet
Definition:
ParameterSet.h:36
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:34
reco::GsfElectron::full5x5_e1x5
float full5x5_e1x5() const
Definition:
GsfElectron.h:445
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
edm::Ptr< reco::GsfElectron >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
GsfEleFull5x5E2x5OverE5x5Cut::minE2x5OverE5x5Cut_
EBEECutValues minE2x5OverE5x5Cut_
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:17
GsfEleFull5x5E2x5OverE5x5Cut::GsfEleFull5x5E2x5OverE5x5Cut
GsfEleFull5x5E2x5OverE5x5Cut(const edm::ParameterSet &c)
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:22
EBEECutValuesT< double >
GsfEleFull5x5E2x5OverE5x5Cut
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:5
CutApplicatorBase.h
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
GsfEleFull5x5E2x5OverE5x5Cut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:27
Generated for CMSSW Reference Manual by
1.8.16