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