Main Page
Namespaces
Classes
Package Documentation
SimCalorimetry
EcalSimAlgos
src
EBShape.cc
Go to the documentation of this file.
1
#include <cmath>
2
3
#include "
SimCalorimetry/EcalSimAlgos/interface/EBShape.h
"
4
5
6
7
void
8
EBShape::fillShape
(
float
&time_interval,
double
&m_thresh,
EcalShapeBase::DVec
& aVec,
const
edm::EventSetup
* es)
const
9
{
10
if
(
m_useDBShape
)
11
{
12
if
(es ==
nullptr
)
13
{
14
throw
cms::Exception
(
"EcalShapeBase:: DB conditions are not available, const edm::EventSetup* es == nullptr "
);
15
}
16
edm::ESHandle<EcalSimPulseShape>
esps;
17
es->
get
<
EcalSimPulseShapeRcd
>().
get
(esps);
18
19
aVec = esps->
barrel_shape
;
20
time_interval = esps->
time_interval
;
21
m_thresh = esps->
barrel_thresh
;
22
23
}
else
// use old hardcoded arrays
24
{
25
m_thresh = 0.00013;
26
time_interval = 1.0;
27
aVec.reserve(500);
28
aVec = {6.94068e-05,
29
-5.03304e-05,
30
-2.13404e-05,
31
6.017e-05,
32
2.01697e-05,
33
0.000114845,
34
2.13998e-05,
35
2.74476e-05,
36
5.2824e-05,
37
8.754e-05,
38
2.95346e-06,
39
-7.58699e-05,
40
-2.72224e-05,
41
3.10997e-06,
42
-3.97771e-05,
43
-1.06916e-05,
44
-0.000113865,
45
6.05044e-05,
46
-5.81202e-05,
47
-6.58974e-06,
48
5.37494e-05,
49
-0.000123729,
50
7.50938e-06,
51
-1.35628e-05,
52
8.33725e-05,
53
3.19299e-05,
54
-3.09232e-05,
55
-7.0086e-05,
56
1.78937e-06,
57
-2.20365e-05,
58
7.68054e-05,
59
-2.5368e-05,
60
5.67291e-06,
61
5.87096e-05,
62
-2.62771e-06,
63
4.31832e-05,
64
8.33616e-06,
65
7.27813e-05,
66
7.6159e-05,
67
-1.60446e-05,
68
-4.12127e-06,
69
-5.93381e-05,
70
1.61444e-05,
71
-5.49559e-05,
72
5.55254e-05,
73
3.32251e-05,
74
-3.15897e-05,
75
7.86588e-05,
76
-2.9704e-05,
77
5.66838e-05,
78
2.85281e-05,
79
-3.02436e-05,
80
-4.16265e-05,
81
-1.63191e-05,
82
6.61193e-05,
83
9.23766e-05,
84
6.68903e-05,
85
-3.20994e-05,
86
0.00011082,
87
-4.07997e-05,
88
-8.29046e-06,
89
-7.42197e-05,
90
-1.64386e-05,
91
1.02508e-05,
92
7.10995e-06,
93
-5.87486e-05,
94
-0.000101201,
95
1.62003e-05,
96
-2.53093e-05,
97
2.65239e-05,
98
-2.68722e-05,
99
-4.02001e-05,
100
5.0674e-05,
101
-1.75884e-05,
102
4.7902e-05,
103
-1.01079e-05,
104
1.08427e-05,
105
-0.000112906,
106
3.33076e-05,
107
0.000181201,
108
0.000426875,
109
0.00114222,
110
0.00237804,
111
0.00541858,
112
0.0089021,
113
0.0149157,
114
0.0231397,
115
0.0344671,
116
0.0471013,
117
0.0625517,
118
0.0857351,
119
0.108561,
120
0.133481,
121
0.163557,
122
0.200243,
123
0.225919,
124
0.269213,
125
0.302929,
126
0.342722,
127
0.378522,
128
0.436563,
129
0.467581,
130
0.510133,
131
0.550063,
132
0.583509,
133
0.619187,
134
0.653245,
135
0.686101,
136
0.721178,
137
0.745129,
138
0.774163,
139
0.799011,
140
0.822177,
141
0.838315,
142
0.858847,
143
0.875559,
144
0.891294,
145
0.90537,
146
0.919617,
147
0.930632,
148
0.936216,
149
0.947739,
150
0.955306,
151
0.961876,
152
0.968124,
153
0.97327,
154
0.977513,
155
0.984885,
156
0.986497,
157
0.990039,
158
0.994798,
159
0.994884,
160
0.99795,
161
0.99834,
162
0.999607,
163
1,
164
0.999047,
165
0.998745,
166
0.999219,
167
0.99814,
168
0.995082,
169
0.992449,
170
0.990418,
171
0.985032,
172
0.982308,
173
0.978696,
174
0.975656,
175
0.971027,
176
0.964811,
177
0.959428,
178
0.95096,
179
0.947428,
180
0.9419,
181
0.933223,
182
0.926482,
183
0.922172,
184
0.912777,
185
0.907388,
186
0.897289,
187
0.891889,
188
0.882056,
189
0.873382,
190
0.865442,
191
0.860032,
192
0.85202,
193
0.841013,
194
0.833802,
195
0.825259,
196
0.815013,
197
0.807465,
198
0.799428,
199
0.792165,
200
0.783088,
201
0.773392,
202
0.764982,
203
0.752174,
204
0.746487,
205
0.737678,
206
0.727396,
207
0.718692,
208
0.712737,
209
0.702738,
210
0.69559,
211
0.684389,
212
0.677989,
213
0.667643,
214
0.659009,
215
0.650217,
216
0.644479,
217
0.636017,
218
0.625257,
219
0.618507,
220
0.609798,
221
0.600097,
222
0.592788,
223
0.584895,
224
0.578228,
225
0.569299,
226
0.560576,
227
0.552404,
228
0.541405,
229
0.536271,
230
0.528734,
231
0.519813,
232
0.512264,
233
0.507001,
234
0.49828,
235
0.492416,
236
0.483181,
237
0.477907,
238
0.469623,
239
0.462528,
240
0.455099,
241
0.45055,
242
0.443576,
243
0.435364,
244
0.429789,
245
0.422724,
246
0.415621,
247
0.409469,
248
0.40401,
249
0.398121,
250
0.391079,
251
0.384414,
252
0.378214,
253
0.369851,
254
0.365966,
255
0.359865,
256
0.353505,
257
0.347899,
258
0.343829,
259
0.337585,
260
0.333089,
261
0.326289,
262
0.322249,
263
0.316079,
264
0.31061,
265
0.305426,
266
0.301885,
267
0.296753,
268
0.290931,
269
0.286877,
270
0.281831,
271
0.276633,
272
0.272283,
273
0.268069,
274
0.26399,
275
0.258457,
276
0.253549,
277
0.249493};
278
279
for
(
unsigned
int
i
( 250 ) ;
i
!= 500 ; ++
i
) aVec.push_back(
exp
(2.39735 - 0.0151053* ((
double
)
i
+1.0)) );
280
}
281
}
EcalShapeBase::m_useDBShape
bool m_useDBShape
Definition:
EcalShapeBase.h:54
mps_fire.i
i
Definition:
mps_fire.py:329
Exception
Definition:
hltDiff.cc:292
EBShape::fillShape
void fillShape(float &time_interval, double &m_thresh, EcalShapeBase::DVec &aVec, const edm::EventSetup *es) const override
Definition:
EBShape.cc:8
EcalSimPulseShape::barrel_shape
std::vector< double > barrel_shape
Definition:
EcalSimPulseShape.h:13
EcalSimPulseShape::time_interval
float time_interval
Definition:
EcalSimPulseShape.h:23
edm::ESHandle
Definition:
DTSurvey.h:22
EcalShapeBase::DVec
std::vector< double > DVec
Definition:
EcalShapeBase.h:28
EcalSimPulseShape::barrel_thresh
double barrel_thresh
Definition:
EcalSimPulseShape.h:20
EcalSimPulseShapeRcd
Definition:
EcalSimPulseShapeRcd.h:5
edm::EventSetup
Definition:
EventSetup.h:54
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:68
EBShape.h
JetChargeProducer_cfi.exp
exp
Definition:
JetChargeProducer_cfi.py:6
Generated for CMSSW Reference Manual by
1.8.11