00001 #ifndef EEname2Index_h 00002 #define EEname2Index_h 00003 00004 /********************************************************************* 00005 * $Id: EEname2Index.h,v 1.5 2004/08/05 18:43:09 balewski Exp $ 00006 * $Log: EEname2Index.h,v $ 00007 * Revision 1.5 2004/08/05 18:43:09 balewski 00008 * reduce memory consumption by factor 10 00009 * 00010 * Revision 1.4 2003/12/02 17:22:08 balewski 00011 * fix after version mixup 00012 * 00013 * Revision 1.2 2003/11/20 16:01:47 balewski 00014 * towars run 4 00015 * 00016 * Revision 1.1 2003/01/28 23:17:14 balewski 00017 * start 00018 * 00019 * Revision 1.1 2002/11/30 20:04:37 balewski 00020 * start 00021 * 00022 *********************************************************************/ 00023 00024 /* Descripion: 00025 00026 1) Lets define a unique 'name' for any active element in EEMC 00027 name="ssTann" for towers, ss=sector 01-12, a=subsector='A' -'E' 00028 nn=tower in eta =01-12 00029 "ssxkkk" for SMD x='U' or 'V' plain orientation, 00030 kkk=001-288 strip ID 00031 "ssPann" for Pres1 00032 "ssQann" for Pres2 00033 "ssRann" for Post 00034 "ssLann" for LED pixel 00035 00036 2) Lets define sector oriented index for any PMT/MAPMT pixel 00037 Index within sector: 00038 00039 Tower 1- 60 =(sub-1)*5+eta, where sub=1-5, eta=1-12 00040 Pre1 101-160 = the same 00041 Pre2 201-260 = the same 00042 Post 301-360 = the same 00043 smd-U 401-688 couting from shortest at eta=2 00044 smd-V 701-988 couting from shortest at eta=2 00045 00046 Index jumps by 1000 from sector to sector 00047 --> add (sectorID-1)*1000 00048 00049 Index total range [0-11999], spare ~15% or ~180/sector 00050 00051 */ 00052 00053 //********************************************************************* 00054 00055 #define EEindexMax 12000 // use it to decalare any local array 00056 #define EEindexVersion 100 // use assert(EEindexVersion==100) if you depend on particular indexing, but try not to. 00057 00058 int EEname2Index(const char *name); 00059 void EEindex2Name(int index, char * name); 00060 void EEindexRange(int secID,int &ix1, int &ix2); 00061 00062 #endif 00063
1.5.9