Main Page
Namespaces
Classes
Package Documentation
RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleFull5x5E2x5OverE5x5WithSatCut.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/Common/interface/ValueMap.h
"
4
#include "
RecoEgamma/ElectronIdentification/interface/EBEECutValues.h
"
5
6
class
GsfEleFull5x5E2x5OverE5x5WithSatCut
:
public
CutApplicatorWithEventContentBase
{
7
public
:
8
GsfEleFull5x5E2x5OverE5x5WithSatCut
(
const
edm::ParameterSet
&
c
);
9
10
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
override
final
;
11
12
void
setConsumes
(
edm::ConsumesCollector
&)
override
final
;
13
void
getEventContent
(
const
edm::EventBase
&)
override
final
;
14
15
double
value
(
const
reco::CandidatePtr
&
cand
)
const
override
final
;
16
17
CandidateType
candidateType
() const override final {
18
return
ELECTRON
;
19
}
20
21
private
:
22
EBEECutValues
minE1x5OverE5x5Cut_
;
23
EBEECutValues
minE2x5OverE5x5Cut_
;
24
EBEECutValuesInt
maxNrSatCrysIn5x5Cut_
;
25
edm::Handle<edm::ValueMap<int>
>
nrSatCrysValueMap_
;
26
27
};
28
29
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
30
GsfEleFull5x5E2x5OverE5x5WithSatCut
,
31
"GsfEleFull5x5E2x5OverE5x5WithSatCut"
);
32
33
GsfEleFull5x5E2x5OverE5x5WithSatCut::GsfEleFull5x5E2x5OverE5x5WithSatCut
(
const
edm::ParameterSet
& params) :
34
CutApplicatorWithEventContentBase
(params),
35
minE1x5OverE5x5Cut_
(params,
"minE1x5OverE5x5"
),
36
minE2x5OverE5x5Cut_
(params,
"minE2x5OverE5x5"
),
37
maxNrSatCrysIn5x5Cut_
(params,
"maxNrSatCrysIn5x5"
){
38
contentTags_
.emplace(
"nrSatCrysValueMap"
,params.
getParameter
<
edm::InputTag
>(
"nrSatCrysValueMap"
));
39
}
40
41
void
GsfEleFull5x5E2x5OverE5x5WithSatCut::setConsumes
(
edm::ConsumesCollector
& cc) {
42
contentTokens_
.emplace(
"nrSatCrysValueMap"
,cc.
consumes
<
edm::ValueMap<int>
>(
contentTags_
[
"nrSatCrysValueMap"
]));
43
}
44
45
void
GsfEleFull5x5E2x5OverE5x5WithSatCut::getEventContent
(
const
edm::EventBase
&
ev
) {
46
ev.
getByLabel
(
contentTags_
[
"nrSatCrysValueMap"
],
nrSatCrysValueMap_
);
47
48
}
49
50
51
CutApplicatorBase::result_type
52
GsfEleFull5x5E2x5OverE5x5WithSatCut::
53
operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
54
55
if
((*
nrSatCrysValueMap_
)[cand]>
maxNrSatCrysIn5x5Cut_
(cand))
return
true
;
56
57
const
double
e5x5
= cand->
full5x5_e5x5
();
58
const
double
e2x5OverE5x5 = e5x5!=0 ? cand->
full5x5_e2x5Max
()/e5x5 : 0;
59
const
double
e1x5OverE5x5 = e5x5!=0 ? cand->
full5x5_e1x5
()/e5x5 : 0;
60
61
return
e1x5OverE5x5 >
minE1x5OverE5x5Cut_
(cand) || e2x5OverE5x5 >
minE2x5OverE5x5Cut_
(cand);
62
63
}
64
65
double
GsfEleFull5x5E2x5OverE5x5WithSatCut::
66
value
(
const
reco::CandidatePtr
&
cand
)
const
{
67
reco::GsfElectronPtr
ele(cand);
68
//btw we broke somebodies nice model of assuming every cut is 1D....
69
//what this is returning is fairly meaningless...
70
return
ele->
full5x5_e1x5
() ? ele->
full5x5_e2x5Max
()/ele->
full5x5_e1x5
() : 0.;
71
}
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition:
ConsumesCollector.h:52
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CutApplicatorWithEventContentBase
Definition:
CutApplicatorWithEventContentBase.h:19
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:48
reco::GsfElectron::full5x5_e5x5
float full5x5_e5x5() const
Definition:
GsfElectron.h:459
reco::GsfElectron::full5x5_e1x5
float full5x5_e1x5() const
Definition:
GsfElectron.h:457
GsfEleFull5x5E2x5OverE5x5WithSatCut::getEventContent
void getEventContent(const edm::EventBase &) override final
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:45
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition:
CutApplicatorWithEventContentBase.h:44
EnergyCorrector.c
c
Definition:
EnergyCorrector.py:43
edm::Handle
Definition:
AssociativeIterator.h:47
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
GsfEleFull5x5E2x5OverE5x5WithSatCut::setConsumes
void setConsumes(edm::ConsumesCollector &) override final
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:41
EBEECutValuesT< double >
ValueMap.h
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition:
CutApplicatorWithEventContentBase.h:39
GsfEleFull5x5E2x5OverE5x5WithSatCut::candidateType
CandidateType candidateType() const override final
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:17
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
GsfEleFull5x5E2x5OverE5x5WithSatCut::minE2x5OverE5x5Cut_
EBEECutValues minE2x5OverE5x5Cut_
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:23
GsfEleFull5x5E2x5OverE5x5WithSatCut::minE1x5OverE5x5Cut_
EBEECutValues minE1x5OverE5x5Cut_
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:22
CutApplicatorWithEventContentBase.h
edm::Ptr< reco::GsfElectron >
GsfEleFull5x5E2x5OverE5x5WithSatCut::maxNrSatCrysIn5x5Cut_
EBEECutValuesInt maxNrSatCrysIn5x5Cut_
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:24
edm::EventBase
Definition:
EventBase.h:46
GsfElectron.h
edm::ValueMap< int >
EBEECutValues.h
GsfEleFull5x5E2x5OverE5x5WithSatCut::value
double value(const reco::CandidatePtr &cand) const override final
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:66
reco::GsfElectron::full5x5_e2x5Max
float full5x5_e2x5Max() const
Definition:
GsfElectron.h:458
GsfEleFull5x5E2x5OverE5x5WithSatCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const override final
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:53
heepElectronID_HEEPV50_CSA14_25ns_cff.e5x5
e5x5
Definition:
heepElectronID_HEEPV50_CSA14_25ns_cff.py:55
edm::EventBase::getByLabel
bool getByLabel(InputTag const &, Handle< T > &) const
Definition:
EventBase.h:94
edm::InputTag
Definition:
InputTag.h:15
GsfEleFull5x5E2x5OverE5x5WithSatCut
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:6
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edm::ParameterSet
Definition:
ParameterSet.h:36
GsfEleFull5x5E2x5OverE5x5WithSatCut::nrSatCrysValueMap_
edm::Handle< edm::ValueMap< int > > nrSatCrysValueMap_
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:25
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
cand
Definition:
decayParser.h:34
GsfEleFull5x5E2x5OverE5x5WithSatCut::GsfEleFull5x5E2x5OverE5x5WithSatCut
GsfEleFull5x5E2x5OverE5x5WithSatCut(const edm::ParameterSet &c)
Definition:
GsfEleFull5x5E2x5OverE5x5WithSatCut.cc:33
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Generated for CMSSW Reference Manual by
1.8.11