Rivet: /Users/chrisg/software/rivet/include/Rivet/Math/Units.hh Source File

| Rivet 3.1.9

Units.hh
1#ifndef RIVET_MATH_UNITS
2#define RIVET_MATH_UNITS
3
4#include "Rivet/Math/MathConstants.hh"
5
6namespace Rivet {
7
8 //
9 // Length [L]
10 //
11 constexpr double millimeter = 1.;
12 constexpr double millimeter2 = millimeter*millimeter;
13 constexpr double millimeter3 = millimeter*millimeter*millimeter;
14
15 constexpr double centimeter = 10.*millimeter;
16 constexpr double centimeter2 = centimeter*centimeter;
17 constexpr double centimeter3 = centimeter*centimeter*centimeter;
18
19 constexpr double meter = 1000.*millimeter;
20 constexpr double meter2 = meter*meter;
21 constexpr double meter3 = meter*meter*meter;
22
23 constexpr double micrometer = 1.e-6 *meter;
24 constexpr double nanometer = 1.e-9 *meter;
25 constexpr double angstrom = 1.e-10*meter;
26 constexpr double picometer = 1.e-12*meter;
27 constexpr double femtometer = 1.e-15*meter;
28 constexpr double attometer = 1.e-18*meter;
29 constexpr double fermi = femtometer;
30
31 // symbols
32 constexpr double mm = millimeter;
33 constexpr double mm2 = millimeter2;
34 constexpr double mm3 = millimeter3;
35
36 constexpr double cm = centimeter;
37 constexpr double cm2 = centimeter2;
38 constexpr double cm3 = centimeter3;
39
40 constexpr double m = meter;
41 constexpr double m2 = meter2;
42 constexpr double m3 = meter3;
43
44 // constexpr double barn = 1.e-28*meter2;
45 // Barn-units in terms of the pb returned by AGILe
46 constexpr double picobarn = 1.0;
47 constexpr double barn = 1.0e+12* picobarn;
48 constexpr double millibarn = 1.0e-3 * barn;
49 constexpr double microbarn = 1.0e-6 * barn;
50 constexpr double nanobarn = 1.0e-9 * barn;
51 constexpr double femtobarn = 1.0e-15 * barn;
52 constexpr double attobarn = 1.0e-18 * barn;
53
54 //
55 // Time [T]
56 //
57 constexpr double nanosecond = 1.0;
58 constexpr double second = 1.e+9 *nanosecond;
59 constexpr double millisecond = 1.e-3 *second;
60 constexpr double microsecond = 1.e-6 *second;
61 constexpr double picosecond = 1.e-12*second;
62
63 // symbols
64 constexpr double ns = nanosecond;
65 constexpr double s = second;
66 constexpr double ms = millisecond;
67
68 //
69 // Electric charge [Q]
70 //
71 constexpr double eplus = 1.0; // positron charge
72 constexpr double e_SI = 1.60217733e-19; // positron charge in coulomb
73
74 //
75 // Energy [E]
76 //
77 constexpr double gigaelectronvolt = 1.;
78 constexpr double electronvolt = 1.e-9*gigaelectronvolt;
79 constexpr double kiloelectronvolt = 1.e-6*gigaelectronvolt;
80 constexpr double megaelectronvolt = 1.e-3*gigaelectronvolt;
81 constexpr double teraelectronvolt = 1.e+3*gigaelectronvolt;
82 constexpr double petaelectronvolt = 1.e+6*gigaelectronvolt;
83
84 // symbols
85 constexpr double eV = electronvolt;
86 constexpr double keV = kiloelectronvolt;
87 constexpr double MeV = megaelectronvolt;
88 constexpr double GeV = gigaelectronvolt;
89 constexpr double TeV = teraelectronvolt;
90 constexpr double PeV = petaelectronvolt;
91
92 constexpr double eV2 = eV*eV;
93 constexpr double keV2 = keV*keV;
94 constexpr double MeV2 = MeV*MeV;
95 constexpr double GeV2 = GeV*GeV;
96 constexpr double TeV2 = TeV*TeV;
97 constexpr double PeV2 = PeV*PeV;
98
99}
100
101#endif
Rivet
Definition MC_Cent_pPb.hh:10