CMS 3D CMS Logo

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