1 /***************************************************************************
5 * Author: blasiuk adapted from CLHEP
6 ***************************************************************************
8 * Description: This file is based on the SystemOfUnits provided
9 * in the CLHEP library v1.2: The units remain the same.
10 * It is just the naming conventions that are different:
12 * 1) No single letter unit:
17 * 2) All prefixes are spelled out explicitly (except electron Volt):
21 * 3) All units with proper names follow the international standard
22 * of being lower case:
26 * The basic units are :
27 * centimeter (centimeter)
29 * Giga electron Volt (GeV)
30 * positron charge (eplus)
31 * degree Kelvin (kelvin)
32 * the amount of substance (mole)
34 * steradian (steradian)
35 ***************************************************************************
38 * Revision 1.1.2.1 2007/10/05 09:38:17 akisiel
41 * Revision 1.1 2007/05/16 10:22:12 akisiel
42 * Making the directory structure of AliFemto flat. All files go into one common directory
44 * Revision 1.1.1.1 2007/04/25 15:38:41 panos
45 * Importing the HBT code dir
47 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
48 * First version on CVS
50 * Revision 1.5 2003/09/02 17:59:35 perev
51 * gcc 3.2 updates + WarnOff
53 * Revision 1.4 1999/03/22 16:21:38 fisyak
56 * Revision 1.3 1999/03/11 14:53:07 ullrich
57 * Added definition of inch.
59 * Revision 1.2 1999/03/02 20:15:08 ullrich
62 * Revision 1.1 1999/01/30 03:59:06 fisyak
63 * Root Version of StarClassLibrary
65 * Revision 1.1 1999/01/23 00:28:08 ullrich
68 **************************************************************************/
69 #ifndef HEP_SYSTEM_OF_UNITS_H
70 #define HEP_SYSTEM_OF_UNITS_H
74 #define M_PI 3.14159265358979312
79 // new macro for CLHEP SystemOfUnits: at end of file
80 // ST_ADD_OLD_CLHEP_SYSTEM_OF_UNITS
84 static const double millimeter = 0.1;
85 static const double millimeter2 = millimeter*millimeter;
86 static const double millimeter3 = millimeter*millimeter*millimeter;
88 static const double centimeter = 10*millimeter;
89 static const double centimeter2 = centimeter*centimeter;
90 static const double centimeter3 = centimeter*centimeter*centimeter;
92 static const double meter = 100.*centimeter;
93 static const double meter2 = meter*meter;
94 static const double meter3 = meter*meter*meter;
96 static const double kilometer = 1000.*meter;
97 static const double kilometer2 = kilometer*kilometer;
98 static const double kilometer3 = kilometer*kilometer*kilometer;
100 static const double micrometer = 1.e-6*meter;
101 static const double nanometer = 1.e-9*meter;
102 static const double femtometer = 1.e-15*meter;
103 static const double fermi = 1*femtometer;
105 static const double barn = 1.e-28*meter2;
106 static const double millibarn = 1.e-3*barn;
107 static const double microbarn = 1.e-6*barn;
108 static const double nanobarn = 1.e-9*barn;
109 static const double inch = 2.54*centimeter;
114 static const double radian = 1.;
115 static const double milliradian = 1.e-3*radian;
117 static const double degree = (M_PI/180.0)*radian;
119 static const double steradian = 1.;
124 static const double second = 1;
125 static const double millisecond = 1.e-3*second;
126 static const double microsecond = 1.e-3*millisecond;
127 static const double nanosecond = 1.e-3*microsecond;
129 static const double hertz = 1./second;
130 static const double kilohertz = 1.e+3*hertz;
131 static const double Megahertz = 1.e+6*hertz;
133 // but these are also unambiguous and unlikely to be used as variable!
134 static const double Hz = 1*hertz;
135 static const double kHz = 1*kilohertz;
136 static const double MHz = 1*Megahertz;
139 // Electric charge [Q]
141 static const double eplus = 1. ; // positron charge
142 static const double e_SI = 1.60217733e-19; // positron charge in coulomb
143 static const double coulomb = eplus/e_SI;
148 static const double Gigaelectronvolt = 1.;
149 static const double Megaelectronvolt = 1.e-3*Gigaelectronvolt;
150 static const double electronvolt = 1.e-6*Megaelectronvolt;
151 static const double kiloelectronvolt = 1.e+3*electronvolt;
152 static const double Teraelectronvolt = 1.e+3*Gigaelectronvolt;
154 // but these are also unambiguous and unlikely to be used as variables
155 static const double MeV = Megaelectronvolt;
156 static const double eV = electronvolt;
157 static const double keV = kiloelectronvolt;
158 static const double GeV = Gigaelectronvolt;
159 static const double TeV = Teraelectronvolt;
161 static const double joule = electronvolt/e_SI;
164 // Mass [E][T^2][L^-2]
166 static const double kilogram = joule*second*second/(meter*meter);
167 static const double gram = 1.e-3*kilogram;
168 static const double milligram = 1.e-3*gram;
173 static const double watt = joule/second;
178 static const double newton = joule/meter;
181 // Pressure [E][L^-3]
184 #define pascal hep_pascal // a trick to avoid warnings
185 static const double hep_pascal = newton/meter2;
187 static const double pascal = newton/meter2;
189 static const double bar = 100000*pascal;
190 static const double atmosphere = 101325*pascal;
193 // Electric current [Q][T^-1]
195 static const double ampere = coulomb/second;
198 // Electric potential [E][Q^-1]
200 static const double Megavolt = MeV/eplus;
201 static const double kilovolt = 1.e-3*Megavolt;
202 static const double volt = 1.e-6*Megavolt;
203 static const double millivolt = 1.e-3*volt;
206 // Electric resistance [E][T][Q^-2]
208 static const double ohm = volt/ampere;
211 // Electric capacitance [Q^2][E^-1]
213 static const double farad = coulomb/volt;
214 static const double millifarad = 1.e-3*farad;
215 static const double microfarad = 1.e-6*farad;
216 static const double nanofarad = 1.e-9*farad;
217 static const double picofarad = 1.e-12*farad;
220 // Magnetic Flux [T][E][Q^-1]
222 static const double weber = volt*second;
225 // Magnetic Field [T][E][Q^-1][L^-2]
227 static const double tesla = volt*second/meter2;
229 static const double gauss = 1.e-4*tesla;
230 static const double kilogauss = 1.e-1*tesla;
233 // Inductance [T^2][E][Q^-2]
235 static const double henry = weber/ampere;
240 static const double kelvin = 1.;
243 // Amount of substance
245 static const double mole = 1.;
250 static const double becquerel = 1./second;
251 static const double curie = 3.7e+10 * becquerel;
254 // Absorbed dose [L^2][T^-2]
256 static const double gray = joule/kilogram ;
261 static const double perCent = 0.01 ;
262 static const double perThousand = 0.001;
263 static const double perMillion = 0.000001;
265 #ifdef ST_ADD_OLD_CLHEP_SYSTEM_OF_UNITS
267 static const double mm = 0.1; // millimeter
268 static const double mm2 = mm*mm;
269 static const double mm3 = mm*mm*mm;
271 static const double cm = 10.*mm; // centimeter
272 static const double cm2 = cm*cm;
273 static const double cm3 = cm*cm*cm;
275 static const double m = 1000.*mm; // meter
276 static const double m2 = m*m;
277 static const double m3 = m*m*m;
279 static const double km = 1000.*m; // kilometer
280 static const double km2 = km*km;
281 static const double km3 = km*km*km;
283 static const double microm = 1.e-6*m; // micro meter
284 static const double nanom = 1.e-9*m;
285 //static const double fermi = 1.e-15*m;
290 static const double rad = 1.; // radian
291 static const double mrad = 1.e-3*rad; // milliradian
292 static const double deg = (M_PI/180.0)*rad;
294 static const double st = 1.; // steradian
299 static const double s = 1; // second
300 static const double ns = 1.e-9*s; // nano second
301 static const double ms = 1.e-3*s; // milli second
303 // Mass [E][T^2][L^-2]
305 static const double kg = joule*second*second/(meter*meter); // kg = 6.24150 e+24 * MeV*ns*ns/(mm*mm)
306 static const double g = 1.e-3*kg;
307 static const double mg = 1.e-3*g;
312 using namespace units;
313 #endif /* HEP_SYSTEM_OF_UNITS_H */