CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
HcalSiPM Class Reference

A general implementation for the response of a SiPM. More...

#include <HcalSiPM.h>

Public Member Functions

int getNCells () const
 
 HcalSiPM (int nCells=1)
 
virtual int hitCells (int photons, int integral=0) const
 
void initRandomEngine (CLHEP::HepRandomEngine &engine)
 
void setNCells (int nCells)
 
virtual ~HcalSiPM ()
 

Protected Member Functions

void defaultErrInit ()
 
virtual double errOnX (double x, double prehit=0.) const
 
void getBeforeAndAfter (double val, int &before, int &after, const std::vector< double > &vec) const
 

Protected Attributes

int theCellCount
 
std::vector< std::vector
< double > > 
theErrSamples
 
std::vector< double > thePrehitSamples
 
CLHEP::RandGaussQ * theRndGauss
 
std::vector< double > theXSamples
 

Detailed Description

A general implementation for the response of a SiPM.

Definition at line 17 of file HcalSiPM.h.

Constructor & Destructor Documentation

HcalSiPM::HcalSiPM ( int  nCells = 1)

Definition at line 9 of file HcalSiPM.cc.

References defaultErrInit(), and theCellCount.

9  :
10  theCellCount(nCells), theRndGauss(0) {
11 
12  assert(theCellCount>0);
13 
15 }
int theCellCount
Definition: HcalSiPM.h:34
void defaultErrInit()
Definition: HcalSiPM.cc:108
CLHEP::RandGaussQ * theRndGauss
Definition: HcalSiPM.h:35
HcalSiPM::~HcalSiPM ( )
virtual

Definition at line 17 of file HcalSiPM.cc.

References theRndGauss.

17  {
18  delete theRndGauss;
19 }
CLHEP::RandGaussQ * theRndGauss
Definition: HcalSiPM.h:35

Member Function Documentation

void HcalSiPM::defaultErrInit ( )
protected

Definition at line 108 of file HcalSiPM.cc.

References alignCSCRings::e, i, groupFilesInBlocks::temp, theErrSamples, thePrehitSamples, and theXSamples.

Referenced by HcalSiPM().

