|
|
Go to the documentation of this file.
16 _be = (fabs(
_eta) < 1.48 ? 0 : 1);
20 _hl = (
_r9 >= 0.94 ? 0 : 1);
22 _hl = (
_r9 >= 0.95 ? 0 : 1);
28 for (
unsigned i(0);
i < 169;
i++) {
29 for (
unsigned j(0);
j < 360;
j++) {
32 double r2(de * de + df * df);
48 for (
unsigned i(0);
i < 33;
i++) {
49 for (
unsigned j(0);
j < 180;
j++) {
52 double r2(de * de + df * df);
68 for (
unsigned i(0);
i < 7;
i++) {
69 for (
unsigned j(0);
j < 18;
j++) {
72 double r2(de * de + df * df);
88 unsigned iz(
_eta >= 0.0 ? 0 : 1);
89 double r[2] = {
xZ(),
yZ()};
92 for (
unsigned i(0);
i < 7080;
i++) {
111 for (
unsigned i(0);
i < 264;
i++) {
130 for (
unsigned i(0);
i < 1;
i++) {
339 <<
", " <<
_aS <<
", " <<
_aM <<
", " <<
_bC <<
", " <<
_bS <<
", " <<
_bM << std::endl;
343 for (
unsigned i(0);
i < 4;
i++) {
369 for (
unsigned i(0);
i < 4;
i++) {
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;
400 for (
unsigned i(0);
i < 4;
i++) {
401 o <<
" _meanAT[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanAT[
be][hl][
i] <<
";" << std::endl;
403 for (
unsigned i(0);
i < 4;
i++) {
404 o <<
" _meanAC[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanAC[
be][hl][
i] <<
";" << std::endl;
406 for (
unsigned i(0);
i < 4;
i++) {
407 o <<
" _meanAS[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanAS[
be][hl][
i] <<
";" << std::endl;
409 for (
unsigned i(0);
i < 4;
i++) {
410 o <<
" _meanAM[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanAM[
be][hl][
i] <<
";" << std::endl;
412 for (
unsigned i(0);
i < 4;
i++) {
413 o <<
" _meanBT[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanBT[
be][hl][
i] <<
";" << std::endl;
415 for (
unsigned i(0);
i < 4;
i++) {
416 o <<
" _meanBC[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanBC[
be][hl][
i] <<
";" << std::endl;
418 for (
unsigned i(0);
i < 4;
i++) {
419 o <<
" _meanBS[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanBS[
be][hl][
i] <<
";" << std::endl;
421 for (
unsigned i(0);
i < 4;
i++) {
422 o <<
" _meanBM[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanBM[
be][hl][
i] <<
";" << std::endl;
424 for (
unsigned i(0);
i < 4;
i++) {
425 o <<
" _meanR9[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_meanR9[
be][hl][
i] <<
";" << std::endl;
429 for (
unsigned i(0);
i < 4;
i++) {
430 o <<
" _sigmaScale[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaScale[
be][hl][
i] <<
";" << std::endl;
432 for (
unsigned i(0);
i < 4;
i++) {
433 o <<
" _sigmaAT[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaAT[
be][hl][
i] <<
";" << std::endl;
435 for (
unsigned i(0);
i < 4;
i++) {
436 o <<
" _sigmaAC[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaAC[
be][hl][
i] <<
";" << std::endl;
438 for (
unsigned i(0);
i < 4;
i++) {
439 o <<
" _sigmaAS[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaAS[
be][hl][
i] <<
";" << std::endl;
441 for (
unsigned i(0);
i < 4;
i++) {
442 o <<
" _sigmaAM[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaAM[
be][hl][
i] <<
";" << std::endl;
444 for (
unsigned i(0);
i < 4;
i++) {
445 o <<
" _sigmaBT[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaBT[
be][hl][
i] <<
";" << std::endl;
447 for (
unsigned i(0);
i < 4;
i++) {
448 o <<
" _sigmaBC[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaBC[
be][hl][
i] <<
";" << std::endl;
450 for (
unsigned i(0);
i < 4;
i++) {
451 o <<
" _sigmaBS[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaBS[
be][hl][
i] <<
";" << std::endl;
453 for (
unsigned i(0);
i < 4;
i++) {
454 o <<
" _sigmaBM[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaBM[
be][hl][
i] <<
";" << std::endl;
456 for (
unsigned i(0);
i < 4;
i++) {
457 o <<
" _sigmaR9[" <<
be <<
"][" << hl <<
"][" <<
i <<
"]=" <<
_sigmaR9[
be][hl][
i] <<
";" << std::endl;
465 o <<
"PhotonFix::printParameters()" << std::endl;
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"
472 o <<
" Mean scaling ";
473 for (
unsigned i(0);
i < 4;
i++)
476 o <<
" Mean " << (
be == 0 ?
"Eta " :
"ZetaX") <<
" total ";
477 for (
unsigned i(0);
i < 4;
i++)
480 o <<
" Mean " << (
be == 0 ?
"Eta " :
"ZetaX") <<
" crystal ";
481 for (
unsigned i(0);
i < 4;
i++)
484 o <<
" Mean " << (
be == 0 ?
"Eta " :
"ZetaX") <<
" submodule";
485 for (
unsigned i(0);
i < 4;
i++)
488 o <<
" Mean " << (
be == 0 ?
"Eta " :
"ZetaX") <<
" module ";
489 for (
unsigned i(0);
i < 4;
i++)
492 o <<
" Mean " << (
be == 0 ?
"Eta zero " :
"ZetaY total ");
493 for (
unsigned i(0);
i < 4;
i++)
496 o <<
" Mean " << (
be == 0 ?
"Phi " :
"ZetaY") <<
" crystal ";
497 for (
unsigned i(0);
i < 4;
i++)
500 o <<
" Mean " << (
be == 0 ?
"Phi " :
"ZetaY") <<
" submodule";
501 for (
unsigned i(0);
i < 4;
i++)
504 o <<
" Mean " << (
be == 0 ?
"Phi " :
"ZetaY") <<
" module ";
505 for (
unsigned i(0);
i < 4;
i++)
509 for (
unsigned i(0);
i < 4;
i++)
513 o <<
" Sigma scaling ";
514 for (
unsigned i(0);
i < 4;
i++)
517 o <<
" Sigma " << (
be == 0 ?
"Eta " :
"ZetaX") <<
" total ";
518 for (
unsigned i(0);
i < 4;
i++)
521 o <<
" Sigma " << (
be == 0 ?
"Eta " :
"ZetaX") <<
" crystal ";
522 for (
unsigned i(0);
i < 4;
i++)
525 o <<
" Sigma " << (
be == 0 ?
"Eta " :
"ZetaX") <<
" submodule";
526 for (
unsigned i(0);
i < 4;
i++)
529 o <<
" Sigma " << (
be == 0 ?
"Eta " :
"ZetaX") <<
" module ";
530 for (
unsigned i(0);
i < 4;
i++)
533 o <<
" Sigma " << (
be == 0 ?
"Eta " :
"ZetaY") <<
" total ";
534 for (
unsigned i(0);
i < 4;
i++)
537 o <<
" Sigma " << (
be == 0 ?
"Eta " :
"ZetaY") <<
" crystal ";
538 for (
unsigned i(0);
i < 4;
i++)
541 o <<
" Sigma " << (
be == 0 ?
"Phi " :
"ZetaY") <<
" submodule";
542 for (
unsigned i(0);
i < 4;
i++)
545 o <<
" Sigma " << (
be == 0 ?
"Phi " :
"ZetaY") <<
" module ";
546 for (
unsigned i(0);
i < 4;
i++)
550 for (
unsigned i(0);
i < 4;
i++)
565 o << std::setprecision(15);
567 for (
unsigned i(0);
i < 169;
i++) {
568 for (
unsigned j(0);
j < 360;
j++) {
569 for (
unsigned k(0);
k < 2;
k++) {
575 for (
unsigned i(0);
i < 33;
i++) {
576 for (
unsigned j(0);
j < 180;
j++) {
577 for (
unsigned k(0);
k < 2;
k++) {
583 for (
unsigned i(0);
i < 7;
i++) {
584 for (
unsigned j(0);
j < 18;
j++) {
585 for (
unsigned k(0);
k < 2;
k++) {
591 for (
unsigned i(0);
i < 100;
i++) {
592 for (
unsigned j(0);
j < 100;
j++) {
600 for (
unsigned i(0);
i < 2;
i++) {
601 for (
unsigned j(0);
j < 7080;
j++) {
602 for (
unsigned k(0);
k < 2;
k++) {
608 for (
unsigned i(0);
i < 2;
i++) {
609 for (
unsigned j(0);
j < 264;
j++) {
610 for (
unsigned k(0);
k < 2;
k++) {
616 for (
unsigned i(0);
i < 2;
i++) {
617 for (
unsigned j(0);
j < 1;
j++) {
618 for (
unsigned k(0);
k < 2;
k++) {
635 double af(0.5 * (f0 +
f1));
650 if (
p[1] == 0.0 ||
p[2] == 0.0 ||
p[3] == 0.0)
655 return p[1] *
exp(-fabs(
p[2]) *
b);
657 return p[1] *
exp(fabs(
p[3]) *
b);
661 if (
p[1] == 0.0 ||
p[2] == 0.0 ||
p[3] == 0.0)
666 return p[1] *
exp(-0.5 *
p[2] *
p[2] *
b *
b);
668 return p[1] *
exp(-0.5 *
p[3] *
p[3] *
b *
b);
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++) {
735 _meanAC[0][0][0] = -0.00352041;
742 _meanAS[0][0][3] = 5.13202e+07;
743 _meanAM[0][0][0] = -0.00140562;
751 _meanBC[0][0][0] = -0.00294295;
755 _meanBS[0][0][0] = -0.00204373;
759 _meanBM[0][0][0] = -0.00275381;
817 _meanAC[0][1][0] = -0.00320856;
822 _meanAS[0][1][1] = -0.00232864;
825 _meanAM[0][1][0] = -0.00104798;
833 _meanBC[0][1][0] = -0.00420429;
841 _meanBM[0][1][0] = -0.00389457;
899 _meanAC[1][0][0] = -0.000396058;
903 _meanAS[1][0][0] = -0.000871036;
907 _meanAM[1][0][0] = 0.000434298;
915 _meanBC[1][0][0] = -0.000452212;
919 _meanBS[1][0][0] = -0.000786157;
924 _meanBM[1][0][1] = -0.00211713;
981 _meanAC[1][1][0] = -0.00158311;
985 _meanAS[1][1][0] = -0.00960269;
986 _meanAS[1][1][1] = -0.00496491;
988 _meanAS[1][1][3] = 8.32667e-16;
989 _meanAM[1][1][0] = -0.00219814;
997 _meanBC[1][1][0] = -0.00423472;
1001 _meanBS[1][1][0] = -0.0012476;
1005 _meanBM[1][1][0] = -1.36573e-05;
1067 _meanAC[0][0][0] = -0.00360057;
1068 _meanAC[0][0][1] = 0.00970858;
1072 _meanAS[0][0][1] = 0.00135995;
1074 _meanAS[0][0][3] = 5.13202e+07;
1075 _meanAM[0][0][0] = -0.00129854;
1083 _meanBC[0][0][0] = -0.00286864;
1087 _meanBS[0][0][0] = -0.00210996;
1088 _meanBS[0][0][1] = 0.00327867;
1149 _meanAC[0][1][0] = -0.00313701;
1154 _meanAS[0][1][1] = -0.00261336;
1156 _meanAS[0][1][3] = 1.19839e+14;
1157 _meanAM[0][1][0] = -0.00100745;
1165 _meanBC[0][1][0] = -0.00397794;
1166 _meanBC[0][1][1] = 0.00219079;
1171 _meanBS[0][1][2] = -8.88573e-27;
1173 _meanBM[0][1][0] = -0.00366315;
1177 _meanR9[0][1][0] = 0.00636789;
1178 _meanR9[0][1][1] = 0.000336062;
1179 _meanR9[0][1][2] = -0.0092699;
1231 _meanAC[1][0][0] = -0.000177563;
1235 _meanAS[1][0][0] = -0.000533039;
1239 _meanAM[1][0][0] = 0.000163185;
1247 _meanBC[1][0][0] = -0.000518186;
1251 _meanBS[1][0][0] = -0.000750734;
1256 _meanBM[1][0][1] = -0.00362647;
1313 _meanAC[1][1][0] = -0.00125367;
1317 _meanAS[1][1][0] = 0.000282607;
1329 _meanBC[1][1][0] = -0.00513833;
1330 _meanBC[1][1][1] = 5.94424e+08;
1333 _meanBS[1][1][0] = -0.00152129;
1337 _meanBM[1][1][0] = -0.000404987;
1395 _meanAT[0][0][0] = 0.000616189;
1399 _meanAC[0][0][0] = -0.00343502;
1407 _meanAM[0][0][0] = -0.0010363;
1415 _meanBC[0][0][0] = -0.00262961;
1423 _meanBM[0][0][0] = -0.00170238;
1563 _meanAC[1][0][0] = -0.000310485;
1567 _meanAS[1][0][0] = -0.0005425;
1571 _meanAM[1][0][0] = 0.000134362;
1579 _meanBC[1][0][0] = -0.000356413;
1588 _meanBM[1][0][1] = -0.00324513;
1590 _meanBM[1][0][3] = 7.58712e+12;
1645 _meanAC[1][1][0] = -0.00131984;
1646 _meanAC[1][1][1] = 0.00950668;
1649 _meanAS[1][1][0] = -0.00705787;
1650 _meanAS[1][1][1] = -0.00581517;
1651 _meanAS[1][1][2] = 7.10951e+10;
1653 _meanAM[1][1][0] = -0.00496966;
1661 _meanBC[1][1][0] = -0.00498431;
1665 _meanBS[1][1][0] = -0.000620577;
1669 _meanBM[1][1][0] = 0.000431046;
1674 _meanR9[1][1][1] = 0.00348896;
1731 _meanAC[0][0][0] = -0.00327969;
1732 _meanAC[0][0][1] = 0.00932112;
1739 _meanAM[0][0][0] = -0.000876726;
1747 _meanBC[0][0][0] = -0.00316342;
1748 _meanBC[0][0][1] = 0.00801235;
1755 _meanBM[0][0][0] = -0.00171652;
1813 _meanAC[0][1][0] = -0.00324258;
1819 _meanAS[0][1][2] = 1.48079e+11;
1820 _meanAS[0][1][3] = 1.61987e+07;
1821 _meanAM[0][1][0] = -0.000991417;
1829 _meanBC[0][1][0] = -0.00437016;
1830 _meanBC[0][1][1] = 0.00235015;
1835 _meanBS[0][1][2] = -1.226e-16;
1837 _meanBM[0][1][0] = -0.000153536;
1895 _meanAC[1][0][0] = -0.000985244;
1899 _meanAS[1][0][0] = -0.000571197;
1903 _meanAM[1][0][0] = 0.00052402;
1911 _meanBC[1][0][0] = -0.000675969;
1915 _meanBS[1][0][0] = -0.000254569;
1920 _meanBM[1][0][1] = -0.00654349;
1977 _meanAC[1][1][0] = -0.00105099;
1981 _meanAS[1][1][0] = -0.00820192;
1982 _meanAS[1][1][1] = -0.00404515;
1985 _meanAM[1][1][0] = 0.00430129;
1993 _meanBC[1][1][0] = -0.00661496;
1994 _meanBC[1][1][1] = -0.0551321;
1997 _meanBS[1][1][0] = -0.000517633;
2001 _meanBM[1][1][0] = 0.00298075;
2003 _meanBM[1][1][2] = -7.17525e+06;
2060 std::ifstream
fin(
"../test/PhotonFix.dat");
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++) {
2072 for (
unsigned i(0);
i < 33;
i++) {
2073 for (
unsigned j(0);
j < 180;
j++) {
2074 for (
unsigned k(0);
k < 2;
k++) {
2080 for (
unsigned i(0);
i < 7;
i++) {
2081 for (
unsigned j(0);
j < 18;
j++) {
2082 for (
unsigned k(0);
k < 2;
k++) {
2087 for (
unsigned i(0);
i < 100;
i++) {
2088 for (
unsigned j(0);
j < 100;
j++) {
2095 for (
unsigned i(0);
i < 2;
i++) {
2096 for (
unsigned j(0);
j < 7080;
j++) {
2097 for (
unsigned k(0);
k < 2;
k++) {
2103 for (
unsigned i(0);
i < 2;
i++) {
2104 for (
unsigned j(0);
j < 264;
j++) {
2105 for (
unsigned k(0);
k < 2;
k++) {
2111 for (
unsigned i(0);
i < 2;
i++) {
2112 for (
unsigned j(0);
j < 1;
j++) {
2113 for (
unsigned k(0);
k < 2;
k++) {
static bool _endcapCrystal[100][100]
static double _barrelSGap[33][180][2]
static double _meanAT[2][2][4]
static void getParameters(unsigned be, unsigned hl, double *p)
static double _meanBC[2][2][4]
static double _meanScale[2][2][4]
double fixedEnergy() const
static double _barrelCGap[169][360][2]
static double _sigmaBC[2][2][4]
static bool initialiseParameters(const std::string &s)
static double _sigmaR9[2][2][4]
static double _endcapCGap[2][7080][2]
static void barrelMGap(unsigned i, unsigned j, unsigned k, double c)
static void dumpParameters(std::ostream &o)
static double _endcapMGap[2][1][2]
static bool initialiseGeometry(const std::string &s)
Sin< T >::type sin(const T &t)
static double _endcapSGap[2][264][2]
static bool initialise(const std::string &s="Nominal")
static double _meanAC[2][2][4]
static double gausCorrection(double a, const double *p)
static double _sigmaScale[2][2][4]
Cos< T >::type cos(const T &t)
static void dumpGaps(std::ostream &o)
static double _meanBS[2][2][4]
PhotonFix(double e, double eta, double phi, double r9)
static void printParameters(std::ostream &o)
static bool initialised()
static void barrelCGap(unsigned i, unsigned j, unsigned k, double c)
static void endcapMGap(unsigned i, unsigned j, unsigned k, double c)
static double _sigmaBT[2][2][4]
static double GetaPhi(double f0, double f1)
static void setParameters(unsigned be, unsigned hl, const double *p)
static double _sigmaBM[2][2][4]
static double _sigmaBS[2][2][4]
static double dPhi(double f0, double f1)
static double _meanBM[2][2][4]
static double expCorrection(double a, const double *p)
static double _sigmaAS[2][2][4]
static void endcapCrystal(unsigned i, unsigned j, bool c)
static double aPhi(double f0, double f1)
static double _meanBT[2][2][4]
static double _meanR9[2][2][4]
static void endcapSGap(unsigned i, unsigned j, unsigned k, double c)
static const double _onePi
static double asinh(double s)
double sigmaEnergy() const
static double _barrelMGap[7][18][2]
static double _sigmaAT[2][2][4]
static double _sigmaAC[2][2][4]
static double _sigmaAM[2][2][4]
static double _meanAM[2][2][4]
static const double _twoPi
static void barrelSGap(unsigned i, unsigned j, unsigned k, double c)
static double _meanAS[2][2][4]
static void endcapCGap(unsigned i, unsigned j, unsigned k, double c)