| The Gaudi Framework v32r1 (f65d50dc)

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