108  {
109  //load up values for the interpolation for the errs on x used to generate
110  //the number of photons. These were produced from a toy SiPM model.
111  theXSamples.clear();
112  thePrehitSamples.clear();
113  theErrSamples.clear();
114 
115  theXSamples.push_back(7.14286e-05);
116  theXSamples.push_back(0.000142857);
117  theXSamples.push_back(0.000428571);
118  theXSamples.push_back(0.00107143);
119  theXSamples.push_back(0.00221429);
120  theXSamples.push_back(0.004);
121  theXSamples.push_back(0.00657143);
122  theXSamples.push_back(0.0100714);
123  theXSamples.push_back(0.0146429);
124  theXSamples.push_back(0.0204286);
125  theXSamples.push_back(0.0275714);
126  theXSamples.push_back(0.0362143);
127  theXSamples.push_back(0.0465);
128  theXSamples.push_back(0.0585714);
129  theXSamples.push_back(0.0725714);
130  theXSamples.push_back(0.0886429);
131  theXSamples.push_back(0.106929);
132  theXSamples.push_back(0.127571);
133  theXSamples.push_back(0.150714);
134  theXSamples.push_back(0.1765);
135  theXSamples.push_back(0.205071);
136  theXSamples.push_back(0.236571);
137  theXSamples.push_back(0.271143);
138  theXSamples.push_back(0.308929);
139  theXSamples.push_back(0.350071);
140  theXSamples.push_back(0.394714);
141  theXSamples.push_back(0.443);
142  theXSamples.push_back(0.495071);
143  theXSamples.push_back(0.551071);
144  theXSamples.push_back(0.611143);
145  theXSamples.push_back(0.675429);
146  theXSamples.push_back(0.744071);
147  theXSamples.push_back(0.817214);
148  theXSamples.push_back(0.895);
149  theXSamples.push_back(0.977571);
150  theXSamples.push_back(1.06507);
151  theXSamples.push_back(1.15764);
152  theXSamples.push_back(1.25543);
153  theXSamples.push_back(1.35857);
154  theXSamples.push_back(1.46721);
155  theXSamples.push_back(1.5815);
156  theXSamples.push_back(1.70157);
157  theXSamples.push_back(1.82757);
158  theXSamples.push_back(1.95964);
159  theXSamples.push_back(2.09793);
160  theXSamples.push_back(2.24257);
161  theXSamples.push_back(2.39371);
162  theXSamples.push_back(2.5515);
163  theXSamples.push_back(2.71607);
164  theXSamples.push_back(2.88757);
165  theXSamples.push_back(3.06614);
166  theXSamples.push_back(3.25193);
167  theXSamples.push_back(3.44507);
168  theXSamples.push_back(3.64571);
169  theXSamples.push_back(3.854);
170  theXSamples.push_back(4.07007);
171  theXSamples.push_back(4.29407);
172  theXSamples.push_back(4.52614);
173  theXSamples.push_back(4.76643);
174  theXSamples.push_back(5.01507);
175  theXSamples.push_back(5.27221);
176  theXSamples.push_back(5.538);
177  theXSamples.push_back(5.81257);
178  theXSamples.push_back(6.09607);
179  theXSamples.push_back(6.38864);
180  theXSamples.push_back(6.69043);
181  theXSamples.push_back(7.00157);
182  theXSamples.push_back(7.32221);
183  theXSamples.push_back(7.6525);
184  theXSamples.push_back(7.99257);
185  theXSamples.push_back(8.34257);
186  theXSamples.push_back(8.70264);
187  theXSamples.push_back(9.07293);
188  theXSamples.push_back(9.45357);
189  theXSamples.push_back(9.84471);
190  theXSamples.push_back(10.2465);
191 
192  for(int i=0; i<16; i++)
193  thePrehitSamples.push_back(i*0.02);
194 
195  vector<double> temp;
196 
197  temp.push_back(0);
198  temp.push_back(0);
199  temp.push_back(0);
200  temp.push_back(8.40058e-06);
201  temp.push_back(1.17956e-05);
202  temp.push_back(2.16323e-05);
203  temp.push_back(3.82308e-05);
204  temp.push_back(6.09053e-05);
205  temp.push_back(8.38503e-05);
206  temp.push_back(0.000119927);
207  temp.push_back(0.000162094);
208  temp.push_back(0.000214873);
209  temp.push_back(0.000263888);
210  temp.push_back(0.000358384);
211  temp.push_back(0.000405752);
212  temp.push_back(0.0004813);
213  temp.push_back(0.000578313);
214  temp.push_back(0.000708949);
215  temp.push_back(0.000806313);
216  temp.push_back(0.000947174);
217  temp.push_back(0.00103474);
218  temp.push_back(0.00117471);
219  temp.push_back(0.00128605);
220  temp.push_back(0.00137934);
221  temp.push_back(0.00154853);
222  temp.push_back(0.00177649);
223  temp.push_back(0.00183272);
224  temp.push_back(0.00186753);
225  temp.push_back(0.0021082);
226  temp.push_back(0.00224273);
227  temp.push_back(0.00230361);
228  temp.push_back(0.00237872);
229  temp.push_back(0.00245845);
230  temp.push_back(0.00265224);
231  temp.push_back(0.00271459);
232  temp.push_back(0.00256564);
233  temp.push_back(0.00266094);
234  temp.push_back(0.00280213);
235  temp.push_back(0.00267646);
236  temp.push_back(0.00263196);
237  temp.push_back(0.00256547);
238  temp.push_back(0.00248559);
239  temp.push_back(0.00254747);
240  temp.push_back(0.00246776);
241  temp.push_back(0.0024417);
242  temp.push_back(0.00233673);
243  temp.push_back(0.00221526);
244  temp.push_back(0.00212567);
245  temp.push_back(0.00179446);
246  temp.push_back(0.00174539);
247  temp.push_back(0.00163708);
248  temp.push_back(0.00152897);
249  temp.push_back(0.00137436);
250  temp.push_back(0.0012264);
251  temp.push_back(0.00115666);
252  temp.push_back(0.00104865);
253  temp.push_back(0.000931932);
254  temp.push_back(0.000867489);
255  temp.push_back(0.000773467);
256  temp.push_back(0.000659164);
257  temp.push_back(0.00060111);
258  temp.push_back(0.00054868);
259  temp.push_back(0.000450312);
260  temp.push_back(0.000393679);
261  temp.push_back(0.000341696);
262  temp.push_back(0.000305829);
263  temp.push_back(0.000238913);
264  temp.push_back(0.000216915);
265  temp.push_back(0.000181357);
266  temp.push_back(0.000164413);
267  temp.push_back(0.000133342);
268  temp.push_back(0.000113031);
269  temp.push_back(9.45459e-05);
270  temp.push_back(7.48834e-05);
271  temp.push_back(5.68479e-05);
272  temp.push_back(4.7456e-05);
273  theErrSamples.push_back(temp);
274  temp.clear();
275 
276  temp.push_back(1.07019e-05);
277  temp.push_back(1.4297e-05);
278  temp.push_back(2.47542e-05);
279  temp.push_back(3.98772e-05);
280  temp.push_back(6.1143e-05);
281  temp.push_back(7.55069e-05);
282  temp.push_back(0.000101314);
283  temp.push_back(0.000126813);
284  temp.push_back(0.000169132);
285  temp.push_back(0.00022141);
286  temp.push_back(0.000261971);
287  temp.push_back(0.000337033);
288  temp.push_back(0.000353671);
289  temp.push_back(0.000455462);
290  temp.push_back(0.000529259);
291  temp.push_back(0.00065141);
292  temp.push_back(0.0007213);
293  temp.push_back(0.000755735);
294  temp.push_back(0.000905117);
295  temp.push_back(0.000983389);
296  temp.push_back(0.00117113);
297  temp.push_back(0.00123377);
298  temp.push_back(0.00140575);
299  temp.push_back(0.0014624);
300  temp.push_back(0.00158725);
301  temp.push_back(0.0017951);
302  temp.push_back(0.0019545);
303  temp.push_back(0.00203318);
304  temp.push_back(0.00228151);
305  temp.push_back(0.00233437);
306  temp.push_back(0.00236975);
307  temp.push_back(0.00248279);
308  temp.push_back(0.00257292);
309  temp.push_back(0.00265839);
310  temp.push_back(0.00291408);
311  temp.push_back(0.00287581);
312  temp.push_back(0.0027742);
313  temp.push_back(0.0028192);
314  temp.push_back(0.00290722);
315  temp.push_back(0.00290954);
316  temp.push_back(0.00289248);
317  temp.push_back(0.0028919);
318  temp.push_back(0.00274249);
319  temp.push_back(0.00275067);
320  temp.push_back(0.00254015);
321  temp.push_back(0.00263388);
322  temp.push_back(0.00246535);
323  temp.push_back(0.00230695);
324  temp.push_back(0.00219084);
325  temp.push_back(0.00201822);
326  temp.push_back(0.00195889);
327  temp.push_back(0.00191163);
328  temp.push_back(0.00195144);
329  temp.push_back(0.0017406);
330  temp.push_back(0.00171877);
331  temp.push_back(0.00161755);
332  temp.push_back(0.00161152);
333  temp.push_back(0.00142289);
334  temp.push_back(0.00142294);
335  temp.push_back(0.00131059);
336  temp.push_back(0.00131986);
337  temp.push_back(0.00130397);
338  temp.push_back(0.00131082);
339  temp.push_back(0.00127312);
340  temp.push_back(0.00127991);
341  temp.push_back(0.00125962);
342  temp.push_back(0.00123696);
343  temp.push_back(0.00127488);
344  temp.push_back(0.0012194);
345  temp.push_back(0.00124351);
346  temp.push_back(0.00130209);
347  temp.push_back(0.00123718);
348  temp.push_back(0.00126401);
349  temp.push_back(0.0012762);
350  temp.push_back(0.00118605);
351  temp.push_back(0.00121322);
352  theErrSamples.push_back(temp);
353  temp.clear();
354 
355  temp.push_back(1.52753e-05);
356  temp.push_back(1.9252e-05);
357  temp.push_back(3.51239e-05);
358  temp.push_back(5.42772e-05);
359  temp.push_back(8.42695e-05);
360  temp.push_back(0.000112201);
361  temp.push_back(0.000147315);
362  temp.push_back(0.000181674);
363  temp.push_back(0.000224435);
364  temp.push_back(0.000284745);
365  temp.push_back(0.000327223);
366  temp.push_back(0.000395938);
367  temp.push_back(0.000472805);
368  temp.push_back(0.000519986);
369  temp.push_back(0.000635296);
370  temp.push_back(0.000669197);
371  temp.push_back(0.000775362);
372  temp.push_back(0.000874534);
373  temp.push_back(0.00102977);
374  temp.push_back(0.00113617);
375  temp.push_back(0.00121311);
376  temp.push_back(0.00141158);
377  temp.push_back(0.00154837);
378  temp.push_back(0.00169857);
379  temp.push_back(0.00188519);
380  temp.push_back(0.00191032);
381  temp.push_back(0.00206575);
382  temp.push_back(0.00222722);
383  temp.push_back(0.00227325);
384  temp.push_back(0.00245166);
385  temp.push_back(0.00259628);
386  temp.push_back(0.00249795);
387  temp.push_back(0.00272387);
388  temp.push_back(0.00297299);
389  temp.push_back(0.0030973);
390  temp.push_back(0.00299177);
391  temp.push_back(0.00288901);
392  temp.push_back(0.00304009);
393  temp.push_back(0.00300757);
394  temp.push_back(0.003216);
395  temp.push_back(0.00301877);
396  temp.push_back(0.00305196);
397  temp.push_back(0.00305521);
398  temp.push_back(0.00264599);
399  temp.push_back(0.00289825);
400  temp.push_back(0.00273878);
401  temp.push_back(0.0028623);
402  temp.push_back(0.00262132);
403  temp.push_back(0.00244983);
404  temp.push_back(0.00238771);
405  temp.push_back(0.00241464);
406  temp.push_back(0.0022464);
407  temp.push_back(0.00216141);
408  temp.push_back(0.00216927);
409  temp.push_back(0.00202911);
410  temp.push_back(0.00201579);
411  temp.push_back(0.00206435);
412  temp.push_back(0.00189058);
413  temp.push_back(0.0019032);
414  temp.push_back(0.00180546);
415  temp.push_back(0.00181397);
416  temp.push_back(0.00177982);
417  temp.push_back(0.00169705);
418  temp.push_back(0.00175611);
419  temp.push_back(0.00183977);
420  temp.push_back(0.00181481);
421  temp.push_back(0.0017491);
422  temp.push_back(0.00167498);
423  temp.push_back(0.00176056);
424  temp.push_back(0.00168206);
425  temp.push_back(0.00178997);
426  temp.push_back(0.00160131);
427  temp.push_back(0.00175127);
428  temp.push_back(0.00175144);
429  temp.push_back(0.00172983);
430  temp.push_back(0.00176049);
431  theErrSamples.push_back(temp);
432  temp.clear();
433 
434  temp.push_back(1.56003e-05);
435  temp.push_back(2.56961e-05);
436  temp.push_back(3.98157e-05);
437  temp.push_back(7.51062e-05);
438  temp.push_back(0.000104808);
439  temp.push_back(0.000137126);
440  temp.push_back(0.000181945);
441  temp.push_back(0.00023428);
442  temp.push_back(0.000276685);
443  temp.push_back(0.000340639);
444  temp.push_back(0.000365219);
445  temp.push_back(0.000455067);
446  temp.push_back(0.000517277);
447  temp.push_back(0.000653087);
448  temp.push_back(0.000704082);
449  temp.push_back(0.00081798);
450  temp.push_back(0.000919737);
451  temp.push_back(0.000997528);
452  temp.push_back(0.00110852);
453  temp.push_back(0.00127015);
454  temp.push_back(0.00135952);
455  temp.push_back(0.00157116);
456  temp.push_back(0.00169714);
457  temp.push_back(0.00181507);
458  temp.push_back(0.00188281);
459  temp.push_back(0.00187945);
460  temp.push_back(0.00224784);
461  temp.push_back(0.00234832);
462  temp.push_back(0.00246759);
463  temp.push_back(0.00258435);
464  temp.push_back(0.00287211);
465  temp.push_back(0.00282387);
466  temp.push_back(0.00301207);
467  temp.push_back(0.00301706);
468  temp.push_back(0.00314772);
469  temp.push_back(0.00313356);
470  temp.push_back(0.00330207);
471  temp.push_back(0.00321868);
472  temp.push_back(0.00340633);
473  temp.push_back(0.00316687);
474  temp.push_back(0.0030367);
475  temp.push_back(0.00346355);
476  temp.push_back(0.00308358);
477  temp.push_back(0.00313356);
478  temp.push_back(0.00322158);
479  temp.push_back(0.00286642);
480  temp.push_back(0.0030063);
481  temp.push_back(0.0028074);
482  temp.push_back(0.00276659);
483  temp.push_back(0.00284753);
484  temp.push_back(0.00260215);
485  temp.push_back(0.00256294);
486  temp.push_back(0.00264208);
487  temp.push_back(0.00247397);
488  temp.push_back(0.00249761);
489  temp.push_back(0.00232896);
490  temp.push_back(0.00237722);
491  temp.push_back(0.00223927);
492  temp.push_back(0.00218478);
493  temp.push_back(0.00219469);
494  temp.push_back(0.00223608);
495  temp.push_back(0.00225412);
496  temp.push_back(0.00218023);
497  temp.push_back(0.00223298);
498  temp.push_back(0.0021489);
499  temp.push_back(0.00216245);
500  temp.push_back(0.00222762);
501  temp.push_back(0.0021608);
502  temp.push_back(0.00226409);
503  temp.push_back(0.00215114);
504  temp.push_back(0.00209354);
505  temp.push_back(0.00220478);
506  temp.push_back(0.00212817);
507  temp.push_back(0.00216157);
508  temp.push_back(0.00210899);
509  temp.push_back(0.00221498);
510  theErrSamples.push_back(temp);
511  temp.clear();
512 
513  temp.push_back(1.98294e-05);
514  temp.push_back(2.74883e-05);
515  temp.push_back(4.97341e-05);
516  temp.push_back(7.8167e-05);
517  temp.push_back(0.000115158);
518  temp.push_back(0.000159637);
519  temp.push_back(0.000198413);
520  temp.push_back(0.000249918);
521  temp.push_back(0.000307694);
522  temp.push_back(0.00037631);
523  temp.push_back(0.000420037);
524  temp.push_back(0.000530557);
525  temp.push_back(0.000574406);
526  temp.push_back(0.000678883);
527  temp.push_back(0.000783538);
528  temp.push_back(0.000828001);
529  temp.push_back(0.000945383);
530  temp.push_back(0.0010672);
531  temp.push_back(0.00119183);
532  temp.push_back(0.00134696);
533  temp.push_back(0.00155348);
534  temp.push_back(0.00167101);
535  temp.push_back(0.00181066);
536  temp.push_back(0.00187759);
537  temp.push_back(0.00199899);
538  temp.push_back(0.00225269);
539  temp.push_back(0.0023458);
540  temp.push_back(0.00253072);
541  temp.push_back(0.00270998);
542  temp.push_back(0.00263773);
543  temp.push_back(0.00294804);
544  temp.push_back(0.00294624);
545  temp.push_back(0.00321668);
546  temp.push_back(0.00332147);
547  temp.push_back(0.00334766);
548  temp.push_back(0.00330149);
549  temp.push_back(0.00340882);
550  temp.push_back(0.00347742);
551  temp.push_back(0.00352589);
552  temp.push_back(0.0035523);
553  temp.push_back(0.0035411);
554  temp.push_back(0.00340469);
555  temp.push_back(0.00335693);
556  temp.push_back(0.00345872);
557  temp.push_back(0.00316091);
558  temp.push_back(0.0031948);
559  temp.push_back(0.00307664);
560  temp.push_back(0.00320621);
561  temp.push_back(0.00304138);
562  temp.push_back(0.00299107);
563  temp.push_back(0.00281006);
564  temp.push_back(0.00278658);
565  temp.push_back(0.0028095);
566  temp.push_back(0.00268299);
567  temp.push_back(0.0027215);
568  temp.push_back(0.00264144);
569  temp.push_back(0.00260714);
570  temp.push_back(0.00255874);
571  temp.push_back(0.00266137);
572  temp.push_back(0.00248823);
573  temp.push_back(0.0026194);
574  temp.push_back(0.0026251);
575  temp.push_back(0.00245108);
576  temp.push_back(0.00254617);
577  temp.push_back(0.00264651);
578  temp.push_back(0.00247705);
579  temp.push_back(0.00252758);
580  temp.push_back(0.00262686);
581  temp.push_back(0.00248693);
582  temp.push_back(0.00254178);
583  temp.push_back(0.00258846);
584  temp.push_back(0.0025353);
585  temp.push_back(0.00240568);
586  temp.push_back(0.00250232);
587  temp.push_back(0.00251452);
588  temp.push_back(0.00258121);
589  theErrSamples.push_back(temp);
590  temp.clear();
591 
592  temp.push_back(2.362e-05);
593  temp.push_back(3.24457e-05);
594  temp.push_back(5.93625e-05);
595  temp.push_back(9.71924e-05);
596  temp.push_back(0.000126279);
597  temp.push_back(0.000176152);
598  temp.push_back(0.000224722);
599  temp.push_back(0.000290262);
600  temp.push_back(0.000351171);
601  temp.push_back(0.000439513);
602  temp.push_back(0.000497545);
603  temp.push_back(0.000596431);
604  temp.push_back(0.000686665);
605  temp.push_back(0.000716486);
606  temp.push_back(0.000835977);
607  temp.push_back(0.000943229);
608  temp.push_back(0.00104521);
609  temp.push_back(0.00120528);
610  temp.push_back(0.00140133);
611  temp.push_back(0.00144132);
612  temp.push_back(0.00164603);
613  temp.push_back(0.00179182);
614  temp.push_back(0.00188172);
615  temp.push_back(0.00203418);
616  temp.push_back(0.00224695);
617  temp.push_back(0.00224972);
618  temp.push_back(0.00259959);
619  temp.push_back(0.00249426);
620  temp.push_back(0.00280589);
621  temp.push_back(0.00286528);
622  temp.push_back(0.00309813);
623  temp.push_back(0.00321952);
624  temp.push_back(0.00324915);
625  temp.push_back(0.00312759);
626  temp.push_back(0.00338569);
627  temp.push_back(0.00351915);
628  temp.push_back(0.00336895);
629  temp.push_back(0.00358675);
630  temp.push_back(0.00361005);
631  temp.push_back(0.00356783);
632  temp.push_back(0.00381571);
633  temp.push_back(0.00358167);
634  temp.push_back(0.00355341);
635  temp.push_back(0.00369961);
636  temp.push_back(0.00345098);
637  temp.push_back(0.00345749);
638  temp.push_back(0.00366643);
639  temp.push_back(0.00328805);
640  temp.push_back(0.00317392);
641  temp.push_back(0.00325794);
642  temp.push_back(0.00325624);
643  temp.push_back(0.00298589);
644  temp.push_back(0.00313121);
645  temp.push_back(0.00307129);
646  temp.push_back(0.00303754);
647  temp.push_back(0.00299004);
648  temp.push_back(0.00283794);
649  temp.push_back(0.0029663);
650  temp.push_back(0.00278505);
651  temp.push_back(0.00294565);
652  temp.push_back(0.00295431);
653  temp.push_back(0.0029553);
654  temp.push_back(0.0027788);
655  temp.push_back(0.00272655);
656  temp.push_back(0.00267875);
657  temp.push_back(0.00288197);
658  temp.push_back(0.00284249);
659  temp.push_back(0.00281758);
660  temp.push_back(0.00285672);
661  temp.push_back(0.00260368);
662  temp.push_back(0.0027489);
663  temp.push_back(0.00270647);
664  temp.push_back(0.00300406);
665  temp.push_back(0.00298123);
666  temp.push_back(0.00284949);
667  temp.push_back(0.00275038);
668  theErrSamples.push_back(temp);
669  temp.clear();
670 
671  temp.push_back(2.62119e-05);
672  temp.push_back(4.06637e-05);
673  temp.push_back(6.45721e-05);
674  temp.push_back(9.8698e-05);
675  temp.push_back(0.000145844);
676  temp.push_back(0.000209191);
677  temp.push_back(0.000267177);
678  temp.push_back(0.000312714);
679  temp.push_back(0.000397544);
680  temp.push_back(0.000436342);
681  temp.push_back(0.000537476);
682  temp.push_back(0.000588913);
683  temp.push_back(0.000733794);
684  temp.push_back(0.000834061);
685  temp.push_back(0.000884576);
686  temp.push_back(0.001049);
687  temp.push_back(0.00109329);
688  temp.push_back(0.00128614);
689  temp.push_back(0.00139434);
690  temp.push_back(0.00155489);
691  temp.push_back(0.00169101);
692  temp.push_back(0.00192918);
693  temp.push_back(0.00192531);
694  temp.push_back(0.00211887);
695  temp.push_back(0.00227517);
696  temp.push_back(0.00250976);
697  temp.push_back(0.00268224);
698  temp.push_back(0.00276841);
699  temp.push_back(0.00287698);
700  temp.push_back(0.00299388);
701  temp.push_back(0.00306973);
702  temp.push_back(0.00337693);
703  temp.push_back(0.00332126);
704  temp.push_back(0.00344551);
705  temp.push_back(0.00364214);
706  temp.push_back(0.00354195);
707  temp.push_back(0.00371903);
708  temp.push_back(0.0037893);
709  temp.push_back(0.00381634);
710  temp.push_back(0.00377593);
711  temp.push_back(0.00382319);
712  temp.push_back(0.00378659);
713  temp.push_back(0.00379056);
714  temp.push_back(0.00392088);
715  temp.push_back(0.00396608);
716  temp.push_back(0.00361685);
717  temp.push_back(0.00356004);
718  temp.push_back(0.00377212);
719  temp.push_back(0.00359799);
720  temp.push_back(0.00349761);
721  temp.push_back(0.00345083);
722  temp.push_back(0.00341753);
723  temp.push_back(0.0031536);
724  temp.push_back(0.00329225);
725  temp.push_back(0.00318691);
726  temp.push_back(0.00342211);
727  temp.push_back(0.00324309);
728  temp.push_back(0.00343059);
729  temp.push_back(0.00313786);
730  temp.push_back(0.00309648);
731  temp.push_back(0.00308665);
732  temp.push_back(0.00315973);
733  temp.push_back(0.00320034);
734  temp.push_back(0.00327231);
735  temp.push_back(0.00315402);
736  temp.push_back(0.00306078);
737  temp.push_back(0.00307093);
738  temp.push_back(0.00304372);
739  temp.push_back(0.0032217);
740  temp.push_back(0.00315268);
741  temp.push_back(0.0031173);
742  temp.push_back(0.00308137);
743  temp.push_back(0.0031778);
744  temp.push_back(0.0030366);
745  temp.push_back(0.00304068);
746  temp.push_back(0.0033214);
747  theErrSamples.push_back(temp);
748  temp.clear();
749 
750  temp.push_back(2.74013e-05);
751  temp.push_back(4.22899e-05);
752  temp.push_back(6.78705e-05);
753  temp.push_back(0.000108305);
754  temp.push_back(0.000155136);
755  temp.push_back(0.000215087);
756  temp.push_back(0.000267491);
757  temp.push_back(0.000324307);
758  temp.push_back(0.000450428);
759  temp.push_back(0.000525255);
760  temp.push_back(0.000593983);
761  temp.push_back(0.000670897);
762  temp.push_back(0.000773512);
763  temp.push_back(0.000886391);
764  temp.push_back(0.000944693);
765  temp.push_back(0.0012177);
766  temp.push_back(0.00122543);
767  temp.push_back(0.00137642);
768  temp.push_back(0.00154086);
769  temp.push_back(0.00165634);
770  temp.push_back(0.00191029);
771  temp.push_back(0.00190192);
772  temp.push_back(0.00211654);
773  temp.push_back(0.00212919);
774  temp.push_back(0.00228748);
775  temp.push_back(0.00254164);
776  temp.push_back(0.00280712);
777  temp.push_back(0.00302764);
778  temp.push_back(0.00306686);
779  temp.push_back(0.00327206);
780  temp.push_back(0.00331136);
781  temp.push_back(0.0036489);
782  temp.push_back(0.00342041);
783  temp.push_back(0.003781);
784  temp.push_back(0.00378694);
785  temp.push_back(0.00386973);
786  temp.push_back(0.00369683);
787  temp.push_back(0.0038999);
788  temp.push_back(0.00395901);
789  temp.push_back(0.00396228);
790  temp.push_back(0.00405743);
791  temp.push_back(0.00410244);
792  temp.push_back(0.00413032);
793  temp.push_back(0.00373123);
794  temp.push_back(0.00395574);
795  temp.push_back(0.00378686);
796  temp.push_back(0.00406811);
797  temp.push_back(0.00395806);
798  temp.push_back(0.00379701);
799  temp.push_back(0.00386635);
800  temp.push_back(0.00361041);
801  temp.push_back(0.00378335);
802  temp.push_back(0.00353608);
803  temp.push_back(0.00346058);
804  temp.push_back(0.00361939);
805  temp.push_back(0.00350638);
806  temp.push_back(0.00351027);
807  temp.push_back(0.00356889);
808  temp.push_back(0.00353562);
809  temp.push_back(0.00338339);
810  temp.push_back(0.00358931);
811  temp.push_back(0.0033404);
812  temp.push_back(0.0034386);
813  temp.push_back(0.00356428);
814  temp.push_back(0.00342609);
815  temp.push_back(0.00351769);
816  temp.push_back(0.0034948);
817  temp.push_back(0.0032928);
818  temp.push_back(0.00354759);
819  temp.push_back(0.0035006);
820  temp.push_back(0.00344599);
821  temp.push_back(0.00360147);
822  temp.push_back(0.00350432);
823  temp.push_back(0.00328072);
824  temp.push_back(0.00352725);
825  temp.push_back(0.00344304);
826  theErrSamples.push_back(temp);
827  temp.clear();
828 
829  temp.push_back(3.19736e-05);
830  temp.push_back(4.2274e-05);
831  temp.push_back(7.42979e-05);
832  temp.push_back(0.000115308);
833  temp.push_back(0.000181278);
834  temp.push_back(0.000238536);
835  temp.push_back(0.000295333);
836  temp.push_back(0.000372787);
837  temp.push_back(0.000450952);
838  temp.push_back(0.000549762);
839  temp.push_back(0.000587952);
840  temp.push_back(0.000717376);
841  temp.push_back(0.000823059);
842  temp.push_back(0.000929103);
843  temp.push_back(0.00101405);
844  temp.push_back(0.00120059);
845  temp.push_back(0.00129663);
846  temp.push_back(0.00138426);
847  temp.push_back(0.0016377);
848  temp.push_back(0.00177567);
849  temp.push_back(0.00193567);
850  temp.push_back(0.00193153);
851  temp.push_back(0.00217634);
852  temp.push_back(0.00226176);
853  temp.push_back(0.00269487);
854  temp.push_back(0.00260071);
855  temp.push_back(0.0029404);
856  temp.push_back(0.00314849);
857  temp.push_back(0.00329682);
858  temp.push_back(0.00359669);
859  temp.push_back(0.0033118);
860  temp.push_back(0.00346258);
861  temp.push_back(0.00376314);
862  temp.push_back(0.00361881);
863  temp.push_back(0.00386849);
864  temp.push_back(0.00410369);
865  temp.push_back(0.0039706);
866  temp.push_back(0.0041219);
867  temp.push_back(0.00407418);
868  temp.push_back(0.00410784);
869  temp.push_back(0.00417039);
870  temp.push_back(0.00396376);
871  temp.push_back(0.00402818);
872  temp.push_back(0.00408969);
873  temp.push_back(0.00398906);
874  temp.push_back(0.00407158);
875  temp.push_back(0.00407663);
876  temp.push_back(0.00429465);
877  temp.push_back(0.00399424);
878  temp.push_back(0.00398511);
879  temp.push_back(0.00413987);
880  temp.push_back(0.00402974);
881  temp.push_back(0.00396823);
882  temp.push_back(0.00406268);
883  temp.push_back(0.00397054);
884  temp.push_back(0.00406304);
885  temp.push_back(0.00381928);
886  temp.push_back(0.00373153);
887  temp.push_back(0.0038722);
888  temp.push_back(0.00372542);
889  temp.push_back(0.00371033);
890  temp.push_back(0.00370851);
891  temp.push_back(0.00370273);
892  temp.push_back(0.00375404);
893  temp.push_back(0.00368417);
894  temp.push_back(0.00370411);
895  temp.push_back(0.00360586);
896  temp.push_back(0.00374387);
897  temp.push_back(0.00370439);
898  temp.push_back(0.00362516);
899  temp.push_back(0.00377766);
900  temp.push_back(0.00360445);
901  temp.push_back(0.00360142);
902  temp.push_back(0.00368594);
903  temp.push_back(0.00358465);
904  temp.push_back(0.00361813);
905  theErrSamples.push_back(temp);
906  temp.clear();
907 
908  temp.push_back(3.33533e-05);
909  temp.push_back(4.71255e-05);
910  temp.push_back(7.95104e-05);
911  temp.push_back(0.000125354);
912  temp.push_back(0.000184391);
913  temp.push_back(0.000241585);
914  temp.push_back(0.000312129);
915  temp.push_back(0.000416606);
916  temp.push_back(0.00048679);
917  temp.push_back(0.000590734);
918  temp.push_back(0.000680798);
919  temp.push_back(0.00074592);
920  temp.push_back(0.000925237);
921  temp.push_back(0.000945055);
922  temp.push_back(0.00111491);
923  temp.push_back(0.00124566);
924  temp.push_back(0.00130333);
925  temp.push_back(0.00159285);
926  temp.push_back(0.00160697);
927  temp.push_back(0.00173291);
928  temp.push_back(0.00205625);
929  temp.push_back(0.0020842);
930  temp.push_back(0.00234011);
931  temp.push_back(0.00257964);
932  temp.push_back(0.00271621);
933  temp.push_back(0.00274754);
934  temp.push_back(0.00300009);
935  temp.push_back(0.00313262);
936  temp.push_back(0.0033966);
937  temp.push_back(0.00370825);
938  temp.push_back(0.00365397);
939  temp.push_back(0.00380956);
940  temp.push_back(0.00406663);
941  temp.push_back(0.00390965);
942  temp.push_back(0.00400766);
943  temp.push_back(0.0040838);
944  temp.push_back(0.00430457);
945  temp.push_back(0.00430605);
946  temp.push_back(0.00452344);
947  temp.push_back(0.00444883);
948  temp.push_back(0.00462339);
949  temp.push_back(0.00441296);
950  temp.push_back(0.0044215);
951  temp.push_back(0.00437965);
952  temp.push_back(0.00450718);
953  temp.push_back(0.00411557);
954  temp.push_back(0.0044587);
955  temp.push_back(0.00428602);
956  temp.push_back(0.00415902);
957  temp.push_back(0.00433486);
958  temp.push_back(0.0043004);
959  temp.push_back(0.00407849);
960  temp.push_back(0.00423246);
961  temp.push_back(0.00394595);
962  temp.push_back(0.00402799);
963  temp.push_back(0.00390578);
964  temp.push_back(0.00403325);
965  temp.push_back(0.00401427);
966  temp.push_back(0.00413036);
967  temp.push_back(0.00396507);
968  temp.push_back(0.00397724);
969  temp.push_back(0.00405608);
970  temp.push_back(0.00410989);
971  temp.push_back(0.00390445);
972  temp.push_back(0.00408041);
973  temp.push_back(0.00374423);
974  temp.push_back(0.00380687);
975  temp.push_back(0.00396012);
976  temp.push_back(0.00403351);
977  temp.push_back(0.00397022);
978  temp.push_back(0.00420906);
979  temp.push_back(0.00395898);
980  temp.push_back(0.00414565);
981  temp.push_back(0.00419401);
982  temp.push_back(0.00398256);
983  temp.push_back(0.00405866);
984  theErrSamples.push_back(temp);
985  temp.clear();
986 
987  temp.push_back(3.60154e-05);
988  temp.push_back(4.78073e-05);
989  temp.push_back(8.81868e-05);
990  temp.push_back(0.00014119);
991  temp.push_back(0.000199197);
992  temp.push_back(0.000271447);
993  temp.push_back(0.000348848);
994  temp.push_back(0.000414794);
995  temp.push_back(0.000517428);
996  temp.push_back(0.000613861);
997  temp.push_back(0.000706405);
998  temp.push_back(0.000830507);
999  temp.push_back(0.000954556);
1000  temp.push_back(0.00102745);
1001  temp.push_back(0.00115016);
1002  temp.push_back(0.00130855);
1003  temp.push_back(0.00141543);
1004  temp.push_back(0.00154704);
1005  temp.push_back(0.00183892);
1006  temp.push_back(0.00182328);
1007  temp.push_back(0.00211743);
1008  temp.push_back(0.00238445);
1009  temp.push_back(0.00251855);
1010  temp.push_back(0.00259965);
1011  temp.push_back(0.00276547);
1012  temp.push_back(0.00279785);
1013  temp.push_back(0.00310652);
1014  temp.push_back(0.00332247);
1015  temp.push_back(0.00348554);
1016  temp.push_back(0.00340047);
1017  temp.push_back(0.00379133);
1018  temp.push_back(0.00394976);
1019  temp.push_back(0.00411556);
1020  temp.push_back(0.00395808);
1021  temp.push_back(0.00413605);
1022  temp.push_back(0.00434804);
1023  temp.push_back(0.00454974);
1024  temp.push_back(0.00448955);
1025  temp.push_back(0.00475876);
1026  temp.push_back(0.00457681);
1027  temp.push_back(0.00444923);
1028  temp.push_back(0.00441159);
1029  temp.push_back(0.00433255);
1030  temp.push_back(0.0044053);
1031  temp.push_back(0.00467223);
1032  temp.push_back(0.00444452);
1033  temp.push_back(0.00429894);
1034  temp.push_back(0.00466592);
1035  temp.push_back(0.004516);
1036  temp.push_back(0.00446295);
1037  temp.push_back(0.00435999);
1038  temp.push_back(0.00467332);
1039  temp.push_back(0.00423821);
1040  temp.push_back(0.00443203);
1041  temp.push_back(0.00434006);
1042  temp.push_back(0.00429902);
1043  temp.push_back(0.0042231);
1044  temp.push_back(0.00423514);
1045  temp.push_back(0.00451164);
1046  temp.push_back(0.00436348);
1047  temp.push_back(0.00436551);
1048  temp.push_back(0.00425205);
1049  temp.push_back(0.00429035);
1050  temp.push_back(0.00411415);
1051  temp.push_back(0.00427361);
1052  temp.push_back(0.0039277);
1053  temp.push_back(0.00405848);
1054  temp.push_back(0.00429804);
1055  temp.push_back(0.00408766);
1056  temp.push_back(0.00384011);
1057  temp.push_back(0.00435199);
1058  temp.push_back(0.004093);
1059  temp.push_back(0.00406005);
1060  temp.push_back(0.00431062);
1061  temp.push_back(0.00411773);
1062  temp.push_back(0.00435653);
1063  theErrSamples.push_back(temp);
1064  temp.clear();
1065 
1066  temp.push_back(3.94789e-05);
1067  temp.push_back(5.3769e-05);
1068  temp.push_back(9.3841e-05);
1069  temp.push_back(0.000149774);
1070  temp.push_back(0.000215262);
1071  temp.push_back(0.000267695);
1072  temp.push_back(0.000370277);
1073  temp.push_back(0.000473963);
1074  temp.push_back(0.000548657);
1075  temp.push_back(0.000625464);
1076  temp.push_back(0.000737716);
1077  temp.push_back(0.000895534);
1078  temp.push_back(0.00100207);
1079  temp.push_back(0.00111602);
1080  temp.push_back(0.00123458);
1081  temp.push_back(0.00138359);
1082  temp.push_back(0.00158882);
1083  temp.push_back(0.00176246);
1084  temp.push_back(0.00177764);
1085  temp.push_back(0.00199677);
1086  temp.push_back(0.00211274);
1087  temp.push_back(0.00240314);
1088  temp.push_back(0.00238892);
1089  temp.push_back(0.00266706);
1090  temp.push_back(0.00292668);
1091  temp.push_back(0.00314009);
1092  temp.push_back(0.00330102);
1093  temp.push_back(0.00354671);
1094  temp.push_back(0.00371555);
1095  temp.push_back(0.00383521);
1096  temp.push_back(0.00392384);
1097  temp.push_back(0.00415042);
1098  temp.push_back(0.00417837);
1099  temp.push_back(0.00410063);
1100  temp.push_back(0.00436123);
1101  temp.push_back(0.00453869);
1102  temp.push_back(0.00456717);
1103  temp.push_back(0.00432658);
1104  temp.push_back(0.00474763);
1105  temp.push_back(0.00479594);
1106  temp.push_back(0.00495067);
1107  temp.push_back(0.00486827);
1108  temp.push_back(0.00501981);
1109  temp.push_back(0.00467952);
1110  temp.push_back(0.00496726);
1111  temp.push_back(0.00471759);
1112  temp.push_back(0.00487664);
1113  temp.push_back(0.00477905);
1114  temp.push_back(0.00457876);
1115  temp.push_back(0.00478556);
1116  temp.push_back(0.00470292);
1117  temp.push_back(0.00474277);
1118  temp.push_back(0.00474074);
1119  temp.push_back(0.00476266);
1120  temp.push_back(0.00459758);
1121  temp.push_back(0.00465773);
1122  temp.push_back(0.00469381);
1123  temp.push_back(0.004336);
1124  temp.push_back(0.00439833);
1125  temp.push_back(0.00434989);
1126  temp.push_back(0.00452046);
1127  temp.push_back(0.00444761);
1128  temp.push_back(0.00452204);
1129  temp.push_back(0.00433173);
1130  temp.push_back(0.00428761);
1131  temp.push_back(0.00454501);
1132  temp.push_back(0.00466898);
1133  temp.push_back(0.00449207);
1134  temp.push_back(0.00478147);
1135  temp.push_back(0.00448187);
1136  temp.push_back(0.00427879);
1137  temp.push_back(0.0045072);
1138  temp.push_back(0.00446825);
1139  temp.push_back(0.00442717);
1140  temp.push_back(0.00450486);
1141  temp.push_back(0.004514);
1142  theErrSamples.push_back(temp);
1143  temp.clear();
1144 
1145  temp.push_back(4.07374e-05);
1146  temp.push_back(5.84427e-05);
1147  temp.push_back(0.000102379);
1148  temp.push_back(0.000154485);
1149  temp.push_back(0.00022167);
1150  temp.push_back(0.000291138);
1151  temp.push_back(0.000366195);
1152  temp.push_back(0.00049284);
1153  temp.push_back(0.000555038);
1154  temp.push_back(0.000718216);
1155  temp.push_back(0.000815782);
1156  temp.push_back(0.000929635);
1157  temp.push_back(0.00105284);
1158  temp.push_back(0.00117775);
1159  temp.push_back(0.00128659);
1160  temp.push_back(0.0014848);
1161  temp.push_back(0.00161139);
1162  temp.push_back(0.00186044);
1163  temp.push_back(0.00193622);
1164  temp.push_back(0.0021136);
1165  temp.push_back(0.00218413);
1166  temp.push_back(0.00254649);
1167  temp.push_back(0.00257878);
1168  temp.push_back(0.00286384);
1169  temp.push_back(0.00277422);
1170  temp.push_back(0.00337728);
1171  temp.push_back(0.0034849);
1172  temp.push_back(0.00340672);
1173  temp.push_back(0.00376872);
1174  temp.push_back(0.00397498);
1175  temp.push_back(0.00407663);
1176  temp.push_back(0.00416444);
1177  temp.push_back(0.00447438);
1178  temp.push_back(0.00421777);
1179  temp.push_back(0.00434779);
1180  temp.push_back(0.00457815);
1181  temp.push_back(0.00510487);
1182  temp.push_back(0.004957);
1183  temp.push_back(0.0050608);
1184  temp.push_back(0.00482047);
1185  temp.push_back(0.00479584);
1186  temp.push_back(0.00506816);
1187  temp.push_back(0.00485049);
1188  temp.push_back(0.00502603);
1189  temp.push_back(0.00496904);
1190  temp.push_back(0.0048041);
1191  temp.push_back(0.00498567);
1192  temp.push_back(0.00505111);
1193  temp.push_back(0.00495093);
1194  temp.push_back(0.00493909);
1195  temp.push_back(0.00518096);
1196  temp.push_back(0.00475333);
1197  temp.push_back(0.00509383);
1198  temp.push_back(0.00455324);
1199  temp.push_back(0.00501535);
1200  temp.push_back(0.00477645);
1201  temp.push_back(0.00467969);
1202  temp.push_back(0.00482058);
1203  temp.push_back(0.0049352);
1204  temp.push_back(0.00479813);
1205  temp.push_back(0.00456841);
1206  temp.push_back(0.00495553);
1207  temp.push_back(0.00475263);
1208  temp.push_back(0.00464536);
1209  temp.push_back(0.0045788);
1210  temp.push_back(0.00482641);
1211  temp.push_back(0.00468534);
1212  temp.push_back(0.00458609);
1213  temp.push_back(0.00469523);
1214  temp.push_back(0.00471367);
1215  temp.push_back(0.00480113);
1216  temp.push_back(0.00477874);
1217  temp.push_back(0.00487724);
1218  temp.push_back(0.00448248);
1219  temp.push_back(0.00457135);
1220  temp.push_back(0.00463623);
1221  theErrSamples.push_back(temp);
1222  temp.clear();
1223 
1224  temp.push_back(4.19494e-05);
1225  temp.push_back(5.81133e-05);
1226  temp.push_back(0.000106598);
1227  temp.push_back(0.000167045);
1228  temp.push_back(0.000245601);
1229  temp.push_back(0.000309417);
1230  temp.push_back(0.000402556);
1231  temp.push_back(0.000531311);
1232  temp.push_back(0.000599414);
1233  temp.push_back(0.000724794);
1234  temp.push_back(0.000843293);
1235  temp.push_back(0.00102089);
1236  temp.push_back(0.00110244);
1237  temp.push_back(0.00119442);
1238  temp.push_back(0.0014845);
1239  temp.push_back(0.00144809);
1240  temp.push_back(0.00163904);
1241  temp.push_back(0.00179288);
1242  temp.push_back(0.00208349);
1243  temp.push_back(0.00218156);
1244  temp.push_back(0.00241731);
1245  temp.push_back(0.00260733);
1246  temp.push_back(0.0028223);
1247  temp.push_back(0.00303541);
1248  temp.push_back(0.00317796);
1249  temp.push_back(0.00318073);
1250  temp.push_back(0.00354012);
1251  temp.push_back(0.0038304);
1252  temp.push_back(0.00394061);
1253  temp.push_back(0.00388992);
1254  temp.push_back(0.00415685);
1255  temp.push_back(0.004271);
1256  temp.push_back(0.00454353);
1257  temp.push_back(0.00436867);
1258  temp.push_back(0.00471855);
1259  temp.push_back(0.00486456);
1260  temp.push_back(0.00458562);
1261  temp.push_back(0.00467012);
1262  temp.push_back(0.00488229);
1263  temp.push_back(0.0051219);
1264  temp.push_back(0.00525306);
1265  temp.push_back(0.00520996);
1266  temp.push_back(0.00512736);
1267  temp.push_back(0.00506308);
1268  temp.push_back(0.00509758);
1269  temp.push_back(0.00513977);
1270  temp.push_back(0.00506956);
1271  temp.push_back(0.0050327);
1272  temp.push_back(0.00528484);
1273  temp.push_back(0.00541921);
1274  temp.push_back(0.00486394);
1275  temp.push_back(0.00532431);
1276  temp.push_back(0.00491166);
1277  temp.push_back(0.0054032);
1278  temp.push_back(0.00515276);
1279  temp.push_back(0.00499206);
1280  temp.push_back(0.00507303);
1281  temp.push_back(0.00528015);
1282  temp.push_back(0.00502935);
1283  temp.push_back(0.00498204);
1284  temp.push_back(0.00482074);
1285  temp.push_back(0.0050209);
1286  temp.push_back(0.00506188);
1287  temp.push_back(0.00501215);
1288  temp.push_back(0.00523337);
1289  temp.push_back(0.00501484);
1290  temp.push_back(0.00482134);
1291  temp.push_back(0.00510347);
1292  temp.push_back(0.00500609);
1293  temp.push_back(0.00508656);
1294  temp.push_back(0.00505679);
1295  temp.push_back(0.00526603);
1296  temp.push_back(0.00491982);
1297  temp.push_back(0.00505811);
1298  temp.push_back(0.00494347);
1299  temp.push_back(0.00506382);
1300  theErrSamples.push_back(temp);
1301  temp.clear();
1302 
1303  temp.push_back(4.58461e-05);
1304  temp.push_back(6.56593e-05);
1305  temp.push_back(0.000106249);
1306  temp.push_back(0.000177259);
1307  temp.push_back(0.000242624);
1308  temp.push_back(0.000318801);
1309  temp.push_back(0.000429442);
1310  temp.push_back(0.000524763);
1311  temp.push_back(0.000627853);
1312  temp.push_back(0.000767861);
1313  temp.push_back(0.000914838);
1314  temp.push_back(0.00101068);
1315  temp.push_back(0.00119111);
1316  temp.push_back(0.00124833);
1317  temp.push_back(0.00147471);
1318  temp.push_back(0.00151766);
1319  temp.push_back(0.00175504);
1320  temp.push_back(0.0019513);
1321  temp.push_back(0.00225088);
1322  temp.push_back(0.00232528);
1323  temp.push_back(0.002477);
1324  temp.push_back(0.0026629);
1325  temp.push_back(0.00282126);
1326  temp.push_back(0.00305865);
1327  temp.push_back(0.00328165);
1328  temp.push_back(0.00342969);
1329  temp.push_back(0.00368517);
1330  temp.push_back(0.00412023);
1331  temp.push_back(0.00408107);
1332  temp.push_back(0.00442514);
1333  temp.push_back(0.00419995);
1334  temp.push_back(0.00445839);
1335  temp.push_back(0.00480241);
1336  temp.push_back(0.00469063);
1337  temp.push_back(0.00488558);
1338  temp.push_back(0.00505738);
1339  temp.push_back(0.00534401);
1340  temp.push_back(0.00529189);
1341  temp.push_back(0.00503914);
1342  temp.push_back(0.00547271);
1343  temp.push_back(0.00532523);
1344  temp.push_back(0.0056474);
1345  temp.push_back(0.00528356);
1346  temp.push_back(0.00537977);
1347  temp.push_back(0.00528494);
1348  temp.push_back(0.00555228);
1349  temp.push_back(0.00522019);
1350  temp.push_back(0.00551423);
1351  temp.push_back(0.00532466);
1352  temp.push_back(0.00562846);
1353  temp.push_back(0.00531636);
1354  temp.push_back(0.00534452);
1355  temp.push_back(0.00546899);
1356  temp.push_back(0.00540307);
1357  temp.push_back(0.00522696);
1358  temp.push_back(0.00543343);
1359  temp.push_back(0.00496315);
1360  temp.push_back(0.0054688);
1361  temp.push_back(0.0054534);
1362  temp.push_back(0.00529457);
1363  temp.push_back(0.00527906);
1364  temp.push_back(0.00505608);
1365  temp.push_back(0.00532934);
1366  temp.push_back(0.00540523);
1367  temp.push_back(0.00546589);
1368  temp.push_back(0.00541721);
1369  temp.push_back(0.00518411);
1370  temp.push_back(0.0050658);
1371  temp.push_back(0.00538019);
1372  temp.push_back(0.00523502);
1373  temp.push_back(0.00518119);
1374  temp.push_back(0.00541954);
1375  temp.push_back(0.00556926);
1376  temp.push_back(0.00516485);
1377  temp.push_back(0.00543988);
1378  temp.push_back(0.00534757);
1379  theErrSamples.push_back(temp);
1380  temp.clear();
1381 
1382  temp.push_back(4.87191e-05);
1383  temp.push_back(6.79557e-05);
1384  temp.push_back(0.00011585);
1385  temp.push_back(0.000170012);
1386  temp.push_back(0.000249995);
1387  temp.push_back(0.000358082);
1388  temp.push_back(0.000441529);
1389  temp.push_back(0.000573455);
1390  temp.push_back(0.000686492);
1391  temp.push_back(0.000768395);
1392  temp.push_back(0.000922129);
1393  temp.push_back(0.0010261);
1394  temp.push_back(0.00121379);
1395  temp.push_back(0.00132394);
1396  temp.push_back(0.00147006);
1397  temp.push_back(0.0016026);
1398  temp.push_back(0.00185945);
1399  temp.push_back(0.00205459);
1400  temp.push_back(0.00224833);
1401  temp.push_back(0.00239438);
1402  temp.push_back(0.00258948);
1403  temp.push_back(0.00285399);
1404  temp.push_back(0.00293392);
1405  temp.push_back(0.00310816);
1406  temp.push_back(0.0035526);
1407  temp.push_back(0.00353642);
1408  temp.push_back(0.003711);
1409  temp.push_back(0.00392946);
1410  temp.push_back(0.00417796);
1411  temp.push_back(0.00440017);
1412  temp.push_back(0.00474434);
1413  temp.push_back(0.00469919);
1414  temp.push_back(0.00476225);
1415  temp.push_back(0.00474708);
1416  temp.push_back(0.00515252);
1417  temp.push_back(0.0053985);
1418  temp.push_back(0.00515269);
1419  temp.push_back(0.00535194);
1420  temp.push_back(0.00519113);
1421  temp.push_back(0.00531732);
1422  temp.push_back(0.00545661);
1423  temp.push_back(0.00562353);
1424  temp.push_back(0.00547828);
1425  temp.push_back(0.00590485);
1426  temp.push_back(0.0054847);
1427  temp.push_back(0.00575722);
1428  temp.push_back(0.00578941);
1429  temp.push_back(0.0055163);
1430  temp.push_back(0.00565193);
1431  temp.push_back(0.00559088);
1432  temp.push_back(0.00578905);
1433  temp.push_back(0.00568463);
1434  temp.push_back(0.00538114);
1435  temp.push_back(0.00569508);
1436  temp.push_back(0.00534805);
1437  temp.push_back(0.00521921);
1438  temp.push_back(0.00568289);
1439  temp.push_back(0.0055866);
1440  temp.push_back(0.00561974);
1441  temp.push_back(0.00548487);
1442  temp.push_back(0.00558498);
1443  temp.push_back(0.00536631);
1444  temp.push_back(0.00541084);
1445  temp.push_back(0.00577058);
1446  temp.push_back(0.00540762);
1447  temp.push_back(0.00545929);
1448  temp.push_back(0.00571948);
1449  temp.push_back(0.00546965);
1450  temp.push_back(0.00557277);
1451  temp.push_back(0.00554671);
1452  temp.push_back(0.00521175);
1453  temp.push_back(0.00546106);
1454  temp.push_back(0.00541317);
1455  temp.push_back(0.00569926);
1456  temp.push_back(0.0055058);
1457  temp.push_back(0.00537131);
1458  theErrSamples.push_back(temp);
1459  temp.clear();
1460 
1461 }
int i
Definition: DBlmapReader.cc:9
std::vector< double > theXSamples
Definition: HcalSiPM.h:37
std::vector< double > thePrehitSamples
Definition: HcalSiPM.h:38
std::vector< std::vector< double > > theErrSamples
Definition: HcalSiPM.h:39
double HcalSiPM::errOnX ( double  x,
double  prehit = 0. 
) const
protectedvirtual

