Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
WSystemOfUnits.h
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: SystemOfUnits.h,v 1.12 2002/03/30 15:02:06 evc Exp $
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 practical 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 [email protected] (STAR)). Added luminous units.
38// 05.08.98 angstrom, picobarn, microsecond, picosecond, petaelectronvolt
39// 01.03.01 parsec
40
41#ifndef HEP_SYSTEM_OF_UNITS_H
42#define HEP_SYSTEM_OF_UNITS_H
43
44namespace Heed {
45
46namespace CLHEP {
47
48//
49//
50//
51static const double pi = 3.14159265358979323846;
52static const double twopi = 2 * pi;
53static const double halfpi = pi / 2;
54static const double pi2 = pi * pi;
55
56//
57// Length [L]
58//
59static const double millimeter = 1.;
60static const double millimeter2 = millimeter * millimeter;
61static const double millimeter3 = millimeter * millimeter * millimeter;
62
63static const double centimeter = 10. * millimeter;
64static const double centimeter2 = centimeter * centimeter;
65static const double centimeter3 = centimeter * centimeter * centimeter;
66
67static const double meter = 1000. * millimeter;
68static const double meter2 = meter * meter;
69static const double meter3 = meter * meter * meter;
70
71static const double kilometer = 1000. * meter;
72static const double kilometer2 = kilometer * kilometer;
73static const double kilometer3 = kilometer * kilometer * kilometer;
74
75static const double parsec = 3.0856775807e+16 * meter;
76
77static const double micrometer = 1.e-6 * meter;
78static const double nanometer = 1.e-9 * meter;
79static const double angstrom = 1.e-10 * meter;
80static const double fermi = 1.e-15 * meter;
81
82static const double barn = 1.e-28 * meter2;
83static const double millibarn = 1.e-3 * barn;
84static const double microbarn = 1.e-6 * barn;
85static const double nanobarn = 1.e-9 * barn;
86static const double picobarn = 1.e-12 * barn;
87
88// symbols
89static const double mm = millimeter;
90static const double mm2 = millimeter2;
91static const double mm3 = millimeter3;
92
93static const double cm = centimeter;
94static const double cm2 = centimeter2;
95static const double cm3 = centimeter3;
96
97static const double m = meter;
98static const double m2 = meter2;
99static const double m3 = meter3;
100
101static const double km = kilometer;
102static const double km2 = kilometer2;
103static const double km3 = kilometer3;
104
105static const double pc = parsec;
106
107//
108// Angle
109//
110static const double radian = 1.;
111static const double milliradian = 1.e-3 * radian;
112static const double degree = (3.14159265358979323846 / 180.0) * radian;
113
114static const double steradian = 1.;
115
116// symbols
117static const double rad = radian;
118static const double mrad = milliradian;
119static const double sr = steradian;
120static const double deg = degree;
121
122//
123// Time [T]
124//
125static const double nanosecond = 1.;
126static const double second = 1.e+9 * nanosecond;
127static const double millisecond = 1.e-3 * second;
128static const double microsecond = 1.e-6 * second;
129static const double picosecond = 1.e-12 * second;
130
131static const double hertz = 1. / second;
132static const double kilohertz = 1.e+3 * hertz;
133static const double megahertz = 1.e+6 * hertz;
134
135// symbols
136static const double ns = nanosecond;
137static const double s = second;
138static const double ms = millisecond;
139
140//
141// Electric charge [Q]
142//
143static const double eplus = 1.; // positron charge
144static const double e_SI = 1.60217733e-19; // positron charge in coulomb
145static const double coulomb = eplus / e_SI; // coulomb = 6.24150 e+18 * eplus
146
147//
148// Energy [E]
149//
150static const double megaelectronvolt = 1.;
151static const double electronvolt = 1.e-6 * megaelectronvolt;
152static const double kiloelectronvolt = 1.e-3 * megaelectronvolt;
153static const double gigaelectronvolt = 1.e+3 * megaelectronvolt;
154static const double teraelectronvolt = 1.e+6 * megaelectronvolt;
155static const double petaelectronvolt = 1.e+9 * megaelectronvolt;
156
157static const double joule = electronvolt / e_SI; // joule = 6.24150 e+12 * MeV
158
159// symbols
160static const double MeV = megaelectronvolt;
161static const double eV = electronvolt;
162static const double keV = kiloelectronvolt;
163static const double GeV = gigaelectronvolt;
164static const double TeV = teraelectronvolt;
165static const double PeV = petaelectronvolt;
166
167//
168// Mass [E][T^2][L^-2]
169//
170static const double kilogram = joule * second * second / (meter * meter);
171static const double gram = 1.e-3 * kilogram;
172static const double milligram = 1.e-3 * gram;
173
174// symbols
175static const double kg = kilogram;
176static const double g = gram;
177static const double mg = milligram;
178
179//
180// Power [E][T^-1]
181//
182static const double watt = joule / second; // watt = 6.24150 e+3 * MeV/ns
183
184//
185// Force [E][L^-1]
186//
187static const double newton = joule / meter; // newton = 6.24150 e+9 * MeV/mm
188
189//
190// Pressure [E][L^-3]
191//
192#define pascal hep_pascal // a trick to avoid warnings
193static const double hep_pascal = newton / m2; // pascal = 6.24150 e+3 * MeV/mm3
194static const double bar = 100000 * pascal; // bar = 6.24150 e+8 * MeV/mm3
195static const double atmosphere =
196 101325 * pascal; // atm = 6.32420 e+8 * MeV/mm3
197
198//
199// Electric current [Q][T^-1]
200//
201static const double ampere =
202 coulomb / second; // ampere = 6.24150 e+9 * eplus/ns
203static const double milliampere = 1.e-3 * ampere;
204static const double microampere = 1.e-6 * ampere;
205static const double nanoampere = 1.e-9 * ampere;
206
207//
208// Electric potential [E][Q^-1]
209//
210static const double megavolt = megaelectronvolt / eplus;
211static const double kilovolt = 1.e-3 * megavolt;
212static const double volt = 1.e-6 * megavolt;
213
214//
215// Electric resistance [E][T][Q^-2]
216//
217static const double ohm =
218 volt / ampere; // ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns)
219
220//
221// Electric capacitance [Q^2][E^-1]
222//
223static const double farad =
224 coulomb / volt; // farad = 6.24150e+24 * eplus/Megavolt
225static const double millifarad = 1.e-3 * farad;
226static const double microfarad = 1.e-6 * farad;
227static const double nanofarad = 1.e-9 * farad;
228static const double picofarad = 1.e-12 * farad;
229
230//
231// Magnetic Flux [T][E][Q^-1]
232//
233static const double weber = volt * second; // weber = 1000*megavolt*ns
234
235//
236// Magnetic Field [T][E][Q^-1][L^-2]
237//
238static const double tesla =
239 volt * second / meter2; // tesla =0.001*megavolt*ns/mm2
240
241static const double gauss = 1.e-4 * tesla;
242static const double kilogauss = 1.e-1 * tesla;
243
244//
245// Inductance [T^2][E][Q^-2]
246//
247static const double henry =
248 weber / ampere; // henry = 1.60217e-7*MeV*(ns/eplus)**2
249
250//
251// Temperature
252//
253static const double kelvin = 1.;
254
255//
256// Amount of substance
257//
258static const double mole = 1.;
259
260//
261// Activity [T^-1]
262//
263static const double becquerel = 1. / second;
264static const double curie = 3.7e+10 * becquerel;
265
266//
267// Absorbed dose [L^2][T^-2]
268//
269static const double gray = joule / kilogram;
270
271//
272// Luminous intensity [I]
273//
274static const double candela = 1.;
275
276//
277// Luminous flux [I]
278//
279static const double lumen = candela * steradian;
280
281//
282// Illuminance [I][L^-2]
283//
284static const double lux = lumen / meter2;
285
286//
287// Miscellaneous
288//
289static const double perCent = 0.01;
290static const double perThousand = 0.001;
291static const double perMillion = 0.000001;
292}
293
294}
295
296#endif /* HEP_SYSTEM_OF_UNITS_H */
#define pascal
Definition: BGMesh.cpp:5