63 #ifndef HEP_SYSTEM_OF_UNITS_H
64 #define HEP_SYSTEM_OF_UNITS_H
74 static const double millimeter = 0.1;
75 static const double millimeter2 = millimeter*millimeter;
76 static const double millimeter3 = millimeter*millimeter*millimeter;
78 static const double centimeter = 10*millimeter;
79 static const double centimeter2 = centimeter*centimeter;
80 static const double centimeter3 = centimeter*centimeter*centimeter;
82 static const double meter = 100.*centimeter;
83 static const double meter2 = meter*meter;
84 static const double meter3 = meter*meter*meter;
86 static const double kilometer = 1000.*meter;
87 static const double kilometer2 = kilometer*kilometer;
88 static const double kilometer3 = kilometer*kilometer*kilometer;
90 static const double micrometer = 1.e-6*meter;
91 static const double nanometer = 1.e-9*meter;
92 static const double femtometer = 1.e-15*meter;
93 static const double fermi = 1*femtometer;
95 static const double barn = 1.e-28*meter2;
96 static const double millibarn = 1.e-3*barn;
97 static const double microbarn = 1.e-6*barn;
98 static const double nanobarn = 1.e-9*barn;
99 static const double inch = 2.54*centimeter;
104 static const double radian = 1.;
105 static const double milliradian = 1.e-3*radian;
107 static const double degree = (M_PI/180.0)*radian;
109 static const double steradian = 1.;
114 static const double second = 1;
115 static const double millisecond = 1.e-3*second;
116 static const double microsecond = 1.e-3*millisecond;
117 static const double nanosecond = 1.e-3*microsecond;
119 static const double hertz = 1./second;
120 static const double kilohertz = 1.e+3*hertz;
121 static const double Megahertz = 1.e+6*hertz;
124 static const double Hz = 1*hertz;
125 static const double kHz = 1*kilohertz;
126 static const double MHz = 1*Megahertz;
131 static const double eplus = 1. ;
132 static const double e_SI = 1.60217733e-19;
133 static const double coulomb = eplus/e_SI;
138 static const double Gigaelectronvolt = 1.;
139 static const double Megaelectronvolt = 1.e-3*Gigaelectronvolt;
140 static const double electronvolt = 1.e-6*Megaelectronvolt;
141 static const double kiloelectronvolt = 1.e+3*electronvolt;
142 static const double Teraelectronvolt = 1.e+3*Gigaelectronvolt;
145 static const double MeV = Megaelectronvolt;
146 static const double eV = electronvolt;
147 static const double keV = kiloelectronvolt;
148 static const double GeV = Gigaelectronvolt;
149 static const double TeV = Teraelectronvolt;
150 static const double amu = 931.49406121 * MeV;
151 static const double joule = electronvolt/e_SI;
156 static const double kilogram = joule*second*second/(meter*meter);
157 static const double gram = 1.e-3*kilogram;
158 static const double milligram = 1.e-3*gram;
163 static const double watt = joule/second;
168 static const double newton = joule/meter;
174 #define pascal hep_pascal // a trick to avoid warnings
175 static const double hep_pascal = newton/meter2;
177 static const double pascal = newton/meter2;
179 static const double bar = 100000*pascal;
180 static const double atmosphere = 101325*pascal;
185 static const double ampere = coulomb/second;
190 static const double Megavolt = MeV/eplus;
191 static const double kilovolt = 1.e-3*Megavolt;
192 static const double volt = 1.e-6*Megavolt;
193 static const double millivolt = 1.e-3*volt;
198 static const double ohm = volt/ampere;
203 static const double farad = coulomb/volt;
204 static const double millifarad = 1.e-3*farad;
205 static const double microfarad = 1.e-6*farad;
206 static const double nanofarad = 1.e-9*farad;
207 static const double picofarad = 1.e-12*farad;
212 static const double weber = volt*second;
217 static const double tesla = volt*second/meter2;
219 static const double gauss = 1.e-4*tesla;
220 static const double kilogauss = 1.e-1*tesla;
225 static const double henry = weber/ampere;
230 static const double kelvin = 1.;
235 static const double mole = 1.;
240 static const double becquerel = 1./second;
241 static const double curie = 3.7e+10 * becquerel;
246 static const double gray = joule/kilogram ;
251 static const double perCent = 0.01 ;
252 static const double perThousand = 0.001;
253 static const double perMillion = 0.000001;
255 #ifdef ST_ADD_OLD_CLHEP_SYSTEM_OF_UNITS
257 static const double mm = 0.1;
258 static const double mm2 = mm*mm;
259 static const double mm3 = mm*mm*mm;
261 static const double cm = 10.*mm;
262 static const double cm2 = cm*cm;
263 static const double cm3 = cm*cm*cm;
265 static const double m = 1000.*mm;
266 static const double m2 = m*m;
267 static const double m3 = m*m*m;
269 static const double km = 1000.*m;
270 static const double km2 = km*km;
271 static const double km3 = km*km*km;
273 static const double microm = 1.e-6*m;
274 static const double nanom = 1.e-9*m;
280 static const double rad = 1.;
281 static const double mrad = 1.e-3*rad;
282 static const double deg = (M_PI/180.0)*rad;
284 static const double st = 1.;
289 static const double s = 1;
290 static const double ns = 1.e-9*s;
291 static const double ms = 1.e-3*s;
295 static const double kg = joule*second*second/(meter*meter);
296 static const double g = 1.e-3*kg;
297 static const double mg = 1.e-3*g;
302 using namespace units;