Definition at line 75 of file HcalSiPM.cc.

References getBeforeAndAfter(), i, j, theErrSamples, thePrehitSamples, and theXSamples.

Referenced by hitCells().

75  {
76  //interpolate between the points in the x,prehit space to determine the
77  //width of the distribution of x
78  int before, after;
79  getBeforeAndAfter(x, before, after, theXSamples);
80  int i, j;
81  getBeforeAndAfter(prehit, i, j, thePrehitSamples);
82  double m1 = (theErrSamples[i][after]-theErrSamples[i][before])/
83  (theXSamples[after]-theXSamples[before]);
84  double err1 = theErrSamples[i][before]+m1*(x-theXSamples[before]);
85  double m2 = (theErrSamples[j][after]-theErrSamples[j][before])/
86  (theXSamples[after]-theXSamples[before]);
87  double err2 = theErrSamples[j][before]+m2*(x-theXSamples[before]);
88 
89  return err1 + (err2-err1)/(thePrehitSamples[j]-thePrehitSamples[i])*
90  (prehit - thePrehitSamples[i]);
91 }
int i
Definition: DBlmapReader.cc:9
std::vector< double > theXSamples
Definition: HcalSiPM.h:37
std::vector< double > thePrehitSamples
Definition: HcalSiPM.h:38
int j
Definition: DBlmapReader.cc:9
void getBeforeAndAfter(double val, int &before, int &after, const std::vector< double > &vec) const
Definition: HcalSiPM.cc:93
std::vector< std::vector< double > > theErrSamples
Definition: HcalSiPM.h:39
x
Definition: VDTMath.h:216
void HcalSiPM::getBeforeAndAfter ( double  val,
int &  before,
int &  after,
const std::vector< double > &  vec 
) const
protected

