57 lines
3.8 KiB
C
57 lines
3.8 KiB
C
|
/************************************
|
||
|
Clover : 0 - 99
|
||
|
LaBr : 100 - 199
|
||
|
Implat : 200 - 299, 200-209 low gain, 250-259 highgain, 290 = veto front, 291 = veto rear
|
||
|
beam line : 300 - 399, 300-309 Image Scint, 310-319 PPAC, 320-329 cross scint, 330-339 MSX
|
||
|
TAC : 400 - 499
|
||
|
* *********************************/
|
||
|
#ifndef MAPPING
|
||
|
#define MAPPING
|
||
|
|
||
|
//==================== mapping
|
||
|
|
||
|
#define NCLOVER 13
|
||
|
#define NCRYSTAL NCLOVER*4
|
||
|
#define NIMPLAT 10
|
||
|
#define NVETO 2
|
||
|
#define NLABR 15
|
||
|
#define NBEAM 15
|
||
|
|
||
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||
|
int mapping[416] ={ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-0
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-1
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-2
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-3
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-4
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-5
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-6
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-7
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-8
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-9
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-10
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-11
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-0, mod-12
|
||
|
|
||
|
250, 200, -1, -1, 251, 252, 253, 254, 201, 202, 203, 204, -1, -1, -1, 500, //crate-1, mod-0
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, 306, 310, 300, 301, 302, 303, 304, 305, //crate-1, mod-1
|
||
|
308, 309, -1, -1, 311, 312, 313, 314, 307, -1, -1, -1, -1, -1, -1, -1, //crate-1, mod-2
|
||
|
0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -1, 11, -1, -1, -1, -1, //crate-1, mod-3
|
||
|
16, 17, 18, 19, 20, 21, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, //crate-1, mod-4
|
||
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, -1, 46, 47, //crate-1, mod-5
|
||
|
48, 49, 50, 51, 9, 10, 24, 25, 26, -1, -1, -1, -1, -1, -1, -1, //crate-1, mod-6
|
||
|
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, -1, //crate-1, mod-7
|
||
|
290, 291, -1, -1, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-1, mod-8
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-1, mod-9
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-1, mod-10
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //crate-1, mod-11
|
||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; //crate-1, mod-12
|
||
|
|
||
|
|
||
|
int mapDetID(int crate, int slot, int ch){
|
||
|
int id = crate * 208 + 16*(slot-2) + ch;
|
||
|
//printf("id : %d, detID : %d \n", id, mapping[id]);
|
||
|
return mapping[id];
|
||
|
}
|
||
|
|
||
|
#endif
|