74 lines
3.6 KiB
C++
Executable File
74 lines
3.6 KiB
C++
Executable File
#ifndef PHYSICAL_CONSTANTS_H
|
|
#define PHYSICAL_CONSTANTS_H
|
|
|
|
// The default is (Gaussian) CGS units
|
|
namespace CGS {
|
|
static const double me = 9.1094e-28; // Electron mass (g)
|
|
static const double mp = 1.6726231e-24; // Proton mass (g)
|
|
static const double mpi0 = 2.406175207e-25; // Mass of uncharged pion (g)
|
|
static const double e = 4.8032068e-10; // Elementary charge (statcoulomb)
|
|
static const double c = 29979245800.; // Speed of light (cm/s)
|
|
static const double eps0 = 1; // Permitivity of vacuum
|
|
static const double mu0 = 1; // Permeability of vacuum
|
|
static const double thomcs = 6.65245e-25; // Thomson cross section (cm^2)
|
|
static const double h = 6.6260755e-27; // Planck constant (erg sec)
|
|
static const double hbar =
|
|
1.054572669e-27; // reduced Planck constant (erg sec)
|
|
static const double k = 1.380658e-16; // Boltzmann constant (erg / K)
|
|
static const double r0 =
|
|
2.8179e-13; // Classical electron radius / Thomson scattering length (cm)
|
|
static const double G = 6.67428e-8; // Gravitational constant cm^3/(g sec^2)
|
|
|
|
}; // namespace CGS
|
|
|
|
// Constants in SI
|
|
namespace SI {
|
|
static const double me = 9.1094e-31; // Electron mass (kg)
|
|
static const double mp = 1.6726e-27; // Proton mass (kg)
|
|
static const double mpi0 = 2.406176e-28; // Mass of uncharged pion (kg)
|
|
static const double e = 1.6022e-19; // Elementary charge (C)
|
|
static const double c = 299792458.; // Speed of light (m/s)
|
|
static const double eps0 = 8.854187817620e-12; // Permitivity of vacuum (F / m)
|
|
static const double mu0 = 1.2566370614e-6; // Permeability of vacuum (H / m)
|
|
static const double thomcs = 6.65245e-29; // Thomson cross section (m^2)
|
|
static const double h = 6.6260755e-34; // Planck constant (J s)
|
|
static const double hbar = 1.054572669e-34; // reduced Planck constant (J s)
|
|
static const double k = 1.380658e-23; // Boltzmann constant (J / K)
|
|
static const double r0 =
|
|
2.8179e-15; // Classical electron radius / Thomson scattering length (m)
|
|
static const double G = 6.67428e-11; // Gravitational constant m^3/(kg s^2)
|
|
static const double u = 1.66053906660E-27; // atomic mass unit (kg)
|
|
}; // namespace SI
|
|
|
|
// Natural Units with e = c = k = me = 1 (Stoney units)
|
|
namespace Naturalunits {
|
|
static const double me = 1; // Electron mass
|
|
static const double mp = 1836.15; // Proton mass
|
|
static const double mpi0 = 264.14; // Mass of uncharged pion
|
|
static const double e = 1; // Elementary charge
|
|
static const double c = 1; // Speed of light
|
|
static const double eps0 = .07957747154594766788; // Permitivity of vacuum
|
|
static const double mu0 = 12.56637061435917295376; // Permeability of vacuum
|
|
static const double thomcs = 3.488e43; // Thomson cross section
|
|
static const double h = 861.022579738; // Planck constant
|
|
static const double hbar = 137.035999679; // reduced Planck constant
|
|
static const double k = 1; // Boltzmann constant
|
|
static const double r0 = 2.0405e21; // Classical electron radius
|
|
static const double G = 1; // Gravitational constant
|
|
|
|
// l = e^2 / c^2 me
|
|
// t = e^2 / c^3 me
|
|
// T = = me c^2 / k
|
|
}; // namespace Naturalunits
|
|
|
|
namespace HEPunits {
|
|
static const double me = 511e3; // Electron mass (eV)
|
|
};
|
|
|
|
namespace UnitConversion {
|
|
const double JouleToeV = 1. / SI::e;
|
|
const double eVToJoule = SI::e;
|
|
const double KToeV = 8.61732814974056E-05;
|
|
}; // namespace UnitConversion
|
|
|
|
#endif |