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