ATLAS Offline Software
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# 06.20.25 e_SI
57# -----
58
59#
60# Length [L]
61#
62millimeter = 1.0
63millimeter2 = millimeter * millimeter
64millimeter3 = millimeter * millimeter * millimeter
65
66centimeter = 10.0 * millimeter
67centimeter2 = centimeter * centimeter
68centimeter3 = centimeter * centimeter * centimeter
69
70meter = 1000.0 * millimeter
71meter2 = meter * meter
72meter3 = meter * meter * meter
73
74kilometer = 1000.0 * meter
75kilometer2 = kilometer * kilometer
76kilometer3 = kilometer * kilometer * kilometer
77
78parsec = 3.0856775807e16 * meter
79
80micrometer = 1.0e-6 * meter
81nanometer = 1.0e-9 * meter
82angstrom = 1.0e-10 * meter
83fermi = 1.0e-15 * meter
84
85barn = 1.0e-28 * meter2
86millibarn = 1.0e-3 * barn
87microbarn = 1.0e-6 * barn
88nanobarn = 1.0e-9 * barn
89picobarn = 1.0e-12 * barn
90
91liter = 1.0e3 * centimeter3
92L = liter
93dL = 1.0e-1 * liter
94cL = 1.0e-2 * liter
95mL = 1.0e-3 * liter
96
97# symbols
98mm = millimeter
99mm2 = millimeter2
100mm3 = millimeter3
101
102cm = centimeter
103cm2 = centimeter2
104cm3 = centimeter3
105
106m = meter
107m2 = meter2
108m3 = meter3
109
110km = kilometer
111km2 = kilometer2
112km3 = kilometer3
113
114pc = parsec
115
116#
117# Angle
118#
119radian = 1.0
120milliradian = 1.0e-3 * radian
121degree = (3.14159265358979323846 / 180.0) * radian
122
123steradian = 1.0
124
125# symbols
126rad = radian
127mrad = milliradian
128sr = steradian
129deg = degree
130
131#
132# Time [T]
133#
134nanosecond = 1.0
135second = 1.0e9 * nanosecond
136millisecond = 1.0e-3 * second
137microsecond = 1.0e-6 * second
138picosecond = 1.0e-12 * second
139femtosecond = 1.0e-15 * second
140
141hertz = 1.0 / second
142kilohertz = 1.0e3 * hertz
143megahertz = 1.0e6 * hertz
144
145# symbols
146ns = nanosecond
147s = second
148ms = millisecond
149us = microsecond
150ps = picosecond
151
152#
153# Electric charge [Q]
154#
155eplus = 1.0 # positron charge
156e_SI = 1.602176634e-19 # positron charge in coulomb
157coulomb = eplus / e_SI # coulomb = 6.24150 e+18 * eplus
158
159#
160# Energy [E]
161#
162megaelectronvolt = 1.0
163electronvolt = 1.0e-6 * megaelectronvolt
164kiloelectronvolt = 1.0e-3 * megaelectronvolt
165gigaelectronvolt = 1.0e3 * megaelectronvolt
166teraelectronvolt = 1.0e6 * megaelectronvolt
167petaelectronvolt = 1.0e9 * megaelectronvolt
168
169joule = electronvolt / e_SI # joule = 6.24150 e+12 * MeV
170
171# symbols
172MeV = megaelectronvolt
173eV = electronvolt
174keV = kiloelectronvolt
175GeV = gigaelectronvolt
176TeV = teraelectronvolt
177PeV = petaelectronvolt
178
179#
180# Mass [E][T^2][L^-2]
181#
182kilogram = joule * second * second / (meter * meter)
183gram = 1.0e-3 * kilogram
184milligram = 1.0e-3 * gram
185
186# symbols
187kg = kilogram
188g = gram
189mg = milligram
190
191#
192# Power [E][T^-1]
193#
194watt = joule / second # watt = 6.24150 e+3 * MeV/ns
195
196#
197# Force [E][L^-1]
198#
199newton = joule / meter # newton = 6.24150 e+9 * MeV/mm
200
201#
202# Pressure [E][L^-3]
203#
204hep_pascal = newton / m2 # pascal = 6.24150 e+3 * MeV/mm3
205pascal = hep_pascal # a trick to avoid warnings
206bar = 100000 * pascal # bar = 6.24150 e+8 * MeV/mm3
207atmosphere = 101325 * pascal # atm = 6.32420 e+8 * MeV/mm3
208
209#
210# Electric current [Q][T^-1]
211#
212ampere = coulomb / second # ampere = 6.24150 e+9 * eplus/ns
213milliampere = 1.0e-3 * ampere
214microampere = 1.0e-6 * ampere
215nanoampere = 1.0e-9 * ampere
216
217#
218# Electric potential [E][Q^-1]
219#
220megavolt = megaelectronvolt / eplus
221kilovolt = 1.0e-3 * megavolt
222volt = 1.0e-6 * megavolt
223
224#
225# Electric resistance [E][T][Q^-2]
226#
227# ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns)
228ohm = volt / ampere
229
230#
231# Electric capacitance [Q^2][E^-1]
232#
233# farad = 6.24150e+24 * eplus/Megavolt
234farad = coulomb / volt
235millifarad = 1.0e-3 * farad
236microfarad = 1.0e-6 * farad
237nanofarad = 1.0e-9 * farad
238picofarad = 1.0e-12 * farad
239
240#
241# Magnetic Flux [T][E][Q^-1]
242#
243weber = volt * second # weber = 1000*megavolt*ns
244
245#
246# Magnetic Field [T][E][Q^-1][L^-2]
247#
248tesla = volt * second / meter2 # tesla =0.001*megavolt*ns/mm2
249
250gauss = 1.0e-4 * tesla
251kilogauss = 1.0e-1 * tesla
252
253#
254# Inductance [T^2][E][Q^-2]
255#
256# henry = 1.60217e-7*MeV*(ns/eplus)**2
257henry = weber / ampere
258
259#
260# Temperature
261#
262kelvin = 1.0
263
264#
265# Amount of substance
266#
267mole = 1.0
268
269#
270# Activity [T^-1]
271#
272becquerel = 1.0 / second
273curie = 3.7e10 * becquerel
274kilobecquerel = 1.0e3 * becquerel
275megabecquerel = 1.0e6 * becquerel
276gigabecquerel = 1.0e9 * becquerel
277millicurie = 1.0e-3 * curie
278microcurie = 1.0e-6 * curie
279Bq = becquerel
280kBq = kilobecquerel
281MBq = megabecquerel
282GBq = gigabecquerel
283Ci = curie
284mCi = millicurie
285uCi = microcurie
286
287#
288# Absorbed dose [L^2][T^-2]
289#
290gray = joule / kilogram
291kilogray = 1.0e3 * gray
292milligray = 1.0e-3 * gray
293microgray = 1.0e-6 * gray
294
295#
296# Luminous intensity [I]
297#
298candela = 1.0
299
300#
301# Luminous flux [I]
302#
303lumen = candela * steradian
304
305#
306# Illuminance [I][L^-2]
307#
308lux = lumen / meter2
309
310#
311# Miscellaneous
312#
313perCent = 0.01
314perThousand = 0.001
315perMillion = 0.000001