Definition at line 93 of file HcalSiPM.cc.

Referenced by errOnX().

94  {
95  //binary like search to indeces points around an arbitrary value.
96  before = 0;
97  after = vec.size()-1;
98  int mid = vec.size()/2;
99  bool go = true;
100  do {
101  if (vec[mid]>val) after = mid;
102  else before = mid;
103  mid = (after+before)/2;
104  go = (after-before > 1);
105  } while (go);
106 }
int HcalSiPM::getNCells ( ) const
inline

Definition at line 25 of file HcalSiPM.h.

References theCellCount.

25 { return theCellCount; }
int theCellCount
Definition: HcalSiPM.h:34
int HcalSiPM::hitCells ( int  photons,
int  integral = 0 
) const
virtual

Definition at line 21 of file HcalSiPM.cc.

References errOnX(), edm::hlt::Exception, create_public_lumi_plots::exp, edm::RandomNumberGenerator::getEngine(), edm::Service< T >::isAvailable(), timingPdfMaker::mean, theCellCount, theRndGauss, tablePrinter::width, and vdt::x.

Referenced by HcalSiPMHitResponse::makeSiPMSignal().

21  {
22  //don't need to do zero or negative photons.
23  if (photons < 1) return 0;
24  if (integral < 0) integral = 0;
25  if (integral >= theCellCount) return 0;
26 
27  if (theRndGauss == 0) {
28  //random number generator setup
30  if ( ! rng.isAvailable()) {
31  throw cms::Exception("Configuration")
32  << "HcalSiPM requires the RandomNumberGeneratorService\n"
33  "which is not present in the configuration file. "
34  "You must add the service\n"
35  "in the configuration file or remove the modules that require it.";
36  }
37 
38  CLHEP::HepRandomEngine& engine = rng->getEngine();
39  theRndGauss = new CLHEP::RandGaussQ(engine);
40  }
41 
42  //normalize by theCellCount to remove dependency on SiPM size and pixel density.
43  double x = double(photons)/double(theCellCount);
44  double prehit = double(integral)/double(theCellCount);
45 
46  //calculate the width and mean of the distribution for a given x
47  double width = errOnX(x, prehit);
48  double mean = 1. - std::exp(-x);
49 
50  //you can't hit more than everything.
51  if (mean > 1.) mean = 1.;
52 
53  //convert back to absolute pixels
54  mean *= (1-prehit)*theCellCount;
55  width *= (1-prehit)*theCellCount;
56 
57  double npe;
58  while (true) {
59  npe = theRndGauss->fire(mean, width);
60  if ((npe > -0.5) && (npe <= theCellCount-integral) && (npe <= photons))
61  return int(npe + 0.5);
62  }
63 }
int theCellCount
Definition: HcalSiPM.h:34
CLHEP::RandGaussQ * theRndGauss
Definition: HcalSiPM.h:35
virtual double errOnX(double x, double prehit=0.) const
Definition: HcalSiPM.cc:75
bool isAvailable() const
Definition: Service.h:47
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
x
Definition: VDTMath.h:216
void HcalSiPM::initRandomEngine ( CLHEP::HepRandomEngine &  engine)

