52#ifndef SI_SYSTEM_OF_UNITS_HH
53#define SI_SYSTEM_OF_UNITS_HH 1
55static constexpr double pi = 3.14159265358979323846;
56static constexpr double twopi = 2 * pi;
57static constexpr double halfpi = pi / 2;
58static constexpr double pi2 = pi * pi;
62static constexpr double meter = 1.;
63static constexpr double meter2 = meter * meter;
64static constexpr double meter3 = meter * meter * meter;
66static constexpr double millimeter = 0.001 * meter;
67static constexpr double millimeter2 = millimeter * millimeter;
68static constexpr double millimeter3 = millimeter * millimeter * millimeter;
70static constexpr double centimeter = 10. * millimeter;
71static constexpr double centimeter2 = centimeter * centimeter;
72static constexpr double centimeter3 = centimeter * centimeter * centimeter;
74static constexpr double kilometer = 1000. * meter;
75static constexpr double kilometer2 = kilometer * kilometer;
76static constexpr double kilometer3 = kilometer * kilometer * kilometer;
78static constexpr double parsec = 3.0856775807e+16 * meter;
80static constexpr double micrometer = 1.e-6 * meter;
81static constexpr double nanometer = 1.e-9 * meter;
82static constexpr double angstrom = 1.e-10 * meter;
83static constexpr double fermi = 1.e-15 * meter;
85static constexpr double barn = 1.e-28 * meter2;
86static constexpr double millibarn = 1.e-3 * barn;
87static constexpr double microbarn = 1.e-6 * barn;
88static constexpr double nanobarn = 1.e-9 * barn;
89static constexpr double picobarn = 1.e-12 * barn;
92static constexpr double nm = nanometer;
93static constexpr double um = micrometer;
95static constexpr double mm = millimeter;
96static constexpr double mm2 = millimeter2;
97static constexpr double mm3 = millimeter3;
99static constexpr double cm = centimeter;
100static constexpr double cm2 = centimeter2;
101static constexpr double cm3 = centimeter3;
103static constexpr double liter = 1.e+3 * cm3;
104static constexpr double L = liter;
105static constexpr double dL = 1.e-1 * liter;
106static constexpr double cL = 1.e-2 * liter;
107static constexpr double mL = 1.e-3 * liter;
109static constexpr double m = meter;
110static constexpr double m2 = meter2;
111static constexpr double m3 = meter3;
113static constexpr double km = kilometer;
114static constexpr double km2 = kilometer2;
115static constexpr double km3 = kilometer3;
117static constexpr double pc = parsec;
122static constexpr double radian = 1.;
123static constexpr double milliradian = 1.e-3 * radian;
124static constexpr double degree = (pi / 180.0) * radian;
126static constexpr double steradian = 1.;
129static constexpr double rad = radian;
130static constexpr double mrad = milliradian;
131static constexpr double sr = steradian;
132static constexpr double deg = degree;
137static constexpr double second = 1.;
138static constexpr double nanosecond = 1.e-9 * second;
139static constexpr double millisecond = 1.e-3 * second;
140static constexpr double microsecond = 1.e-6 * second;
141static constexpr double picosecond = 1.e-12 * second;
143static constexpr double hertz = 1. / second;
144static constexpr double kilohertz = 1.e+3 * hertz;
145static constexpr double megahertz = 1.e+6 * hertz;
148static constexpr double ns = nanosecond;
149static constexpr double s = second;
150static constexpr double ms = millisecond;
151static constexpr double us = microsecond;
152static constexpr double ps = picosecond;
157static constexpr double kilogram = 1.;
158static constexpr double gram = 1.e-3 * kilogram;
159static constexpr double milligram = 1.e-3 * gram;
162static constexpr double kg = kilogram;
163static constexpr double g = gram;
164static constexpr double mg = milligram;
169static constexpr double ampere = 1.;
170static constexpr double milliampere = 1.e-3 * ampere;
171static constexpr double microampere = 1.e-6 * ampere;
172static constexpr double nanoampere = 1.e-9 * ampere;
177static constexpr double coulomb = ampere * second;
178static constexpr double e_SI = 1.602176634e-19;
179static constexpr double eplus = e_SI * coulomb;
184static constexpr double joule = kg * m * m / (s * s);
186static constexpr double electronvolt = e_SI * joule;
187static constexpr double kiloelectronvolt = 1.e+3 * electronvolt;
188static constexpr double megaelectronvolt = 1.e+6 * electronvolt;
189static constexpr double gigaelectronvolt = 1.e+9 * electronvolt;
190static constexpr double teraelectronvolt = 1.e+12 * electronvolt;
191static constexpr double petaelectronvolt = 1.e+15 * electronvolt;
194static constexpr double MeV = megaelectronvolt;
195static constexpr double eV = electronvolt;
196static constexpr double keV = kiloelectronvolt;
197static constexpr double GeV = gigaelectronvolt;
198static constexpr double TeV = teraelectronvolt;
199static constexpr double PeV = petaelectronvolt;
204static constexpr double watt = joule / second;
209static constexpr double newton =
215#define pascal hep_pascal
216static constexpr double hep_pascal =
218static constexpr double bar = 100000 *
pascal;
219static constexpr double atmosphere =
225static constexpr double megavolt = megaelectronvolt / eplus;
226static constexpr double kilovolt = 1.e-3 * megavolt;
227static constexpr double volt = 1.e-6 * megavolt;
232static constexpr double ohm =
238static constexpr double farad =
240static constexpr double millifarad = 1.e-3 * farad;
241static constexpr double microfarad = 1.e-6 * farad;
242static constexpr double nanofarad = 1.e-9 * farad;
243static constexpr double picofarad = 1.e-12 * farad;
248static constexpr double weber = volt * second;
253static constexpr double tesla =
254 volt * second / meter2;
256static constexpr double gauss = 1.e-4 * tesla;
257static constexpr double kilogauss = 1.e-1 * tesla;
262static constexpr double henry =
268static constexpr double kelvin = 1.;
273static constexpr double mole = 1.;
278static constexpr double becquerel = 1. / second;
279static constexpr double curie = 3.7e+10 * becquerel;
280static constexpr double kilobecquerel = 1.e+3 * becquerel;
281static constexpr double megabecquerel = 1.e+6 * becquerel;
282static constexpr double gigabecquerel = 1.e+9 * becquerel;
283static constexpr double millicurie = 1.e-3 * curie;
284static constexpr double microcurie = 1.e-6 * curie;
285static constexpr double Bq = becquerel;
286static constexpr double kBq = kilobecquerel;
287static constexpr double MBq = megabecquerel;
288static constexpr double GBq = gigabecquerel;
289static constexpr double Ci = curie;
290static constexpr double mCi = millicurie;
291static constexpr double uCi = microcurie;
296static constexpr double gray = joule / kilogram;
297static constexpr double kilogray = 1.e+3 * gray;
298static constexpr double milligray = 1.e-3 * gray;
299static constexpr double microgray = 1.e-6 * gray;
304static constexpr double candela = 1.;
309static constexpr double lumen = candela * steradian;
314static constexpr double lux = lumen / meter2;
319static constexpr double perCent = 0.01;
320static constexpr double perThousand = 0.001;
321static constexpr double perMillion = 0.000001;