Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleFull5x5E2x5OverE5x5Cut.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/EgammaCandidates/interface/ConversionFwd.h
"
4
#include "
DataFormats/EgammaCandidates/interface/Conversion.h
"
5
#include "
RecoEgamma/EgammaTools/interface/ConversionTools.h
"
6
7
#include "
RecoEgamma/ElectronIdentification/interface/EBEECutValues.h
"
8
9
class
GsfEleFull5x5E2x5OverE5x5Cut
:
public
CutApplicatorWithEventContentBase
{
10
public
:
11
GsfEleFull5x5E2x5OverE5x5Cut
(
const
edm::ParameterSet
&
c
);
12
13
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
override
final
;
14
15
void
setConsumes
(
edm::ConsumesCollector
&)
override
final
;
16
void
getEventContent
(
const
edm::EventBase
&)
override
final
;
17
18
CandidateType
candidateType
()
const
override final {
19
return
ELECTRON
;
20
}
21
22
private
:
23
EBEECutValues
minE1x5OverE5x5Cut_
;
24
EBEECutValues
minE2x5OverE5x5Cut_
;
25
26
27
edm::Handle<edm::ValueMap<float>
>
e1x5Handle_
;
28
edm::Handle<edm::ValueMap<float>
>
e2x5Handle_
;
29
edm::Handle<edm::ValueMap<float>
>
e5x5Handle_
;
30
31
constexpr
static
char
e5x5_
[] =
"e5x5"
;
32
constexpr
static
char
e2x5_
[] =
"e2x5"
;
33
constexpr
static
char
e1x5_
[] =
"e1x5"
;
34
};
35
36
constexpr
char
GsfEleFull5x5E2x5OverE5x5Cut::e5x5_
[];
37
constexpr
char
GsfEleFull5x5E2x5OverE5x5Cut::e2x5_
[];
38
constexpr
char
GsfEleFull5x5E2x5OverE5x5Cut::e1x5_
[];
39
40
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
41
GsfEleFull5x5E2x5OverE5x5Cut
,
42
"GsfEleFull5x5E2x5OverE5x5Cut"
);
43
44
GsfEleFull5x5E2x5OverE5x5Cut::GsfEleFull5x5E2x5OverE5x5Cut
(
const
edm::ParameterSet
& params) :
45
CutApplicatorWithEventContentBase
(params),
46
minE1x5OverE5x5Cut_(params,
"minE1x5OverE5x5"
),
47
minE2x5OverE5x5Cut_(params,
"minE2x5OverE5x5"
){
48
edm::InputTag
e5x5Tag = params.
getParameter
<
edm::InputTag
>(
e5x5_
);
49
edm::InputTag
e2x5Tag = params.
getParameter
<
edm::InputTag
>(
e2x5_
);
50
edm::InputTag
e1x5Tag = params.
getParameter
<
edm::InputTag
>(
e1x5_
);
51
contentTags_
.emplace(
e5x5_
,e5x5Tag);
52
contentTags_
.emplace(
e2x5_
,e2x5Tag);
53
contentTags_
.emplace(
e1x5_
,e1x5Tag);
54
}
55
56
void
GsfEleFull5x5E2x5OverE5x5Cut::setConsumes
(
edm::ConsumesCollector
& cc) {
57
auto
e5x5 = cc.
consumes
<
double
>(
contentTags_
[
e5x5_
]);
58
contentTokens_
.emplace(
e5x5_
,e5x5);
59
auto
e2x5 = cc.
consumes
<
double
>(
contentTags_
[
e2x5_
]);
60
contentTokens_
.emplace(
e2x5_
,e2x5);
61
auto
e1x5 = cc.
consumes
<
double
>(
contentTags_
[
e1x5_
]);
62
contentTokens_
.emplace(
e1x5_
,e1x5);
63
}
64
65
void
GsfEleFull5x5E2x5OverE5x5Cut::getEventContent
(
const
edm::EventBase
&
ev
) {
66
ev.
getByLabel
(
contentTags_
[
e5x5_
],
e5x5Handle_
);
67
ev.
getByLabel
(
contentTags_
[
e2x5_
],
e2x5Handle_
);
68
ev.
getByLabel
(
contentTags_
[
e1x5_
],
e1x5Handle_
);
69
}
70
71
CutApplicatorBase::result_type
72
GsfEleFull5x5E2x5OverE5x5Cut::
73
operator()
(
const
reco::GsfElectronPtr
& cand)
const
{
74
75
const
double
e5x5 = (*e5x5Handle_)[cand];
76
const
double
e1x5OverE5x5 = e5x5!=0 ? (*e1x5Handle_)[cand]/e5x5 : 0;
77
const
double
e2x5OverE5x5 = e5x5!=0 ? (*e2x5Handle_)[cand]/e5x5 : 0;
78
79
return
e1x5OverE5x5 >
minE1x5OverE5x5Cut_
(cand) || e2x5OverE5x5 >
minE2x5OverE5x5Cut_
(cand);
80
81
}
GsfEleFull5x5E2x5OverE5x5Cut::e1x5Handle_
edm::Handle< edm::ValueMap< float > > e1x5Handle_
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:27
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition:
ConsumesCollector.h:41
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CutApplicatorWithEventContentBase
Definition:
CutApplicatorWithEventContentBase.h:18
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:48
GsfEleFull5x5E2x5OverE5x5Cut::candidateType
CandidateType candidateType() const overridefinal
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:18
GsfEleFull5x5E2x5OverE5x5Cut::e5x5Handle_
edm::Handle< edm::ValueMap< float > > e5x5Handle_
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:29
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition:
CutApplicatorWithEventContentBase.h:40
GsfEleFull5x5E2x5OverE5x5Cut::setConsumes
void setConsumes(edm::ConsumesCollector &) overridefinal
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:56
GsfEleFull5x5E2x5OverE5x5Cut::e1x5_
static char e1x5_[]
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:33
Conversion.h
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:90
edm::Handle
Definition:
AssociativeIterator.h:47
constexpr
#define constexpr
GsfEleFull5x5E2x5OverE5x5Cut
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:9
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition:
CutApplicatorWithEventContentBase.h:35
GsfEleFull5x5E2x5OverE5x5Cut::GsfEleFull5x5E2x5OverE5x5Cut
GsfEleFull5x5E2x5OverE5x5Cut(const edm::ParameterSet &c)
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:44
GsfEleFull5x5E2x5OverE5x5Cut::operator()
result_type operator()(const reco::GsfElectronPtr &) const overridefinal
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:73
edm::Ptr< reco::GsfElectron >
EBEECutValues
Definition:
EBEECutValues.h:12
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
ConversionTools.h
CutApplicatorWithEventContentBase.h
GsfEleFull5x5E2x5OverE5x5Cut::getEventContent
void getEventContent(const edm::EventBase &) overridefinal
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:65
edm::EventBase
Definition:
EventBase.h:45
GsfElectron.h
EBEECutValues.h
GsfEleFull5x5E2x5OverE5x5Cut::e2x5Handle_
edm::Handle< edm::ValueMap< float > > e2x5Handle_
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:28
compareJSON.const
string const
Definition:
compareJSON.py:14
trackerHits.c
tuple c
Definition:
trackerHits.py:26
ConversionFwd.h
GsfEleFull5x5E2x5OverE5x5Cut::e2x5_
static char e2x5_[]
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:32
edm::EventBase::getByLabel
bool getByLabel(InputTag const &, Handle< T > &) const
Definition:
EventBase.h:87
edm::InputTag
Definition:
InputTag.h:17
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edm::ParameterSet
Definition:
ParameterSet.h:35
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
GsfEleFull5x5E2x5OverE5x5Cut::minE1x5OverE5x5Cut_
EBEECutValues minE1x5OverE5x5Cut_
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:23
GsfEleFull5x5E2x5OverE5x5Cut::e5x5_
static char e5x5_[]
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:31
edm::ConsumesCollector
Definition:
ConsumesCollector.h:32
GsfEleFull5x5E2x5OverE5x5Cut::minE2x5OverE5x5Cut_
EBEECutValues minE2x5OverE5x5Cut_
Definition:
GsfEleFull5x5E2x5OverE5x5Cut.cc:24
Generated for CMSSW Reference Manual by
1.8.5