Definition at line 70 of file HcalSiPM.cc.

References theRndGauss.

Referenced by HcalSiPMHitResponse::setRandomEngine().

70  {
71  if(theRndGauss) delete theRndGauss;
72  theRndGauss = new CLHEP::RandGaussQ(engine);
73 }
CLHEP::RandGaussQ * theRndGauss
Definition: HcalSiPM.h:35
void HcalSiPM::setNCells ( int  nCells)

Definition at line 65 of file HcalSiPM.cc.

References theCellCount.

Referenced by HcalSiPMHitResponse::makeSiPMSignal().

65  {
66  assert(nCells>0);
67  theCellCount = nCells;
68 }
int theCellCount
Definition: HcalSiPM.h:34

Member Data Documentation

int HcalSiPM::theCellCount
protected

Definition at line 34 of file HcalSiPM.h.

Referenced by getNCells(), HcalSiPM(), hitCells(), and setNCells().

std::vector< std::vector< double > > HcalSiPM::theErrSamples
protected

Definition at line 39 of file HcalSiPM.h.

Referenced by defaultErrInit(), and errOnX().

std::vector< double > HcalSiPM::thePrehitSamples
protected

Definition at line 38 of file HcalSiPM.h.

Referenced by defaultErrInit(), and errOnX().

CLHEP::RandGaussQ* HcalSiPM::theRndGauss
mutableprotected

Definition at line 35 of file HcalSiPM.h.

Referenced by hitCells(), initRandomEngine(), and ~HcalSiPM().

std::vector< double > HcalSiPM::theXSamples
protected

Definition at line 37 of file HcalSiPM.h.

Referenced by defaultErrInit(), and errOnX().