102 std::string mapFile =
"TOF400_StripMap_RUN9.txt",
103 std::string inlFile =
"ListINLFiles_Run9.txt")
109 Int_t MapL[24] = {6, 9, 0, 3, 7, 10, 1, 4, 8, 11, 2, 5, 15, 12, 21, 18, 16, 13, 22, 19, 17, 14, 23, 20};
110 Int_t MapR[24] = {17, 14, 23, 20, 16, 13, 22, 19, 15, 12, 21, 18, 8, 11, 2, 5, 7, 10, 1, 4, 6, 9, 0, 3};
113 Int_t MapL_2[24] = {1, 14, 7, 4, 0, 13, 6, 3, 15, 12, 5, 2, 8, 11, 18, 21, 23, 10, 17, 20, 22, 9, 16, 19};
114 Int_t MapR_2[24] = {22, 9, 16, 19, 23, 10, 17, 20, 8, 11, 18, 21, 15, 12, 5, 2, 0, 13, 6, 3, 1, 14, 7, 4};
116 Int_t mapTwistDet[30];
119 if (
i == 0 ||
i == 2 ||
i == 4 ||
i == 5 ||
i == 6 ||
i == 15 ||
i == 22 ||
i == 23 ||
i == 24 ||
i == 29)
138 slot[4] = 0x06e9404b;
139 slot[5] = 0x06e9da9e;
140 slot[6] = 0x06e940b1;
141 slot[7] = 0x07a8deb2;
142 slot[8] = 0x06e9403e;
143 slot[9] = 0x06e9da86;
144 slot[10] = 0x076cae7a;
146 slot[14] = 0x06e9e4b0;
147 slot[15] = 0x076cae7b;
148 slot[16] = 0x076cad53;
149 slot[17] = 0x06e940be;
150 slot[18] = 0x076ccf5f;
151 slot[19] = 0x076ccf56;
152 slot[20] = 0x06e9da91;
159 cout <<
"Num = " << Num << endl;
160 cout <<
"GetSlot(Num) = " <<
GetSlot(Num) <<
" GetCon(Num) = " <<
GetCon(Num) << endl;
161 cout <<
"GetDet(Num) = " <<
GetDet(Num) <<
" GetSide(Num) = " <<
GetSide(Num) << endl;
164 ffStrip.open(mapFile.c_str(), std::fstream::out);
166 cerr <<
"Cannot open the file " << mapFile << endl;
175 {18204, 15103, 20102, 15201},
176 {18014, 14013, 19012, 16011},
177 {18124, 14223, 20022, 16121},
178 {17234, 14133, 19132, 17031},
179 {17144, 15043, 19242, 16241},
181 {9054, 5253, 8152, 5151},
182 {9164, 6063, 8262, 5061},
183 {9274, 6173, 8072, 4271},
184 {10084, 6283, 7282, 4181},
185 {10194, 7093, 7192, 4091},
190 for (
Int_t j = 0; j < 24; j++) {
201 << std::setfill(
' ') <<
'\t';
207 if (mapTwistDet[det] == 1)
215 }
else if (
GetSide(MapDetL[det][
i]) == 3 ||
GetSide(MapDetL[det][
i]) == 4) {
217 if (mapTwistDet[det] == 1)
241 slot[4] = 0x0e7619ce;
242 slot[5] = 0x0e765cfa;
243 slot[6] = 0x0e75504a;
244 slot[7] = 0x0e7619cf;
245 slot[8] = 0x0e755014;
246 slot[9] = 0x0e755026;
247 slot[10] = 0x0e7619bc;
249 slot[14] = 0x0e75e9e1;
250 slot[15] = 0x0e765ced;
251 slot[16] = 0x0e7619bb;
252 slot[17] = 0x0e755038;
253 slot[18] = 0x0e75502f;
254 slot[19] = 0x0e755053;
255 slot[20] = 0x0e755041;
265 {20104, 16103, 18002, 14101},
266 {20014, 16013, 18112, 14011},
267 {19224, 17023, 17122, 15121},
268 {19134, 16233, 17232, 15031},
269 {19044, 15243, 18242, 14241},
271 {9254, 10253, 8052, 5051},
272 {9164, 6263, 7162, 4261},
273 {10074, 6173, 7272, 5171},
274 {10184, 6083, 8182, 4081},
275 {9094, 5293, 8292, 4191},
279 ffStrip.open(mapFile.c_str(), std::fstream::in | std::fstream::out | std::fstream::app);
281 cerr <<
"2. Cannot open the file " << mapFile << endl;
287 for (
Int_t j = 0; j < 24; j++) {
297 ffStrip << std::hex << std::setfill(
'0') << std::setw(8) <<
slot[
GetSlot(MapDetL2[det][
i])]
298 << std::setfill(
' ') <<
'\t';
304 if (mapTwistDet[
GetDet(MapDetL2[det][
i]) + 10] == 1)
312 }
else if (
GetSide(MapDetL2[det][
i]) == 3 ||
GetSide(MapDetL2[det][
i]) == 4) {
314 if (mapTwistDet[
GetDet(MapDetL2[det][
i]) + 10] == 1)
338 slot[4] = 0x076caef6;
339 slot[5] = 0x06e9404a;
340 slot[6] = 0x076d180a;
341 slot[7] = 0x06e940b2;
342 slot[8] = 0x080c05e4;
343 slot[9] = 0x076d445b;
344 slot[10] = 0x07a96e8a;
346 slot[14] = 0x07a9fc6f;
347 slot[15] = 0x07a9b249;
348 slot[16] = 0x080bcc14;
349 slot[17] = 0x07a9b1d6;
350 slot[18] = 0x07a9e7d0;
351 slot[19] = 0x07a9fbf8;
352 slot[20] = 0x07a9eef2;
362 {20104, 18203, 17002, 14101},
363 {20014, 18113, 16212, 15111},
364 {19224, 18023, 16022, 14021},
365 {19134, 17233, 16132, 14231},
366 {19044, 17143, 15242, 15041},
368 {10154, 6053, 8052, 4251},
369 {10064, 5263, 8262, 4161},
370 {9274, 6173, 7272, 4071},
371 {9084, 6283, 8182, 5081},
372 {9194, 7093, 7192, 5191},
376 ffStrip.open(mapFile.c_str(), std::fstream::in | std::fstream::out | std::fstream::app);
378 cerr <<
"2. Cannot open the file " << mapFile << endl;
384 for (
Int_t j = 0; j < 24; j++) {
394 ffStrip << std::hex << std::setfill(
'0') << std::setw(8) <<
slot[
GetSlot(MapDetL3[det][
i])]
395 << std::setfill(
' ') <<
'\t';
401 if (mapTwistDet[
GetDet(MapDetL2[det][
i]) + 20] == 1)
409 }
else if (
GetSide(MapDetL3[det][
i]) == 3 ||
GetSide(MapDetL3[det][
i]) == 4) {
411 if (mapTwistDet[
GetDet(MapDetL2[det][
i]) + 20] == 1)