CMS 3D CMS Logo

PhotonFix.cc
Go to the documentation of this file.
1 #include <cmath>
2 #include <cassert>
3 #include <fstream>
4 #include <iomanip>
5 
6 // ensure that this include points to the appropriate location for PhotonFix.h
8 
9 PhotonFix::PhotonFix(double e, double eta, double phi, double r9) : _e(e), _eta(eta), _phi(phi), _r9(r9) { setup(); }
10 
12  // Check constants have been set up
14 
15  // Determine if EB or EE
16  _be = (fabs(_eta) < 1.48 ? 0 : 1);
17 
18  // Determine if high or low R9
19  if (_be == 0)
20  _hl = (_r9 >= 0.94 ? 0 : 1);
21  else
22  _hl = (_r9 >= 0.95 ? 0 : 1);
23 
24  // Coordinates relative to cracks
25  double r2Min;
26  if (_be == 0) {
27  r2Min = 1.0e6;
28  for (unsigned i(0); i < 169; i++) {
29  for (unsigned j(0); j < 360; j++) {
30  double de(_eta - _barrelCGap[i][j][0]);
31  double df(dPhi(_phi, _barrelCGap[i][j][1]));
32  double r2(de * de + df * df);
33 
34  if (r2 < r2Min) {
35  r2Min = r2;
36  if (i >= 84) {
37  _aC = de;
38  _bC = -df;
39  } else {
40  _aC = -de;
41  _bC = df;
42  }
43  }
44  }
45  }
46 
47  r2Min = 1.0e6;
48  for (unsigned i(0); i < 33; i++) {
49  for (unsigned j(0); j < 180; j++) {
50  double de(_eta - _barrelSGap[i][j][0]);
51  double df(dPhi(_phi, _barrelSGap[i][j][1]));
52  double r2(de * de + df * df);
53 
54  if (r2 < r2Min) {
55  r2Min = r2;
56  if (i >= 16) {
57  _aS = de;
58  _bS = -df;
59  } else {
60  _aS = -de;
61  _bS = df;
62  }
63  }
64  }
65  }
66 
67  r2Min = 1.0e6;
68  for (unsigned i(0); i < 7; i++) {
69  for (unsigned j(0); j < 18; j++) {
70  double de(_eta - _barrelMGap[i][j][0]);
71  double df(dPhi(_phi, _barrelMGap[i][j][1]));
72  double r2(de * de + df * df);
73 
74  if (r2 < r2Min) {
75  r2Min = r2;
76  if (i >= 3) {
77  _aM = de;
78  _bM = -df;
79  } else {
80  _aM = -de;
81  _bM = df;
82  }
83  }
84  }
85  }
86 
87  } else {
88  unsigned iz(_eta >= 0.0 ? 0 : 1);
89  double r[2] = {xZ(), yZ()};
90 
91  r2Min = 1.0e6;
92  for (unsigned i(0); i < 7080; i++) {
93  double dx(r[0] - _endcapCGap[iz][i][0]);
94  double dy(r[1] - _endcapCGap[iz][i][1]);
95  double r2(dx * dx + dy * dy);
96 
97  if (r2 < r2Min) {
98  r2Min = r2;
99  if (r[0] > 0.0)
100  _aC = dx;
101  else
102  _aC = -dx;
103  if (r[1] > 0.0)
104  _bC = dy;
105  else
106  _bC = -dy;
107  }
108  }
109 
110  r2Min = 1.0e6;
111  for (unsigned i(0); i < 264; i++) {
112  double dx(r[0] - _endcapSGap[iz][i][0]);
113  double dy(r[1] - _endcapSGap[iz][i][1]);
114  double r2(dx * dx + dy * dy);
115 
116  if (r2 < r2Min) {
117  r2Min = r2;
118  if (r[0] > 0.0)
119  _aS = dx;
120  else
121  _aS = -dx;
122  if (r[1] > 0.0)
123  _bS = dy;
124  else
125  _bS = -dy;
126  }
127  }
128 
129  r2Min = 1.0e6;
130  for (unsigned i(0); i < 1; i++) {
131  double dx(r[0] - _endcapMGap[iz][i][0]);
132  double dy(r[1] - _endcapMGap[iz][i][1]);
133  double r2(dx * dx + dy * dy);
134 
135  if (r2 < r2Min) {
136  r2Min = r2;
137  if (iz == 0) {
138  _aM = dx;
139  _bM = dy;
140  } else {
141  _aM = -dx;
142  _bM = -dy;
143  }
144  }
145  }
146  }
147 }
148 
149 double PhotonFix::fixedEnergy() const {
150  double f(0.0);
151 
152  // Overall scale and energy(T) dependence
153  f = _meanScale[_be][_hl][0];
154  f += _meanScale[_be][_hl][1] * _e;
155  f += _meanScale[_be][_hl][2] * _e / cosh(_eta);
156  f += _meanScale[_be][_hl][3] * cosh(_eta) / _e;
157 
158  // General eta or zeta dependence
159  if (_be == 0) {
160  f += _meanAT[_be][_hl][0] * _eta * _eta;
162  } else {
163  f += _meanAT[_be][_hl][0] * xZ() * xZ();
164  f += _meanBT[_be][_hl][0] * yZ() * yZ();
165  }
166 
167  // Eta or x crystal, submodule and module dependence
168  f += expCorrection(_aC, _meanAC[_be][_hl]);
169  f += expCorrection(_aS, _meanAS[_be][_hl]);
170  f += expCorrection(_aM, _meanAM[_be][_hl]);
171 
172  // Phi or y crystal, submodule and module dependence
173  f += expCorrection(_bC, _meanBC[_be][_hl]);
174  f += expCorrection(_bS, _meanBS[_be][_hl]);
175  f += expCorrection(_bM, _meanBM[_be][_hl]);
176 
177  // R9 dependence
178  if (_hl == 0) {
179  f += _meanR9[_be][_hl][1] * (_r9 - _meanR9[_be][_hl][0]) * (_r9 - _meanR9[_be][_hl][0]) +
180  _meanR9[_be][_hl][2] * (_r9 - _meanR9[_be][_hl][0]) * (_r9 - _meanR9[_be][_hl][0]) *
181  (_r9 - _meanR9[_be][_hl][0]);
182  } else {
183  f += _meanR9[_be][_hl][0] * _r9 + _meanR9[_be][_hl][1] * _r9 * _r9 + _meanR9[_be][_hl][2] * _r9 * _r9 * _r9;
184  }
185 
186  return _e * f;
187 }
188 
189 double PhotonFix::sigmaEnergy() const {
190  // Overall resolution scale vs energy
191  double sigma;
192  if (_be == 0) {
193  sigma = _sigmaScale[_be][_hl][0] * _sigmaScale[_be][_hl][0];
194  //std::cout << "PhotonFix::sigmaEnergy 1 sigma = " << sigma << std::endl;
195  sigma += _sigmaScale[_be][_hl][1] * _sigmaScale[_be][_hl][1] * _e;
196  //std::cout << "PhotonFix::sigmaEnergy 2 sigma = " << sigma << std::endl;
197  sigma += _sigmaScale[_be][_hl][2] * _sigmaScale[_be][_hl][2] * _e * _e;
198  //std::cout << "PhotonFix::sigmaEnergy 3 sigma = " << sigma << std::endl;
199  } else {
200  sigma = _sigmaScale[_be][_hl][0] * _sigmaScale[_be][_hl][0] * cosh(_eta) * cosh(_eta);
201  sigma += _sigmaScale[_be][_hl][1] * _sigmaScale[_be][_hl][1] * _e;
202  sigma += _sigmaScale[_be][_hl][2] * _sigmaScale[_be][_hl][2] * _e * _e;
203  }
204  sigma = sqrt(sigma);
205 
206  double f(1.0);
207 
208  // General eta or zeta dependence
209  if (_be == 0) {
210  f += _sigmaAT[_be][_hl][0] * _eta * _eta;
211  //std::cout << "PhotonFix::sigmaEnergy 4 f = " << f << std::endl;
213  //std::cout << "PhotonFix::sigmaEnergy 5 f = " << f << std::endl;
214  } else {
215  f += _sigmaAT[_be][_hl][0] * xZ() * xZ();
216  f += _sigmaBT[_be][_hl][0] * yZ() * yZ();
217  }
218 
219  // Eta or x crystal, submodule and module dependence
221  //std::cout << "PhotonFix::sigmaEnergy 6 f = " << f << std::endl;
223  //std::cout << "PhotonFix::sigmaEnergy 7 f = " << f << std::endl;
225  //std::cout << "PhotonFix::sigmaEnergy 8 f = " << f << std::endl;
226 
227  // Phi or y crystal, submodule and module dependence
229  //std::cout << "PhotonFix::sigmaEnergy 9 f = " << f << std::endl;
231  //std::cout << "PhotonFix::sigmaEnergy 10 f = " << f << std::endl;
233  //std::cout << "PhotonFix::sigmaEnergy 11 f = " << f << std::endl;
234 
235  // R9 dependence
236  if (_hl == 0) {
237  f += _sigmaR9[_be][_hl][1] * (_r9 - _sigmaR9[_be][_hl][0]) * (_r9 - _sigmaR9[_be][_hl][0]) +
238  _sigmaR9[_be][_hl][2] * (_r9 - _sigmaR9[_be][_hl][0]) * (_r9 - _sigmaR9[_be][_hl][0]) *
239  (_r9 - _sigmaR9[_be][_hl][0]);
240  //std::cout << "PhotonFix::sigmaEnergy 12 f = " << f << std::endl;
241  } else {
242  f += _sigmaR9[_be][_hl][0] * _r9 + _sigmaR9[_be][_hl][1] * _r9 * _r9;
243  //std::cout << "PhotonFix::sigmaEnergy 13 f = " << f << std::endl;
244  }
245 
246  return sigma * f;
247 }
248 
249 double PhotonFix::rawEnergy() const { return _e; }
250 
251 double PhotonFix::eta() const { return _eta; }
252 
253 double PhotonFix::phi() const { return _phi; }
254 
255 double PhotonFix::r9() const { return _r9; }
256 
257 double PhotonFix::etaC() const {
258  assert(_be == 0);
259  return _aC;
260 }
261 
262 double PhotonFix::etaS() const {
263  assert(_be == 0);
264  return _aS;
265 }
266 
267 double PhotonFix::etaM() const {
268  assert(_be == 0);
269  return _aM;
270 }
271 
272 double PhotonFix::phiC() const {
273  assert(_be == 0);
274  return _bC;
275 }
276 
277 double PhotonFix::phiS() const {
278  assert(_be == 0);
279  return _bS;
280 }
281 
282 double PhotonFix::phiM() const {
283  assert(_be == 0);
284  return _bM;
285 }
286 
287 double PhotonFix::xZ() const {
288  assert(_be == 1);
289  return asinh(cos(_phi) / sinh(_eta));
290 }
291 
292 double PhotonFix::xC() const {
293  assert(_be == 1);
294  return _aC;
295 }
296 
297 double PhotonFix::xS() const {
298  assert(_be == 1);
299  return _aS;
300 }
301 
302 double PhotonFix::xM() const {
303  assert(_be == 1);
304  return _aM;
305 }
306 
307 double PhotonFix::yZ() const {
308  assert(_be == 1);
309  return asinh(sin(_phi) / sinh(_eta));
310 }
311 
312 double PhotonFix::yC() const {
313  assert(_be == 1);
314  return _bC;
315 }
316 
317 double PhotonFix::yS() const {
318  assert(_be == 1);
319  return _bS;
320 }
321 
322 double PhotonFix::yM() const {
323  assert(_be == 1);
324  return _bM;
325 }
326 
327 double PhotonFix::GetaPhi(double f0, double f1) { return aPhi(f0, f1); }
328 
329 void PhotonFix::barrelCGap(unsigned i, unsigned j, unsigned k, double c) { _barrelCGap[i][j][k] = c; }
330 void PhotonFix::barrelSGap(unsigned i, unsigned j, unsigned k, double c) { _barrelSGap[i][j][k] = c; }
331 void PhotonFix::barrelMGap(unsigned i, unsigned j, unsigned k, double c) { _barrelMGap[i][j][k] = c; }
332 void PhotonFix::endcapCrystal(unsigned i, unsigned j, bool c) { _endcapCrystal[i][j] = c; }
333 void PhotonFix::endcapCGap(unsigned i, unsigned j, unsigned k, double c) { _endcapCGap[i][j][k] = c; }
334 void PhotonFix::endcapSGap(unsigned i, unsigned j, unsigned k, double c) { _endcapSGap[i][j][k] = c; }
335 void PhotonFix::endcapMGap(unsigned i, unsigned j, unsigned k, double c) { _endcapMGap[i][j][k] = c; }
336 
337 void PhotonFix::print() const {
338  std::cout << "PhotonFix: e,eta,phi,r9 = " << _e << ", " << _eta << ", " << _phi << ", " << _r9 << ", gaps " << _aC
339  << ", " << _aS << ", " << _aM << ", " << _bC << ", " << _bS << ", " << _bM << std::endl;
340 }
341 
342 void PhotonFix::setParameters(unsigned be, unsigned hl, const double *p) {
343  for (unsigned i(0); i < 4; i++) {
344  _meanScale[be][hl][i] = p[i + 0 * 4];
345  _meanAT[be][hl][i] = p[i + 1 * 4];
346  _meanAC[be][hl][i] = p[i + 2 * 4];
347  _meanAS[be][hl][i] = p[i + 3 * 4];
348  _meanAM[be][hl][i] = p[i + 4 * 4];
349  _meanBT[be][hl][i] = p[i + 5 * 4];
350  _meanBC[be][hl][i] = p[i + 6 * 4];
351  _meanBS[be][hl][i] = p[i + 7 * 4];
352  _meanBM[be][hl][i] = p[i + 8 * 4];
353  _meanR9[be][hl][i] = p[i + 9 * 4];
354 
355  _sigmaScale[be][hl][i] = p[i + 10 * 4];
356  _sigmaAT[be][hl][i] = p[i + 11 * 4];
357  _sigmaAC[be][hl][i] = p[i + 12 * 4];
358  _sigmaAS[be][hl][i] = p[i + 13 * 4];
359  _sigmaAM[be][hl][i] = p[i + 14 * 4];
360  _sigmaBT[be][hl][i] = p[i + 15 * 4];
361  _sigmaBC[be][hl][i] = p[i + 16 * 4];
362  _sigmaBS[be][hl][i] = p[i + 17 * 4];
363  _sigmaBM[be][hl][i] = p[i + 18 * 4];
364  _sigmaR9[be][hl][i] = p[i + 19 * 4];
365  }
366 }
367 
368 void PhotonFix::getParameters(unsigned be, unsigned hl, double *p) {
369  for (unsigned i(0); i < 4; i++) {
370  p[i + 0 * 4] = _meanScale[be][hl][i];
371  p[i + 1 * 4] = _meanAT[be][hl][i];
372  p[i + 2 * 4] = _meanAC[be][hl][i];
373  p[i + 3 * 4] = _meanAS[be][hl][i];
374  p[i + 4 * 4] = _meanAM[be][hl][i];
375  p[i + 5 * 4] = _meanBT[be][hl][i];
376  p[i + 6 * 4] = _meanBC[be][hl][i];
377  p[i + 7 * 4] = _meanBS[be][hl][i];
378  p[i + 8 * 4] = _meanBM[be][hl][i];
379  p[i + 9 * 4] = _meanR9[be][hl][i];
380 
381  p[i + 10 * 4] = _sigmaScale[be][hl][i];
382  p[i + 11 * 4] = _sigmaAT[be][hl][i];
383  p[i + 12 * 4] = _sigmaAC[be][hl][i];
384  p[i + 13 * 4] = _sigmaAS[be][hl][i];
385  p[i + 14 * 4] = _sigmaAM[be][hl][i];
386  p[i + 15 * 4] = _sigmaBT[be][hl][i];
387  p[i + 16 * 4] = _sigmaBC[be][hl][i];
388  p[i + 17 * 4] = _sigmaBS[be][hl][i];
389  p[i + 18 * 4] = _sigmaBM[be][hl][i];
390  p[i + 19 * 4] = _sigmaR9[be][hl][i];
391  }
392 }
393 
394 void PhotonFix::dumpParameters(std::ostream &o) {
395  for (unsigned be(0); be < 2; be++) {
396  for (unsigned hl(0); hl < 2; hl++) {
397  for (unsigned i(0); i < 4; i++) {
398  o << " _meanScale[" << be << "][" << hl << "][" << i << "]=" << _meanScale[be][hl][i] << ";" << std::endl;
399  }
400  for (unsigned i(0); i < 4; i++) {
401  o << " _meanAT[" << be << "][" << hl << "][" << i << "]=" << _meanAT[be][hl][i] << ";" << std::endl;
402  }
403  for (unsigned i(0); i < 4; i++) {
404  o << " _meanAC[" << be << "][" << hl << "][" << i << "]=" << _meanAC[be][hl][i] << ";" << std::endl;
405  }
406  for (unsigned i(0); i < 4; i++) {
407  o << " _meanAS[" << be << "][" << hl << "][" << i << "]=" << _meanAS[be][hl][i] << ";" << std::endl;
408  }
409  for (unsigned i(0); i < 4; i++) {
410  o << " _meanAM[" << be << "][" << hl << "][" << i << "]=" << _meanAM[be][hl][i] << ";" << std::endl;
411  }
412  for (unsigned i(0); i < 4; i++) {
413  o << " _meanBT[" << be << "][" << hl << "][" << i << "]=" << _meanBT[be][hl][i] << ";" << std::endl;
414  }
415  for (unsigned i(0); i < 4; i++) {
416  o << " _meanBC[" << be << "][" << hl << "][" << i << "]=" << _meanBC[be][hl][i] << ";" << std::endl;
417  }
418  for (unsigned i(0); i < 4; i++) {
419  o << " _meanBS[" << be << "][" << hl << "][" << i << "]=" << _meanBS[be][hl][i] << ";" << std::endl;
420  }
421  for (unsigned i(0); i < 4; i++) {
422  o << " _meanBM[" << be << "][" << hl << "][" << i << "]=" << _meanBM[be][hl][i] << ";" << std::endl;
423  }
424  for (unsigned i(0); i < 4; i++) {
425  o << " _meanR9[" << be << "][" << hl << "][" << i << "]=" << _meanR9[be][hl][i] << ";" << std::endl;
426  }
427  o << std::endl;
428 
429  for (unsigned i(0); i < 4; i++) {
430  o << " _sigmaScale[" << be << "][" << hl << "][" << i << "]=" << _sigmaScale[be][hl][i] << ";" << std::endl;
431  }
432  for (unsigned i(0); i < 4; i++) {
433  o << " _sigmaAT[" << be << "][" << hl << "][" << i << "]=" << _sigmaAT[be][hl][i] << ";" << std::endl;
434  }
435  for (unsigned i(0); i < 4; i++) {
436  o << " _sigmaAC[" << be << "][" << hl << "][" << i << "]=" << _sigmaAC[be][hl][i] << ";" << std::endl;
437  }
438  for (unsigned i(0); i < 4; i++) {
439  o << " _sigmaAS[" << be << "][" << hl << "][" << i << "]=" << _sigmaAS[be][hl][i] << ";" << std::endl;
440  }
441  for (unsigned i(0); i < 4; i++) {
442  o << " _sigmaAM[" << be << "][" << hl << "][" << i << "]=" << _sigmaAM[be][hl][i] << ";" << std::endl;
443  }
444  for (unsigned i(0); i < 4; i++) {
445  o << " _sigmaBT[" << be << "][" << hl << "][" << i << "]=" << _sigmaBT[be][hl][i] << ";" << std::endl;
446  }
447  for (unsigned i(0); i < 4; i++) {
448  o << " _sigmaBC[" << be << "][" << hl << "][" << i << "]=" << _sigmaBC[be][hl][i] << ";" << std::endl;
449  }
450  for (unsigned i(0); i < 4; i++) {
451  o << " _sigmaBS[" << be << "][" << hl << "][" << i << "]=" << _sigmaBS[be][hl][i] << ";" << std::endl;
452  }
453  for (unsigned i(0); i < 4; i++) {
454  o << " _sigmaBM[" << be << "][" << hl << "][" << i << "]=" << _sigmaBM[be][hl][i] << ";" << std::endl;
455  }
456  for (unsigned i(0); i < 4; i++) {
457  o << " _sigmaR9[" << be << "][" << hl << "][" << i << "]=" << _sigmaR9[be][hl][i] << ";" << std::endl;
458  }
459  o << std::endl;
460  }
461  }
462 }
463 
464 void PhotonFix::printParameters(std::ostream &o) {
465  o << "PhotonFix::printParameters()" << std::endl;
466 
467  for (unsigned be(0); be < 2; be++) {
468  for (unsigned hl(0); hl < 2; hl++) {
469  o << " Parameters for " << (be == 0 ? "barrel" : "endcap") << ", " << (hl == 0 ? "high" : "low") << " R9"
470  << std::endl;
471 
472  o << " Mean scaling ";
473  for (unsigned i(0); i < 4; i++)
474  o << std::setw(14) << _meanScale[be][hl][i];
475  o << std::endl;
476  o << " Mean " << (be == 0 ? "Eta " : "ZetaX") << " total ";
477  for (unsigned i(0); i < 4; i++)
478  o << std::setw(14) << _meanAT[be][hl][i];
479  o << std::endl;
480  o << " Mean " << (be == 0 ? "Eta " : "ZetaX") << " crystal ";
481  for (unsigned i(0); i < 4; i++)
482  o << std::setw(14) << _meanAC[be][hl][i];
483  o << std::endl;
484  o << " Mean " << (be == 0 ? "Eta " : "ZetaX") << " submodule";
485  for (unsigned i(0); i < 4; i++)
486  o << std::setw(14) << _meanAS[be][hl][i];
487  o << std::endl;
488  o << " Mean " << (be == 0 ? "Eta " : "ZetaX") << " module ";
489  for (unsigned i(0); i < 4; i++)
490  o << std::setw(14) << _meanAM[be][hl][i];
491  o << std::endl;
492  o << " Mean " << (be == 0 ? "Eta zero " : "ZetaY total ");
493  for (unsigned i(0); i < 4; i++)
494  o << std::setw(14) << _meanBT[be][hl][i];
495  o << std::endl;
496  o << " Mean " << (be == 0 ? "Phi " : "ZetaY") << " crystal ";
497  for (unsigned i(0); i < 4; i++)
498  o << std::setw(14) << _meanBC[be][hl][i];
499  o << std::endl;
500  o << " Mean " << (be == 0 ? "Phi " : "ZetaY") << " submodule";
501  for (unsigned i(0); i < 4; i++)
502  o << std::setw(14) << _meanBS[be][hl][i];
503  o << std::endl;
504  o << " Mean " << (be == 0 ? "Phi " : "ZetaY") << " module ";
505  for (unsigned i(0); i < 4; i++)
506  o << std::setw(14) << _meanBM[be][hl][i];
507  o << std::endl;
508  o << " Mean R9 ";
509  for (unsigned i(0); i < 4; i++)
510  o << std::setw(14) << _meanR9[be][hl][i];
511  o << std::endl;
512 
513  o << " Sigma scaling ";
514  for (unsigned i(0); i < 4; i++)
515  o << std::setw(14) << _sigmaScale[be][hl][i];
516  o << std::endl;
517  o << " Sigma " << (be == 0 ? "Eta " : "ZetaX") << " total ";
518  for (unsigned i(0); i < 4; i++)
519  o << std::setw(14) << _sigmaAT[be][hl][i];
520  o << std::endl;
521  o << " Sigma " << (be == 0 ? "Eta " : "ZetaX") << " crystal ";
522  for (unsigned i(0); i < 4; i++)
523  o << std::setw(14) << _sigmaAC[be][hl][i];
524  o << std::endl;
525  o << " Sigma " << (be == 0 ? "Eta " : "ZetaX") << " submodule";
526  for (unsigned i(0); i < 4; i++)
527  o << std::setw(14) << _sigmaAS[be][hl][i];
528  o << std::endl;
529  o << " Sigma " << (be == 0 ? "Eta " : "ZetaX") << " module ";
530  for (unsigned i(0); i < 4; i++)
531  o << std::setw(14) << _sigmaAM[be][hl][i];
532  o << std::endl;
533  o << " Sigma " << (be == 0 ? "Eta " : "ZetaY") << " total ";
534  for (unsigned i(0); i < 4; i++)
535  o << std::setw(14) << _sigmaBT[be][hl][i];
536  o << std::endl;
537  o << " Sigma " << (be == 0 ? "Eta " : "ZetaY") << " crystal ";
538  for (unsigned i(0); i < 4; i++)
539  o << std::setw(14) << _sigmaBC[be][hl][i];
540  o << std::endl;
541  o << " Sigma " << (be == 0 ? "Phi " : "ZetaY") << " submodule";
542  for (unsigned i(0); i < 4; i++)
543  o << std::setw(14) << _sigmaBS[be][hl][i];
544  o << std::endl;
545  o << " Sigma " << (be == 0 ? "Phi " : "ZetaY") << " module ";
546  for (unsigned i(0); i < 4; i++)
547  o << std::setw(14) << _sigmaBM[be][hl][i];
548  o << std::endl;
549  o << " Sigma R9 ";
550  for (unsigned i(0); i < 4; i++)
551  o << std::setw(14) << _sigmaR9[be][hl][i];
552  o << std::endl;
553  }
554  }
555 }
556 
557 double PhotonFix::asinh(double s) {
558  if (s >= 0.0)
559  return log(sqrt(s * s + 1.0) + s);
560  else
561  return -log(sqrt(s * s + 1.0) - s);
562 }
563 
564 void PhotonFix::dumpGaps(std::ostream &o) {
565  o << std::setprecision(15);
566 
567  for (unsigned i(0); i < 169; i++) {
568  for (unsigned j(0); j < 360; j++) {
569  for (unsigned k(0); k < 2; k++) {
570  o << _barrelCGap[i][j][k] << std::endl;
571  }
572  }
573  }
574 
575  for (unsigned i(0); i < 33; i++) {
576  for (unsigned j(0); j < 180; j++) {
577  for (unsigned k(0); k < 2; k++) {
578  o << _barrelSGap[i][j][k] << std::endl;
579  }
580  }
581  }
582 
583  for (unsigned i(0); i < 7; i++) {
584  for (unsigned j(0); j < 18; j++) {
585  for (unsigned k(0); k < 2; k++) {
586  o << _barrelMGap[i][j][k] << std::endl;
587  }
588  }
589  }
590 
591  for (unsigned i(0); i < 100; i++) {
592  for (unsigned j(0); j < 100; j++) {
593  if (_endcapCrystal[i][j])
594  o << 0 << std::endl;
595  else
596  o << 1 << std::endl;
597  }
598  }
599 
600  for (unsigned i(0); i < 2; i++) {
601  for (unsigned j(0); j < 7080; j++) {
602  for (unsigned k(0); k < 2; k++) {
603  o << _endcapCGap[i][j][k] << std::endl;
604  }
605  }
606  }
607 
608  for (unsigned i(0); i < 2; i++) {
609  for (unsigned j(0); j < 264; j++) {
610  for (unsigned k(0); k < 2; k++) {
611  o << _endcapSGap[i][j][k] << std::endl;
612  }
613  }
614  }
615 
616  for (unsigned i(0); i < 2; i++) {
617  for (unsigned j(0); j < 1; j++) {
618  for (unsigned k(0); k < 2; k++) {
619  o << _endcapMGap[i][j][k] << std::endl;
620  }
621  }
622  }
623 }
624 
625 double PhotonFix::dPhi(double f0, double f1) {
626  double df(f0 - f1);
627  if (df > _onePi)
628  df -= _twoPi;
629  if (df < -_onePi)
630  df += _twoPi;
631  return df;
632 }
633 
634 double PhotonFix::aPhi(double f0, double f1) {
635  double af(0.5 * (f0 + f1));
636  if (fabs(dPhi(af, f0)) > 0.5 * _onePi) {
637  if (af >= 0.0)
638  af -= _onePi;
639  else
640  af += _onePi;
641  }
642 
643  assert(fabs(dPhi(af, f0)) < 0.5 * _onePi);
644  assert(fabs(dPhi(af, f1)) < 0.5 * _onePi);
645 
646  return af;
647 }
648 
649 double PhotonFix::expCorrection(double a, const double *p) {
650  if (p[1] == 0.0 || p[2] == 0.0 || p[3] == 0.0)
651  return 0.0;
652 
653  double b(a - p[0]);
654  if (b >= 0.0)
655  return p[1] * exp(-fabs(p[2]) * b);
656  else
657  return p[1] * exp(fabs(p[3]) * b);
658 }
659 
660 double PhotonFix::gausCorrection(double a, const double *p) {
661  if (p[1] == 0.0 || p[2] == 0.0 || p[3] == 0.0)
662  return 0.0;
663 
664  double b(a - p[0]);
665  if (b >= 0.0)
666  return p[1] * exp(-0.5 * p[2] * p[2] * b * b);
667  else
668  return p[1] * exp(-0.5 * p[3] * p[3] * b * b);
669 }
672  if (_initialised)
673  return false;
674 
677  return true;
678 }
679 
681  _initialised = false;
682 
683  if (s == "Nominal") {
684  for (unsigned be(0); be < 2; be++) {
685  for (unsigned hl(0); hl < 2; hl++) {
686  for (unsigned i(0); i < 4; i++) {
687  _meanScale[be][hl][i] = 0;
688  _meanAT[be][hl][i] = 0;
689  _meanAC[be][hl][i] = 0;
690  _meanAS[be][hl][i] = 0;
691  _meanAM[be][hl][i] = 0;
692  _meanBT[be][hl][i] = 0;
693  _meanBC[be][hl][i] = 0;
694  _meanBS[be][hl][i] = 0;
695  _meanBM[be][hl][i] = 0;
696  _meanR9[be][hl][i] = 0;
697 
698  _sigmaScale[be][hl][i] = 0;
699  _sigmaAT[be][hl][i] = 0;
700  _sigmaAC[be][hl][i] = 0;
701  _sigmaAS[be][hl][i] = 0;
702  _sigmaAM[be][hl][i] = 0;
703  _sigmaBT[be][hl][i] = 0;
704  _sigmaBC[be][hl][i] = 0;
705  _sigmaBS[be][hl][i] = 0;
706  _sigmaBM[be][hl][i] = 0;
707  _sigmaR9[be][hl][i] = 0;
708  }
709 
710  _meanScale[be][hl][0] = 1.0;
711  if (be == 0) {
712  _sigmaScale[be][hl][0] = 0.2;
713  _sigmaScale[be][hl][1] = 0.03;
714  _sigmaScale[be][hl][2] = 0.006;
715  } else {
716  _sigmaScale[be][hl][0] = 0.25;
717  _sigmaScale[be][hl][1] = 0.05;
718  _sigmaScale[be][hl][2] = 0.010;
719  }
720  }
721  }
722 
723  _initialised = true;
724  }
725 
726  if (s == "3_8") {
727  _meanScale[0][0][0] = 0.994724;
728  _meanScale[0][0][1] = 1.98102e-06;
729  _meanScale[0][0][2] = 1.43015e-05;
730  _meanScale[0][0][3] = -0.0908525;
731  _meanAT[0][0][0] = 0.0;
732  _meanAT[0][0][1] = 0.0;
733  _meanAT[0][0][2] = 0.0;
734  _meanAT[0][0][3] = 0.0;
735  _meanAC[0][0][0] = -0.00352041;
736  _meanAC[0][0][1] = 0.00982015;
737  _meanAC[0][0][2] = 434.32;
738  _meanAC[0][0][3] = 529.508;
739  _meanAS[0][0][0] = -1.1;
740  _meanAS[0][0][1] = 0.00135995;
741  _meanAS[0][0][2] = 295.712;
742  _meanAS[0][0][3] = 5.13202e+07;
743  _meanAM[0][0][0] = -0.00140562;
744  _meanAM[0][0][1] = 0.156322;
745  _meanAM[0][0][2] = 263.097;
746  _meanAM[0][0][3] = 222.294;
747  _meanBT[0][0][0] = 0.0;
748  _meanBT[0][0][1] = 0.0;
749  _meanBT[0][0][2] = 0.0;
750  _meanBT[0][0][3] = 0.0;
751  _meanBC[0][0][0] = -0.00294295;
752  _meanBC[0][0][1] = 0.011533;
753  _meanBC[0][0][2] = 562.905;
754  _meanBC[0][0][3] = 421.097;
755  _meanBS[0][0][0] = -0.00204373;
756  _meanBS[0][0][1] = 0.00347592;
757  _meanBS[0][0][2] = 36.5614;
758  _meanBS[0][0][3] = 1265.25;
759  _meanBM[0][0][0] = -0.00275381;
760  _meanBM[0][0][1] = 0.0812447;
761  _meanBM[0][0][2] = 216.885;
762  _meanBM[0][0][3] = 264.754;
763  _meanR9[0][0][0] = 0.952584;
764  _meanR9[0][0][1] = 22.7119;
765  _meanR9[0][0][2] = 402.816;
766  _meanR9[0][0][3] = 0;
767 
768  _sigmaScale[0][0][0] = 0.167184;
769  _sigmaScale[0][0][1] = 6.14323e-11;
770  _sigmaScale[0][0][2] = 0.00769693;
771  _sigmaScale[0][0][3] = 0;
772  _sigmaAT[0][0][0] = 0.228255;
773  _sigmaAT[0][0][1] = 0;
774  _sigmaAT[0][0][2] = 0;
775  _sigmaAT[0][0][3] = 0;
776  _sigmaAC[0][0][0] = -0.00411906;
777  _sigmaAC[0][0][1] = 0.077799;
778  _sigmaAC[0][0][2] = 23.1033;
779  _sigmaAC[0][0][3] = -3e+17;
780  _sigmaAS[0][0][0] = 0;
781  _sigmaAS[0][0][1] = 0;
782  _sigmaAS[0][0][2] = 0;
783  _sigmaAS[0][0][3] = 0;
784  _sigmaAM[0][0][0] = -0.000130695;
785  _sigmaAM[0][0][1] = 11.2121;
786  _sigmaAM[0][0][2] = 468.535;
787  _sigmaAM[0][0][3] = 407.652;
788  _sigmaBT[0][0][0] = 1.33384e-05;
789  _sigmaBT[0][0][1] = 8.77098;
790  _sigmaBT[0][0][2] = 324.048;
791  _sigmaBT[0][0][3] = 239.868;
792  _sigmaBC[0][0][0] = -0.00281964;
793  _sigmaBC[0][0][1] = 0.125811;
794  _sigmaBC[0][0][2] = 538.949;
795  _sigmaBC[0][0][3] = 1358.76;
796  _sigmaBS[0][0][0] = 0;
797  _sigmaBS[0][0][1] = 0;
798  _sigmaBS[0][0][2] = 0;
799  _sigmaBS[0][0][3] = 0;
800  _sigmaBM[0][0][0] = -0.00293676;
801  _sigmaBM[0][0][1] = 8.88276;
802  _sigmaBM[0][0][2] = 350.032;
803  _sigmaBM[0][0][3] = 580.354;
804  _sigmaR9[0][0][0] = 0.955876;
805  _sigmaR9[0][0][1] = 2254.5;
806  _sigmaR9[0][0][2] = 14627;
807  _sigmaR9[0][0][3] = 0;
808 
809  _meanScale[0][1][0] = 0.888348;
810  _meanScale[0][1][1] = 1.20452e-05;
811  _meanScale[0][1][2] = -1.04458e-05;
812  _meanScale[0][1][3] = -0.542383;
813  _meanAT[0][1][0] = 0.0;
814  _meanAT[0][1][1] = 0.0;
815  _meanAT[0][1][2] = 0.0;
816  _meanAT[0][1][3] = 0.0;
817  _meanAC[0][1][0] = -0.00320856;
818  _meanAC[0][1][1] = 0.0240109;
819  _meanAC[0][1][2] = 115.145;
820  _meanAC[0][1][3] = 205.859;
821  _meanAS[0][1][0] = 0.0349736;
822  _meanAS[0][1][1] = -0.00232864;
823  _meanAS[0][1][2] = 318.584;
824  _meanAS[0][1][3] = 1.4e+09;
825  _meanAM[0][1][0] = -0.00104798;
826  _meanAM[0][1][1] = 0.208249;
827  _meanAM[0][1][2] = 297.049;
828  _meanAM[0][1][3] = 220.609;
829  _meanBT[0][1][0] = 0.0;
830  _meanBT[0][1][1] = 0.0;
831  _meanBT[0][1][2] = 0.0;
832  _meanBT[0][1][3] = 0.0;
833  _meanBC[0][1][0] = -0.00420429;
834  _meanBC[0][1][1] = 0.00203991;
835  _meanBC[0][1][2] = 172.278;
836  _meanBC[0][1][3] = 410.677;
837  _meanBS[0][1][0] = -0.0430854;
838  _meanBS[0][1][1] = 0.0961883;
839  _meanBS[0][1][2] = 0.196958;
840  _meanBS[0][1][3] = 11442.2;
841  _meanBM[0][1][0] = -0.00389457;
842  _meanBM[0][1][1] = 0.0449086;
843  _meanBM[0][1][2] = 78.9252;
844  _meanBM[0][1][3] = 103.237;
845  _meanR9[0][1][0] = 0.0182102;
846  _meanR9[0][1][1] = -0.03752;
847  _meanR9[0][1][2] = 0.0198881;
848  _meanR9[0][1][3] = 0;
849 
850  _sigmaScale[0][1][0] = 0.386681;
851  _sigmaScale[0][1][1] = 0.0913412;
852  _sigmaScale[0][1][2] = 0.00119232;
853  _sigmaScale[0][1][3] = 0;
854  _sigmaAT[0][1][0] = 1.36562;
855  _sigmaAT[0][1][1] = 0;
856  _sigmaAT[0][1][2] = 0;
857  _sigmaAT[0][1][3] = 0;
858  _sigmaAC[0][1][0] = -0.00504613;
859  _sigmaAC[0][1][1] = -1.09115;
860  _sigmaAC[0][1][2] = 8.57406;
861  _sigmaAC[0][1][3] = 57.1351;
862  _sigmaAS[0][1][0] = 0;
863  _sigmaAS[0][1][1] = 0;
864  _sigmaAS[0][1][2] = 0;
865  _sigmaAS[0][1][3] = 0;
866  _sigmaAM[0][1][0] = -0.00014319;
867  _sigmaAM[0][1][1] = 5.39527;
868  _sigmaAM[0][1][2] = 432.566;
869  _sigmaAM[0][1][3] = 265.165;
870  _sigmaBT[0][1][0] = -0.040161;
871  _sigmaBT[0][1][1] = 2.65711;
872  _sigmaBT[0][1][2] = -0.398357;
873  _sigmaBT[0][1][3] = -0.440649;
874  _sigmaBC[0][1][0] = 0.00580015;
875  _sigmaBC[0][1][1] = -0.631833;
876  _sigmaBC[0][1][2] = 18594.3;
877  _sigmaBC[0][1][3] = 4.00955e+08;
878  _sigmaBS[0][1][0] = 0;
879  _sigmaBS[0][1][1] = 0;
880  _sigmaBS[0][1][2] = 0;
881  _sigmaBS[0][1][3] = 0;
882  _sigmaBM[0][1][0] = -0.00376665;
883  _sigmaBM[0][1][1] = 3.74316;
884  _sigmaBM[0][1][2] = 102.72;
885  _sigmaBM[0][1][3] = 157.396;
886  _sigmaR9[0][1][0] = -3.12696;
887  _sigmaR9[0][1][1] = 1.75114;
888  _sigmaR9[0][1][2] = 0;
889  _sigmaR9[0][1][3] = 0;
890 
891  _meanScale[1][0][0] = 0.999461;
892  _meanScale[1][0][1] = 4.37414e-06;
893  _meanScale[1][0][2] = 4.92078e-06;
894  _meanScale[1][0][3] = -0.121609;
895  _meanAT[1][0][0] = 0.0;
896  _meanAT[1][0][1] = 0.0;
897  _meanAT[1][0][2] = 0.0;
898  _meanAT[1][0][3] = 0.0;
899  _meanAC[1][0][0] = -0.000396058;
900  _meanAC[1][0][1] = 0.0144837;
901  _meanAC[1][0][2] = 1374.93;
902  _meanAC[1][0][3] = 945.634;
903  _meanAS[1][0][0] = -0.000871036;
904  _meanAS[1][0][1] = 0.0442747;
905  _meanAS[1][0][2] = 645.709;
906  _meanAS[1][0][3] = 962.845;
907  _meanAM[1][0][0] = 0.000434298;
908  _meanAM[1][0][1] = 0.0658628;
909  _meanAM[1][0][2] = 1928.49;
910  _meanAM[1][0][3] = 728.522;
911  _meanBT[1][0][0] = 0.0;
912  _meanBT[1][0][1] = 0.0;
913  _meanBT[1][0][2] = 0.0;
914  _meanBT[1][0][3] = 0.0;
915  _meanBC[1][0][0] = -0.000452212;
916  _meanBC[1][0][1] = 0.0129968;
917  _meanBC[1][0][2] = 1056.08;
918  _meanBC[1][0][3] = 759.102;
919  _meanBS[1][0][0] = -0.000786157;
920  _meanBS[1][0][1] = 0.0346555;
921  _meanBS[1][0][2] = 592.239;
922  _meanBS[1][0][3] = 854.285;
923  _meanBM[1][0][0] = -0.0665038;
924  _meanBM[1][0][1] = -0.00211713;
925  _meanBM[1][0][2] = 4.84395;
926  _meanBM[1][0][3] = 11.6644;
927  _meanR9[1][0][0] = 0.971355;
928  _meanR9[1][0][1] = 47.2751;
929  _meanR9[1][0][2] = 536.907;
930  _meanR9[1][0][3] = 0;
931 
932  _sigmaScale[1][0][0] = 0.254641;
933  _sigmaScale[1][0][1] = 0.00264818;
934  _sigmaScale[1][0][2] = 0.0114953;
935  _sigmaScale[1][0][3] = 0;
936  _sigmaAT[1][0][0] = 0.935839;
937  _sigmaAT[1][0][1] = 0;
938  _sigmaAT[1][0][2] = 0;
939  _sigmaAT[1][0][3] = 0;
940  _sigmaAC[1][0][0] = -0.00476475;
941  _sigmaAC[1][0][1] = 2.14548;
942  _sigmaAC[1][0][2] = 29937;
943  _sigmaAC[1][0][3] = 2.6e+11;
944  _sigmaAS[1][0][0] = -8.17285e-05;
945  _sigmaAS[1][0][1] = 1.5821;
946  _sigmaAS[1][0][2] = 1928.83;
947  _sigmaAS[1][0][3] = 902.519;
948  _sigmaAM[1][0][0] = 0.0278577;
949  _sigmaAM[1][0][1] = 0.58439;
950  _sigmaAM[1][0][2] = 43.3575;
951  _sigmaAM[1][0][3] = 19.7836;
952  _sigmaBT[1][0][0] = -0.456051;
953  _sigmaBT[1][0][1] = 0;
954  _sigmaBT[1][0][2] = 0;
955  _sigmaBT[1][0][3] = 0;
956  _sigmaBC[1][0][0] = -0.00264527;
957  _sigmaBC[1][0][1] = 0.696043;
958  _sigmaBC[1][0][2] = 7.49509e+12;
959  _sigmaBC[1][0][3] = 96843;
960  _sigmaBS[1][0][0] = 0.000258933;
961  _sigmaBS[1][0][1] = 1.28387;
962  _sigmaBS[1][0][2] = 1668.71;
963  _sigmaBS[1][0][3] = 730.716;
964  _sigmaBM[1][0][0] = 0.00121506;
965  _sigmaBM[1][0][1] = 0.938541;
966  _sigmaBM[1][0][2] = 9003.57;
967  _sigmaBM[1][0][3] = 288.897;
968  _sigmaR9[1][0][0] = 1.01207;
969  _sigmaR9[1][0][1] = -816.244;
970  _sigmaR9[1][0][2] = -16283.8;
971  _sigmaR9[1][0][3] = 0;
972 
973  _meanScale[1][1][0] = 0.324634;
974  _meanScale[1][1][1] = 9.48206e-05;
975  _meanScale[1][1][2] = 1.0e-12;
976  _meanScale[1][1][3] = 1.0e-12;
977  _meanAT[1][1][0] = 0.0;
978  _meanAT[1][1][1] = 0.0;
979  _meanAT[1][1][2] = 0.0;
980  _meanAT[1][1][3] = 0.0;
981  _meanAC[1][1][0] = -0.00158311;
982  _meanAC[1][1][1] = 0.0106161;
983  _meanAC[1][1][2] = 338.964;
984  _meanAC[1][1][3] = 797.172;
985  _meanAS[1][1][0] = -0.00960269;
986  _meanAS[1][1][1] = -0.00496491;
987  _meanAS[1][1][2] = 934.472;
988  _meanAS[1][1][3] = 8.32667e-16;
989  _meanAM[1][1][0] = -0.00219814;
990  _meanAM[1][1][1] = 0.653906;
991  _meanAM[1][1][2] = 0.0949848;
992  _meanAM[1][1][3] = 0.0977831;
993  _meanBT[1][1][0] = 0.0;
994  _meanBT[1][1][1] = 0.0;
995  _meanBT[1][1][2] = 0.0;
996  _meanBT[1][1][3] = 0.0;
997  _meanBC[1][1][0] = -0.00423472;
998  _meanBC[1][1][1] = 0.0279695;
999  _meanBC[1][1][2] = 28073.7;
1000  _meanBC[1][1][3] = 118612;
1001  _meanBS[1][1][0] = -0.0012476;
1002  _meanBS[1][1][1] = 0.02744;
1003  _meanBS[1][1][2] = 390.697;
1004  _meanBS[1][1][3] = 727.861;
1005  _meanBM[1][1][0] = -1.36573e-05;
1006  _meanBM[1][1][1] = 0.0667504;
1007  _meanBM[1][1][2] = -80154.4;
1008  _meanBM[1][1][3] = 576.637;
1009  _meanR9[1][1][0] = 0.113317;
1010  _meanR9[1][1][1] = 0.0142669;
1011  _meanR9[1][1][2] = -0.125721;
1012  _meanR9[1][1][3] = 0;
1013 
1014  _sigmaScale[1][1][0] = 0.471767;
1015  _sigmaScale[1][1][1] = 0.211196;
1016  _sigmaScale[1][1][2] = 0.0240124;
1017  _sigmaScale[1][1][3] = 0;
1018  _sigmaAT[1][1][0] = 0.404395;
1019  _sigmaAT[1][1][1] = 0;
1020  _sigmaAT[1][1][2] = 0;
1021  _sigmaAT[1][1][3] = 0;
1022  _sigmaAC[1][1][0] = 0.00173151;
1023  _sigmaAC[1][1][1] = -0.479291;
1024  _sigmaAC[1][1][2] = 11583.5;
1025  _sigmaAC[1][1][3] = -7e+09;
1026  _sigmaAS[1][1][0] = 0.000450387;
1027  _sigmaAS[1][1][1] = 0.662978;
1028  _sigmaAS[1][1][2] = 924.051;
1029  _sigmaAS[1][1][3] = 448.417;
1030  _sigmaAM[1][1][0] = 0.00335603;
1031  _sigmaAM[1][1][1] = 0.648407;
1032  _sigmaAM[1][1][2] = 134.672;
1033  _sigmaAM[1][1][3] = 27.4139;
1034  _sigmaBT[1][1][0] = 0.602402;
1035  _sigmaBT[1][1][1] = 0;
1036  _sigmaBT[1][1][2] = 0;
1037  _sigmaBT[1][1][3] = 0;
1038  _sigmaBC[1][1][0] = -0.00256192;
1039  _sigmaBC[1][1][1] = 2.01276;
1040  _sigmaBC[1][1][2] = 114558;
1041  _sigmaBC[1][1][3] = 2.15421e+06;
1042  _sigmaBS[1][1][0] = 0.00151576;
1043  _sigmaBS[1][1][1] = 0.359084;
1044  _sigmaBS[1][1][2] = 329.414;
1045  _sigmaBS[1][1][3] = 154.509;
1046  _sigmaBM[1][1][0] = -0.0452587;
1047  _sigmaBM[1][1][1] = 1.26253;
1048  _sigmaBM[1][1][2] = 1.9e+09;
1049  _sigmaBM[1][1][3] = 1058.76;
1050  _sigmaR9[1][1][0] = 4.59667;
1051  _sigmaR9[1][1][1] = -5.14404;
1052  _sigmaR9[1][1][2] = 0;
1053  _sigmaR9[1][1][3] = 0;
1054 
1055  _initialised = true;
1056  }
1057 
1058  if (s == "3_11") {
1059  _meanScale[0][0][0] = 0.994363;
1060  _meanScale[0][0][1] = 4.84904e-07;
1061  _meanScale[0][0][2] = 1.54475e-05;
1062  _meanScale[0][0][3] = -0.103309;
1063  _meanAT[0][0][0] = 0.0;
1064  _meanAT[0][0][1] = 0.0;
1065  _meanAT[0][0][2] = 0.0;
1066  _meanAT[0][0][3] = 0.0;
1067  _meanAC[0][0][0] = -0.00360057;
1068  _meanAC[0][0][1] = 0.00970858;
1069  _meanAC[0][0][2] = 409.406;
1070  _meanAC[0][0][3] = 527.952;
1071  _meanAS[0][0][0] = -1.1;
1072  _meanAS[0][0][1] = 0.00135995;
1073  _meanAS[0][0][2] = 295.712;
1074  _meanAS[0][0][3] = 5.13202e+07;
1075  _meanAM[0][0][0] = -0.00129854;
1076  _meanAM[0][0][1] = 0.151466;
1077  _meanAM[0][0][2] = 261.828;
1078  _meanAM[0][0][3] = 214.662;
1079  _meanBT[0][0][0] = 0.0;
1080  _meanBT[0][0][1] = 0.0;
1081  _meanBT[0][0][2] = 0.0;
1082  _meanBT[0][0][3] = 0.0;
1083  _meanBC[0][0][0] = -0.00286864;
1084  _meanBC[0][0][1] = 0.0114118;
1085  _meanBC[0][0][2] = 563.962;
1086  _meanBC[0][0][3] = 412.922;
1087  _meanBS[0][0][0] = -0.00210996;
1088  _meanBS[0][0][1] = 0.00327867;
1089  _meanBS[0][0][2] = 23.617;
1090  _meanBS[0][0][3] = 1018.45;
1091  _meanBM[0][0][0] = -0.002287;
1092  _meanBM[0][0][1] = 0.0848984;
1093  _meanBM[0][0][2] = 235.575;
1094  _meanBM[0][0][3] = 260.773;
1095  _meanR9[0][0][0] = 0.951724;
1096  _meanR9[0][0][1] = 23.7181;
1097  _meanR9[0][0][2] = 177.34;
1098  _meanR9[0][0][3] = 0;
1099 
1100  _sigmaScale[0][0][0] = 0.187578;
1101  _sigmaScale[0][0][1] = -0.000901045;
1102  _sigmaScale[0][0][2] = 0.00673186;
1103  _sigmaScale[0][0][3] = 0;
1104  _sigmaAT[0][0][0] = 0.183777;
1105  _sigmaAT[0][0][1] = 0;
1106  _sigmaAT[0][0][2] = 0;
1107  _sigmaAT[0][0][3] = 0;
1108  _sigmaAC[0][0][0] = -0.00430202;
1109  _sigmaAC[0][0][1] = 0.122501;
1110  _sigmaAC[0][0][2] = 51.9772;
1111  _sigmaAC[0][0][3] = -3e+17;
1112  _sigmaAS[0][0][0] = 0;
1113  _sigmaAS[0][0][1] = 0;
1114  _sigmaAS[0][0][2] = 0;
1115  _sigmaAS[0][0][3] = 0;
1116  _sigmaAM[0][0][0] = 0.00101883;
1117  _sigmaAM[0][0][1] = 11.2009;
1118  _sigmaAM[0][0][2] = 593.111;
1119  _sigmaAM[0][0][3] = 345.433;
1120  _sigmaBT[0][0][0] = -6.02356e-05;
1121  _sigmaBT[0][0][1] = 6.99896;
1122  _sigmaBT[0][0][2] = 235.996;
1123  _sigmaBT[0][0][3] = 196;
1124  _sigmaBC[0][0][0] = -0.00282254;
1125  _sigmaBC[0][0][1] = 0.18764;
1126  _sigmaBC[0][0][2] = 509.825;
1127  _sigmaBC[0][0][3] = 1400.14;
1128  _sigmaBS[0][0][0] = 0;
1129  _sigmaBS[0][0][1] = 0;
1130  _sigmaBS[0][0][2] = 0;
1131  _sigmaBS[0][0][3] = 0;
1132  _sigmaBM[0][0][0] = -0.00252199;
1133  _sigmaBM[0][0][1] = 39.1544;
1134  _sigmaBM[0][0][2] = 612.481;
1135  _sigmaBM[0][0][3] = 905.994;
1136  _sigmaR9[0][0][0] = 0.95608;
1137  _sigmaR9[0][0][1] = 2203.31;
1138  _sigmaR9[0][0][2] = -22454.2;
1139  _sigmaR9[0][0][3] = 0;
1140 
1141  _meanScale[0][1][0] = 0.889415;
1142  _meanScale[0][1][1] = 1.21788e-05;
1143  _meanScale[0][1][2] = -4.3438e-06;
1144  _meanScale[0][1][3] = -0.629968;
1145  _meanAT[0][1][0] = 0.0;
1146  _meanAT[0][1][1] = 0.0;
1147  _meanAT[0][1][2] = 0.0;
1148  _meanAT[0][1][3] = 0.0;
1149  _meanAC[0][1][0] = -0.00313701;
1150  _meanAC[0][1][1] = 0.0227998;
1151  _meanAC[0][1][2] = 128.653;
1152  _meanAC[0][1][3] = 234.333;
1153  _meanAS[0][1][0] = 0.0346198;
1154  _meanAS[0][1][1] = -0.00261336;
1155  _meanAS[0][1][2] = 177.983;
1156  _meanAS[0][1][3] = 1.19839e+14;
1157  _meanAM[0][1][0] = -0.00100745;
1158  _meanAM[0][1][1] = 0.264247;
1159  _meanAM[0][1][2] = 337.255;
1160  _meanAM[0][1][3] = 251.454;
1161  _meanBT[0][1][0] = 0.0;
1162  _meanBT[0][1][1] = 0.0;
1163  _meanBT[0][1][2] = 0.0;
1164  _meanBT[0][1][3] = 0.0;
1165  _meanBC[0][1][0] = -0.00397794;
1166  _meanBC[0][1][1] = 0.00219079;
1167  _meanBC[0][1][2] = 176.842;
1168  _meanBC[0][1][3] = 450.29;
1169  _meanBS[0][1][0] = -2e+07;
1170  _meanBS[0][1][1] = 0.0957598;
1171  _meanBS[0][1][2] = -8.88573e-27;
1172  _meanBS[0][1][3] = 11442.2;
1173  _meanBM[0][1][0] = -0.00366315;
1174  _meanBM[0][1][1] = 0.0622186;
1175  _meanBM[0][1][2] = 94.5155;
1176  _meanBM[0][1][3] = 126.404;
1177  _meanR9[0][1][0] = 0.00636789;
1178  _meanR9[0][1][1] = 0.000336062;
1179  _meanR9[0][1][2] = -0.0092699;
1180  _meanR9[0][1][3] = 0;
1181 
1182  _sigmaScale[0][1][0] = 0.685096;
1183  _sigmaScale[0][1][1] = 0.129065;
1184  _sigmaScale[0][1][2] = -0.00212486;
1185  _sigmaScale[0][1][3] = 0;
1186  _sigmaAT[0][1][0] = 0.898865;
1187  _sigmaAT[0][1][1] = 0;
1188  _sigmaAT[0][1][2] = 0;
1189  _sigmaAT[0][1][3] = 0;
1190  _sigmaAC[0][1][0] = -0.00492979;
1191  _sigmaAC[0][1][1] = -1.20123;
1192  _sigmaAC[0][1][2] = 2.89231;
1193  _sigmaAC[0][1][3] = 18.2059;
1194  _sigmaAS[0][1][0] = 0;
1195  _sigmaAS[0][1][1] = 0;
1196  _sigmaAS[0][1][2] = 0;
1197  _sigmaAS[0][1][3] = 0;
1198  _sigmaAM[0][1][0] = -0.000727825;
1199  _sigmaAM[0][1][1] = 8.42395;
1200  _sigmaAM[0][1][2] = 512.032;
1201  _sigmaAM[0][1][3] = 415.962;
1202  _sigmaBT[0][1][0] = -0.0336364;
1203  _sigmaBT[0][1][1] = 2.45182;
1204  _sigmaBT[0][1][2] = -0.284353;
1205  _sigmaBT[0][1][3] = -0.31679;
1206  _sigmaBC[0][1][0] = 0.00510553;
1207  _sigmaBC[0][1][1] = -0.953869;
1208  _sigmaBC[0][1][2] = 113872;
1209  _sigmaBC[0][1][3] = 1.35966e+09;
1210  _sigmaBS[0][1][0] = 0;
1211  _sigmaBS[0][1][1] = 0;
1212  _sigmaBS[0][1][2] = 0;
1213  _sigmaBS[0][1][3] = 0;
1214  _sigmaBM[0][1][0] = -0.0034071;
1215  _sigmaBM[0][1][1] = 4.19719;
1216  _sigmaBM[0][1][2] = 128.952;
1217  _sigmaBM[0][1][3] = 180.604;
1218  _sigmaR9[0][1][0] = -3.38988;
1219  _sigmaR9[0][1][1] = 2.0714;
1220  _sigmaR9[0][1][2] = 0;
1221  _sigmaR9[0][1][3] = 0;
1222 
1223  _meanScale[1][0][0] = 1.0009;
1224  _meanScale[1][0][1] = -4.79805e-06;
1225  _meanScale[1][0][2] = 3.34625e-05;
1226  _meanScale[1][0][3] = -0.194267;
1227  _meanAT[1][0][0] = 0.0;
1228  _meanAT[1][0][1] = 0.0;
1229  _meanAT[1][0][2] = 0.0;
1230  _meanAT[1][0][3] = 0.0;
1231  _meanAC[1][0][0] = -0.000177563;
1232  _meanAC[1][0][1] = 0.0122839;
1233  _meanAC[1][0][2] = 1798.92;
1234  _meanAC[1][0][3] = 776.856;
1235  _meanAS[1][0][0] = -0.000533039;
1236  _meanAS[1][0][1] = 0.0642604;
1237  _meanAS[1][0][2] = 969.596;
1238  _meanAS[1][0][3] = 1004.15;
1239  _meanAM[1][0][0] = 0.000163185;
1240  _meanAM[1][0][1] = 0.085936;
1241  _meanAM[1][0][2] = 1593.17;
1242  _meanAM[1][0][3] = 681.623;
1243  _meanBT[1][0][0] = 0.0;
1244  _meanBT[1][0][1] = 0.0;
1245  _meanBT[1][0][2] = 0.0;
1246  _meanBT[1][0][3] = 0.0;
1247  _meanBC[1][0][0] = -0.000518186;
1248  _meanBC[1][0][1] = 0.0121868;
1249  _meanBC[1][0][2] = 1112.53;
1250  _meanBC[1][0][3] = 933.281;
1251  _meanBS[1][0][0] = -0.000750734;
1252  _meanBS[1][0][1] = 0.03859;
1253  _meanBS[1][0][2] = 547.579;
1254  _meanBS[1][0][3] = 775.887;
1255  _meanBM[1][0][0] = -0.190395;
1256  _meanBM[1][0][1] = -0.00362647;
1257  _meanBM[1][0][2] = 5.25687;
1258  _meanBM[1][0][3] = -2.8e+08;
1259  _meanR9[1][0][0] = 0.972346;
1260  _meanR9[1][0][1] = 53.9185;
1261  _meanR9[1][0][2] = 1354.5;
1262  _meanR9[1][0][3] = 0;
1263 
1264  _sigmaScale[1][0][0] = 0.348019;
1265  _sigmaScale[1][0][1] = -6.43731e-11;
1266  _sigmaScale[1][0][2] = 0.0158647;
1267  _sigmaScale[1][0][3] = 0;
1268  _sigmaAT[1][0][0] = 0.215239;
1269  _sigmaAT[1][0][1] = 0;
1270  _sigmaAT[1][0][2] = 0;
1271  _sigmaAT[1][0][3] = 0;
1272  _sigmaAC[1][0][0] = -0.00492298;
1273  _sigmaAC[1][0][1] = -3.40058;
1274  _sigmaAC[1][0][2] = 17263.9;
1275  _sigmaAC[1][0][3] = 2.6e+11;
1276  _sigmaAS[1][0][0] = -0.000237998;
1277  _sigmaAS[1][0][1] = 3.0258;
1278  _sigmaAS[1][0][2] = 1811.25;
1279  _sigmaAS[1][0][3] = 1846.79;
1280  _sigmaAM[1][0][0] = 0.0210134;
1281  _sigmaAM[1][0][1] = 0.328359;
1282  _sigmaAM[1][0][2] = 22.49;
1283  _sigmaAM[1][0][3] = 14.5021;
1284  _sigmaBT[1][0][0] = -0.495072;
1285  _sigmaBT[1][0][1] = 0;
1286  _sigmaBT[1][0][2] = 0;
1287  _sigmaBT[1][0][3] = 0;
1288  _sigmaBC[1][0][0] = -0.00265007;
1289  _sigmaBC[1][0][1] = 0.970549;
1290  _sigmaBC[1][0][2] = -6.89119e+07;
1291  _sigmaBC[1][0][3] = 180110;
1292  _sigmaBS[1][0][0] = 0.00045833;
1293  _sigmaBS[1][0][1] = 2.16342;
1294  _sigmaBS[1][0][2] = 3582.4;
1295  _sigmaBS[1][0][3] = 1100.36;
1296  _sigmaBM[1][0][0] = 0.00188871;
1297  _sigmaBM[1][0][1] = 1.66177;
1298  _sigmaBM[1][0][2] = 3.2e+08;
1299  _sigmaBM[1][0][3] = 2163.81;
1300  _sigmaR9[1][0][0] = -220.415;
1301  _sigmaR9[1][0][1] = 5.19136e-08;
1302  _sigmaR9[1][0][2] = 3.04028e-10;
1303  _sigmaR9[1][0][3] = 0;
1304 
1305  _meanScale[1][1][0] = 0.338011;
1306  _meanScale[1][1][1] = 9.47815e-05;
1307  _meanScale[1][1][2] = -0.000238735;
1308  _meanScale[1][1][3] = -0.846414;
1309  _meanAT[1][1][0] = 0.0;
1310  _meanAT[1][1][1] = 0.0;
1311  _meanAT[1][1][2] = 0.0;
1312  _meanAT[1][1][3] = 0.0;
1313  _meanAC[1][1][0] = -0.00125367;
1314  _meanAC[1][1][1] = 0.013324;
1315  _meanAC[1][1][2] = 203.988;
1316  _meanAC[1][1][3] = 431.951;
1317  _meanAS[1][1][0] = 0.000282607;
1318  _meanAS[1][1][1] = 0.0307431;
1319  _meanAS[1][1][2] = 343.509;
1320  _meanAS[1][1][3] = 274.957;
1321  _meanAM[1][1][0] = 0.0020258;
1322  _meanAM[1][1][1] = 0.643913;
1323  _meanAM[1][1][2] = 0.0693877;
1324  _meanAM[1][1][3] = 0.0816029;
1325  _meanBT[1][1][0] = 0.0;
1326  _meanBT[1][1][1] = 0.0;
1327  _meanBT[1][1][2] = 0.0;
1328  _meanBT[1][1][3] = 0.0;
1329  _meanBC[1][1][0] = -0.00513833;
1330  _meanBC[1][1][1] = 5.94424e+08;
1331  _meanBC[1][1][2] = -62814.9;
1332  _meanBC[1][1][3] = 118612;
1333  _meanBS[1][1][0] = -0.00152129;
1334  _meanBS[1][1][1] = 0.0234694;
1335  _meanBS[1][1][2] = 186.483;
1336  _meanBS[1][1][3] = 754.201;
1337  _meanBM[1][1][0] = -0.000404987;
1338  _meanBM[1][1][1] = 0.156384;
1339  _meanBM[1][1][2] = -1.7e+08;
1340  _meanBM[1][1][3] = 1793.83;
1341  _meanR9[1][1][0] = 0.0645278;
1342  _meanR9[1][1][1] = 0.161614;
1343  _meanR9[1][1][2] = -0.215822;
1344  _meanR9[1][1][3] = 0;
1345 
1346  _sigmaScale[1][1][0] = 1.07376;
1347  _sigmaScale[1][1][1] = 7.47238e-13;
1348  _sigmaScale[1][1][2] = 0.0289594;
1349  _sigmaScale[1][1][3] = 0;
1350  _sigmaAT[1][1][0] = -0.520907;
1351  _sigmaAT[1][1][1] = 0;
1352  _sigmaAT[1][1][2] = 0;
1353  _sigmaAT[1][1][3] = 0;
1354  _sigmaAC[1][1][0] = 0.00165941;
1355  _sigmaAC[1][1][1] = -0.351422;
1356  _sigmaAC[1][1][2] = 8968.94;
1357  _sigmaAC[1][1][3] = -7e+09;
1358  _sigmaAS[1][1][0] = 0.000490279;
1359  _sigmaAS[1][1][1] = 0.554531;
1360  _sigmaAS[1][1][2] = 469.111;
1361  _sigmaAS[1][1][3] = 457.541;
1362  _sigmaAM[1][1][0] = 0.00102079;
1363  _sigmaAM[1][1][1] = 0.628055;
1364  _sigmaAM[1][1][2] = 53.9452;
1365  _sigmaAM[1][1][3] = 72.911;
1366  _sigmaBT[1][1][0] = -0.461542;
1367  _sigmaBT[1][1][1] = 0;
1368  _sigmaBT[1][1][2] = 0;
1369  _sigmaBT[1][1][3] = 0;
1370  _sigmaBC[1][1][0] = -0.00219303;
1371  _sigmaBC[1][1][1] = 0.874327;
1372  _sigmaBC[1][1][2] = 71353.2;
1373  _sigmaBC[1][1][3] = 2.09924e+08;
1374  _sigmaBS[1][1][0] = 0.00104021;
1375  _sigmaBS[1][1][1] = 0.236098;
1376  _sigmaBS[1][1][2] = 482.954;
1377  _sigmaBS[1][1][3] = 191.984;
1378  _sigmaBM[1][1][0] = -0.000116086;
1379  _sigmaBM[1][1][1] = 2.4438;
1380  _sigmaBM[1][1][2] = 1.9e+09;
1381  _sigmaBM[1][1][3] = -700.271;
1382  _sigmaR9[1][1][0] = 4.59374;
1383  _sigmaR9[1][1][1] = -5.06202;
1384  _sigmaR9[1][1][2] = 0;
1385  _sigmaR9[1][1][3] = 0;
1386 
1387  _initialised = true;
1388  }
1389 
1390  if (s == "4_2") {
1391  _meanScale[0][0][0] = 0.996757;
1392  _meanScale[0][0][1] = -1.02729e-05;
1393  _meanScale[0][0][2] = 2.92397e-05;
1394  _meanScale[0][0][3] = -0.0892806;
1395  _meanAT[0][0][0] = 0.000616189;
1396  _meanAT[0][0][1] = 0;
1397  _meanAT[0][0][2] = 0;
1398  _meanAT[0][0][3] = 0;
1399  _meanAC[0][0][0] = -0.00343502;
1400  _meanAC[0][0][1] = 0.0102123;
1401  _meanAC[0][0][2] = 460.294;
1402  _meanAC[0][0][3] = 510.925;
1403  _meanAS[0][0][0] = 0;
1404  _meanAS[0][0][1] = 0;
1405  _meanAS[0][0][2] = 0;
1406  _meanAS[0][0][3] = 0;
1407  _meanAM[0][0][0] = -0.0010363;
1408  _meanAM[0][0][1] = 0.147364;
1409  _meanAM[0][0][2] = 280.742;
1410  _meanAM[0][0][3] = 200.903;
1411  _meanBT[0][0][0] = 0;
1412  _meanBT[0][0][1] = 0.0290516;
1413  _meanBT[0][0][2] = -113.185;
1414  _meanBT[0][0][3] = -176099;
1415  _meanBC[0][0][0] = -0.00262961;
1416  _meanBC[0][0][1] = 0.0134481;
1417  _meanBC[0][0][2] = 699.825;
1418  _meanBC[0][0][3] = 401.452;
1419  _meanBS[0][0][0] = 0;
1420  _meanBS[0][0][1] = 0;
1421  _meanBS[0][0][2] = 0;
1422  _meanBS[0][0][3] = 0;
1423  _meanBM[0][0][0] = -0.00170238;
1424  _meanBM[0][0][1] = 0.0751873;
1425  _meanBM[0][0][2] = 232.9;
1426  _meanBM[0][0][3] = 225.712;
1427  _meanR9[0][0][0] = 0.946441;
1428  _meanR9[0][0][1] = 19.5162;
1429  _meanR9[0][0][2] = 173.503;
1430  _meanR9[0][0][3] = 0;
1431 
1432  _sigmaScale[0][0][0] = 0.196245;
1433  _sigmaScale[0][0][1] = 0.0191932;
1434  _sigmaScale[0][0][2] = 0.00660053;
1435  _sigmaScale[0][0][3] = 0;
1436  _sigmaAT[0][0][0] = 0.179417;
1437  _sigmaAT[0][0][1] = 0;
1438  _sigmaAT[0][0][2] = 0;
1439  _sigmaAT[0][0][3] = 0;
1440  _sigmaAC[0][0][0] = -0.00383752;
1441  _sigmaAC[0][0][1] = 0.0881981;
1442  _sigmaAC[0][0][2] = 88.6384;
1443  _sigmaAC[0][0][3] = -3e+17;
1444  _sigmaAS[0][0][0] = 0;
1445  _sigmaAS[0][0][1] = 0;
1446  _sigmaAS[0][0][2] = 0;
1447  _sigmaAS[0][0][3] = 0;
1448  _sigmaAM[0][0][0] = 0.000932441;
1449  _sigmaAM[0][0][1] = 10.1637;
1450  _sigmaAM[0][0][2] = 610.691;
1451  _sigmaAM[0][0][3] = 290.271;
1452  _sigmaBT[0][0][0] = -0.00599323;
1453  _sigmaBT[0][0][1] = 1.71943;
1454  _sigmaBT[0][0][2] = 90.7352;
1455  _sigmaBT[0][0][3] = 164.449;
1456  _sigmaBC[0][0][0] = -0.00167802;
1457  _sigmaBC[0][0][1] = 0.303306;
1458  _sigmaBC[0][0][2] = 1326.56;
1459  _sigmaBC[0][0][3] = 765.552;
1460  _sigmaBS[0][0][0] = 0;
1461  _sigmaBS[0][0][1] = 0;
1462  _sigmaBS[0][0][2] = 0;
1463  _sigmaBS[0][0][3] = 0;
1464  _sigmaBM[0][0][0] = -0.00252598;
1465  _sigmaBM[0][0][1] = 52.0947;
1466  _sigmaBM[0][0][2] = 660.313;
1467  _sigmaBM[0][0][3] = 1052.64;
1468  _sigmaR9[0][0][0] = 0.952982;
1469  _sigmaR9[0][0][1] = 1961.39;
1470  _sigmaR9[0][0][2] = 22382.1;
1471  _sigmaR9[0][0][3] = 0;
1472 
1473  _meanScale[0][1][0] = 0.88802;
1474  _meanScale[0][1][1] = 1.61e-05;
1475  _meanScale[0][1][2] = -1.08e-05;
1476  _meanScale[0][1][3] = -0.489;
1477  _meanAT[0][1][0] = -0.00165;
1478  _meanAT[0][1][1] = 0;
1479  _meanAT[0][1][2] = 0;
1480  _meanAT[0][1][3] = 0;
1481  _meanAC[0][1][0] = -0.003195;
1482  _meanAC[0][1][1] = 0.02012;
1483  _meanAC[0][1][2] = 151.6;
1484  _meanAC[0][1][3] = 255;
1485  _meanAS[0][1][0] = 0;
1486  _meanAS[0][1][1] = 0;
1487  _meanAS[0][1][2] = 0;
1488  _meanAS[0][1][3] = 0;
1489  _meanAM[0][1][0] = -0.00055;
1490  _meanAM[0][1][1] = 0.1515;
1491  _meanAM[0][1][2] = 534;
1492  _meanAM[0][1][3] = 330;
1493  _meanBT[0][1][0] = 0;
1494  _meanBT[0][1][1] = 0.187;
1495  _meanBT[0][1][2] = 299.298;
1496  _meanBT[0][1][3] = 428.221;
1497  _meanBC[0][1][0] = -0.00366;
1498  _meanBC[0][1][1] = 0.0038;
1499  _meanBC[0][1][2] = 760;
1500  _meanBC[0][1][3] = 760;
1501  _meanBS[0][1][0] = 0;
1502  _meanBS[0][1][1] = 0;
1503  _meanBS[0][1][2] = 0;
1504  _meanBS[0][1][3] = 0;
1505  _meanBM[0][1][0] = -0.00316;
1506  _meanBM[0][1][1] = 0.0404;
1507  _meanBM[0][1][2] = 137;
1508  _meanBM[0][1][3] = 146;
1509  _meanR9[0][1][0] = 0.02573;
1510  _meanR9[0][1][1] = -0.03722;
1511  _meanR9[0][1][2] = 0.0144;
1512  _meanR9[0][1][3] = 0;
1513 
1514  _sigmaScale[0][1][0] = 0.66;
1515  _sigmaScale[0][1][1] = 0.07465;
1516  _sigmaScale[0][1][2] = -0.00373;
1517  _sigmaScale[0][1][3] = 0;
1518  _sigmaAT[0][1][0] = 1.363;
1519  _sigmaAT[0][1][1] = 0;
1520  _sigmaAT[0][1][2] = 0;
1521  _sigmaAT[0][1][3] = 0;
1522  _sigmaAC[0][1][0] = -0.00342;
1523  _sigmaAC[0][1][1] = -1.667;
1524  _sigmaAC[0][1][2] = 6.6;
1525  _sigmaAC[0][1][3] = 14;
1526  _sigmaAS[0][1][0] = 0;
1527  _sigmaAS[0][1][1] = 0;
1528  _sigmaAS[0][1][2] = 0;
1529  _sigmaAS[0][1][3] = 0;
1530  _sigmaAM[0][1][0] = -0.00094;
1531  _sigmaAM[0][1][1] = 12.0228;
1532  _sigmaAM[0][1][2] = 536;
1533  _sigmaAM[0][1][3] = 464;
1534  _sigmaBT[0][1][0] = 0.022;
1535  _sigmaBT[0][1][1] = 3.223;
1536  _sigmaBT[0][1][2] = -0.361;
1537  _sigmaBT[0][1][3] = -0.318;
1538  _sigmaBC[0][1][0] = 0.00567264;
1539  _sigmaBC[0][1][1] = -1.184;
1540  _sigmaBC[0][1][2] = 76000;
1541  _sigmaBC[0][1][3] = 2.14748e+08;
1542  _sigmaBS[0][1][0] = 0;
1543  _sigmaBS[0][1][1] = 0;
1544  _sigmaBS[0][1][2] = 0;
1545  _sigmaBS[0][1][3] = 0;
1546  _sigmaBM[0][1][0] = -0.00236;
1547  _sigmaBM[0][1][1] = 5.78;
1548  _sigmaBM[0][1][2] = 166;
1549  _sigmaBM[0][1][3] = 203.5;
1550  _sigmaR9[0][1][0] = -2.94;
1551  _sigmaR9[0][1][1] = 1.53445;
1552  _sigmaR9[0][1][2] = 0;
1553  _sigmaR9[0][1][3] = 0;
1554 
1555  _meanScale[1][0][0] = 0.993921;
1556  _meanScale[1][0][1] = -8.11417e-06;
1557  _meanScale[1][0][2] = 3.23086e-05;
1558  _meanScale[1][0][3] = -0.0976369;
1559  _meanAT[1][0][0] = 0.0691979;
1560  _meanAT[1][0][1] = 0;
1561  _meanAT[1][0][2] = 0;
1562  _meanAT[1][0][3] = 0;
1563  _meanAC[1][0][0] = -0.000310485;
1564  _meanAC[1][0][1] = 0.0169478;
1565  _meanAC[1][0][2] = 1301.97;
1566  _meanAC[1][0][3] = 796.53;
1567  _meanAS[1][0][0] = -0.0005425;
1568  _meanAS[1][0][1] = 0.0676613;
1569  _meanAS[1][0][2] = 790.284;
1570  _meanAS[1][0][3] = 970;
1571  _meanAM[1][0][0] = 0.000134362;
1572  _meanAM[1][0][1] = 0.364822;
1573  _meanAM[1][0][2] = 3396.04;
1574  _meanAM[1][0][3] = 2407.2;
1575  _meanBT[1][0][0] = 0.0456649;
1576  _meanBT[1][0][1] = 0;
1577  _meanBT[1][0][2] = 0;
1578  _meanBT[1][0][3] = 0;
1579  _meanBC[1][0][0] = -0.000356413;
1580  _meanBC[1][0][1] = 0.0167018;
1581  _meanBC[1][0][2] = 1394.52;
1582  _meanBC[1][0][3] = 823.035;
1583  _meanBS[1][0][0] = -0.000484;
1584  _meanBS[1][0][1] = 0.0542618;
1585  _meanBS[1][0][2] = 798.07;
1586  _meanBS[1][0][3] = 1019.88;
1587  _meanBM[1][0][0] = -0.175333;
1588  _meanBM[1][0][1] = -0.00324513;
1589  _meanBM[1][0][2] = 2.87972;
1590  _meanBM[1][0][3] = 7.58712e+12;
1591  _meanR9[1][0][0] = 0.96393;
1592  _meanR9[1][0][1] = 29.6072;
1593  _meanR9[1][0][2] = 334.89;
1594  _meanR9[1][0][3] = 0;
1595 
1596  _sigmaScale[1][0][0] = 0.337911;
1597  _sigmaScale[1][0][1] = 1.03419e-11;
1598  _sigmaScale[1][0][2] = 0.0153846;
1599  _sigmaScale[1][0][3] = 0;
1600  _sigmaAT[1][0][0] = 1.12;
1601  _sigmaAT[1][0][1] = 0;
1602  _sigmaAT[1][0][2] = 0;
1603  _sigmaAT[1][0][3] = 0;
1604  _sigmaAC[1][0][0] = 48.1275;
1605  _sigmaAC[1][0][1] = 1.50005e+08;
1606  _sigmaAC[1][0][2] = 21231.6;
1607  _sigmaAC[1][0][3] = 2.6e+11;
1608  _sigmaAS[1][0][0] = -0.00036952;
1609  _sigmaAS[1][0][1] = 2.75194;
1610  _sigmaAS[1][0][2] = 1045.06;
1611  _sigmaAS[1][0][3] = 1420.87;
1612  _sigmaAM[1][0][0] = 0.05567;
1613  _sigmaAM[1][0][1] = 0.32;
1614  _sigmaAM[1][0][2] = 420;
1615  _sigmaAM[1][0][3] = 12.8233;
1616  _sigmaBT[1][0][0] = -0.22312;
1617  _sigmaBT[1][0][1] = 0;
1618  _sigmaBT[1][0][2] = 0;
1619  _sigmaBT[1][0][3] = 0;
1620  _sigmaBC[1][0][0] = -0.00320087;
1621  _sigmaBC[1][0][1] = 59.2836;
1622  _sigmaBC[1][0][2] = 7.49509e+12;
1623  _sigmaBC[1][0][3] = 1.32714e+07;
1624  _sigmaBS[1][0][0] = 0.000189384;
1625  _sigmaBS[1][0][1] = 2.89111;
1626  _sigmaBS[1][0][2] = 2468.02;
1627  _sigmaBS[1][0][3] = 1294.69;
1628  _sigmaBM[1][0][0] = 0.00154629;
1629  _sigmaBM[1][0][1] = 16.9762;
1630  _sigmaBM[1][0][2] = 1.05e+07;
1631  _sigmaBM[1][0][3] = -9e+06;
1632  _sigmaR9[1][0][0] = 99.68;
1633  _sigmaR9[1][0][1] = -9.37265e-08;
1634  _sigmaR9[1][0][2] = 6.91613e-09;
1635  _sigmaR9[1][0][3] = 0;
1636 
1637  _meanScale[1][1][0] = 0.340125;
1638  _meanScale[1][1][1] = -5.02007e-05;
1639  _meanScale[1][1][2] = 0.000208216;
1640  _meanScale[1][1][3] = -1.32063;
1641  _meanAT[1][1][0] = -0.092494;
1642  _meanAT[1][1][1] = 0;
1643  _meanAT[1][1][2] = 0;
1644  _meanAT[1][1][3] = 0;
1645  _meanAC[1][1][0] = -0.00131984;
1646  _meanAC[1][1][1] = 0.00950668;
1647  _meanAC[1][1][2] = 259.804;
1648  _meanAC[1][1][3] = 705.003;
1649  _meanAS[1][1][0] = -0.00705787;
1650  _meanAS[1][1][1] = -0.00581517;
1651  _meanAS[1][1][2] = 7.10951e+10;
1652  _meanAS[1][1][3] = -68.7322;
1653  _meanAM[1][1][0] = -0.00496966;
1654  _meanAM[1][1][1] = 0.655834;
1655  _meanAM[1][1][2] = 0.0491064;
1656  _meanAM[1][1][3] = 0.0632471;
1657  _meanBT[1][1][0] = -0.158344;
1658  _meanBT[1][1][1] = 0;
1659  _meanBT[1][1][2] = 0;
1660  _meanBT[1][1][3] = 0;
1661  _meanBC[1][1][0] = -0.00498431;
1662  _meanBC[1][1][1] = -18315.4;
1663  _meanBC[1][1][2] = 50760;
1664  _meanBC[1][1][3] = 118612;
1665  _meanBS[1][1][0] = -0.000620577;
1666  _meanBS[1][1][1] = 0.0247672;
1667  _meanBS[1][1][2] = 437.005;
1668  _meanBS[1][1][3] = 374.823;
1669  _meanBM[1][1][0] = 0.000431046;
1670  _meanBM[1][1][1] = 0.0224695;
1671  _meanBM[1][1][2] = -1.06e+07;
1672  _meanBM[1][1][3] = -135.039;
1673  _meanR9[1][1][0] = 0.151826;
1674  _meanR9[1][1][1] = 0.00348896;
1675  _meanR9[1][1][2] = -0.161781;
1676  _meanR9[1][1][3] = 0;
1677 
1678  _sigmaScale[1][1][0] = 1.19993;
1679  _sigmaScale[1][1][1] = 1.38778e-17;
1680  _sigmaScale[1][1][2] = 0.0251314;
1681  _sigmaScale[1][1][3] = 0;
1682  _sigmaAT[1][1][0] = -0.791929;
1683  _sigmaAT[1][1][1] = 0;
1684  _sigmaAT[1][1][2] = 0;
1685  _sigmaAT[1][1][3] = 0;
1686  _sigmaAC[1][1][0] = 0.0015505;
1687  _sigmaAC[1][1][1] = -0.530085;
1688  _sigmaAC[1][1][2] = 33506.7;
1689  _sigmaAC[1][1][3] = -7e+09;
1690  _sigmaAS[1][1][0] = 7.98682e-05;
1691  _sigmaAS[1][1][1] = 0.875124;
1692  _sigmaAS[1][1][2] = 483.102;
1693  _sigmaAS[1][1][3] = 1005.71;
1694  _sigmaAM[1][1][0] = -0.00510653;
1695  _sigmaAM[1][1][1] = 1.05312;
1696  _sigmaAM[1][1][2] = 49.6466;
1697  _sigmaAM[1][1][3] = 7.11474e+12;
1698  _sigmaBT[1][1][0] = -1.30079;
1699  _sigmaBT[1][1][1] = 0;
1700  _sigmaBT[1][1][2] = 0;
1701  _sigmaBT[1][1][3] = 0;
1702  _sigmaBC[1][1][0] = -0.00202301;
1703  _sigmaBC[1][1][1] = 4.19368;
1704  _sigmaBC[1][1][2] = -1.08161e+07;
1705  _sigmaBC[1][1][3] = -6e+09;
1706  _sigmaBS[1][1][0] = 0.00182147;
1707  _sigmaBS[1][1][1] = 0.25995;
1708  _sigmaBS[1][1][2] = 881.576;
1709  _sigmaBS[1][1][3] = 304.891;
1710  _sigmaBM[1][1][0] = -0.0454995;
1711  _sigmaBM[1][1][1] = 7.63845;
1712  _sigmaBM[1][1][2] = 1.9e+09;
1713  _sigmaBM[1][1][3] = 150001;
1714  _sigmaR9[1][1][0] = 5.69741;
1715  _sigmaR9[1][1][1] = -6.23853;
1716  _sigmaR9[1][1][2] = 0;
1717  _sigmaR9[1][1][3] = 0;
1718 
1719  _initialised = true;
1720  }
1721 
1722  if (s == "4_2e") {
1723  _meanScale[0][0][0] = 1.02133;
1724  _meanScale[0][0][1] = -0.000183073;
1725  _meanScale[0][0][2] = 0.000252052;
1726  _meanScale[0][0][3] = 0.300892;
1727  _meanAT[0][0][0] = 0.016876;
1728  _meanAT[0][0][1] = 0;
1729  _meanAT[0][0][2] = 0;
1730  _meanAT[0][0][3] = 0;
1731  _meanAC[0][0][0] = -0.00327969;
1732  _meanAC[0][0][1] = 0.00932112;
1733  _meanAC[0][0][2] = 430.176;
1734  _meanAC[0][0][3] = 440.94;
1735  _meanAS[0][0][0] = 0;
1736  _meanAS[0][0][1] = 0;
1737  _meanAS[0][0][2] = 0;
1738  _meanAS[0][0][3] = 0;
1739  _meanAM[0][0][0] = -0.000876726;
1740  _meanAM[0][0][1] = 0.128953;
1741  _meanAM[0][0][2] = 262.609;
1742  _meanAM[0][0][3] = 204.869;
1743  _meanBT[0][0][0] = 0;
1744  _meanBT[0][0][1] = 0;
1745  _meanBT[0][0][2] = 0;
1746  _meanBT[0][0][3] = 0;
1747  _meanBC[0][0][0] = -0.00316342;
1748  _meanBC[0][0][1] = 0.00801235;
1749  _meanBC[0][0][2] = 552.944;
1750  _meanBC[0][0][3] = 507.239;
1751  _meanBS[0][0][0] = 0;
1752  _meanBS[0][0][1] = 0;
1753  _meanBS[0][0][2] = 0;
1754  _meanBS[0][0][3] = 0;
1755  _meanBM[0][0][0] = -0.00171652;
1756  _meanBM[0][0][1] = 0.0746995;
1757  _meanBM[0][0][2] = 190.606;
1758  _meanBM[0][0][3] = 210.147;
1759  _meanR9[0][0][0] = 0.847311;
1760  _meanR9[0][0][1] = -10.0049;
1761  _meanR9[0][0][2] = 67.613;
1762  _meanR9[0][0][3] = 0;
1763 
1764  _sigmaScale[0][0][0] = 0.345777;
1765  _sigmaScale[0][0][1] = 0.0375747;
1766  _sigmaScale[0][0][2] = -0.00516299;
1767  _sigmaScale[0][0][3] = 0;
1768  _sigmaAT[0][0][0] = 0.994444;
1769  _sigmaAT[0][0][1] = 0;
1770  _sigmaAT[0][0][2] = 0;
1771  _sigmaAT[0][0][3] = 0;
1772  _sigmaAC[0][0][0] = -0.00380373;
1773  _sigmaAC[0][0][1] = -1.00415;
1774  _sigmaAC[0][0][2] = 110274;
1775  _sigmaAC[0][0][3] = -3e+17;
1776  _sigmaAS[0][0][0] = 0;
1777  _sigmaAS[0][0][1] = 0;
1778  _sigmaAS[0][0][2] = 0;
1779  _sigmaAS[0][0][3] = 0;
1780  _sigmaAM[0][0][0] = -0.000881147;
1781  _sigmaAM[0][0][1] = 8.76414;
1782  _sigmaAM[0][0][2] = 455.387;
1783  _sigmaAM[0][0][3] = 412.382;
1784  _sigmaBT[0][0][0] = 0.00578517;
1785  _sigmaBT[0][0][1] = 2.28008;
1786  _sigmaBT[0][0][2] = -3.36e+07;
1787  _sigmaBT[0][0][3] = -152.696;
1788  _sigmaBC[0][0][0] = -0.00161997;
1789  _sigmaBC[0][0][1] = 50513.8;
1790  _sigmaBC[0][0][2] = -1.26888e+07;
1791  _sigmaBC[0][0][3] = 3.75561e+07;
1792  _sigmaBS[0][0][0] = 0;
1793  _sigmaBS[0][0][1] = 0;
1794  _sigmaBS[0][0][2] = 0;
1795  _sigmaBS[0][0][3] = 0;
1796  _sigmaBM[0][0][0] = -0.00168415;
1797  _sigmaBM[0][0][1] = 6.89324;
1798  _sigmaBM[0][0][2] = 272.169;
1799  _sigmaBM[0][0][3] = 315.424;
1800  _sigmaR9[0][0][0] = 0.952571;
1801  _sigmaR9[0][0][1] = 0;
1802  _sigmaR9[0][0][2] = 0;
1803  _sigmaR9[0][0][3] = 0;
1804 
1805  _meanScale[0][1][0] = 0.870259;
1806  _meanScale[0][1][1] = 0.000234598;
1807  _meanScale[0][1][2] = -0.000262422;
1808  _meanScale[0][1][3] = 0.277914;
1809  _meanAT[0][1][0] = 1e-06;
1810  _meanAT[0][1][1] = 0;
1811  _meanAT[0][1][2] = 0;
1812  _meanAT[0][1][3] = 0;
1813  _meanAC[0][1][0] = -0.00324258;
1814  _meanAC[0][1][1] = 0.0209948;
1815  _meanAC[0][1][2] = 167.983;
1816  _meanAC[0][1][3] = 305.464;
1817  _meanAS[0][1][0] = 0.0333341;
1818  _meanAS[0][1][1] = -591.066;
1819  _meanAS[0][1][2] = 1.48079e+11;
1820  _meanAS[0][1][3] = 1.61987e+07;
1821  _meanAM[0][1][0] = -0.000991417;
1822  _meanAM[0][1][1] = 0.121994;
1823  _meanAM[0][1][2] = 367.004;
1824  _meanAM[0][1][3] = 289.22;
1825  _meanBT[0][1][0] = 0;
1826  _meanBT[0][1][1] = 0.187;
1827  _meanBT[0][1][2] = 299.298;
1828  _meanBT[0][1][3] = 428.221;
1829  _meanBC[0][1][0] = -0.00437016;
1830  _meanBC[0][1][1] = 0.00235015;
1831  _meanBC[0][1][2] = 759.85;
1832  _meanBC[0][1][3] = -5018.79;
1833  _meanBS[0][1][0] = -1.2e+08;
1834  _meanBS[0][1][1] = 0.0934286;
1835  _meanBS[0][1][2] = -1.226e-16;
1836  _meanBS[0][1][3] = 11442.2;
1837  _meanBM[0][1][0] = -0.000153536;
1838  _meanBM[0][1][1] = 0.0101487;
1839  _meanBM[0][1][2] = 60.0003;
1840  _meanBM[0][1][3] = -4.4e+08;
1841  _meanR9[0][1][0] = 0.0853634;
1842  _meanR9[0][1][1] = -0.263819;
1843  _meanR9[0][1][2] = 0.200892;
1844  _meanR9[0][1][3] = 0;
1845 
1846  _sigmaScale[0][1][0] = 0.705452;
1847  _sigmaScale[0][1][1] = -0.0781086;
1848  _sigmaScale[0][1][2] = 0.0039561;
1849  _sigmaScale[0][1][3] = 0;
1850  _sigmaAT[0][1][0] = 1.46888;
1851  _sigmaAT[0][1][1] = 0;
1852  _sigmaAT[0][1][2] = 0;
1853  _sigmaAT[0][1][3] = 0;
1854  _sigmaAC[0][1][0] = -0.00537924;
1855  _sigmaAC[0][1][1] = -0.740685;
1856  _sigmaAC[0][1][2] = 1.59714;
1857  _sigmaAC[0][1][3] = 31.9922;
1858  _sigmaAS[0][1][0] = 0;
1859  _sigmaAS[0][1][1] = 0;
1860  _sigmaAS[0][1][2] = 0;
1861  _sigmaAS[0][1][3] = 0;
1862  _sigmaAM[0][1][0] = 0.000163134;
1863  _sigmaAM[0][1][1] = 7.30822;
1864  _sigmaAM[0][1][2] = 632.013;
1865  _sigmaAM[0][1][3] = 373.003;
1866  _sigmaBT[0][1][0] = 0.00253725;
1867  _sigmaBT[0][1][1] = 2.97332;
1868  _sigmaBT[0][1][2] = -0.516548;
1869  _sigmaBT[0][1][3] = -0.50994;
1870  _sigmaBC[0][1][0] = 0.00578715;
1871  _sigmaBC[0][1][1] = -0.473225;
1872  _sigmaBC[0][1][2] = 8363.08;
1873  _sigmaBC[0][1][3] = 2.36808e+19;
1874  _sigmaBS[0][1][0] = 0;
1875  _sigmaBS[0][1][1] = 0;
1876  _sigmaBS[0][1][2] = 0;
1877  _sigmaBS[0][1][3] = 0;
1878  _sigmaBM[0][1][0] = 0.000184199;
1879  _sigmaBM[0][1][1] = 3.82105;
1880  _sigmaBM[0][1][2] = 93.4062;
1881  _sigmaBM[0][1][3] = 95.4072;
1882  _sigmaR9[0][1][0] = 1.20664;
1883  _sigmaR9[0][1][1] = -3.43548;
1884  _sigmaR9[0][1][2] = 0;
1885  _sigmaR9[0][1][3] = 0;
1886 
1887  _meanScale[1][0][0] = 0.966787;
1888  _meanScale[1][0][1] = 4.77112e-05;
1889  _meanScale[1][0][2] = -4.47768e-05;
1890  _meanScale[1][0][3] = 0.0854689;
1891  _meanAT[1][0][0] = 0.0691979;
1892  _meanAT[1][0][1] = 0;
1893  _meanAT[1][0][2] = 0;
1894  _meanAT[1][0][3] = 0;
1895  _meanAC[1][0][0] = -0.000985244;
1896  _meanAC[1][0][1] = 0.0132327;
1897  _meanAC[1][0][2] = 530.13;
1898  _meanAC[1][0][3] = 1008.64;
1899  _meanAS[1][0][0] = -0.000571197;
1900  _meanAS[1][0][1] = 0.0579624;
1901  _meanAS[1][0][2] = 687.722;
1902  _meanAS[1][0][3] = 836.21;
1903  _meanAM[1][0][0] = 0.00052402;
1904  _meanAM[1][0][1] = 0.402941;
1905  _meanAM[1][0][2] = 3615.29;
1906  _meanAM[1][0][3] = 1495.1;
1907  _meanBT[1][0][0] = 0.0456649;
1908  _meanBT[1][0][1] = 0;
1909  _meanBT[1][0][2] = 0;
1910  _meanBT[1][0][3] = 0;
1911  _meanBC[1][0][0] = -0.000675969;
1912  _meanBC[1][0][1] = 0.0118283;
1913  _meanBC[1][0][2] = 1050.1;
1914  _meanBC[1][0][3] = 1329.8;
1915  _meanBS[1][0][0] = -0.000254569;
1916  _meanBS[1][0][1] = 0.0576783;
1917  _meanBS[1][0][2] = 853.571;
1918  _meanBS[1][0][3] = 938.698;
1919  _meanBM[1][0][0] = -0.186506;
1920  _meanBM[1][0][1] = -0.00654349;
1921  _meanBM[1][0][2] = 1.09286;
1922  _meanBM[1][0][3] = -5.8e+08;
1923  _meanR9[1][0][0] = 0.951164;
1924  _meanR9[1][0][1] = -0.323083;
1925  _meanR9[1][0][2] = 506.054;
1926  _meanR9[1][0][3] = 0;
1927 
1928  _sigmaScale[1][0][0] = 0.443288;
1929  _sigmaScale[1][0][1] = 1.73472e-18;
1930  _sigmaScale[1][0][2] = 0.0134633;
1931  _sigmaScale[1][0][3] = 0;
1932  _sigmaAT[1][0][0] = 6.60294;
1933  _sigmaAT[1][0][1] = 0;
1934  _sigmaAT[1][0][2] = 0;
1935  _sigmaAT[1][0][3] = 0;
1936  _sigmaAC[1][0][0] = 48.1275;
1937  _sigmaAC[1][0][1] = 1.50005e+08;
1938  _sigmaAC[1][0][2] = 21231.6;
1939  _sigmaAC[1][0][3] = 2.6e+11;
1940  _sigmaAS[1][0][0] = 0.000112234;
1941  _sigmaAS[1][0][1] = 2.38201;
1942  _sigmaAS[1][0][2] = 1368.36;
1943  _sigmaAS[1][0][3] = 1014.58;
1944  _sigmaAM[1][0][0] = 0.0227945;
1945  _sigmaAM[1][0][1] = 1.35035;
1946  _sigmaAM[1][0][2] = 34.8078;
1947  _sigmaAM[1][0][3] = 41.2653;
1948  _sigmaBT[1][0][0] = 4.6512;
1949  _sigmaBT[1][0][1] = 0;
1950  _sigmaBT[1][0][2] = 0;
1951  _sigmaBT[1][0][3] = 0;
1952  _sigmaBC[1][0][0] = -0.00385034;
1953  _sigmaBC[1][0][1] = 9860.11;
1954  _sigmaBC[1][0][2] = 7.49509e+12;
1955  _sigmaBC[1][0][3] = 5.55794e+07;
1956  _sigmaBS[1][0][0] = 0.000287389;
1957  _sigmaBS[1][0][1] = 2.22754;
1958  _sigmaBS[1][0][2] = 2066.43;
1959  _sigmaBS[1][0][3] = 926.247;
1960  _sigmaBM[1][0][0] = 0.00110983;
1961  _sigmaBM[1][0][1] = 4.70582;
1962  _sigmaBM[1][0][2] = 8.47552e+10;
1963  _sigmaBM[1][0][3] = -4572.21;
1964  _sigmaR9[1][0][0] = 141.283;
1965  _sigmaR9[1][0][1] = -6.07621e-07;
1966  _sigmaR9[1][0][2] = 1.40907e-08;
1967  _sigmaR9[1][0][3] = 0;
1968 
1969  _meanScale[1][1][0] = 0.290862;
1970  _meanScale[1][1][1] = -5.93303e-05;
1971  _meanScale[1][1][2] = 0.000431058;
1972  _meanScale[1][1][3] = 0.350738;
1973  _meanAT[1][1][0] = -0.092494;
1974  _meanAT[1][1][1] = 0;
1975  _meanAT[1][1][2] = 0;
1976  _meanAT[1][1][3] = 0;
1977  _meanAC[1][1][0] = -0.00105099;
1978  _meanAC[1][1][1] = 0.0195863;
1979  _meanAC[1][1][2] = 162.87;
1980  _meanAC[1][1][3] = 259.479;
1981  _meanAS[1][1][0] = -0.00820192;
1982  _meanAS[1][1][1] = -0.00404515;
1983  _meanAS[1][1][2] = -9e+12;
1984  _meanAS[1][1][3] = -12.1537;
1985  _meanAM[1][1][0] = 0.00430129;
1986  _meanAM[1][1][1] = 0.647006;
1987  _meanAM[1][1][2] = 0.0524654;
1988  _meanAM[1][1][3] = 0.057336;
1989  _meanBT[1][1][0] = -0.158344;
1990  _meanBT[1][1][1] = 0;
1991  _meanBT[1][1][2] = 0;
1992  _meanBT[1][1][3] = 0;
1993  _meanBC[1][1][0] = -0.00661496;
1994  _meanBC[1][1][1] = -0.0551321;
1995  _meanBC[1][1][2] = 1286.49;
1996  _meanBC[1][1][3] = 118612;
1997  _meanBS[1][1][0] = -0.000517633;
1998  _meanBS[1][1][1] = 0.0294134;
1999  _meanBS[1][1][2] = 414.964;
2000  _meanBS[1][1][3] = 487.294;
2001  _meanBM[1][1][0] = 0.00298075;
2002  _meanBM[1][1][1] = 0.0146853;
2003  _meanBM[1][1][2] = -7.17525e+06;
2004  _meanBM[1][1][3] = 41.9253;
2005  _meanR9[1][1][0] = 0.213804;
2006  _meanR9[1][1][1] = -0.395466;
2007  _meanR9[1][1][2] = 0.202973;
2008  _meanR9[1][1][3] = 0;
2009 
2010  _sigmaScale[1][1][0] = 1.29656;
2011  _sigmaScale[1][1][1] = 9.61084e-11;
2012  _sigmaScale[1][1][2] = 0.0270649;
2013  _sigmaScale[1][1][3] = 0;
2014  _sigmaAT[1][1][0] = -0.0115339;
2015  _sigmaAT[1][1][1] = 0;
2016  _sigmaAT[1][1][2] = 0;
2017  _sigmaAT[1][1][3] = 0;
2018  _sigmaAC[1][1][0] = 0.0013797;
2019  _sigmaAC[1][1][1] = -0.445789;
2020  _sigmaAC[1][1][2] = 29539.8;
2021  _sigmaAC[1][1][3] = -3.6e+08;
2022  _sigmaAS[1][1][0] = 0.000213606;
2023  _sigmaAS[1][1][1] = 0.547654;
2024  _sigmaAS[1][1][2] = 892.47;
2025  _sigmaAS[1][1][3] = 408.826;
2026  _sigmaAM[1][1][0] = -0.00121353;
2027  _sigmaAM[1][1][1] = 1.10052;
2028  _sigmaAM[1][1][2] = 31.303;
2029  _sigmaAM[1][1][3] = 80.0479;
2030  _sigmaBT[1][1][0] = 0.470361;
2031  _sigmaBT[1][1][1] = 0;
2032  _sigmaBT[1][1][2] = 0;
2033  _sigmaBT[1][1][3] = 0;
2034  _sigmaBC[1][1][0] = -0.00222463;
2035  _sigmaBC[1][1][1] = 18440.6;
2036  _sigmaBC[1][1][2] = 5.80805e+07;
2037  _sigmaBC[1][1][3] = -4.43323e+17;
2038  _sigmaBS[1][1][0] = 0.00156455;
2039  _sigmaBS[1][1][1] = 0.337173;
2040  _sigmaBS[1][1][2] = 281.318;
2041  _sigmaBS[1][1][3] = 252.457;
2042  _sigmaBM[1][1][0] = -0.0455886;
2043  _sigmaBM[1][1][1] = 1.47875;
2044  _sigmaBM[1][1][2] = 1.9e+09;
2045  _sigmaBM[1][1][3] = 1193.93;
2046  _sigmaR9[1][1][0] = 8.89993;
2047  _sigmaR9[1][1][1] = -9.8386;
2048  _sigmaR9[1][1][2] = 0;
2049  _sigmaR9[1][1][3] = 0;
2050 
2051  _initialised = true;
2052  }
2053 
2055  return true;
2056 }
2057 
2058 // Get the geometry of cracks and gaps from file
2060  std::ifstream fin("../test/PhotonFix.dat");
2061  assert(fin);
2062 
2063  std::cout << "Reading in here" << std::endl;
2064  for (unsigned i(0); i < 169; i++) {
2065  for (unsigned j(0); j < 360; j++) {
2066  for (unsigned k(0); k < 2; k++) {
2067  fin >> _barrelCGap[i][j][k];
2068  }
2069  }
2070  }
2071 
2072  for (unsigned i(0); i < 33; i++) {
2073  for (unsigned j(0); j < 180; j++) {
2074  for (unsigned k(0); k < 2; k++) {
2075  fin >> _barrelSGap[i][j][k];
2076  }
2077  }
2078  }
2079 
2080  for (unsigned i(0); i < 7; i++) {
2081  for (unsigned j(0); j < 18; j++) {
2082  for (unsigned k(0); k < 2; k++) {
2083  fin >> _barrelMGap[i][j][k];
2084  }
2085  }
2086  }
2087  for (unsigned i(0); i < 100; i++) {
2088  for (unsigned j(0); j < 100; j++) {
2089  unsigned k;
2090  fin >> k;
2091  _endcapCrystal[i][j] = (k == 0);
2092  }
2093  }
2094 
2095  for (unsigned i(0); i < 2; i++) {
2096  for (unsigned j(0); j < 7080; j++) {
2097  for (unsigned k(0); k < 2; k++) {
2098  fin >> _endcapCGap[i][j][k];
2099  }
2100  }
2101  }
2102 
2103  for (unsigned i(0); i < 2; i++) {
2104  for (unsigned j(0); j < 264; j++) {
2105  for (unsigned k(0); k < 2; k++) {
2106  fin >> _endcapSGap[i][j][k];
2107  }
2108  }
2109  }
2110 
2111  for (unsigned i(0); i < 2; i++) {
2112  for (unsigned j(0); j < 1; j++) {
2113  for (unsigned k(0); k < 2; k++) {
2114  fin >> _endcapMGap[i][j][k];
2115  }
2116  }
2117  }
2118 
2119  assert(fin);
2120 
2121  return true;
2122 }
2123 
2124 const double PhotonFix::_onePi(acos(-1.0));
2125 const double PhotonFix::_twoPi(2.0 * acos(-1.0));
2126 
2127 bool PhotonFix::_initialised = false;
2128 
2129 double PhotonFix::_meanScale[2][2][4];
2130 double PhotonFix::_meanAT[2][2][4];
2131 double PhotonFix::_meanAC[2][2][4];
2132 double PhotonFix::_meanAS[2][2][4];
2133 double PhotonFix::_meanAM[2][2][4];
2134 double PhotonFix::_meanBT[2][2][4];
2135 double PhotonFix::_meanBC[2][2][4];
2136 double PhotonFix::_meanBS[2][2][4];
2137 double PhotonFix::_meanBM[2][2][4];
2138 double PhotonFix::_meanR9[2][2][4];
2139 
2140 double PhotonFix::_sigmaScale[2][2][4];
2141 double PhotonFix::_sigmaAT[2][2][4];
2142 double PhotonFix::_sigmaAC[2][2][4];
2143 double PhotonFix::_sigmaAS[2][2][4];
2144 double PhotonFix::_sigmaAM[2][2][4];
2145 double PhotonFix::_sigmaBT[2][2][4];
2146 double PhotonFix::_sigmaBC[2][2][4];
2147 double PhotonFix::_sigmaBS[2][2][4];
2148 double PhotonFix::_sigmaBM[2][2][4];
2149 double PhotonFix::_sigmaR9[2][2][4];
2150 
2151 double PhotonFix::_barrelCGap[169][360][2];
2152 double PhotonFix::_barrelSGap[33][180][2];
2153 double PhotonFix::_barrelMGap[7][18][2];
2154 
2155 bool PhotonFix::_endcapCrystal[100][100];
2156 double PhotonFix::_endcapCGap[2][7080][2];
2157 double PhotonFix::_endcapSGap[2][264][2];
2158 double PhotonFix::_endcapMGap[2][1][2];
electrons_cff.r9
r9
Definition: electrons_cff.py:366
PhotonFix::_endcapCrystal
static bool _endcapCrystal[100][100]
Definition: PhotonFix.h:166
PhotonFix::_barrelSGap
static double _barrelSGap[33][180][2]
Definition: PhotonFix.h:162
mps_fire.i
i
Definition: mps_fire.py:355
PhotonFix::yC
double yC() const
Definition: PhotonFix.cc:312
PhotonFix::yZ
double yZ() const
Definition: PhotonFix.cc:307
PhotonFix::_meanAT
static double _meanAT[2][2][4]
Definition: PhotonFix.h:138
PhotonFix::getParameters
static void getParameters(unsigned be, unsigned hl, double *p)
Definition: PhotonFix.cc:368
PhotonFix::_meanBC
static double _meanBC[2][2][4]
Definition: PhotonFix.h:143
PhotonFix::etaS
double etaS() const
Definition: PhotonFix.cc:262
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PhotonFix::_meanScale
static double _meanScale[2][2][4]
Definition: PhotonFix.h:137
PhotonFix::fixedEnergy
double fixedEnergy() const
Definition: PhotonFix.cc:149
PhotonFix::_barrelCGap
static double _barrelCGap[169][360][2]
Definition: PhotonFix.h:161
PhotonFix::_sigmaBC
static double _sigmaBC[2][2][4]
Definition: PhotonFix.h:155
PhotonFix::initialiseParameters
static bool initialiseParameters(const std::string &s)
Definition: PhotonFix.cc:680
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PhotonFix::_sigmaR9
static double _sigmaR9[2][2][4]
Definition: PhotonFix.h:158
PhotonFix::xC
double xC() const
Definition: PhotonFix.cc:292
PhotonFix::_endcapCGap
static double _endcapCGap[2][7080][2]
Definition: PhotonFix.h:167
PhotonFix::barrelMGap
static void barrelMGap(unsigned i, unsigned j, unsigned k, double c)
Definition: PhotonFix.cc:331
cms::cuda::assert
assert(be >=bs)
PhotonFix.h
PhotonFix::dumpParameters
static void dumpParameters(std::ostream &o)
Definition: PhotonFix.cc:394
PhotonFix::rawEnergy
double rawEnergy() const
Definition: PhotonFix.cc:249
PhotonFix::_bC
double _bC
Definition: PhotonFix.h:127
PhotonFix::_endcapMGap
static double _endcapMGap[2][1][2]
Definition: PhotonFix.h:169
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
PhotonFix::initialiseGeometry
static bool initialiseGeometry(const std::string &s)
Definition: PhotonFix.cc:2059
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PhotonFix::_endcapSGap
static double _endcapSGap[2][264][2]
Definition: PhotonFix.h:168
PhotonFix::initialise
static bool initialise(const std::string &s="Nominal")
Definition: PhotonFix.cc:671
PhotonFix::_meanAC
static double _meanAC[2][2][4]
Definition: PhotonFix.h:139
PhotonFix::gausCorrection
static double gausCorrection(double a, const double *p)
Definition: PhotonFix.cc:660
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PhotonFix::_sigmaScale
static double _sigmaScale[2][2][4]
Definition: PhotonFix.h:149
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
PhotonFix::_hl
unsigned _hl
Definition: PhotonFix.h:125
groupFilesInBlocks.fin
fin
Definition: groupFilesInBlocks.py:94
PhotonFix::xS
double xS() const
Definition: PhotonFix.cc:297
PhotonFix::dumpGaps
static void dumpGaps(std::ostream &o)
Definition: PhotonFix.cc:564
PhotonFix::etaM
double etaM() const
Definition: PhotonFix.cc:267
PhotonFix::xZ
double xZ() const
Definition: PhotonFix.cc:287
PVValHelper::eta
Definition: PVValidationHelpers.h:69
PhotonFix::_meanBS
static double _meanBS[2][2][4]
Definition: PhotonFix.h:144
PhotonFix::PhotonFix
PhotonFix(double e, double eta, double phi, double r9)
Definition: PhotonFix.cc:9
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
PhotonFix::_bS
double _bS
Definition: PhotonFix.h:127
PhotonFix::printParameters
static void printParameters(std::ostream &o)
Definition: PhotonFix.cc:464
PhotonFix::initialised
static bool initialised()
Definition: PhotonFix.cc:670
PhotonFix::barrelCGap
static void barrelCGap(unsigned i, unsigned j, unsigned k, double c)
Definition: PhotonFix.cc:329
PhotonFix::endcapMGap
static void endcapMGap(unsigned i, unsigned j, unsigned k, double c)
Definition: PhotonFix.cc:335
PhotonFix::_sigmaBT
static double _sigmaBT[2][2][4]
Definition: PhotonFix.h:154
dqmdumpme.k
k
Definition: dqmdumpme.py:60
b
double b
Definition: hdecay.h:118
PhotonFix::phiM
double phiM() const
Definition: PhotonFix.cc:282
PhotonFix::GetaPhi
static double GetaPhi(double f0, double f1)
Definition: PhotonFix.cc:327
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PhotonFix::setParameters
static void setParameters(unsigned be, unsigned hl, const double *p)
Definition: PhotonFix.cc:342
PhotonFix::_sigmaBM
static double _sigmaBM[2][2][4]
Definition: PhotonFix.h:157
PhotonFix::_sigmaBS
static double _sigmaBS[2][2][4]
Definition: PhotonFix.h:156
PhotonFix::phiC
double phiC() const
Definition: PhotonFix.cc:272
a
double a
Definition: hdecay.h:119
PhotonFix::dPhi
static double dPhi(double f0, double f1)
Definition: PhotonFix.cc:625
PhotonFix::_meanBM
static double _meanBM[2][2][4]
Definition: PhotonFix.h:145
PVValHelper::phi
Definition: PVValidationHelpers.h:68
PhotonFix::_initialised
static bool _initialised
Definition: PhotonFix.h:134
PhotonFix::_aS
double _aS
Definition: PhotonFix.h:127
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
PhotonFix::expCorrection
static double expCorrection(double a, const double *p)
Definition: PhotonFix.cc:649
PhotonFix::print
void print() const
Definition: PhotonFix.cc:337
PhotonFix::phi
double phi() const
Definition: PhotonFix.cc:253
PhotonFix::_sigmaAS
static double _sigmaAS[2][2][4]
Definition: PhotonFix.h:152
PhotonFix::endcapCrystal
static void endcapCrystal(unsigned i, unsigned j, bool c)
Definition: PhotonFix.cc:332
PhotonFix::_bM
double _bM
Definition: PhotonFix.h:127
PVValHelper::dy
Definition: PVValidationHelpers.h:49
PhotonFix::etaC
double etaC() const
Definition: PhotonFix.cc:257
PhotonFix::aPhi
static double aPhi(double f0, double f1)
Definition: PhotonFix.cc:634
PhotonFix::_meanBT
static double _meanBT[2][2][4]
Definition: PhotonFix.h:142
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
PhotonFix::_meanR9
static double _meanR9[2][2][4]
Definition: PhotonFix.h:146
alignCSCRings.r
r
Definition: alignCSCRings.py:93
PhotonFix::xM
double xM() const
Definition: PhotonFix.cc:302
PhotonFix::_phi
double _phi
Definition: PhotonFix.h:126
PhotonFix::endcapSGap
static void endcapSGap(unsigned i, unsigned j, unsigned k, double c)
Definition: PhotonFix.cc:334
PhotonFix::_onePi
static const double _onePi
Definition: PhotonFix.h:130
PhotonFix::_aM
double _aM
Definition: PhotonFix.h:127
PhotonFix::_be
unsigned _be
Definition: PhotonFix.h:125
PhotonFix::yM
double yM() const
Definition: PhotonFix.cc:322
PhotonFix::asinh
static double asinh(double s)
Definition: PhotonFix.cc:557
PhotonFix::sigmaEnergy
double sigmaEnergy() const
Definition: PhotonFix.cc:189
PhotonFix::_barrelMGap
static double _barrelMGap[7][18][2]
Definition: PhotonFix.h:163
PhotonFix::_sigmaAT
static double _sigmaAT[2][2][4]
Definition: PhotonFix.h:150
PhotonFix::_sigmaAC
static double _sigmaAC[2][2][4]
Definition: PhotonFix.h:151
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
PhotonFix::yS
double yS() const
Definition: PhotonFix.cc:317
PhotonFix::_sigmaAM
static double _sigmaAM[2][2][4]
Definition: PhotonFix.h:153
PhotonFix::eta
double eta() const
Definition: PhotonFix.cc:251
PhotonFix::_meanAM
static double _meanAM[2][2][4]
Definition: PhotonFix.h:141
PhotonFix::_twoPi
static const double _twoPi
Definition: PhotonFix.h:131
cms::cuda::be
int be
Definition: HistoContainer.h:126
PhotonFix::barrelSGap
static void barrelSGap(unsigned i, unsigned j, unsigned k, double c)
Definition: PhotonFix.cc:330
PhotonFix::_eta
double _eta
Definition: PhotonFix.h:126
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
PhotonFix::_meanAS
static double _meanAS[2][2][4]
Definition: PhotonFix.h:140
PhotonFix::_aC
double _aC
Definition: PhotonFix.h:127
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
PhotonFix::phiS
double phiS() const
Definition: PhotonFix.cc:277
PVValHelper::dx
Definition: PVValidationHelpers.h:48
PhotonFix::setup
void setup()
Definition: PhotonFix.cc:11
PhotonFix::r9
double r9() const
Definition: PhotonFix.cc:255
PhotonFix::endcapCGap
static void endcapCGap(unsigned i, unsigned j, unsigned k, double c)
Definition: PhotonFix.cc:333
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
PhotonFix::_e
double _e
Definition: PhotonFix.h:126
PhotonFix::_r9
double _r9
Definition: PhotonFix.h:126