13 Int_t MapR[24] = {3, 0, 9, 6, 4, 1, 10, 7, 5, 2, 11, 8, 18, 21, 12, 15, 19, 22, 13, 16, 20, 23, 14, 17};
14 Int_t MapL[24] = {20, 23, 14, 17, 19, 22, 13, 16, 18, 21, 12, 15, 5, 2, 11, 8, 4, 1, 10, 7, 3, 0, 9, 6};
19 UInt_t crate = 0x06ea9711;
20 static const Int_t kNSlot = 23;
21 UInt_t slot[kNSlot] = {0.};
29 slot[14] = 0x046f408c;
30 slot[15] = 0x06e94033;
31 slot[16] = 0x076cae7a;
32 slot[17] = 0x07a8deb2;
33 slot[18] = 0x076cad52;
34 slot[19] = 0x076ccf62;
35 slot[20] = 0x06e940be;
40 ff.open(placementMapFile.c_str(), std::fstream::out);
43 cerr <<
"Cannot open the file " << placementMapFile << endl;
46 for (Int_t
i = 0;
i < kNSlot;
i++)
49 ff << std::hex << std::setfill(
'0') << std::setw(8) << crate <<
'\t';
50 ff << std::dec <<
i <<
'\t';
51 ff << std::hex << std::setfill(
'0') << std::setw(8) << slot[
i] << endl;
57 cout <<
"Num = " << Num << endl;
58 cout <<
"GetSlot(Num) = " <<
GetSlot(Num) <<
" GetCon(Num) = " <<
GetCon(Num) << endl;
59 cout <<
"GetDet(Num) = " <<
GetDet(Num) <<
" GetSide(Num) = " <<
GetSide(Num) << endl;
63 ff.open(mapFile.c_str(), std::fstream::out);
66 cerr <<
"Cannot open the file " << mapFile << endl;
70 static const Int_t kNIt = 4;
71 static const Int_t kNDet = 10+1;
72 Int_t MapDet[kNDet][kNIt] = {
73 {1002, 1101, 1204, 2003},
74 {2112, 2211, 3014, 3113},
75 {3222, 4021, 4124, 4223},
76 {5032, 5131, 5234, 6033},
77 {6142, 6241, 7044, 7143},
78 {14052, 14151, 14254, 15053},
79 {15162, 15261, 16064, 16163},
80 {16272, 17071, 17174, 17273},
81 {18082, 18181, 18284, 19083},
82 {19192, 19291, 20094, 20193},
83 {7205, 20205, 7205, 20205}
90 for (Int_t det = 0; det < kNDet; det++)
92 for (Int_t
i = 0;
i < kNIt;
i++)
94 for (Int_t j = 0; j < 24; j++)
103 ff << std::hex << std::setfill(
'0') << std::setw(8) << slot[
GetSlot(MapDet[det][
i])] << std::setfill(
' ') <<
'\t';
104 ff << std::dec << j + 24 *
GetCon(MapDet[det][
i]) <<
'\t';
105 ff <<
GetDet(MapDet[det][
i]) <<
'\t';
108 if (det < 5) ff << 47 - (MapL[j] + (
GetSide(MapDet[det][
i]) - 1)*24) <<
'\t';
109 else ff << MapL[j] + (
GetSide(MapDet[det][
i]) - 1)*24 <<
'\t';
116 if (det < 5) ff << 47 - (MapR[j] + (
GetSide(MapDet[det][
i]) - 3)*24) <<
'\t';
117 else ff << MapR[j] + (
GetSide(MapDet[det][
i]) - 3)*24 <<
'\t';