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
RecoTBCalo
EcalTBHodoscopeReconstructor
src
EcalTBHodoscopeRecInfoProducer.cc
Go to the documentation of this file.
1
#include "
RecoTBCalo/EcalTBHodoscopeReconstructor/interface/EcalTBHodoscopeRecInfoProducer.h
"
2
#include "
TBDataFormats/EcalTBObjects/interface/EcalTBHodoscopeRawInfo.h
"
3
#include "
TBDataFormats/EcalTBObjects/interface/EcalTBHodoscopeRecInfo.h
"
4
#include "
DataFormats/Common/interface/EDCollection.h
"
5
#include "
DataFormats/Common/interface/Handle.h
"
6
#include "
FWCore/Framework/interface/ESHandle.h
"
7
#include "
FWCore/Framework/interface/EventSetup.h
"
8
9
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
10
11
EcalTBHodoscopeRecInfoProducer::EcalTBHodoscopeRecInfoProducer
(
edm::ParameterSet
const
& ps) {
12
rawInfoCollection_
= ps.
getParameter
<
std::string
>(
"rawInfoCollection"
);
13
rawInfoProducer_
= ps.
getParameter
<
std::string
>(
"rawInfoProducer"
);
14
recInfoCollection_
= ps.
getParameter
<
std::string
>(
"recInfoCollection"
);
15
fitMethod_
= ps.
getParameter
<
int
>(
"fitMethod"
);
16
17
// std::vector<double> planeShift_def;
18
// planeShift_def.push_back( -0.333 );
19
// planeShift_def.push_back( -0.333 );
20
// planeShift_def.push_back( -0.333 );
21
// planeShift_def.push_back( -0.333 );
22
std::vector<double>
planeShift
= ps.
getParameter
<std::vector<double> >(
"planeShift"
);
23
24
// std::vector<double> zPosition_def;
25
// zPosition_def.push_back( -0.333 );
26
// zPosition_def.push_back( -0.333 );
27
// zPosition_def.push_back( -0.333 );
28
// zPosition_def.push_back( -0.333 );
29
std::vector<double>
zPosition
= ps.
getParameter
<std::vector<double> >(
"zPosition"
);
30
31
produces<EcalTBHodoscopeRecInfo>(
recInfoCollection_
);
32
33
algo_
=
new
EcalTBHodoscopeRecInfoAlgo
(
fitMethod_
,
planeShift
,
zPosition
);
34
}
35
36
EcalTBHodoscopeRecInfoProducer::~EcalTBHodoscopeRecInfoProducer
() {
delete
algo_
; }
37
38
void
EcalTBHodoscopeRecInfoProducer::produce
(
edm::Event
&
e
,
const
edm::EventSetup
& es) {
39
// Get input
40
edm::Handle<EcalTBHodoscopeRawInfo>
ecalRawHodoscope;
41
const
EcalTBHodoscopeRawInfo
* ecalHodoRawInfo =
nullptr
;
42
//evt.getByLabel( digiProducer_, digiCollection_, pDigis);
43
e
.getByLabel(
rawInfoProducer_
, ecalRawHodoscope);
44
if
(ecalRawHodoscope.
isValid
()) {
45
ecalHodoRawInfo = ecalRawHodoscope.
product
();
46
}
47
48
if
(!ecalHodoRawInfo) {
49
edm::LogError
(
"EcalTBHodoscopeRecInfoError"
) <<
"Error! can't get the product "
<<
rawInfoCollection_
.c_str();
50
return
;
51
}
52
53
if
((*ecalHodoRawInfo).planes() != 4) {
54
edm::LogError
(
"EcalTBHodoscopeRecInfoError"
)
55
<<
"Number of planes different from expected "
<<
rawInfoCollection_
.c_str();
56
return
;
57
}
58
59
// Create empty output
60
61
e
.put(std::make_unique<EcalTBHodoscopeRecInfo>(
algo_
->
reconstruct
(*ecalRawHodoscope)),
recInfoCollection_
);
62
}
EcalTBHodoscopeRecInfoProducer::rawInfoCollection_
std::string rawInfoCollection_
Definition:
EcalTBHodoscopeRecInfoProducer.h:23
Handle.h
MessageLogger.h
edm::Handle::product
T const * product() const
Definition:
Handle.h:70
ESHandle.h
EcalTBHodoscopeRawInfo.h
EcalTBHodoscopeRecInfoAlgo
Definition:
EcalTBHodoscopeRecInfoAlgo.h:11
EcalTBHodoscopeRecInfoProducer.h
EcalTBHodoscopeRecInfoProducer::rawInfoProducer_
std::string rawInfoProducer_
Definition:
EcalTBHodoscopeRecInfoProducer.h:22
EcalTBHodoscopeRecInfoProducer::fitMethod_
int fitMethod_
Definition:
EcalTBHodoscopeRecInfoProducer.h:26
ecal2004TBHodoscopeReconstructor_cfi.planeShift
planeShift
Definition:
ecal2004TBHodoscopeReconstructor_cfi.py:8
edm::Handle
Definition:
AssociativeIterator.h:50
ecal2004TBHodoscopeReconstructor_cfi.zPosition
zPosition
Definition:
ecal2004TBHodoscopeReconstructor_cfi.py:9
EcalTBHodoscopeRecInfoProducer::produce
void produce(edm::Event &e, const edm::EventSetup &es) override
Definition:
EcalTBHodoscopeRecInfoProducer.cc:38
EcalTBHodoscopeRecInfoProducer::EcalTBHodoscopeRecInfoProducer
EcalTBHodoscopeRecInfoProducer(const edm::ParameterSet &ps)
Definition:
EcalTBHodoscopeRecInfoProducer.cc:11
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::LogError
Definition:
MessageLogger.h:183
EcalTBHodoscopeRecInfo.h
EcalTBHodoscopeRawInfo
Definition:
EcalTBHodoscopeRawInfo.h:13
edm::EventSetup
Definition:
EventSetup.h:57
EcalTBHodoscopeRecInfoAlgo::reconstruct
EcalTBHodoscopeRecInfo reconstruct(const EcalTBHodoscopeRawInfo &hodoscopeRawInfo) const
Definition:
EcalTBHodoscopeRecInfoAlgo.cc:97
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
EcalTBHodoscopeRecInfoProducer::algo_
EcalTBHodoscopeRecInfoAlgo * algo_
Definition:
EcalTBHodoscopeRecInfoProducer.h:27
EventSetup.h
EcalTBHodoscopeRecInfoProducer::~EcalTBHodoscopeRecInfoProducer
~EcalTBHodoscopeRecInfoProducer() override
Definition:
EcalTBHodoscopeRecInfoProducer.cc:36
EcalTBHodoscopeRecInfoProducer::recInfoCollection_
std::string recInfoCollection_
Definition:
EcalTBHodoscopeRecInfoProducer.h:24
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:70
edm::Event
Definition:
Event.h:73
EDCollection.h
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16