Main Page
Namespaces
Classes
Package Documentation
RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.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
GsfEleFull5x5SigmaIEtaIEtaWithSatCut
:
public
CutApplicatorWithEventContentBase
{
7
public
:
8
GsfEleFull5x5SigmaIEtaIEtaWithSatCut
(
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
maxSigmaIEtaIEtaCut_
;
23
EBEECutValuesInt
maxNrSatCrysIn5x5Cut_
;
24
edm::Handle<edm::ValueMap<int>
>
nrSatCrysValueMap_
;
25
26
};
27
28
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
29
GsfEleFull5x5SigmaIEtaIEtaWithSatCut
,
30
"GsfEleFull5x5SigmaIEtaIEtaWithSatCut"
);
31
32
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::GsfEleFull5x5SigmaIEtaIEtaWithSatCut
(
const
edm::ParameterSet
& params) :
33
CutApplicatorWithEventContentBase
(params),
34
maxSigmaIEtaIEtaCut_
(params,
"maxSigmaIEtaIEta"
),
35
36
maxNrSatCrysIn5x5Cut_
(params,
"maxNrSatCrysIn5x5"
){
37
contentTags_
.emplace(
"nrSatCrysValueMap"
,params.
getParameter
<
edm::InputTag
>(
"nrSatCrysValueMap"
));
38
}
39
40
void
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::setConsumes
(
edm::ConsumesCollector
& cc) {
41
contentTokens_
.emplace(
"nrSatCrysValueMap"
,cc.
consumes
<
edm::ValueMap<int>
>(
contentTags_
[
"nrSatCrysValueMap"
]));
42
}
43
44
void
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::getEventContent
(
const
edm::EventBase
&
ev
) {
45
ev.
getByLabel
(
contentTags_
[
"nrSatCrysValueMap"
],
nrSatCrysValueMap_
);
46
47
}
48
49
50
CutApplicatorBase::result_type
51
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::
52
operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
53
54
if
((*
nrSatCrysValueMap_
)[cand]>
maxNrSatCrysIn5x5Cut_
(cand))
return
true
;
55
else
return
cand->
full5x5_sigmaIetaIeta
() <
maxSigmaIEtaIEtaCut_
(cand);
56
57
}
58
59
double
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::
60
value
(
const
reco::CandidatePtr
&
cand
)
const
{
61
reco::GsfElectronPtr
ele(cand);
62
return
ele->
full5x5_sigmaIetaIeta
();
63
}
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
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::maxSigmaIEtaIEtaCut_
EBEECutValues maxSigmaIEtaIEtaCut_
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:22
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:48
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::getEventContent
void getEventContent(const edm::EventBase &) override final
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:44
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
GsfEleFull5x5SigmaIEtaIEtaWithSatCut
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:6
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::candidateType
CandidateType candidateType() const override final
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:17
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
EBEECutValuesT< double >
ValueMap.h
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const override final
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:52
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition:
CutApplicatorWithEventContentBase.h:39
reco::GsfElectron::full5x5_sigmaIetaIeta
float full5x5_sigmaIetaIeta() const
Definition:
GsfElectron.h:455
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
CutApplicatorWithEventContentBase.h
edm::Ptr< reco::GsfElectron >
edm::EventBase
Definition:
EventBase.h:44
GsfElectron.h
edm::ValueMap< int >
EBEECutValues.h
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::GsfEleFull5x5SigmaIEtaIEtaWithSatCut
GsfEleFull5x5SigmaIEtaIEtaWithSatCut(const edm::ParameterSet &c)
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:32
edm::EventBase::getByLabel
bool getByLabel(InputTag const &, Handle< T > &) const
Definition:
EventBase.h:89
edm::InputTag
Definition:
InputTag.h:15
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edm::ParameterSet
Definition:
ParameterSet.h:36
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
cand
Definition:
decayParser.h:34
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::maxNrSatCrysIn5x5Cut_
EBEECutValuesInt maxNrSatCrysIn5x5Cut_
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:23
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::value
double value(const reco::CandidatePtr &cand) const override final
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:60
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::nrSatCrysValueMap_
edm::Handle< edm::ValueMap< int > > nrSatCrysValueMap_
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:24
GsfEleFull5x5SigmaIEtaIEtaWithSatCut::setConsumes
void setConsumes(edm::ConsumesCollector &) override final
Definition:
GsfEleFull5x5SigmaIEtaIEtaWithSatCut.cc:40
Generated for CMSSW Reference Manual by
1.8.11