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