MINT2
CLHEPSystemOfUnits.h
Go to the documentation of this file.
1 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2 // status: Mon 9 Feb 2009 19:17:56 GMT
3 // -*- C++ -*-
4 // ----------------------------------------------------------------------
5 // HEP coherent system of Units
6 //
7 // This file has been provided to CLHEP by Geant4 (simulation toolkit for HEP).
8 //
9 // The basic units are :
10 // millimeter (millimeter)
11 // nanosecond (nanosecond)
12 // Mega electron Volt (MeV)
13 // positron charge (eplus)
14 // degree Kelvin (kelvin)
15 // the amount of substance (mole)
16 // luminous intensity (candela)
17 // radian (radian)
18 // steradian (steradian)
19 //
20 // Below is a non exhaustive list of derived and pratical units
21 // (i.e. mostly the SI units).
22 // You can add your own units.
23 //
24 // The SI numerical value of the positron charge is defined here,
25 // as it is needed for conversion factor : positron charge = e_SI (coulomb)
26 //
27 // The others physical constants are defined in the header file :
28 // PhysicalConstants.h
29 //
30 // Authors: M.Maire, S.Giani
31 //
32 // History:
33 //
34 // 06.02.96 Created.
35 // 28.03.96 Added miscellaneous constants.
36 // 05.12.97 E.Tcherniaev: Redefined pascal (to avoid warnings on WinNT)
37 // 20.05.98 names: meter, second, gram, radian, degree
38 // (from Brian.Lasiuk@yale.edu (STAR)). Added luminous units.
39 // 05.08.98 angstrom, picobarn, microsecond, picosecond, petaelectronvolt
40 // 01.03.01 parsec
41 
42 #ifndef HEP_SYSTEM_OF_UNITS_H
43 #define HEP_SYSTEM_OF_UNITS_H
44 
45 //
46 // Length [L]
47 //
48 static const double millimeter = 1.;
49 static const double millimeter2 = millimeter*millimeter;
51 
52 static const double centimeter = 10.*millimeter;
53 static const double centimeter2 = centimeter*centimeter;
55 
56 static const double meter = 1000.*millimeter;
57 static const double meter2 = meter*meter;
58 static const double meter3 = meter*meter*meter;
59 
60 static const double kilometer = 1000.*meter;
61 static const double kilometer2 = kilometer*kilometer;
62 static const double kilometer3 = kilometer*kilometer*kilometer;
63 
64 static const double parsec = 3.0856775807e+16*meter;
65 
66 static const double micrometer = 1.e-6 *meter;
67 static const double nanometer = 1.e-9 *meter;
68 static const double angstrom = 1.e-10*meter;
69 static const double fermi = 1.e-15*meter;
70 
71 static const double barn = 1.e-28*meter2;
72 static const double millibarn = 1.e-3 *barn;
73 static const double microbarn = 1.e-6 *barn;
74 static const double nanobarn = 1.e-9 *barn;
75 static const double picobarn = 1.e-12*barn;
76 
77 // symbols
78 static const double mm = millimeter;
79 static const double mm2 = millimeter2;
80 static const double mm3 = millimeter3;
81 
82 static const double cm = centimeter;
83 static const double cm2 = centimeter2;
84 static const double cm3 = centimeter3;
85 
86 static const double m = meter;
87 static const double m2 = meter2;
88 static const double m3 = meter3;
89 
90 static const double km = kilometer;
91 static const double km2 = kilometer2;
92 static const double km3 = kilometer3;
93 
94 static const double pc = parsec;
95 
96 //
97 // Angle
98 //
99 static const double radian = 1.;
100 static const double milliradian = 1.e-3*radian;
101 static const double degree = (3.14159265358979323846/180.0)*radian;
102 
103 static const double steradian = 1.;
104 
105 // symbols
106 static const double rad = radian;
107 static const double mrad = milliradian;
108 static const double sr = steradian;
109 static const double deg = degree;
110 
111 //
112 // Time [T]
113 //
114 static const double nanosecond = 1.;
115 static const double second = 1.e+9 *nanosecond;
116 static const double millisecond = 1.e-3 *second;
117 static const double microsecond = 1.e-6 *second;
118 static const double picosecond = 1.e-12*second;
119 
120 static const double hertz = 1./second;
121 static const double kilohertz = 1.e+3*hertz;
122 static const double megahertz = 1.e+6*hertz;
123 
124 // symbols
125 static const double ns = nanosecond;
126 static const double s = second;
127 static const double ms = millisecond;
128 
129 //
130 // Electric charge [Q]
131 //
132 static const double eplus = 1. ; // positron charge
133 static const double e_SI = 1.60217733e-19; // positron charge in coulomb
134 static const double coulomb = eplus/e_SI; // coulomb = 6.24150 e+18 * eplus
135 
136 //
137 // Energy [E]
138 //
139 static const double megaelectronvolt = 1. ;
140 static const double electronvolt = 1.e-6*megaelectronvolt;
141 static const double kiloelectronvolt = 1.e-3*megaelectronvolt;
142 static const double gigaelectronvolt = 1.e+3*megaelectronvolt;
143 static const double teraelectronvolt = 1.e+6*megaelectronvolt;
144 static const double petaelectronvolt = 1.e+9*megaelectronvolt;
145 
146 static const double joule = electronvolt/e_SI; // joule = 6.24150 e+12 * MeV
147 
148 // symbols
149 static const double MeV = megaelectronvolt;
150 static const double eV = electronvolt;
151 static const double keV = kiloelectronvolt;
152 static const double GeV = gigaelectronvolt;
153 static const double TeV = teraelectronvolt;
154 static const double PeV = petaelectronvolt;
155 
156 //
157 // Mass [E][T^2][L^-2]
158 //
159 static const double kilogram = joule*second*second/(meter*meter);
160 static const double gram = 1.e-3*kilogram;
161 static const double milligram = 1.e-3*gram;
162 
163 // symbols
164 static const double kg = kilogram;
165 static const double g = gram;
166 static const double mg = milligram;
167 
168 //
169 // Power [E][T^-1]
170 //
171 static const double watt = joule/second; // watt = 6.24150 e+3 * MeV/ns
172 
173 //
174 // Force [E][L^-1]
175 //
176 static const double newton = joule/meter; // newton = 6.24150 e+9 * MeV/mm
177 
178 //
179 // Pressure [E][L^-3]
180 //
181 #ifndef __CINT__
182 #define pascal hep_pascal // a trick to avoid warnings
183 static const double hep_pascal = newton/m2; // pascal = 6.24150 e+3 * MeV/mm3
184 #else
185 static const double hep_pascal = newton/m2; // pascal = 6.24150 e+3 * MeV/mm3
186 static const double pascal = hep_pascal;
187 #endif
188 
189 static const double bar = 100000*pascal; // bar = 6.24150 e+8 * MeV/mm3
190 static const double atmosphere = 101325*pascal; // atm = 6.32420 e+8 * MeV/mm3
191 
192 //
193 // Electric current [Q][T^-1]
194 //
195 static const double ampere = coulomb/second; // ampere = 6.24150 e+9 * eplus/ns
196 static const double milliampere = 1.e-3*ampere;
197 static const double microampere = 1.e-6*ampere;
198 static const double nanoampere = 1.e-9*ampere;
199 
200 //
201 // Electric potential [E][Q^-1]
202 //
203 static const double megavolt = megaelectronvolt/eplus;
204 static const double kilovolt = 1.e-3*megavolt;
205 static const double volt = 1.e-6*megavolt;
206 
207 //
208 // Electric resistance [E][T][Q^-2]
209 //
210 static const double ohm = volt/ampere; // ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns)
211 
212 //
213 // Electric capacitance [Q^2][E^-1]
214 //
215 static const double farad = coulomb/volt; // farad = 6.24150e+24 * eplus/Megavolt
216 static const double millifarad = 1.e-3*farad;
217 static const double microfarad = 1.e-6*farad;
218 static const double nanofarad = 1.e-9*farad;
219 static const double picofarad = 1.e-12*farad;
220 
221 //
222 // Magnetic Flux [T][E][Q^-1]
223 //
224 static const double weber = volt*second; // weber = 1000*megavolt*ns
225 
226 //
227 // Magnetic Field [T][E][Q^-1][L^-2]
228 //
229 static const double tesla = volt*second/meter2; // tesla =0.001*megavolt*ns/mm2
230 
231 static const double gauss = 1.e-4*tesla;
232 static const double kilogauss = 1.e-1*tesla;
233 
234 //
235 // Inductance [T^2][E][Q^-2]
236 //
237 static const double henry = weber/ampere; // henry = 1.60217e-7*MeV*(ns/eplus)**2
238 
239 //
240 // Temperature
241 //
242 static const double kelvin = 1.;
243 
244 //
245 // Amount of substance
246 //
247 static const double mole = 1.;
248 
249 //
250 // Activity [T^-1]
251 //
252 static const double becquerel = 1./second ;
253 static const double curie = 3.7e+10 * becquerel;
254 
255 //
256 // Absorbed dose [L^2][T^-2]
257 //
258 static const double gray = joule/kilogram ;
259 
260 //
261 // Luminous intensity [I]
262 //
263 static const double candela = 1.;
264 
265 //
266 // Luminous flux [I]
267 //
268 static const double lumen = candela*steradian;
269 
270 //
271 // Illuminance [I][L^-2]
272 //
273 static const double lux = lumen/meter2;
274 
275 //
276 // Miscellaneous
277 //
278 static const double perCent = 0.01 ;
279 static const double perThousand = 0.001;
280 static const double perMillion = 0.000001;
281 
282 #endif /* HEP_SYSTEM_OF_UNITS_H */
static const double keV
static const double cm2
static const double atmosphere
static const double kilometer3
static const double millimeter
static const double watt
static const double microbarn
static const double kg
static const double ampere
static const double gauss
static const double fermi
static const double picofarad
static const double lumen
static const double kilometer2
static const double mm3
static const double centimeter3
static const double lux
static const double perCent
static const double kiloelectronvolt
static const double cm
static const double meter2
static const double becquerel
static const double picobarn
static const double kilogauss
static const double deg
static const double s
static const double weber
static const double mole
static const double gram
static const double meter
static const double petaelectronvolt
static const double millimeter3
static const double picosecond
static const double perMillion
static const double milligram
static const double ns
static const double hertz
static const double degree
static const double cm3
static const double microsecond
static const double kilogram
static const double parsec
static const double electronvolt
static const double MeV
static const double kilovolt
static const double radian
static const double henry
static const double centimeter2
static const double km3
static const double milliradian
static const double farad
static const double hep_pascal
#define pascal
static const double coulomb
static const double kilometer
static const double microfarad
static const double eplus
static const double curie
static const double rad
static const double m2
static const double m
static const double ohm
static const double tesla
static const double megavolt
static const double second
static const double megahertz
static const double bar
static const double nanofarad
static const double millifarad
static const double GeV
static const double e_SI
static const double steradian
static const double PeV
static const double megaelectronvolt
static const double mg
static const double milliampere
static const double joule
static const double kilohertz
static const double millisecond
static const double nanoampere
static const double kelvin
static const double microampere
static const double gray
static const double TeV
static const double g
static const double millibarn
static const double eV
static const double perThousand
static const double km
static const double candela
static const double m3
static const double mrad
static const double teraelectronvolt
static const double barn
static const double mm2
static const double nanosecond
static const double km2
static const double volt
static const double sr
static const double micrometer
static const double newton
static const double centimeter
static const double mm
static const double millimeter2
static const double nanometer
static const double angstrom
static const double nanobarn
static const double pc
static const double ms
static const double gigaelectronvolt
static const double meter3