StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
azim_to_rcvb.h
1 /****************************************************************
2 * This file contains the azimuthal sector to receiver board *
3 * mapping as described by the diagram *
4 * http://wwwstar.mppmu.mpg.de/map/mapping.html *
5 * *
6 * This file can be used to translate from global sector *
7 * numbering (1-60) to the correct chamber (0-1), rcvboard (0-9) *
8 * and rcvbsector (0-2) *
9 * -or- *
10 * to translate from rcvboard and rcvbsector to global sector *
11 * numbering 1-30 *
12 * (global sectors 31-60 have the same rcvboard mapping) *
13 * *
14 * J.L.Klay 11-July-2000 *
15 *****************************************************************/
16 
17 #define SECTORS 60
18 #define RCVBOARDS 10
19 #define AZIMSEC 3
20 
21 //For a given sector, numbered 1 - 60, what Chamber,
22 // what RCVBOARD and what RcvbSector?
23 
24 static const unsigned char sector_map[SECTORS][3] = {
25 /* Chamber 0 */
26 /* sector 0 */ {0,0,0}, /* sector 1 */ {0,2,0},
27 /* sector 2 */ {0,4,0}, /* sector 3 */ {0,5,0},
28 /* sector 4 */ {0,7,0}, /* sector 5 */ {0,9,0},
29 /* sector 6 */ {0,0,1}, /* sector 7 */ {0,2,1},
30 /* sector 8 */ {0,4,1}, /* sector 9 */ {0,5,1},
31 /* sector 10 */ {0,7,1}, /* sector 11 */ {0,9,1},
32 /* sector 12 */ {0,0,2}, /* sector 13 */ {0,2,2},
33 /* sector 14 */ {0,4,2}, /* sector 15 */ {0,5,2},
34 /* sector 16 */ {0,7,2}, /* sector 17 */ {0,9,2},
35 /* sector 18 */ {0,1,0}, /* sector 19 */ {0,3,0},
36 /* sector 20 */ {0,3,1}, /* sector 21 */ {0,6,0},
37 /* sector 22 */ {0,8,0}, /* sector 23 */ {0,8,1},
38 /* sector 24 */ {0,1,1}, /* sector 25 */ {0,1,2},
39 /* sector 26 */ {0,3,2}, /* sector 27 */ {0,6,1},
40 /* sector 28 */ {0,6,2}, /* sector 29 */ {0,8,2},
41 /* Chamber 1 */
42 /* sector 30 */ {1,0,0}, /* sector 31 */ {1,2,0},
43 /* sector 32 */ {1,4,0}, /* sector 33 */ {1,5,0},
44 /* sector 34 */ {1,7,0}, /* sector 35 */ {1,9,0},
45 /* sector 36 */ {1,0,1}, /* sector 37 */ {1,2,1},
46 /* sector 38 */ {1,4,1}, /* sector 39 */ {1,5,1},
47 /* sector 40 */ {1,7,1}, /* sector 41 */ {1,9,1},
48 /* sector 42 */ {1,0,2}, /* sector 43 */ {1,2,2},
49 /* sector 44 */ {1,4,2}, /* sector 45 */ {1,5,2},
50 /* sector 46 */ {1,7,2}, /* sector 47 */ {1,9,2},
51 /* sector 48 */ {1,1,0}, /* sector 49 */ {1,3,0},
52 /* sector 50 */ {1,3,1}, /* sector 51 */ {1,6,0},
53 /* sector 52 */ {1,8,0}, /* sector 53 */ {1,8,1},
54 /* sector 54 */ {1,1,1}, /* sector 55 */ {1,1,2},
55 /* sector 56 */ {1,3,2}, /* sector 57 */ {1,6,1},
56 /* sector 58 */ {1,6,2}, /* sector 59 */ {1,8,2},
57 };
58 
59 //This is essentially the reverse - if I know the rcvb and azimsec,
60 //what is the global sector?
61 
62 static const unsigned char rcvb_to_sector[RCVBOARDS][AZIMSEC] = {
63 /* RCVBOARD 0 */
64  {1,7,13},
65 /* RCVBOARD 1 */
66  {19,25,26},
67 /* RCVBOARD 2 */
68  {2,8,14},
69 /* RCVBOARD 3 */
70  {20,21,27},
71 /* RCVBOARD 4 */
72  {3,9,15},
73 /* RCVBOARD 5 */
74  {4,10,16},
75 /* RCVBOARD 6 */
76  {22,28,29},
77 /* RCVBOARD 7 */
78  {5,11,17},
79 /* RCVBOARD 8 */
80  {23,24,30},
81 /* RCVBOARD 9 */
82  {6,12,18}
83 };
84 
85