1 #include "LASERINO_TABLE.h"
5 out <<
"static LASERINO_t Bundles[14][6] = " << endl;
8 for (Int_t r = 0; r < 14; r++) {
9 Int_t sector = Locals[r][0][0].Sector;
10 Int_t s = (sector-1)/2;
11 for (Int_t b = 0; b < 6; b++) {
13 Bundles[r][b] = Locals[r][b][m];
14 Bundles[r][b].dX = Bundles[r][b].ddX = Bundles[r][b].dY = Bundles[r][b].ddY = 0;
16 Bundles[r][b].DeltaPhi = - 1.e-3*(dPhiC[s].Angle+dPhiC2[s].Angle);
17 if (r == 0 && b == 0) out <<
" {{{";
19 if (b == 0) out <<
" {{";
23 Bundles[r][b].Write(out);
24 if (r == 13 && b == 5) out <<
"}}};";
26 if (b == 5) out <<
"}},";
34 out <<
"static LASERINO_t Mirrors[14][6][7] = " << endl;
35 for (Int_t r = 0; r < 14; r++) {
36 for (Int_t b = 0; b < 6; b++) {
38 for (Int_t m = 0; m < 3; m++) phi0 += Locals[r][b][m].DeltaPhi;
39 Double_t phiM = -phi0;
40 for (Int_t m = 0; m < 7; m++) {
41 Mirrors[m] = Locals[r][b][m];
42 Mirrors[m].X -= Bundles[r][b].X;
43 Mirrors[m].Y -= Bundles[r][b].Y;
44 Mirrors[m].Z -= Bundles[r][b].Z;
45 Mirrors[m].ThetaZ -= Bundles[r][b].ThetaZ;
46 Mirrors[m].dX -= Bundles[r][b].dX;
47 Mirrors[m].dY -= Bundles[r][b].dY;
48 Mirrors[m].DeltaPhi = phiM;
49 phiM += Locals[r][b][m].DeltaPhi;
53 if ( Mirrors[0].Z > Mirrors[1].Z) { Mirrors[0].Status += 100; Mirrors[1].Status += 100;}
54 if ( Mirrors[0].Z > Mirrors[4].Z) { Mirrors[0].Status += 100; Mirrors[3].Status += 100;}
55 if ( Mirrors[6].Z > Mirrors[3].Z) { Mirrors[6].Status += 100; Mirrors[3].Status += 100;}
56 if ( Mirrors[6].Z > Mirrors[5].Z) { Mirrors[6].Status += 100; Mirrors[5].Status += 100;}
58 if ( Mirrors[1].Z > Mirrors[2].Z) { Mirrors[1].Status += 100; Mirrors[4].Status += 100;}
59 if ( Mirrors[3].Z > Mirrors[2].Z) { Mirrors[3].Status += 100; Mirrors[2].Status += 100;}
60 if ( Mirrors[3].Z > Mirrors[4].Z) { Mirrors[3].Status += 100; Mirrors[4].Status += 100;}
61 if ( Mirrors[5].Z > Mirrors[4].Z) { Mirrors[5].Status += 100; Mirrors[4].Status += 100;}
63 if ( Mirrors[0].X > Mirrors[1].X) { Mirrors[0].Status += 1; Mirrors[1].Status += 1;}
64 if ( Mirrors[0].X > Mirrors[3].X) { Mirrors[0].Status += 1; Mirrors[3].Status += 1;}
65 if ( Mirrors[0].X > Mirrors[5].X) { Mirrors[0].Status += 1; Mirrors[5].Status += 1;}
67 if ( Mirrors[6].X > Mirrors[1].X) { Mirrors[6].Status += 1; Mirrors[1].Status += 1;}
68 if ( Mirrors[6].X > Mirrors[3].X) { Mirrors[6].Status += 1; Mirrors[3].Status += 1;}
69 if ( Mirrors[6].X > Mirrors[5].X) { Mirrors[6].Status += 1; Mirrors[5].Status += 1;}
71 if ( Mirrors[1].X > Mirrors[2].X) { Mirrors[0].Status += 1; Mirrors[2].Status += 1;}
72 if ( Mirrors[3].X > Mirrors[2].X) { Mirrors[3].Status += 1; Mirrors[2].Status += 1;}
73 if ( Mirrors[5].X > Mirrors[2].X) { Mirrors[5].Status += 1; Mirrors[2].Status += 1;}
75 if ( Mirrors[1].X > Mirrors[4].X) { Mirrors[0].Status += 1; Mirrors[4].Status += 1;}
76 if ( Mirrors[3].X > Mirrors[4].X) { Mirrors[3].Status += 1; Mirrors[4].Status += 1;}
77 if ( Mirrors[5].X > Mirrors[4].X) { Mirrors[5].Status += 1; Mirrors[4].Status += 1;}
79 if ( Mirrors[1].Y > Mirrors[0].Y) { Mirrors[1].Status += 10; Mirrors[0].Status += 10;}
80 if ( Mirrors[1].Y > Mirrors[2].Y) { Mirrors[1].Status += 10; Mirrors[2].Status += 10;}
82 if ( Mirrors[0].Y > Mirrors[3].Y) { Mirrors[0].Status += 10; Mirrors[4].Status += 10;}
83 if ( Mirrors[2].Y > Mirrors[3].Y) { Mirrors[2].Status += 10; Mirrors[4].Status += 10;}
84 if ( Mirrors[3].Y > Mirrors[4].Y) { Mirrors[3].Status += 10; Mirrors[4].Status += 10;}
85 if ( Mirrors[3].Y > Mirrors[6].Y) { Mirrors[3].Status += 10; Mirrors[6].Status += 10;}
86 if ( Mirrors[4].Y > Mirrors[5].Y) { Mirrors[4].Status += 10; Mirrors[5].Status += 10;}
87 if ( Mirrors[6].Y > Mirrors[5].Y) { Mirrors[6].Status += 10; Mirrors[5].Status += 10;}
88 for (Int_t m = 0; m < 7; m++) {
89 if (r == 0 && b == 0 && m == 0) out <<
" {{{{";
91 if (b == 0 && m == 0) out <<
" {{{";
93 if (m == 0) out <<
" {{";
98 Mirrors[m].Write(out);
99 if (r == 13 && b == 5 && m == 6) out <<
"}}}};";
101 if (b == 5 && m == 6) out <<
"}}},";
103 if (m == 6) out <<
"}}";