StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EEname2Index.h
1 #ifndef EEname2Index_h
2 #define EEname2Index_h
3 
4 /*********************************************************************
5  * $Id: EEname2Index.h,v 1.5 2004/08/05 18:43:09 balewski Exp $
6  * $Log: EEname2Index.h,v $
7  * Revision 1.5 2004/08/05 18:43:09 balewski
8  * reduce memory consumption by factor 10
9  *
10  * Revision 1.4 2003/12/02 17:22:08 balewski
11  * fix after version mixup
12  *
13  * Revision 1.2 2003/11/20 16:01:47 balewski
14  * towars run 4
15  *
16  * Revision 1.1 2003/01/28 23:17:14 balewski
17  * start
18  *
19  * Revision 1.1 2002/11/30 20:04:37 balewski
20  * start
21  *
22  *********************************************************************/
23 
24  /* Descripion:
25 
26  1) Lets define a unique 'name' for any active element in EEMC
27  name="ssTann" for towers, ss=sector 01-12, a=subsector='A' -'E'
28  nn=tower in eta =01-12
29  "ssxkkk" for SMD x='U' or 'V' plain orientation,
30  kkk=001-288 strip ID
31  "ssPann" for Pres1
32  "ssQann" for Pres2
33  "ssRann" for Post
34  "ssLann" for LED pixel
35 
36  2) Lets define sector oriented index for any PMT/MAPMT pixel
37  Index within sector:
38 
39  Tower 1- 60 =(sub-1)*5+eta, where sub=1-5, eta=1-12
40  Pre1 101-160 = the same
41  Pre2 201-260 = the same
42  Post 301-360 = the same
43  smd-U 401-688 couting from shortest at eta=2
44  smd-V 701-988 couting from shortest at eta=2
45 
46  Index jumps by 1000 from sector to sector
47  --> add (sectorID-1)*1000
48 
49  Index total range [0-11999], spare ~15% or ~180/sector
50 
51  */
52 
53 //*********************************************************************
54 
55 #define EEindexMax 12000 // use it to decalare any local array
56 #define EEindexVersion 100 // use assert(EEindexVersion==100) if you depend on particular indexing, but try not to.
57 
58 int EEname2Index(const char *name);
59 void EEindex2Name(int index, char * name);
60 void EEindexRange(int secID,int &ix1, int &ix2);
61 
62 #endif
63