Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
RecoLocalCalo
HGCalRecProducers
plugins
HGCalRecHitMapProducer.cc
Go to the documentation of this file.
1
// user include files
2
#include <unordered_map>
3
4
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
5
#include "
FWCore/Framework/interface/global/EDProducer.h
"
6
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
7
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/ESHandle.h
"
10
#include "
FWCore/Framework/interface/MakerMacros.h
"
11
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
12
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
13
14
#include "
DataFormats/HGCRecHit/interface/HGCRecHitCollections.h
"
15
16
class
HGCalRecHitMapProducer
:
public
edm::global::EDProducer
<> {
17
public
:
18
HGCalRecHitMapProducer
(
const
edm::ParameterSet
&);
19
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
20
21
void
produce
(
edm::StreamID
,
edm::Event
&,
const
edm::EventSetup
&)
const override
;
22
23
private
:
24
const
edm::EDGetTokenT<HGCRecHitCollection>
hits_ee_token_
;
25
const
edm::EDGetTokenT<HGCRecHitCollection>
hits_fh_token_
;
26
const
edm::EDGetTokenT<HGCRecHitCollection>
hits_bh_token_
;
27
};
28
29
DEFINE_FWK_MODULE
(
HGCalRecHitMapProducer
);
30
31
using
DetIdRecHitMap
= std::unordered_map<DetId, const HGCRecHit*>;
32
33
HGCalRecHitMapProducer::HGCalRecHitMapProducer
(
const
edm::ParameterSet
& ps)
34
: hits_ee_token_(consumes<
HGCRecHitCollection
>(ps.getParameter<
edm
::
InputTag
>(
"EEInput"
))),
35
hits_fh_token_(consumes<
HGCRecHitCollection
>(ps.getParameter<
edm
::
InputTag
>(
"FHInput"
))),
36
hits_bh_token_(consumes<
HGCRecHitCollection
>(ps.getParameter<
edm
::
InputTag
>(
"BHInput"
))) {
37
produces<DetIdRecHitMap>();
38
}
39
40
void
HGCalRecHitMapProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
41
edm::ParameterSetDescription
desc
;
42
desc
.add<
edm::InputTag
>(
"EEInput"
, {
"HGCalRecHit"
,
"HGCEERecHits"
});
43
desc
.add<
edm::InputTag
>(
"FHInput"
, {
"HGCalRecHit"
,
"HGCHEFRecHits"
});
44
desc
.add<
edm::InputTag
>(
"BHInput"
, {
"HGCalRecHit"
,
"HGCHEBRecHits"
});
45
descriptions.
add
(
"hgcalRecHitMapProducer"
,
desc
);
46
}
47
48
void
HGCalRecHitMapProducer::produce
(
edm::StreamID
,
edm::Event
& evt,
const
edm::EventSetup
& es)
const
{
49
auto
hitMap = std::make_unique<DetIdRecHitMap>();
50
const
auto
& ee_hits = evt.
get
(
hits_ee_token_
);
51
const
auto
& fh_hits = evt.
get
(
hits_fh_token_
);
52
const
auto
& bh_hits = evt.
get
(
hits_bh_token_
);
53
54
for
(
const
auto
&
hit
: ee_hits) {
55
hitMap->emplace(
hit
.detid(), &
hit
);
56
}
57
58
for
(
const
auto
&
hit
: fh_hits) {
59
hitMap->emplace(
hit
.detid(), &
hit
);
60
}
61
62
for
(
const
auto
&
hit
: bh_hits) {
63
hitMap->emplace(
hit
.detid(), &
hit
);
64
}
65
evt.
put
(
std::move
(hitMap));
66
}
ConfigurationDescriptions.h
edm::StreamID
Definition:
StreamID.h:30
MessageLogger.h
ESHandle.h
edm::EDGetTokenT
Definition:
EDGetToken.h:33
edm
HLT enums.
Definition:
AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::SortedCollection
Definition:
SortedCollection.h:49
HGCalRecHitMapProducer::hits_bh_token_
const edm::EDGetTokenT< HGCRecHitCollection > hits_bh_token_
Definition:
HGCalRecHitMapProducer.cc:26
HGCalRecHitMapProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
HGCalRecHitMapProducer.cc:40
MakerMacros.h
HGCalRecHitMapProducer
Definition:
HGCalRecHitMapProducer.cc:16
DetIdRecHitMap
std::unordered_map< DetId, const HGCRecHit * > DetIdRecHitMap
Definition:
HGCalRecHitMapProducer.cc:31
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
HGCalRecHitMapProducer::hits_fh_token_
const edm::EDGetTokenT< HGCRecHitCollection > hits_fh_token_
Definition:
HGCalRecHitMapProducer.cc:25
ParameterSetDescription.h
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
HGCRecHitCollections.h
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
Event.h:133
edm::EventSetup
Definition:
EventSetup.h:58
HGCalRecHitMapProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition:
HGCalRecHitMapProducer.cc:48
HGCalRecHitMapProducer::HGCalRecHitMapProducer
HGCalRecHitMapProducer(const edm::ParameterSet &)
Definition:
HGCalRecHitMapProducer.cc:33
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Frameworkfwd.h
HGCalRecHitMapProducer::hits_ee_token_
const edm::EDGetTokenT< HGCRecHitCollection > hits_ee_token_
Definition:
HGCalRecHitMapProducer.cc:24
EDProducer.h
edm::Event
Definition:
Event.h:73
edm::Event::get
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition:
Event.h:346
edm::InputTag
Definition:
InputTag.h:15
hit
Definition:
SiStripHitEffFromCalibTree.cc:88
Generated for CMSSW Reference Manual by
1.8.16