14 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};
15 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};
21 static const Int_t kNSlot = 23;
22 UInt_t slot[kNSlot] = {0.};
30 slot[14] = 0x046f408c;
31 slot[15] = 0x06e94033;
32 slot[16] = 0x076cae7a;
33 slot[17] = 0x07a8deb2;
34 slot[18] = 0x076cad52;
35 slot[19] = 0x076ccf62;
36 slot[20] = 0x06e940be;
41 ff.open(placementMapFile.c_str(), std::fstream::out);
43 cerr <<
"Cannot open the file " << placementMapFile << endl;
48 ff << std::hex << std::setfill(
'0') << std::setw(8) << crate <<
'\t';
49 ff << std::dec <<
i <<
'\t';
50 ff << std::hex << std::setfill(
'0') << std::setw(8) << slot[
i] << endl;
55 cout <<
"Num = " << Num << endl;
56 cout <<
"GetSlot(Num) = " <<
GetSlot(Num) <<
" GetCon(Num) = " <<
GetCon(Num) << endl;
57 cout <<
"GetDet(Num) = " <<
GetDet(Num) <<
" GetSide(Num) = " <<
GetSide(Num) << endl;
60 ff.open(mapFile.c_str(), std::fstream::out);
62 cerr <<
"Cannot open the file " << mapFile << endl;
66 static const Int_t kNIt = 4;
67 static const Int_t kNDet = 10 + 1;
68 Int_t MapDet[kNDet][kNIt] = {
69 {1002, 1101, 1204, 2003}, {2112, 2211, 3014, 3113}, {3222, 4021, 4124, 4223},
70 {5032, 5131, 5234, 6033}, {6142, 6241, 7044, 7143}, {14052, 14151, 14254, 15053},
71 {15162, 15261, 16064, 16163}, {16272, 17071, 17174, 17273}, {18082, 18181, 18284, 19083},
72 {19192, 19291, 20094, 20193}, {7205, 20205, 7205, 20205}};
77 for (
Int_t det = 0; det < kNDet; det++) {
79 for (
Int_t j = 0; j < 24; j++) {
89 ff << std::hex << std::setfill(
'0') << std::setw(8) << slot[
GetSlot(MapDet[det][
i])]
90 << std::setfill(
' ') <<
'\t';
91 ff << std::dec << j + 24 *
GetCon(MapDet[det][
i]) <<
'\t';
92 ff <<
GetDet(MapDet[det][
i]) <<
'\t';
95 ff << 47 - (MapL[j] + (
GetSide(MapDet[det][
i]) - 1) * 24) <<
'\t';
97 ff << MapL[j] + (
GetSide(MapDet[det][
i]) - 1) * 24 <<
'\t';
103 ff << 47 - (MapR[j] + (
GetSide(MapDet[det][
i]) - 3) * 24) <<
'\t';
105 ff << MapR[j] + (
GetSide(MapDet[det][
i]) - 3) * 24 <<
'\t';