StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MakeShellSectorOnGlobal.C
1 struct data_t {
2  Int_t day;
3  Double_t dx, ddx, dy, ddy, dz, ddz, alpha, dalpha, beta, dbeta, gamma, dgamma;
4  Int_t run, date, time;
5  // Double_t zdc;
6  Double_t field;
7  Int_t sector; // 0-1 SVT Clam shell, 2-5 Ssd Sector + 1
8  Char_t *comment;
9 };
10 Int_t N = 6;
11 /*
12  day|dX mkm |dY mkm |dZ mkm |alpha mrad |beta mrad |gamma mrad |Comment
13 // { 20, 15.98, 1.00, 2.58, 6.39, 51.57, 5.85, 0.04, 0.01, 0.17, 0.02, 0.12, 0.06, 6065045, 20050120, 0,-1, 0, "NoField 065E SVT 0 (+x South) "},
14 // { 20, -4.37, 1.62, 38.35, 1.11, 40.56, 2.39, -0.16, 0.02, 0.02, 0.00, 0.06, 0.08, 6065045, 20050120, 0,-1, 1, "NoField 065E SVT 1 (-x North)"},
15 // { 20, 248.03, 1.57, 52.57,13.90,-140.18, 2.90, 0.03, 0.01, 0.62, 0.00, -0.15, 0.08, 6020062, 20050120, 0,-1, 2, "CuCu200RF SSD 1 Pass121A"},
16 // { 20, 85.49,10.11, 155.29, 1.32, -68.27,13.15, 0.12, 0.00, 0.14, 0.01, 0.33, 0.07, 6020062, 20050120, 0,-1, 3, "CuCu200RF SSD 2 Pass121A"},
17 // { 20,-119.93, 1.46, 23.47, 1.02, -85.78, 3.03, -0.25, 0.01, 0.35, 0.00, 0.26, 0.22, 6020062, 20050120, 0,-1, 4, "CuCu200RF SSD 3 Pass121A"},
18 // { 20, 32.48, 8.69, 120.82, 1.12, -37.97,11.76, -0.29, 0.00, 0.22, 0.01, -0.15, 0.06, 6020062, 20050120, 0,-1, 5, "CuCu200RF SSD 4 Pass121A"}
19 // { 48, 15.98, 1.00, 2.58, 6.39, 51.57, 5.85, 0.04, 0.01, 0.17, 0.02, 0.12, 0.06, 6065045, 20050217, 0, 1, 0, "NoField 065E SVT 0 (+x South) "},
20 // { 48, -4.37, 1.62, 38.35, 1.11, 40.56, 2.39, -0.16, 0.02, 0.02, 0.00, 0.06, 0.08, 6065045, 20050217, 0, 1, 1, "NoField 065E SVT 1 (-x North)"},
21 // { 48, 141.20, 1.43, -55.42,12.45,-121.38, 2.93, 0.11, 0.02, 0.11, 0.00, 0.36, 0.19, 6048024, 20050217, 0, 1, 2, "CuCu200FF SSD 1 Pass121A"},
22 // { 48, -48.30, 0.90, -13.70, 0.98,-106.73,11.92, 0.11, 0.00, 0.28, 0.02, -0.10, 0.06, 6048024, 20050217, 0, 1, 3, "CuCu200FF SSD 2 Pass121A"},
23 // { 48,-299.05, 1.40, -76.58,13.31,-130.22, 2.75, 0.08, 0.04, 0.63, 0.00, 0.50, 0.07, 6048024, 20050217, 0, 1, 4, "CuCu200FF SSD 3 Pass121A"},
24 // { 48, -93.84, 0.70, -81.97,14.10, -40.17,11.37, 0.17, 0.00, 0.34, 0.01, 0.51, 0.06, 6048024, 20050217, 0, 1, 5, "CuCu200FF SSD 4 Pass121A"}
25 03/18/07
26  Pass 121 RFB
27 | 55.39+- 0.65 | 91.50+- 6.05 | 1.86+- 5.39 | -0.01+- 0.00 | 0.29+- 0.01 | 0.04+- 0.03 | Average for SVT ClamShell 0
28 | 62.02+- 0.78 | 53.80+- 6.74 | -85.55+- 6.08 | -0.25+- 0.01 | 0.42+- 0.02 | -0.73+- 0.06 | Average for SVT ClamShell 1
29 | -16.93+- 1.56 | 5.17+- 1.07 | -0.51+- 3.08 | 0.04+- 0.01 | 0.04+- 0.00 | 0.18+- 0.21 | Average for SSD Sector 1
30 | 20.98+- 4.04 | 14.80+- 0.76 | -38.01+- 2.16 | 0.05+- 0.00 | 0.10+- 0.01 | -0.08+- 0.07 | Average for SSD Sector 2
31 | -63.01+- 1.53 | 19.31+- 1.03 | -65.14+- 3.04 | -0.02+- 0.01 | 0.01+- 0.00 | 0.42+- 0.09 | Average for SSD Sector 3
32 | 12.36+- 8.69 | 10.88+- 0.89 | -8.41+- 1.83 | -0.02+- 0.00 | -0.01+- 0.01 | 0.11+- 0.06 | Average for SSD Sector 4
33 | 58.41+- 0.50 | 104.13+- 3.39 | -38.14+- 3.33 | -0.09+- 0.01 | 0.14+- 0.03 | -0.20+- 0.03 | Average for All Svt
34 | -1.58+- 5.06 | 8.33+- 0.61 | -24.92+- 0.92 | 0.07+- 0.00 | 0.08+- 0.00 | -0.02+- 0.02 | Average for All Ssd
35 Pass 121 FFB
36 | -84.97+- 4.42 | -82.28+- 5.59 | -1.08+- 5.06 | 0.18+- 0.03 | 0.30+- 0.04 | -0.44+- 0.05 | Average for SVT ClamShell 0
37 | -87.81+- 4.92 | -98.37+- 6.54 | -48.72+- 5.95 | -0.03+- 0.01 | 0.35+- 0.05 | 0.63+- 0.06 | Average for SVT ClamShell 1
38 | 87.78+- 1.42 | -3.53+- 1.33 | -24.13+- 2.91 | 0.07+- 0.01 | -0.00+- 0.00 | -0.04+- 0.05 | Average for SSD Sector 1
39 | -35.25+- 0.94 | -4.41+- 0.90 | -44.86+- 1.79 | 0.02+- 0.00 | 0.05+- 0.00 | -0.11+- 0.02 | Average for SSD Sector 2
40 |-124.69+- 1.40 | 0.93+- 0.87 | 13.83+- 2.42 | -0.05+- 0.01 | 0.03+- 0.00 | -0.03+- 0.20 | Average for SSD Sector 3
41 | -54.37+- 0.57 | -51.85+- 0.80 | -36.61+- 1.54 | 0.04+- 0.00 | 0.00+- 0.00 | -0.01+- 0.06 | Average for SSD Sector 4
42 | -93.34+- 0.48 |-129.99+- 3.18 | -21.00+- 3.12 | 0.13+- 0.01 | 0.21+- 0.02 | 0.12+- 0.03 | Average for All Svt
43 | -21.39+- 4.55 | -24.66+- 0.58 | -14.74+- 4.07 | 0.03+- 0.00 | 0.05+- 0.00 | -0.10+- 0.02 | Average for All Ssd
44 03/19/07
45 Pass 121 RFC
46 | 22.63+- 0.65 | 66.26+- 0.71 | 3.43+- 5.39 | 0.01+- 0.01 | 0.19+- 0.01 | -0.11+- 0.05 | Average for SVT ClamShell 0
47 | 26.56+- 4.96 | 41.07+- 6.74 | -38.69+- 6.07 | -0.07+- 0.04 | 0.08+- 0.02 | -0.16+- 0.06 | Average for SVT ClamShell 1
48 | 39.77+- 1.56 | 0.16+- 1.04 | -10.26+- 3.08 | -0.05+- 0.01 | 0.00+- 0.00 | 0.45+- 0.11 | Average for SSD Sector 1
49 | 24.69+-10.11 | 18.85+- 1.32 | 17.07+- 2.15 | -0.00+- 0.00 | 0.14+- 0.00 | -0.02+- 0.07 | Average for SSD Sector 2
50 | -98.33+- 1.47 | -22.92+-14.10 | -3.03+- 3.04 | -0.09+- 0.01 | -0.01+- 0.00 | 0.05+- 0.09 | Average for SSD Sector 3
51 | 3.95+- 8.69 | 19.39+- 0.86 | 1.53+- 1.83 | -0.03+- 0.00 | -0.00+- 0.01 | 0.03+- 0.06 | Average for SSD Sector 4
52 | 31.64+- 0.51 | 51.09+- 3.39 | -16.98+- 3.33 | -0.02+- 0.01 | 0.06+- 0.03 | -0.08+- 0.03 | Average for All Svt
53 | -5.23+- 5.06 | 18.41+- 0.64 | 3.25+- 0.93 | 0.00+- 0.00 | 0.03+- 0.00 | -0.09+- 0.02 | Average for All Ssd
54 Pass 121 FFC
55 | -49.41+- 0.61 | -60.12+- 0.63 | 3.16+- 5.06 | -0.01+- 0.01 | 0.22+- 0.01 | -0.03+- 0.05 | Average for SVT ClamShell 0
56 | -42.46+- 0.78 | -69.76+- 0.64 | -23.70+- 5.95 | 0.02+- 0.01 | 0.18+- 0.05 | 0.02+- 0.06 | Average for SVT ClamShell 1
57 | -3.92+- 1.41 | -3.85+- 0.74 | -18.13+- 2.91 | 0.02+- 0.01 | 0.01+- 0.00 | 0.11+- 0.09 | Average for SSD Sector 1
58 | 9.15+- 8.60 | 12.43+- 1.00 | 9.66+- 1.79 | -0.01+- 0.00 | 0.01+- 0.00 | 0.16+- 0.02 | Average for SSD Sector 2
59 | 0.47+- 1.41 | -4.81+- 0.89 | -14.36+- 2.75 | -0.12+- 0.01 | -0.00+- 0.00 | -0.34+- 0.06 | Average for SSD Sector 3
60 | 5.58+- 7.96 | -11.64+- 0.78 | 1.68+- 1.54 | 0.04+- 0.00 | -0.01+- 0.00 | -0.06+- 0.06 | Average for SSD Sector 4
61 | -46.76+- 0.48 | -64.24+- 0.44 | -8.15+- 3.12 | 0.11+- 0.01 | 0.10+- 0.02 | 0.06+- 0.03 | Average for All Svt
62 | 3.73+- 4.55 | -0.67+- 0.58 | -0.80+- 0.99 | 0.02+- 0.00 | 0.02+- 0.00 | 0.00+- 0.02 | Average for All Ssd
63  D 03/19/2007 -"- position, Ladder Alignment
64 Pass 121 RFD
65 | 12.63+- 0.65 | 30.95+- 0.71 | -5.67+- 0.69 | -0.01+- 0.00 | 0.08+- 0.01 | -0.13+- 0.05 | Average for SVT ClamShell 0
66 | 14.95+- 4.96 | 29.28+- 6.74 | -16.75+- 6.07 | -0.05+- 0.01 | 0.11+- 0.05 | 0.02+- 0.06 | Average for SVT ClamShell 1
67 | 104.79+- 1.57 | 38.84+- 0.97 | 12.07+- 3.08 | 0.05+- 0.01 | -0.01+- 0.00 | -0.06+- 0.06 | Average for SSD Sector 1 <--------------
68 | 37.24+- 4.29 | 13.53+- 1.32 | 25.48+- 2.19 | -0.02+- 0.00 | -0.02+- 0.00 | 0.17+- 0.03 | Average for SSD Sector 2
69 | -17.65+- 1.49 | 17.33+- 1.04 | -20.65+- 3.04 | -0.00+- 0.01 | 0.00+- 0.00 | -0.49+- 0.06 | Average for SSD Sector 3
70 | -24.56+- 0.83 | 18.88+- 0.89 | -1.03+- 1.79 | -0.01+- 0.00 | -0.01+- 0.01 | 0.03+- 0.06 | Average for SSD Sector 4
71 | 22.05+- 0.51 | 24.24+- 3.39 | -4.72+- 3.33 | 0.01+- 0.01 | 0.08+- 0.01 | -0.05+- 0.03 | Average for All Svt
72 | 1.33+- 0.53 | 12.39+- 0.66 | 5.14+- 1.09 | 0.04+- 0.00 | 0.04+- 0.00 | -0.02+- 0.00 | Average for All Ssd
73 Pass 121 FFD
74 | -17.97+- 0.61 | -17.84+- 0.63 | -2.94+- 0.64 | 0.11+- 0.03 | -0.08+- 0.01 | 0.09+- 0.05 | Average for SVT ClamShell 0
75 | -25.75+- 0.78 | -52.98+- 6.55 | -12.24+- 5.96 | 0.02+- 0.01 | 0.09+- 0.05 | -0.12+- 0.06 | Average for SVT ClamShell 1
76 | 24.78+- 1.42 | 4.00+- 7.79 | -4.91+- 2.91 | -0.01+- 0.01 | -0.00+- 0.00 | 0.20+- 0.19 | Average for SSD Sector 1
77 | -17.65+- 0.79 | -16.45+- 0.97 | 2.17+- 1.82 | 0.00+- 0.00 | -0.01+- 0.00 | -0.15+- 0.02 | Average for SSD Sector 2
78 | 76.46+- 1.38 | -7.02+- 0.89 | -31.87+- 2.55 | -0.04+- 0.01 | -0.00+- 0.00 | 0.37+- 0.20 | Average for SSD Sector 3
79 | 1.84+- 7.96 | -15.03+- 0.76 | 2.26+- 1.54 | 0.00+- 0.00 | 0.00+- 0.00 | -0.02+- 0.06 | Average for SSD Sector 4
80 | -20.84+- 0.48 | -34.00+- 3.18 | -1.88+- 3.12 | 0.11+- 0.01 | 0.03+- 0.02 | 0.08+- 0.02 | Average for All Svt
81 | 19.35+- 4.55 | -15.44+- 0.58 | -3.76+- 0.99 | -0.00+- 0.00 | -0.01+- 0.00 | -0.00+- 0.02 | Average for All Ssd
82 
83 
84 */
85 data_t Data[6] = {
86 // { 20, 55.39, 0.65, 91.50, 6.05, 1.86, 5.39, -0.01, 0.00, 0.29, 0.01, 0.04, 0.03 , 6065045, 20050120,1,-1, 0, "CuCu200RF SVT 0 Pass121B"},
87 // { 20, 62.02, 0.78, 53.80, 6.74, -85.55, 6.08, -0.25, 0.01, 0.42, 0.02, -0.73, 0.06 , 6065045, 20050120,1,-1, 1, "CuCu200RF SVT 1 Pass121B"},
88 // { 20,-16.93, 1.56, 5.17, 1.07, -0.51, 3.08, 0.04, 0.01, 0.04, 0.00, 0.18, 0.21 , 6020062, 20050120,1,-1, 2, "CuCu200RF SSD 1 Pass121B"},
89 // { 20, 20.98, 4.04, 14.80, 0.76, -38.01, 2.16, 0.05, 0.00, 0.10, 0.01, -0.08, 0.07 , 6020062, 20050120,1,-1, 3, "CuCu200RF SSD 2 Pass121B"},
90 // { 20,-63.01, 1.53, 19.31, 1.03, -65.14, 3.04, -0.02, 0.01, 0.01, 0.00, 0.42, 0.09 , 6020062, 20050120,1,-1, 4, "CuCu200RF SSD 3 Pass121B"},
91 // { 20, 12.36, 8.69, 10.88, 0.89, -8.41, 1.83, -0.02, 0.00, -0.01, 0.01, 0.11, 0.06 , 6020062, 20050120,1,-1, 5, "CuCu200RF SSD 4 Pass121B"}
92 // { 48, -84.97, 4.42, -82.28, 5.59, -1.08, 5.06, 0.18, 0.03, 0.30, 0.04, -0.44, 0.05, 6048024, 20050217,1, 1, 0, "CuCu200FF SSD 1 Pass121B"},
93 // { 48, -87.81, 4.92, -98.37, 6.54, -48.72, 5.95, -0.03, 0.01, 0.35, 0.05, 0.63, 0.06, 6048024, 20050217,1, 1, 1, "CuCu200FF SSD 1 Pass121B"},
94 // { 48, 87.78, 1.42, -3.53, 1.33, -24.13, 2.91, 0.07, 0.01, -0.00, 0.00, -0.04, 0.05, 6048024, 20050217,1, 1, 2, "CuCu200FF SSD 1 Pass121B"},
95 // { 48, -35.25, 0.94, -4.41, 0.90, -44.86, 1.79, 0.02, 0.00, 0.05, 0.00, -0.11, 0.02, 6048024, 20050217,1, 1, 3, "CuCu200FF SSD 1 Pass121B"},
96 // { 48,-124.69, 1.40, 0.93, 0.87, 13.83, 2.42, -0.05, 0.01, 0.03, 0.00, -0.03, 0.20, 6048024, 20050217,1, 1, 4, "CuCu200FF SSD 1 Pass121B"},
97 // { 48, -54.37, 0.57, -51.85, 0.80, -36.61, 1.54, 0.04, 0.00, 0.00, 0.00, -0.01, 0.06, 6048024, 20050217,1, 1, 5, "CuCu200FF SSD 1 Pass121B"}
98 // { 20, 22.63, 0.65, 66.26, 0.71, 3.43, 5.39, 0.01, 0.01, 0.19, 0.01, -0.11, 0.05, 6065045, 20050120,2,-1, 0, "CuCu200RF SVT 0 Pass121C"},
99 // { 20, 26.56, 4.96, 41.07, 6.74, -38.69, 6.07, -0.07, 0.04, 0.08, 0.02, -0.16, 0.06, 6065045, 20050120,2,-1, 1, "CuCu200RF SVT 1 Pass121C"},
100 // { 20, 39.77, 1.56, 0.16, 1.04, -10.26, 3.08, -0.05, 0.01, 0.00, 0.00, 0.45, 0.11, 6020062, 20050120,2,-1, 2, "CuCu200RF SSD 1 Pass121C"},
101 // { 20, 24.69,10.11, 18.85, 1.32, 17.07, 2.15, -0.00, 0.00, 0.14, 0.00, -0.02, 0.07, 6020062, 20050120,2,-1, 3, "CuCu200RF SSD 2 Pass121C"},
102 // { 20,-98.33, 1.47, -22.92,14.10, -3.03, 3.04, -0.09, 0.01, -0.01, 0.00, 0.05, 0.09, 6020062, 20050120,2,-1, 4, "CuCu200RF SSD 3 Pass121C"},
103 // { 20, 3.95, 8.69, 19.39, 0.86, 1.53, 1.83, -0.03, 0.00, -0.00, 0.01, 0.03, 0.06, 6020062, 20050120,2,-1, 5, "CuCu200RF SSD 4 Pass121C"}
104 // { 48,-49.41, 0.61, -60.12, 0.63, 3.16, 5.06, -0.01, 0.01, 0.22, 0.01, -0.03, 0.05, 6048024, 20050217,2, 1, 0, "CuCu200FF SVT 0 Pass121C"},
105 // { 48,-42.46, 0.78, -69.76, 0.64, -23.70, 5.95, 0.02, 0.01, 0.18, 0.05, 0.02, 0.06, 6048024, 20050217,2, 1, 1, "CuCu200FF SVT 1 Pass121C"},
106 // { 48, -3.92, 1.41, -3.85, 0.74, -18.13, 2.91, 0.02, 0.01, 0.01, 0.00, 0.11, 0.09, 6048024, 20050217,2, 1, 2, "CuCu200FF SSD 1 Pass121C"},
107 // { 48, 9.15, 8.60, 12.43, 1.00, 9.66, 1.79, -0.01, 0.00, 0.01, 0.00, 0.16, 0.02, 6048024, 20050217,2, 1, 3, "CuCu200FF SSD 2 Pass121C"},
108 // { 48, 0.47, 1.41, -4.81, 0.89, -14.36, 2.75, -0.12, 0.01, -0.00, 0.00, -0.34, 0.06, 6048024, 20050217,2, 1, 4, "CuCu200FF SSD 3 Pass121C"},
109 // { 48, 5.58, 7.96, -11.64, 0.78, 1.68, 1.54, 0.04, 0.00, -0.01, 0.00, -0.06, 0.06, 6048024, 20050217,2, 1, 5, "CuCu200FF SSD 4 Pass121C"}
110 // { 20, 12.63, 0.65, 30.95, 0.71, -5.67, 0.69, -0.01, 0.00, 0.08, 0.01, -0.13, 0.05, 6065045, 20050120,3,-1, 0, "CuCu200RF SVT 0 Pass121D"},
111 // { 20, 14.95, 4.96, 29.28, 6.74, -16.75, 6.07, -0.05, 0.01, 0.11, 0.05, 0.02, 0.06, 6065045, 20050120,3,-1, 1, "CuCu200RF SVT 1 Pass121D"},
112 // { 20, 104.79, 1.57, 38.84, 0.97, 12.07, 3.08, 0.05, 0.01, -0.01, 0.00, -0.06, 0.06, 6020062, 20050120,3,-1, 2, "CuCu200RF SSD 1 Pass121D"},
113 // { 20, 37.24, 4.29, 13.53, 1.32, 25.48, 2.19, -0.02, 0.00, -0.02, 0.00, 0.17, 0.03, 6020062, 20050120,3,-1, 3, "CuCu200RF SSD 2 Pass121D"},
114 // { 20, -17.65, 1.49, 17.33, 1.04, -20.65, 3.04, -0.00, 0.01, 0.00, 0.00, -0.49, 0.06, 6020062, 20050120,3,-1, 4, "CuCu200RF SSD 3 Pass121D"},
115 // { 20, -24.56, 0.83, 18.88, 0.89, -1.03, 1.79, -0.01, 0.00, -0.01, 0.01, 0.03, 0.06, 6020062, 20050120,3,-1, 5, "CuCu200RF SSD 4 Pass121D"}
116 // { 48, -17.97, 0.61, -17.84, 0.63, -2.94, 0.64, 0.11, 0.03, -0.08, 0.01, 0.09, 0.05, 6048024, 20050217,3, 1, 0, "CuCu200FF SVT 0 Pass121D"},
117 // { 48, -25.75, 0.78, -52.98, 6.55, -12.24, 5.96, 0.02, 0.01, 0.09, 0.05, -0.12, 0.06, 6048024, 20050217,3, 1, 1, "CuCu200FF SVT 1 Pass121D"},
118 // { 48, 24.78, 1.42, 4.00, 7.79, -4.91, 2.91, -0.01, 0.01, -0.00, 0.00, 0.20, 0.19, 6048024, 20050217,3, 1, 2, "CuCu200FF SSD 1 Pass121D"},
119 // { 48, -17.65, 0.79, -16.45, 0.97, 2.17, 1.82, 0.00, 0.00, -0.01, 0.00, -0.15, 0.02, 6048024, 20050217,3, 1, 3, "CuCu200FF SSD 2 Pass121D"},
120 // { 48, 76.46, 1.38, -7.02, 0.89, -31.87, 2.55, -0.04, 0.01, -0.00, 0.00, 0.37, 0.20, 6048024, 20050217,3, 1, 4, "CuCu200FF SSD 3 Pass121D"},
121 // { 48, 1.84, 7.96, -15.03, 0.76, 2.26, 1.54, 0.00, 0.00, 0.00, 0.00, -0.02, 0.06, 6048024, 20050217,3, 1, 5, "CuCu200FF SSD 4 Pass121D"}
122 // { 69, -78.31, 5.77, 16.10, 7.15, 83.74, 6.31, 0.06, 0.04, 0.23, 0.05, -0.02, 0.06, 6069100, 20050310,1, 1, 0, "CuCu62FF SVT 0 Pass123"},
123 // { 69, 101.11, 2.09, -4.35, 1.20, 103.56, 8.96, -0.48, 0.01, 0.39, 0.07, 0.38, 0.09, 6069100, 20050310,1, 1, 1, "CuCu62FF SVT 1 Pass123"},
124 // { 69, 415.95,47.77,-254.67,13.75, -21.83, 1.65, -0.00, 0.00, -0.01, 0.00, 1.87, 0.20, 6069100, 20050310,1, 1, 2, "CuCu62FF SSD 1 Pass123"},
125 // { 69, -137.60, 9.95, -26.58, 1.93, -53.67,12.87, -0.02, 0.00, -0.02, 0.00, 0.11, 0.07, 6069100, 20050310,1, 1, 3, "CuCu62FF SSD 2 Pass123"},
126 // { 69, 21.96, 2.26, 215.68,14.01, -74.05, 1.72, -0.00, 0.00, -0.10, 0.00, -0.65, 0.03, 6069100, 20050310,1, 1, 4, "CuCu62FF SSD 3 Pass123"},
127 // { 69, 197.97, 8.93, 5.54, 0.72, 45.03, 1.11, -0.01, 0.00, -0.01, 0.00, 0.06, 0.03, 6069100, 20050310,1, 1, 5, "CuCu62FF SSD 4 Pass123"}
128  //Pass125 TpcOnly
129 // { 69, 32.04, 1.30, 17.64, 0.94, -1.15,12.72, 0.19, 0.01, 0.35, 0.01, 0.13, 0.07 , 6069100, 20050310,10, 1, 0, "CuCu62FF SVT 0 Pass125"},
130 // { 69, 113.00, 2.32, -14.42, 1.65, 39.36, 1.96,-0.60, 0.02, 0.15, 0.01, -0.17, 0.07 , 6069100, 20050310,10, 1, 1, "CuCu62FF SVT 1 Pass125"},
131 // { 69, 369.65, 1.62, -69.71,22.50,-185.50, 5.64, 0.01, 0.00, 0.59, 0.01, -0.24, 0.09 , 6069100, 20050310,10, 1, 2, "CuCu62FF SSD 1 Pass125"},
132 // { 69, 56.64, 1.39, 8.87, 1.55,-177.29,20.66, 0.11, 0.00, 0.31, 0.00, -0.18, 0.11 , 6069100, 20050310,10, 1, 3, "CuCu62FF SSD 2 Pass125"},
133 // { 69,-136.69, 2.47, 1.63, 1.53,-265.42, 4.61, 0.03, 0.00, 1.05, 0.00, -0.87, 0.09 , 6069100, 20050310,10, 1, 4, "CuCu62FF SSD 3 Pass125"},
134 // { 69, 93.12,14.45, -41.23, 1.01, -80.87,19.03, 0.36, 0.00, 0.63, 0.01, 0.31, 0.01 , 6069100, 20050310,10, 1, 5, "CuCu62FF SSD 4 Pass125"}
135 // //Pass125 Cu62B
136 // { 69, 55.70, 1.36, 59.10, 1.48, -30.51, 1.45, 0.20, 0.01, 0.13, 0.01, 0.26, 0.07, 6069100, 20050310,11, 1, 0, "SVT 0 Pass125Cu62B"},
137 // { 69, 73.89, 2.32, 5.41, 1.65, -4.80, 1.98, 0.06, 0.02, 0.06, 0.01, -0.20, 0.11, 6069100, 20050310,11, 1, 1, "SVT 1 Pass125Cu62B"},
138 // { 69, -41.74, 2.60, -3.47, 1.65, 2.38, 5.87, 0.00, 0.00, 0.03, 0.01, 1.21, 0.14, 6069100, 20050310,11, 1, 2, "SSD 1 Pass125Cu62B"},
139 // { 69, 9.03, 1.27, 52.90, 1.51, -48.88,20.54, 0.11, 0.00, 0.25, 0.00, -0.06, 0.07, 6069100, 20050310,11, 1, 3, "SSD 2 Pass125Cu62B"},
140 // { 69, 182.34, 2.40, -14.80, 1.54, -9.67, 5.75, 0.01, 0.00, 0.03, 0.00, -0.12, 0.08, 6069100, 20050310,11, 1, 4, "SSD 3 Pass125Cu62B"},
141 // { 69, 30.02,14.36, 62.21, 1.36, -62.11, 3.14, 0.05, 0.00, 0.00, 0.00, -0.18, 0.02, 6069100, 20050310,11, 1, 5, "SSD 4 Pass125Cu62B"}
142 //Pass125 021
143 // { 20, -20.79, 1.08, 38.63, 1.14, -0.95, 1.14, 0.04, 0.01, 0.07, 0.01, -0.19, 0.05, 6020062, 20050120,12,-1, 0, "CuCu200RF SVT 0 Pass125_021"},
144 // { 20, -12.97, 8.13, 23.79, 1.16, -40.92, 1.19, 0.14, 0.01, 0.11, 0.01, 0.16, 0.06, 6020062, 20050120,12,-1, 1, "CuCu200RF SVT 1 Pass125_021"},
145 // { 20, 14.61, 2.58, -2.17, 1.22, 15.74, 4.97, 0.10, 0.01, -0.06, 0.00, -0.61, 0.04, 6020062, 20050120,12,-1, 2, "CuCu200RF SSD 1 Pass125_021"},
146 // { 20, 54.40, 1.62, 23.87, 2.13, -7.50, 3.72, -0.14, 0.00, 0.18, 0.00, 0.33, 0.13, 6020062, 20050120,12,-1, 3, "CuCu200RF SSD 2 Pass125_021"},
147 // { 20,-103.65, 1.76, 2.27, 1.63, -22.86, 5.11, 0.02, 0.00, 0.07, 0.00, -0.38, 0.08, 6020062, 20050120,12,-1, 4, "CuCu200RF SSD 3 Pass125_021"},
148 // { 20, -31.03,15.01, 17.69, 1.48, -25.35, 3.06, 0.39, 0.00, -0.06, 0.02, -0.04, 0.02, 6020062, 20050120,12,-1, 5, "CuCu200RF SSD 4 Pass125_021"}
149 // //Pass125 049
150 // { 48, 55.31, 0.87, -2.41, 0.92, 8.47, 0.89, -0.05, 0.01, 0.27, 0.01, -0.09, 0.04, 6048024, 20050217,12, 1, 0, "CuCu200FF SVT 0 Pass125_049"},
151 // { 48, -17.96, 6.92, 44.45, 9.26, -3.11, 0.98, -0.01, 0.05, 0.17, 0.02, 0.69, 0.02, 6048024, 20050217,12, 1, 1, "CuCu200FF SVT 1 Pass125_049"},
152 // { 48, -8.61, 2.31, 0.15, 0.06, -40.81, 4.79, -0.00, 0.00, -0.09, 0.00, -1.01, 0.13, 6048024, 20050217,12, 1, 2, "CuCu200FF SSD 1 Pass125_049"},
153 // { 48, 29.24, 1.09, 24.24, 1.19, 2.24, 2.62, -0.02, 0.00, -0.02, 0.00, -0.17, 0.03, 6048024, 20050217,12, 1, 3, "CuCu200FF SSD 2 Pass125_049"},
154 // { 48, 106.80, 2.21, -10.96, 1.47, 19.49, 4.17, 0.01, 0.00, 0.23, 0.00, 0.63, 0.08, 6048024, 20050217,12, 1, 4, "CuCu200FF SSD 3 Pass125_049"},
155 // { 48, 23.58,12.27, 15.74, 0.95, -27.35, 2.24, 0.41, 0.00, 0.02, 0.01, -0.05, 0.09, 6048024, 20050217,12, 1, 5, "CuCu200FF SSD 4 Pass125_049"}
156 //Pass125 Cu62C
157 // { 69, 15.46, 1.21, -15.91, 1.26, 13.21, 1.45, 0.12, 0.01, 0.01, 0.01, -0.28, 0.12, 6069100, 20050310,12, 1, 0, "SVT 0 Pass125Cu62C"},
158 // { 69, 19.46, 2.34, -22.65, 1.62, -4.24, 2.00, 0.01, 0.02, 0.05, 0.01, 0.17, 0.06, 6069100, 20050310,12, 1, 1, "SVT 1 Pass125Cu62C"},
159 // { 69, 273.08, 1.59, 5.98, 2.21, 0.89, 5.84, 0.00, 0.00, -0.01, 0.01, -0.41, 0.08, 6069100, 20050310,12, 1, 2, "SSD 1 Pass125Cu62C"},
160 // { 69, 1.42, 1.24, 18.47, 1.52, -58.26, 3.77, 0.03, 0.00, 0.10, 0.00, 0.28, 0.02, 6069100, 20050310,12, 1, 3, "SSD 2 Pass125Cu62C"},
161 // { 69, 36.47, 2.42, -4.73, 1.59, 2.37, 5.75, 0.01, 0.00, -0.00, 0.00, 0.31, 0.10, 6069100, 20050310,12, 1, 4, "SSD 3 Pass125Cu62C"},
162 // { 69, 10.05,14.36, -20.65, 1.07, 1.78, 3.15, 0.00, 0.00, 0.02, 0.00, -0.00, 0.06, 6069100, 20050310,12, 1, 5, "SSD 4 Pass125Cu62C"}
163 
164 // Rafael - 04/02/07 - 16:25 - Pass126 Cu62
165 // { 69, -42.31, 0.79, -32.80, 7.83, 31.82, 0.83, -0.10, 0.05, 0.19, 0.01, -0.37, 0.07, 6069100, 20050310, 19, 1, 0, "SVT 0 Pass126Cu62"},
166 // { 69, 4.71, 1.16, -32.83, 1.24, -17.37, 8.98, 0.05, 0.01, 0.37, 0.07, 0.29, 0.09, 6069100, 20050310, 19, 1, 1, "SVT 1 Pass126Cu62"},
167 // { 69, 0.93, 1.41, -63.65, 18.45, -14.89, 2.39, -0.00, 0.00, -0.01, 0.00, 0.33, 0.02, 6069100, 20050310, 19, 1, 2, "SSD 1 Pass126Cu62"},
168 // { 69, -19.94, 1.13, -1.76, 0.28, 10.08, 1.70, -0.00, 0.00, -0.01, 0.00, -0.08, 0.02, 6069100, 20050310, 19, 1, 3, "SSD 2 Pass126Cu62"},
169 // { 69, -23.23, 1.23, 77.19, 16.62, 2.34, 2.16, 0.00, 0.00, 0.02, 0.00, -0.83, 0.04, 6069100, 20050310, 19, 1, 4, "SSD 3 Pass126Cu62"},
170 // { 69, 41.30, 9.43, -2.77, 0.64, -4.12, 1.40, 0.00, 0.00, 0.01, 0.00, 0.09, 0.01, 6069100, 20050310, 19, 1, 5, "SSD 4 Pass126Cu62"}
171 //Pass126 04/02/07 021
172 // { 20, 27.91, 1.13, 25.99, 1.12, 3.93, 1.04, 0.04, 0.00, -0.08, 0.00, -0.02, 0.08, 6020062, 20050120,19,-1, 0, "CuCu200RF SVT 0 Pass126"},
173 // { 20, 15.99, 7.22, 42.49, 1.17, -13.36, 1.09, 0.07, 0.01, 0.12, 0.01, 0.20, 0.09, 6020062, 20050120,19,-1, 1, "CuCu200RF SVT 1 Pass126"},
174 // { 20, -12.88, 1.84, -0.44, 0.03, 3.32, 2.72, 0.00, 0.00, 0.01, 0.00, -0.05, 0.03, 6020062, 20050120,19,-1, 2, "CuCu200RF SSD 1 Pass126"},
175 // { 20, -13.68, 0.66, 0.74, 0.14, 1.02, 2.12, 0.00, 0.00, -0.00, 0.00, -0.11, 0.01, 6020062, 20050120,19,-1, 3, "CuCu200RF SSD 2 Pass126"},
176 // { 20, -16.70, 1.68, 4.31, 0.54, -22.52, 2.68, 0.00, 0.00, 0.00, 0.00, -0.78, 0.03, 6020062, 20050120,19,-1, 4, "CuCu200RF SSD 3 Pass126"},
177 // { 20, -0.45, 0.04, 0.91, 0.12, -12.14, 1.74, -0.00, 0.00, 0.00, 0.00, 0.05, 0.01, 6020062, 20050120,19,-1, 5, "CuCu200RF SSD 4 Pass126"}
178 //Pass126 04/02/07 049
179 // { 48, 14.88, 1.66, 8.99, 0.48, 29.15, 0.83, -0.04, 0.04, 0.14, 0.01, 0.04, 0.06, 6048024, 20050217,19, 1, 0, "CuCu200FF SSD 1 Pass126"},
180 // { 48, -4.79, 2.51, 40.01, 0.71, -30.39, 0.87, -0.05, 0.01, 0.11, 0.03, 0.32, 0.07, 6048024, 20050217,19, 1, 1, "CuCu200FF SSD 1 Pass126"},
181 // { 48, -5.19, 2.56, -0.09, 0.02, 2.18, 2.38, 0.00, 0.00, -0.01, 0.00, 0.11, 0.31, 6048024, 20050217,19, 1, 2, "CuCu200FF SSD 1 Pass126"},
182 // { 48, -12.77, 0.60, -2.90, 0.37, 5.05, 1.63, 0.00, 0.00, -0.00, 0.00, -0.09, 0.02, 6048024, 20050217,19, 1, 3, "CuCu200FF SSD 1 Pass126"},
183 // { 48, -35.80, 1.77, 63.42,17.10, 11.91, 2.24, 0.00, 0.00, 0.01, 0.00, -0.13, 0.27, 6048024, 20050217,19, 1, 4, "CuCu200FF SSD 1 Pass126"},
184 // { 48, -0.70, 0.03, 0.21, 0.82, -3.77, 1.40, -0.01, 0.00, 0.00, 0.00, -0.15, 0.01, 6048024, 20050217,19, 1, 5, "CuCu200FF SSD 1 Pass126"}
185 //Pass126 021D 04/03/07 skipped
186 // { 20, 13.08, 1.25, 16.31, 1.16, -4.77, 1.16, 0.01, 0.00, 0.08, 0.01, 0.09, 0.09, 6020062, 20050120,20,-1, 0, "CuCu200RF SVT 0 Pass126 021D"},
187 // { 20, 6.74, 1.33, 13.69, 1.33, 13.08, 1.25, -0.06, 0.00, 0.09, 0.01, 0.03, 0.05, 6020062, 20050120,20,-1, 1, "CuCu200RF SVT 1 Pass126 021D"},
188 // { 20, -12.31, 1.94, -0.45, 0.03, 3.63, 2.81, 0.00, 0.00, 0.01, 0.00, -0.07, 0.03, 6020062, 20050120,20,-1, 2, "CuCu200RF SSD 1 Pass126 021D"},
189 // { 20, -13.70, 0.68, 0.86, 0.27, 2.06, 2.20, 0.00, 0.00, -0.00, 0.00, -0.10, 0.01, 6020062, 20050120,20,-1, 3, "CuCu200RF SSD 2 Pass126 021D"},
190 // { 20, -16.47, 1.77, 0.53, 0.03, -21.88, 2.78, 0.00, 0.00, 0.00, 0.00, -0.64, 0.03, 6020062, 20050120,20,-1, 4, "CuCu200RF SSD 3 Pass126 021D"},
191 // { 20, -0.50, 0.04, 1.97, 0.61, -11.90, 1.80, -0.00, 0.00, 0.00, 0.00, 0.08, 0.01, 6020062, 20050120,20,-1, 5, "CuCu200RF SSD 4 Pass126 021D"}
192 //Pass126D 049D 04/03/07 skipped
193 // { 48, 4.90, 6.55, 4.94, 0.94, -11.11, 0.95, 0.24, 0.00, -0.11, 0.02, 0.02, 0.07, 6048024, 20050217,20, 1, 0, "CuCu200FF SSD 1 Pass126 049D"},
194 // { 48, 21.22, 1.09, -10.02, 0.93, 38.31, 1.07, -0.18, 0.01, -0.04, 0.01, 0.16, 0.08, 6048024, 20050217,20, 1, 1, "CuCu200FF SSD 1 Pass126 049D"},
195 // { 48, -2.77, 2.88, -0.08, 0.03, 3.73, 2.61, 0.00, 0.00, -0.01, 0.00, 0.03, 0.21, 6048024, 20050217,20, 1, 2, "CuCu200FF SSD 1 Pass126 049D"},
196 // { 48, -12.29, 0.75, -2.54, 0.38, 4.62, 0.71, 0.00, 0.00, -0.00, 0.00, -0.04, 0.02, 6048024, 20050217,20, 1, 3, "CuCu200FF SSD 1 Pass126 049D"},
197 // { 48, -36.03, 1.87, 8.58, 0.72, 10.92, 2.46, 0.00, 0.00, 0.02, 0.00, -0.30, 0.02, 6048024, 20050217,20, 1, 4, "CuCu200FF SSD 1 Pass126 049D"},
198 // { 48, -0.70, 0.03, -2.11, 0.57, -3.99, 1.54, -0.01, 0.00, 0.00, 0.00, -0.15, 0.01, 6048024, 20050217,20, 1, 5, "CuCu200FF SSD 1 Pass126 049D"}
199 //Pass126D Cu62D 04/03/07
200 // { 69, 8.72, 6.90, -3.65, 8.93, -13.01, 0.93, 0.11, 0.01, -0.23, 0.01, 0.34, 0.08, 6069100, 20050310,20, 1, 0, "SVT 0 Pass126 Cu62D"},
201 // { 69, -34.77, 1.26, 8.77,12.21, -6.39, 1.26, 0.03, 0.01, -0.02, 0.01, -0.68, 0.11, 6069100, 20050310,20, 1, 1, "SVT 1 Pass126 Cu62D"},
202 // { 69, 4.75, 1.56, 0.53, 0.02, -10.36, 2.59, -0.00, 0.00, 0.00, 0.00, -0.22, 0.02, 6069100, 20050310,20, 1, 2, "SSD 1 Pass126 Cu62D"},
203 // { 69, -8.11, 0.72, -4.58, 0.25, 13.50, 1.84, 0.00, 0.00, 0.00, 0.00, -0.05, 0.01, 6069100, 20050310,20, 1, 3, "SSD 2 Pass126 Cu62D"},
204 // { 69, -11.52, 1.34, -0.54, 0.03, 9.29, 2.34, 0.00, 0.00, 0.01, 0.00, -0.01, 0.04, 6069100, 20050310,20, 1, 4, "SSD 3 Pass126 Cu62D"},
205 // { 69, 1.45, 0.03, 6.83, 0.47, -13.61, 1.51, -0.00, 0.00, 0.01, 0.00, 0.04, 0.01, 6069100, 20050310,20, 1, 5, "SSD 4 Pass126 Cu62D"}
206 //FFA/Global/Results.Pass213_TpcOnly_FFAPlotsNFP25rCut0.5cm:
207 // {120, 67.82, 2.04,-13.50, 2.73, -16.40, 0.26, 0.06, 0.01, 0.03, 0.02, 0.11, 0.02,8120052,20070321, 32, 1, 0, "SVT 0 Pass213 FFA"},
208 // {120, -76.10, 2.32, 5.61, 0.31, -12.00, 2.43, 0.04, 0.02, 0.06, 0.02, 0.11, 0.02,8120052,20070321, 32, 1, 1, "SVT 1 Pass213 FFA"},
209 // {120, -15.73, 0.87, 0.75, 0.03,-122.47,19.52, 0.50, 0.07, -0.47, 0.04, 0.13, 0.18,8120052,20070321, 32, 1, 2, "SSD 1 Pass213 FFA"},
210 // {120, 7.51, 0.73, 4.76, 0.75, 292.02, 9.69, -0.12, 0.02, 1.36, 0.04, 0.17, 0.01,8120052,20070321, 32, 1, 3, "SSD 2 Pass213 FFA"},
211 // {120, 24.34, 0.97, 0.68, 0.51, -5.35, 1.44, 0.02, 0.00, 0.07, 0.00, 0.30, 0.04,8120052,20070321, 32, 1, 4, "SSD 3 Pass213 FFA"},
212 // {120, -5.24, 0.53, 0.59, 0.65, 128.74, 9.26, 0.07, 0.00, -0.56, 0.04, 0.00, 0.02,8120052,20070321, 32, 1, 5, "SSD 4 Pass213 FFA"}
213 
214 // //RFA/Global/Results.Pass213_TpcOnly_RFAPlotsNFP25rCut0.5cm:
215 // {159, 11.34, 3.64,-23.75, 4.93, 5.21, 0.46, 0.14, 0.03, -0.04, 0.03, 0.22, 0.03,8159044,20070524, 32,-1, 0, "SVT 0 Pass213 RFA"},
216 // {159, -83.28, 4.32, 13.56, 6.15, -5.38, 0.59, -0.23, 0.03, 0.02, 0.01, -0.09, 0.05,8159044,20070524, 32,-1, 1, "SVT 1 Pass213 RFA"},
217 // {159,-123.66, 1.56, 2.84, 0.04, 15.39, 2.77, 0.05, 0.02, 0.26, 0.08, -0.18, 0.08,8159044,20070524, 32,-1, 2, "SSD 1 Pass213 RFA"},
218 // {159, -4.29, 1.36, 20.95, 1.33,331.96,17.67, 0.35, 0.04, 1.37, 0.07, 0.04, 0.09,8159044,20070524, 32,-1, 3, "SSD 2 Pass213 RFA"},
219 // {159, -80.52, 1.72, 13.79, 1.03, 22.80, 2.83, -0.04, 0.00, -0.62, 0.07, 0.05, 0.28,8159044,20070524, 32,-1, 4, "SSD 3 Pass213 RFA"},
220 // {159, -27.60, 0.86, 25.09, 1.24,140.43,20.47, -0.55, 0.01, -0.36, 0.01, -0.03, 0.12,8159044,20070524, 32,-1, 5, "SSD 4 Pass213 RFA"}
221 // //RFB/Global/Results.Pass213_TpcOnly_RFBPlotsNFP25rCut0.5cm
222 // {159, 5.88, 3.65, -5.99, 0.51, 0.28, 0.47, 0.14, 0.01, -0.02, 0.03, 0.12, 0.04,8159044,20070524, 33,-1, 0, "SVT 0 Pass213 RFB"},
223 // {159, -41.92, 4.33, 9.16, 6.17, -6.61, 0.58, -0.11, 0.03, -0.02, 0.01, -0.02, 0.05,8159044,20070524, 33,-1, 1, "SVT 1 Pass213 RFB"},
224 // {159, -44.42, 1.47, 1.60, 0.04,-17.88, 2.81, -0.01, 0.02, 0.06, 0.08, 0.43, 0.08,8159044,20070524, 33,-1, 2, "SSD 1 Pass213 RFB"},
225 // {159, -4.92, 1.16, 3.43, 1.32, 73.27,17.73, 0.07, 0.04, 0.42, 0.00, 0.01, 0.09,8159044,20070524, 33,-1, 3, "SSD 2 Pass213 RFB"},
226 // {159, -19.21, 1.75, 4.99, 1.01, 12.42, 2.85, -0.04, 0.00, -0.32, 0.01, 0.03, 0.28,8159044,20070524, 33,-1, 4, "SSD 3 Pass213 RFB"},
227 // {159, -30.01, 1.18, 3.76, 1.17,-12.87, 1.93, -0.00, 0.00, -0.27, 0.00, -0.00, 0.02,8159044,20070524, 33,-1, 5, "SSD 4 Pass213 RFB"}
228 // Pass213/RFC/Global
229  {159, 1.71, 5.57,-14.53, 0.78, 3.36, 0.73, -0.02, 0.01, -0.01, 0.05, 0.03, 0.06,8159044,20070524, 34,-1, 0, "SVT 0 Pass213 RFC"},
230  {159,-22.30, 6.60, 6.25, 9.41, 3.58, 0.88, -0.04, 0.05, -0.04, 0.06, 0.01, 0.07,8159044,20070524, 34,-1, 1, "SVT 1 Pass213 RFC"},
231  {159,140.32, 1.50, -0.61, 0.07, 0.68, 4.21, 0.01, 0.00, -0.02, 0.12, -0.69, 0.01,8159044,20070524, 34,-1, 2, "SSD 1 Pass213 RFC"},
232  {159,-17.70, 1.48, -9.70, 1.61, 22.69, 3.25, -0.06, 0.01, 0.25, 0.00, 0.01, 0.14,8159044,20070524, 34,-1, 3, "SSD 2 Pass213 RFC"},
233  {159, 2.01, 2.06, 6.80, 1.46, 2.74, 4.44, -0.01, 0.00, -0.07, 0.01, -0.03, 0.01,8159044,20070524, 34,-1, 4, "SSD 3 Pass213 RFC"},
234  {159, -3.20, 1.36, -7.76, 1.56, 60.56, 2.94, -0.10, 0.00, -0.06, 0.00, 0.12, 0.03,8159044,20070524, 34,-1, 5, "SSD 4 Pass213 RFC"}
235 };
236 
237 
238 //________________________________________________________________________________
239 void MakeShellSectorOnGlobal(){
240  gROOT->LoadMacro("bfc.C");
241  bfc(0,"mysql,tpcDb,MagF,nodefault");
242  StMaker *dbMk = chain->Maker("db");
243  if (! dbMk) return;
244  dbMk->SetDebug(1);
245  if (! StarMagField::Instance()) new StarMagField(1,Data[0].field);
246  // StarMagField::Instance()->SetFactor(Data[0].field);
247  StEvtHddr *header = chain->GetEvtHddr();
248  header->SetRunNumber(1);
249  header->SetDateTime(Data[0].date,Data[0].time);
250  dbMk->SetDateTime(Data[0].date,Data[0].time);
251  chain->MakeEvent();
252  const TGeoHMatrix &Tpc2Global = gStTpcDb->Tpc2GlobalMatrix(); cout << "Tpc2Global\t"; Tpc2Global.Print();
253 
254  St_Survey *SsdOnGlobal = (St_Survey *) dbMk->GetDataBase("Geometry/ssd/SsdOnGlobal");
255  if (! SsdOnGlobal) {cout << "SsdOnGlobal has not been found" << endl; return;}
256  St_Survey *SvtOnGlobal = (St_Survey *) dbMk->GetDataBase("Geometry/svt/SvtOnGlobal");
257  if (! SvtOnGlobal) {cout << "SvtOnGlobal has not been found" << endl; return;}
258  St_Survey *SsdSectorsOnGlobalOld = (St_Survey *) dbMk->GetDataBase("Geometry/ssd/SsdSectorsOnGlobal"); // sectors in the SSD barrel coordinate system
259  St_Survey *SvtShellOnGlobalOld = (St_Survey *) dbMk->GetDataBase("Geometry/svt/ShellOnGlobal"); // sectors in the SSD barrel coordinate system
260  if (! (SsdSectorsOnGlobalOld)) return;
261  Survey_st *SectorsOnGlobal = SsdSectorsOnGlobalOld->GetTable(); // sectors in the SSD barrel coordinate system
262  Survey_st *ShellOnGlobal = SvtShellOnGlobalOld->GetTable(); // sectors in the SSD barrel coordinate system
263  Int_t NoSectors = SsdSectorsOnGlobalOld->GetNRows();
264  Int_t NoShells = SvtShellOnGlobalOld->GetNRows();
265  St_Survey *SsdSectorsOnGlobal = new St_Survey("SsdSectorsOnGlobal",NoSectors);
266  St_Survey *SvtShellOnGlobal = new St_Survey("ShellOnGlobal",NoShells);
267  TGeoHMatrix GLSSD, GLSVT, GSSD, GSVT, GLSSDI, GLSVTI, SG,SGold;
268  Survey_st *ssdOnGlobal = SsdOnGlobal->GetTable(); // SSD as whole
269  GSSD.SetRotation(&ssdOnGlobal->r00);
270  GSSD.SetTranslation(&ssdOnGlobal->t0); //cout << "WL\t"; WL.Print();
271  GLSSD = Tpc2Global * GSSD;
272  GLSSDI = GLSSD.Inverse();
273  Survey_st *svtOnGlobal = SvtOnGlobal->GetTable(); // SVT as whole
274  GSVT.SetRotation(&svtOnGlobal->r00);
275  GSVT.SetTranslation(&svtOnGlobal->t0); //cout << "WL\t"; WL.Print();
276  GLSVT = Tpc2Global * GSVT;
277  GLSVTI = GLSVT.Inverse();
278 //________________________________________________________________________________
279  Double_t xyz[3], dxyz[3], drot[3];
280  for (Int_t s = 0; s < NoSectors; s++, SectorsOnGlobal++) {
281  Int_t sector = SectorsOnGlobal->Id;
282  Int_t i = sector + 1;
283  TGeoHMatrix dR, dr;
284  dR.RotateX(180./TMath::Pi()*Data[i].alpha*1e-3);
285  dR.RotateY(180./TMath::Pi()*Data[i].beta*1e-3);
286  dR.RotateZ(180./TMath::Pi()*Data[i].gamma*1e-3);
287  xyz[0] = 1e-4*Data[i].dx;
288  xyz[1] = 1e-4*Data[i].dy;
289  xyz[2] = 1e-4*Data[i].dz;
290  dxyz[0] = 1e-4*Data[i].ddx;
291  dxyz[1] = 1e-4*Data[i].ddy;
292  dxyz[2] = 1e-4*Data[i].ddz;
293  drot[0] = Data[i].dalpha*1e-3;
294  drot[1] = Data[i].dbeta*1e-3;
295  drot[2] = Data[i].dgamma*1e-3;
296  dR.SetTranslation(xyz);
297  cout << "Additional rotation for Sector\t" << sector; dR.Print();
298  SGold.SetRotation(&SectorsOnGlobal->r00);
299  SGold.SetTranslation(&SectorsOnGlobal->t0); //cout << "Sector\t" << Sector << "\tSGold\t"; SGold.Print();
300  cout << "Original SG\t"; SGold.Print();
301  //________________________________________________________________________________
302  Double_t norm;
303  TVector3 d(&SectorsOnGlobal->r00); norm = 1./d.Mag(); d *= norm;
304  TVector3 t(&SectorsOnGlobal->r10); norm = 1./t.Mag(); t *= norm;
305  TVector3 n(&SectorsOnGlobal->r20);
306  TVector3 c = d.Cross(t);
307  if (c.Dot(n) < 0) c *= -1;
308  Double_t rot[9] = {
309  d.x(),d.y(),d.z(),
310  t.x(),t.y(),t.z(),
311  c.x(),c.y(),c.z(),
312  };
313  SGold.SetRotation(rot);
314  cout << "Original SG after normalization\t"; SGold.Print();
315  //________________________________________________________________________________
316  dr = GLSSDI * dR * GLSSD;
317  cout << " GLSSDI\t"; GLSSDI.Print();
318  cout << " GLSSD \t"; GLSSD.Print();
319  cout << " dR \t"; dR.Print();
320  cout << " dr \t"; dr.Print();
321  SG = dr * SGold; //cout << "SG\t"; SG.Print();
322  cout << "new SG \t"; SG.Print();
323  Survey_st row = *SectorsOnGlobal;
324  Double_t *r = SG.GetRotationMatrix();
325  memcpy(&row.r00, r, 9*sizeof(Double_t));
326  Double_t *tr = SG.GetTranslation();
327  memcpy(&row.t0, tr, 3*sizeof(Double_t));
328  memcpy(&row.sigmaRotX, drot, 3*sizeof(Double_t));
329  memcpy(&row.sigmaTrX, dxyz, 3*sizeof(Double_t));
330  SsdSectorsOnGlobal->AddAt(&row);
331  }
332  for (Int_t s = 0; s < NoShells; s++, ShellOnGlobal++) {
333  Int_t shell = ShellOnGlobal->Id;
334  Int_t i = shell;
335  TGeoHMatrix dR, dr;
336  dR.RotateX(180./TMath::Pi()*Data[i].alpha*1e-3);
337  dR.RotateY(180./TMath::Pi()*Data[i].beta*1e-3);
338  dR.RotateZ(180./TMath::Pi()*Data[i].gamma*1e-3);
339  xyz[0] = 1e-4*Data[i].dx;
340  xyz[1] = 1e-4*Data[i].dy;
341  xyz[2] = 1e-4*Data[i].dz;
342  dxyz[0] = 1e-4*Data[i].ddx;
343  dxyz[1] = 1e-4*Data[i].ddy;
344  dxyz[2] = 1e-4*Data[i].ddz;
345  drot[0] = Data[i].dalpha*1e-3;
346  drot[1] = Data[i].dbeta*1e-3;
347  drot[2] = Data[i].dgamma*1e-3;
348  dR.SetTranslation(xyz);
349  cout << "Additional rotation for Shell\t" << shell; dR.Print();
350  SGold.SetRotation(&ShellOnGlobal->r00);
351  SGold.SetTranslation(&ShellOnGlobal->t0); //cout << "Shell\t" << Shell << "\tSGold\t"; SGold.Print();
352  cout << "Original SG\t"; SGold.Print();
353  //________________________________________________________________________________
354  Double_t norm;
355  TVector3 d(&ShellOnGlobal->r00); norm = 1./d.Mag(); d *= norm;
356  TVector3 t(&ShellOnGlobal->r10); norm = 1./t.Mag(); t *= norm;
357  TVector3 n(&ShellOnGlobal->r20);
358  TVector3 c = d.Cross(t);
359  if (c.Dot(n) < 0) c *= -1;
360  Double_t rot[9] = {
361  d.x(),d.y(),d.z(),
362  t.x(),t.y(),t.z(),
363  c.x(),c.y(),c.z(),
364  };
365  SGold.SetRotation(rot);
366  cout << "Original SG after normalization\t"; SGold.Print();
367  //________________________________________________________________________________
368  dr = GLSVTI * dR * GLSVT;
369  cout << " GLSVTI\t"; GLSVTI.Print();
370  cout << " GLSVT \t"; GLSVT.Print();
371  cout << " dR \t"; dR.Print();
372  cout << " dr \t"; dr.Print();
373  SG = dr * SGold; //cout << "SG\t"; SG.Print();
374  cout << "new SG \t"; SG.Print();
375  Survey_st row = *ShellOnGlobal;
376  Double_t *r = SG.GetRotationMatrix();
377  memcpy(&row.r00, r, 9*sizeof(Double_t));
378  Double_t *tr = SG.GetTranslation();
379  memcpy(&row.t0, tr, 3*sizeof(Double_t));
380  memcpy(&row.sigmaRotX, drot, 3*sizeof(Double_t));
381  memcpy(&row.sigmaTrX, dxyz, 3*sizeof(Double_t));
382  SvtShellOnGlobal->AddAt(&row);
383  }
384  TString fOut = Form("%s.%8i.%06i.C",SsdSectorsOnGlobal->GetName(),Data[0].date,Data[0].time);
385  ofstream out;
386  cout << "Create " << fOut << endl;
387  out.open(fOut.Data());
388  out << "TDataSet *CreateTable() {" << endl;
389  out << " if (!gROOT->GetClass(\"St_Survey\")) return 0;" << endl;
390  out << " Survey_st row[" << NoSectors << "] = {" << endl;
391  Survey_st *SectorOnGlobal = SsdSectorsOnGlobal->GetTable();
392  for (Int_t k = 0; k < NoSectors; k++, SectorOnGlobal++) {
393  out << " {" << Form("%1i",SectorOnGlobal->Id);
394  Double_t *r = &(SectorOnGlobal->r00);
395  for (Int_t j = 0; j < 9; j++) out << Form(",%7.5f",r[j]);
396  for (Int_t j = 9; j < 12; j++) out << Form(",%7.4f",r[j]);
397  for (Int_t j = 12; j < 18; j++) out << Form(",%7.5f",r[j]);
398  out << ",\"" << Data[k+2].comment << "\"}";
399  if (k != NoSectors - 1) out << ",";
400  out << endl;
401  }
402  out << " };" << endl;
403  out << " St_Survey *tableSet = new St_Survey(\"" << SsdSectorsOnGlobal->GetName() << "\"," << NoSectors << ");" << endl;
404  out << " for (Int_t i = 0; i < " << NoSectors << "; i++) tableSet->AddAt(&row[i].Id, i);" << endl;
405  out << " return (TDataSet *)tableSet;" << endl;
406  out << "}" << endl;
407  out.close();
408  //________________________________________________________________________________
409  TString fOut = Form("%s.%8i.%06i.C",SvtShellOnGlobal->GetName(),Data[0].date,Data[0].time);
410  ofstream out;
411  cout << "Create " << fOut << endl;
412  out.open(fOut.Data());
413  out << "TDataSet *CreateTable() {" << endl;
414  out << " if (!gROOT->GetClass(\"St_Survey\")) return 0;" << endl;
415  out << " Survey_st row[" << NoShells << "] = {" << endl;
416  Survey_st *ShellOnGlobal = SvtShellOnGlobal->GetTable();
417  for (Int_t i = 0; i < NoShells; i++, ShellOnGlobal++) {
418  out << " {" << Form("%1i",ShellOnGlobal->Id);
419  Double_t *r = &(ShellOnGlobal->r00);
420  for (Int_t j = 0; j < 9; j++) out << Form(",%7.5f",r[j]);
421  for (Int_t j = 9; j < 12; j++) out << Form(",%7.4f",r[j]);
422  for (Int_t j = 12; j < 18; j++) out << Form(",%7.5f",r[j]);
423  out << ",\"" << Data[i].comment << "\"}";
424  if (i != NoShells - 1) out << ",";
425  out << endl;
426  }
427  out << " };" << endl;
428  out << " St_Survey *tableSet = new St_Survey(\"" << SvtShellOnGlobal->GetName() << "\"," << NoShells << ");" << endl;
429  out << " for (Int_t i = 0; i < " << NoShells << "; i++) tableSet->AddAt(&row[i].Id, i);" << endl;
430  out << " return (TDataSet *)tableSet;" << endl;
431  out << "}" << endl;
432  out.close();
433  }