41#ifndef HEP_SYSTEM_OF_UNITS_H
42#define HEP_SYSTEM_OF_UNITS_H
51static const double pi = 3.14159265358979323846;
52static const double twopi = 2 * pi;
53static const double halfpi = pi / 2;
54static const double pi2 = pi * pi;
59static const double millimeter = 1.;
60static const double millimeter2 = millimeter * millimeter;
61static const double millimeter3 = millimeter * millimeter * millimeter;
63static const double centimeter = 10. * millimeter;
64static const double centimeter2 = centimeter * centimeter;
65static const double centimeter3 = centimeter * centimeter * centimeter;
67static const double meter = 1000. * millimeter;
68static const double meter2 = meter * meter;
69static const double meter3 = meter * meter * meter;
71static const double kilometer = 1000. * meter;
72static const double kilometer2 = kilometer * kilometer;
73static const double kilometer3 = kilometer * kilometer * kilometer;
75static const double parsec = 3.0856775807e+16 * meter;
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;
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;
89static const double mm = millimeter;
90static const double mm2 = millimeter2;
91static const double mm3 = millimeter3;
93static const double cm = centimeter;
94static const double cm2 = centimeter2;
95static const double cm3 = centimeter3;
97static const double m = meter;
98static const double m2 = meter2;
99static const double m3 = meter3;
101static const double km = kilometer;
102static const double km2 = kilometer2;
103static const double km3 = kilometer3;
105static const double pc = parsec;
110static const double radian = 1.;
111static const double milliradian = 1.e-3 * radian;
112static const double degree = (3.14159265358979323846 / 180.0) * radian;
114static const double steradian = 1.;
117static const double rad = radian;
118static const double mrad = milliradian;
119static const double sr = steradian;
120static const double deg = degree;
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;
131static const double hertz = 1. / second;
132static const double kilohertz = 1.e+3 * hertz;
133static const double megahertz = 1.e+6 * hertz;
136static const double ns = nanosecond;
137static const double s = second;
138static const double ms = millisecond;
143static const double eplus = 1.;
144static const double e_SI = 1.60217733e-19;
145static const double coulomb = eplus / e_SI;
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;
157static const double joule = electronvolt / e_SI;
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;
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;
175static const double kg = kilogram;
176static const double g = gram;
177static const double mg = milligram;
182static const double watt = joule / second;
187static const double newton = joule / meter;
192#define pascal hep_pascal
193static const double hep_pascal = newton / m2;
194static const double bar = 100000 *
pascal;
195static const double atmosphere =
201static const double ampere =
203static const double milliampere = 1.e-3 * ampere;
204static const double microampere = 1.e-6 * ampere;
205static const double nanoampere = 1.e-9 * ampere;
210static const double megavolt = megaelectronvolt / eplus;
211static const double kilovolt = 1.e-3 * megavolt;
212static const double volt = 1.e-6 * megavolt;
217static const double ohm =
223static const double farad =
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;
233static const double weber = volt * second;
238static const double tesla =
239 volt * second / meter2;
241static const double gauss = 1.e-4 * tesla;
242static const double kilogauss = 1.e-1 * tesla;
247static const double henry =
253static const double kelvin = 1.;
258static const double mole = 1.;
263static const double becquerel = 1. / second;
264static const double curie = 3.7e+10 * becquerel;
269static const double gray = joule / kilogram;
274static const double candela = 1.;
279static const double lumen = candela * steradian;
284static const double lux = lumen / meter2;
289static const double perCent = 0.01;
290static const double perThousand = 0.001;
291static const double perMillion = 0.000001;