26 return &cablingService;
32 return &cablingService;
44 , m_isCacheFilled(false)
45 , m_MBTSmergedRun2Plus(64, 0)
46 , m_E1mergedRun2Plus(128, 0)
203 std::cout <<
"==> Setting testbeam flag to "
204 << ((testBeam) ?
"TRUE" :
"FALSE")
205 <<
" in TileCablingService " << std::endl;
301 for (
IdentifierHash pmtHash = 0; pmtHash < maxPmtHash; pmtHash += 1) {
313 if (tower == 41 || (tower > 42 && tower < 46))
continue;
341 if (modMax > modMin) {
342 std::cout <<
"TileCablingService: in section " <<
section <<
" side " <<
side
343 <<
" modules from " << modMin <<
" to " << modMax-1 <<
" are connected" << std::endl;
350 std::cout <<
"TileCablingService: in section " <<
section <<
" side " <<
side
351 <<
" no modules connected " << std::endl;
379 int mineta[4] = { 0, 0, 9, 9 };
380 int maxeta[4] = { 0, 8, 14, 14 };
418 if ( ieta > 8 )
pmt = 1-
pmt;
1127 channel = (tower<15) ? 45 : 46;
1209 channel = (tower<15) ? 45 : 46;
1395 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2,
1396 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5,
1397 4, 4, 5, 5, 5, 6, -1, -1, 6, 6, 6, 7,
1398 8, 8, 7, 7, 7, 6, 8, -1, 6, 9, 9, 8,
1400 15, 13, 8, 8, 9, 9, 11, 11, 10, 10, 12, 12,
1401 11, 10, 11, 11, 10, 10, -1, -1, 13, 13, 12, 12,
1402 -1, -1, -1, -1, -1, -1, 13, 14, 14, -1, -1, 13,
1403 14, 12, 12, 14, 15, 15, -1, -1, -1, -1, -1, -1 };
1436 2, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1,
1437 1, 2, 2, 0, 1, 1, 0, 0, 0, 1, 1, 0,
1438 2, 2, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0,
1439 0, 0, 0, 1, 1, 2, 1, -1, 2, 0, 0, 1,
1441 3, 3, 2, 2, 1, 1, 0, 0, 1, 1, 0, 0,
1442 3, 3, 1, 1, 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, 0, 0, 0,
1526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
SH, 0, 0, 0,
NC,
NC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1527 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
NC,
NC, 0, 0,
NC, 0, 0, 0, 0, 0,
1528 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
NC,
NC, 0, 0,
NC, 0, 0, 0, 0, 0, 0, 0, 0, 0
1532 for (
int i = 0;
i < 512;
i++) {
1533 if (tmp_drawer[
i] !=
NC) {
1537 case 0:
case 1: channel_number =
i%4 + 12;
break;
1538 default: channel_number =
i%4 - 2;
1571 for (
int module_count = 0; module_count < 64; module_count++ ) {
1572 for (
int tower_count = 0; tower_count < 4; tower_count++) {
1577 if ((channel_number == 12)||(channel_number == 13)||(channel_number == 0)||(channel_number == 1)){
1579 switch (tower_count) {
1580 case 2: tower_number = 13;
break;
1581 case 3: tower_number = 15;
break;
1582 default: tower_number = tower_count + 10;
1585 switch (channel_number) {
1586 case 12:
case 13: channel_count = channel_number - 12;
break;
1587 default: channel_count = channel_number + 2;
1590 int index = (
side<<8)|(drawer_number<<2)|(channel_count);
1662 if (tower == towerE1) {
1694 case 15:
cell=3;
break;
1695 case 13:
cell=2;
break;
1696 case 11:
cell=1;
break;
1709 case 15:
cell=3;
break;
1710 case 13:
cell=2;
break;
1711 case 11:
cell=1;
break;
1724 case 1:
cell=3;
break;
1725 case 0:
cell=2;
break;
1726 case 13:
cell=1;
break;
1739 case 1:
cell=3;
break;
1740 case 0:
cell=2;
break;
1741 case 13:
cell=1;
break;
1781 const bool C =
true;
1782 const bool NC =
false;
1784 bool cell_present[64] = {
1795 return cell_present[
module];
1802 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
1803 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
1804 0, 1, 0, 1, 0, 1, -1, -1, 0, 1, 0, 1,
1805 0, 1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1,
1807 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
1808 0, 0, 0, 1, 0, 1, -1, -1, 0, 1, 0, 1,
1809 -1, -1, -1, -1, -1, -1, 0, 0, 1, -1, -1, 1,
1810 1, 1, 0, 0, 1, 0, -1, -1, -1, -1, -1, -1 };
1890 4, 8, 10, 18, 20, 26, 32, 38, 36, 46, -1, 6, 10, 20, 31, 41,
1891 1, 5, 9, 15, 19, 23, 29, 35, 37, 45, -1, 7, 11, 21, 32, 40,
1894 2, 6, 12, 16, 22, 28, 34, 40, 42, 4, 8, 14, 22, 30, 39, -1,
1895 3, 7, 11, 17, 21, 27, 33, 39, 47, 5, 9, 15, 23, 35, 36, -1,
1898 0, -1, 14, -1, 24, -1, 44, -1, 2, -1, 16, -1, 38, -1, -1, -1,
1899 m_maxChannels, -1, 13, -1, 25, -1, 41, -1, 3, -1, 17, -1, 37, -1, -1, -1,
1902 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
m_E1chan,
m_E2chan, -1,
m_E3chan, -1,
m_E4chan,
1903 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
1924 int offset = (48 * (1 + (tower % 4)));
1927 if (((tower - 2) % 4) == 0) {
1932 if ((tower % 8) == 0)
1935 if (((tower - 2) % 4) == 0)
1950 int pos[96] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1951 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1952 27, 26, 25, 30, 29, 28,-33,-32, 31, 36, 35, 34,
1953 39, 38, 37, 42, 41, 40, 45,-44, 43, 48, 47, 46,
1955 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1956 13, 14, 15, 16, 17, 18,-19,-20, 21, 22, 23, 24,
1957 -27,-26,-25,-31,-32,-28, 33, 29, 30,-36,-35, 34,
1958 44, 38, 37, 43, 42, 41,-45,-39,-40,-48,-47,-46 };
1973 0, 1, 2, 2, 1, 3, 4, 4, 3, 5, 5, 6,
1974 6, 7, 7, 8, 9, 9, 8, 10, 10, 11, 11, 12,
1975 13, 13, 12, 14, 14, 15, -1, -1, 15, 16, 16, 17,
1976 18, 18, 17, 19, 19, 20, 21, -1, 20, 22, 22, 21,
1978 1, 2, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,
1979 3, 4, 10, 10, 11, 11, -1, -1, 12, 12, 13, 13,
1980 -1, -1, -1, -1, -1, -1, 14, 15, 15, -1, -1, 14,
1981 16, 17, 17, 16, 18, 18, -1, -1, -1, -1, -1, -1
2009 static const int tbtype[8] = {
2027 static const int tbmodule[8] = {
2055 default:
return 0xFF;
2115 -1, -1, 1, 0, -1, -1, -1, -1,
2116 -1, -1, -1, 1, 0, -1, -1, -1,
2117 -1, -1, -1, -1, -1, -1, 1, 0,
2118 -1, -1, -1, -1, -1, 1, 0, -1,
2119 -1, -1, 1, 0, -1, -1, -1, -1,
2120 -1, -1, -1, 0, 1, -1, -1, -1,
2121 -1, -1, -1, -1, 0, 1, -1, -1,
2122 -1, -1, -1, 1, 0, -1, -1, -1,
2124 -1, -1, -1, 1, 0, -1, -1, -1,
2125 -1, -1, -1, 1, 0, -1, -1, -1,
2126 -1, -1, 1, 0, -1, -1, -1, -1,
2127 -1, -1, 1, 0, -1, -1, -1, -1,
2128 -1, -1, -1, 1, 0, -1, -1, -1,
2129 -1, -1, -1, 1, 0, -1, -1, -1,
2130 -1, -1, -1, -1, -1, 1, 0, -1,
2131 -1, -1, -1, -1, 1, 0, -1, -1
2144 3, 12, 23, 30, 35, 43, 52, 60,
2145 2, 11, 22, 29, 34, 44, 53, 59,
2147 4, 12, 19, 27, 36, 44, 54, 61,
2148 3, 11, 18, 26, 35, 43, 53, 60 };
2150 int side = (
ros == 3) ? 0 : 1;
2162 return ( (
ros > 2) &&
2241 -1, -1, -1, -1, -1, -1, -1, 0,
2242 -1, -1, -1, -1, -1, -1, -1, -1,
2243 -1, -1, -1, -1, -1, -1, -1, 2,
2244 -1, -1, -1, -1, -1, -1, -1, -1,
2245 -1, -1, -1, -1, -1, -1, 2, 3,
2246 4, 5, 4, -1, -1, -1, -1, -1,
2247 -1, -1, -1, -1, -1, 6, 6, 7,
2248 0, 1, -1, -1, -1, -1, -1, -1
2252 -1, -1, 0, -1, -1, -1, -1, 1,
2253 -1, -1, -1, -1, -1, -1, -1, -1,
2254 -1, -1, -1, 2, -1, -1, -1, 3,
2255 -1, -1, -1, -1, -1, -1, -1, -1,
2256 -1, -1, -1, -1, -1, -1, 2, 3,
2257 4, 5, 4, -1, -1, 5, -1, -1,
2258 -1, -1, -1, -1, -1, 6, 6, 7,
2259 0, 1, 7, -1, -1, -1, -1, -1
2263 -1, -1, 0, -1, -1, -1, -1, 1,
2264 -1, -1, -1, -1, -1, -1, -1, -1,
2265 -1, -1, 2, -1, -1, -1, -1, 3,
2266 -1, -1, -1, -1, -1, -1, -1, -1,
2267 -1, -1, -1, -1, -1, -1, 2, 3,
2268 4, 5, 4, -1, -1, 5, -1, -1,
2269 -1, -1, -1, -1, -1, 6, 6, 7,
2270 0, 1, 7, -1, -1, -1, -1, -1
2285 -1, -1, -1, -1, -1, -1, -1, 1,
2286 -1, -1, -1, -1, -1, -1, -1, -1,
2287 -1, -1, -1, -1, -1, -1, -1, 1,
2288 -1, -1, -1, -1, -1, -1, -1, -1,
2289 -1, -1, -1, -1, -1, -1, 0, 0,
2290 0, 0, 1, -1, -1, -1, -1, -1,
2291 -1, -1, -1, -1, -1, 1, 0, 0,
2292 0, 0, -1, -1, -1, -1, -1, -1
2296 -1, -1, 1, -1, -1, -1, -1, 1,
2297 -1, -1, -1, -1, -1, -1, -1, -1,
2298 -1, -1, -1, 1, -1, -1, -1, 1,
2299 -1, -1, -1, -1, -1, -1, -1, -1,
2300 -1, -1, -1, -1, -1, -1, 0, 0,
2301 0, 0, 1, -1, -1, 1, -1, -1,
2302 -1, -1, -1, -1, -1, 1, 0, 0,
2303 0, 0, 1, -1, -1, -1, -1, -1
2307 -1, -1, 1, -1, -1, -1, -1, 1,
2308 -1, -1, -1, -1, -1, -1, -1, -1,
2309 -1, -1, 1, -1, -1, -1, -1, 1,
2310 -1, -1, -1, -1, -1, -1, -1, -1,
2311 -1, -1, -1, -1, -1, -1, 0, 0,
2312 0, 0, 1, -1, -1, 1, -1, -1,
2313 -1, -1, -1, -1, -1, 1, 0, 0,
2314 0, 0, 1, -1, -1, -1, -1, -1
2329 -1, -1, -1, -1, -1, -1, -1, -1,
2330 -1, -1, -1, -1, -1, -1, -1, -1,
2331 -1, -1, -1, -1, -1, -1, -1, -1,
2332 -1, -1, -1, -1, 0, -1, -1, 1,
2333 -1, 2, -1, -1, 3, -1, -1, -1,
2334 -1, -1, -1, -1, -1, -1, -1, -1,
2335 -1, -1, -1, -1, -1, -1, -1, -1,
2336 -1, -1, -1, -1, -1, -1, -1, -1
2346 -1, -1, -1, -1, -1, -1, -1, -1,
2347 -1, -1, -1, -1, -1, -1, -1, -1,
2348 -1, -1, -1, -1, -1, -1, -1, -1,
2349 -1, -1, -1, -1, 2, -1, -1, 2,
2350 -1, 2, -1, -1, 2, -1, -1, -1,
2351 -1, -1, -1, -1, -1, -1, -1, -1,
2352 -1, -1, -1, -1, -1, -1, -1, -1,
2353 -1, -1, -1, -1, -1, -1, -1, -1
2363 56, 57, 38, 39, 40, 41, 54, 55,
2364 7, 7, 23, 23, 42, 42, 53, 53,
2365 28, 31, 33, 36, 28, 31, 33, 36 };
2367 int drawerE5A[8] = {2, 7, 19, 23, 42, 45, 53, 58};
2368 int drawerE5C[8] = {2, 7, 18, 23, 42, 45, 53, 58};
2372 return (
side>0)?drawerE5A[
phi]:drawerE5C[
phi];
2381 return ((
eta==0)?4:12);
2468 isChannelDisconnected =
true;
2470 isChannelDisconnected =
false;
2474 return isChannelDisconnected;