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