]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/icepack/iceconvert/rdmc_local.c
21-jun-2005 NvE Install scripts for gcc corrected to also include the rdmc stuff
[u/mrichter/AliRoot.git] / RALICE / icepack / iceconvert / rdmc_local.c
1
2 /* local general purpose routines for rdmc */
3 #include <stdlib.h>
4 #include <string.h>
5 #include <ctype.h>
6 #include <math.h>
7
8 #include "rdmc.h"
9 #include "rdmc_local.h"
10
11 char *rdmc_which_format(mcfile *fp){
12   static char returnstring[RDMC_MAXLINE];
13
14   switch (fp->format) {
15 #ifdef DUMAND_ASCII_F
16   case DUMAND_ASCII_F:
17     sprintf(returnstring, "dumand-siegmund");
18     break;
19 #endif
20 #ifdef AMANDA_ASCII_F
21   case AMANDA_ASCII_F:
22     sprintf(returnstring, "amanda-f2000");
23     break;
24 #endif
25 #ifdef UWI_ASCII_F
26   case UWI_ASCII_F:
27     sprintf(returnstring, "uwi-raven");
28     break;
29 #endif
30 #ifdef BAIKAL_BIN_F
31   case BAIKAL_BIN_F:
32     sprintf(returnstring, "baikal-binary");
33     break;
34 #endif
35   default:
36     sprintf(returnstring, "unknown");
37     break;
38   }
39
40   return returnstring;
41
42 } /* rdmc_error() */
43
44
45
46 /***************************************************************************/
47 /* id tables */
48 /***************************************************************************/
49
50 const rdmc_idtable_t rdmc_pmt_idtable[] =
51   {
52     {  0, "q370" },
53     { 10, "xp2600" },
54     { 20, "r2018" },
55     { 21, "r5212" },
56     { 30, "emi" },
57     {  0, "std" }, /* default */
58     { RDMC_NA, NULL } /* end id */
59   };
60
61 const rdmc_idtable_t rdmc_sphere_idtable[] =
62   {
63     { 0, "russ" },
64     { 1, "naut" },
65     { 2, "bent" },
66     { 3, "bill" },
67     {  0, "std" }, /* default */
68     { RDMC_NA, NULL } /* end id */
69   };
70
71 const rdmc_idtable_t rdmc_datatrans_idtable[] =
72   {
73     {  0, "coax" },
74     {  1, "tp" },
75     {  2, "opt" },
76     {  3, "qt" },
77     {  4, "tot" },
78     { 10, "dig" },
79     {  3, "std" }, /* default */
80     { RDMC_NA, NULL } /* end id */
81   };
82
83 const rdmc_idtable_t rdmc_detector_idtable[] =
84 {
85   {  0, "unknown" },
86   {  BAIKAL,  "baikal" }, /* and default baikal */
87   {  NT_96,  "baikal-nt96" }, /* and default baikal */
88   {  NT_36,  "baikal-nt36" },
89   {  NT_36s, "baikal-nt36b" },
90   {  NT_36s, "baikal-nt36'" },
91   {  NT_72,  "baikal-nt72" },
92   {  NT_144, "baikal-nt144" },
93   {  NT_192, "baikal-nt192" },
94   {  NT_200, "baikal-nt200" },
95   {  AMANDA,    "amanda" },
96   {  AMANDA_A,    "amanda-a" },
97   {  AMANDA_B_4,  "amanda-b-4" },
98   {  AMANDA_B_10, "amanda-b-10" },/* and default Amanda */
99   {  AMANDA_B_11, "amanda-b-11" }, /* and default Amanda */
100   {  AMANDA_B_13, "amanda-b-13" }, /* and default Amanda */
101   {  AMANDA_II,   "amanda-ii-20" },
102   {  AMANDA_II,   "amanda-ii" },
103   {  AMANDA_KM3,  "icecube" },
104   {  AMANDA_KM3,  "amanda-km3" },
105   {  AMANDA, "neutrino_telescope" }, /* old f2000 from old rdmc */
106   {  JULIA, "julia" },
107   { RDMC_NA, NULL } /* end id */
108 };
109
110 const rdmc_idtable_t  rdmc_particle_idtable[] = {
111   { 0        , "?" },
112   { 0        , "unkwn" },
113   { 0        , "unknown" },
114   { RDMC_NA  , "?" },
115   { MUON_PLUS,  "mu+"      },
116   { MUON_MINUS, "mu-"      },
117   { MUON,       "mu"       },
118   { BREMS,      "brems"    },
119   { BREMS,      "brehm"    },
120   { DELTAE,     "delta"    },
121   { PAIRPROD,   "epair"    },
122   { MU_PAIR,    "mupair"   },
123   { NUCL_INT,   "munu"    },
124   { NUCL_INT,   "nucle"    },
125   { HADRONS,    "hadr"     },
126   { GAMMA,      "gamma"    },
127   { E_PLUS,     "e+"       },
128   { E_MINUS,    "e-"       },
129   { NU,         "nu"    },
130   { NU_MU,      "nu_mu"    },
131   { NU_MU_BAR,  "~nu_mu"    },
132   { NU_EL,      "nu_e"    },
133   { NU_EL_BAR,  "~nu_e"    },
134   { NU_TAU,     "nu_tau"    },
135   { NU_TAU_BAR, "~nu_tau"    },
136   { PI_0,       "pi0"      },
137   { PI_PLUS,    "pi+"      },
138   { PI_MINUS,   "pi-"      },
139   { P_PLUS,     "p+"       },
140   { P_MINUS,    "p-"       },
141   { FIBERLASER, "flaser"   },
142   { N2LASER,    "n2laser"  },
143   { YAGLASER,   "yaglaser" },
144   { 0        , "unkwn" },
145   { 0        , "unknown" },
146   { 0        , "?" },
147   { RDMC_NA, NULL } /* end id */
148 };
149