Physics Definitions
- group PhysicsDefinitions
Fundamental physical data, function, units, constants, etc.
Functions
-
void setCosmologyParameters(double hubbleParameter, double omegaMatter)
Set the cosmological parameters for a flat universe. To ensure flatness omegaL is set to 1 - omegaMatter
- Parameters:
hubbleParameter – dimensionless Hubble parameter, default = 0.673
omegaMatter – matter parameter, default = 0.315
-
double hubbleRate(double redshift = 0)
Hubble rate at given redshift H(z) = H0 * sqrt(omegaM * (1 + z)^3 + omegaL)
-
double omegaL()
-
double omegaM()
-
double H0()
-
double comovingDistance2Redshift(double distance)
Redshift of a comoving object at a given comoving distance to an observer at z = 0. d_comoving(z) = c/H0 * int_0^z dz’ / E(z’)
-
double redshift2ComovingDistance(double redshift)
Comoving distance between an observer at z = 0 and a comoving object at z. d_comoving(z) = c/H0 * int_0^z dz’ / E(z’)
-
double luminosityDistance2Redshift(double distance)
Redshift of a comoving object at a given luminosity distance to an observer at z = 0. d_luminosity(z) = (1 + z) * d_comoving(z)
-
double redshift2LuminosityDistance(double redshift)
Luminosity distance between an observer at z = 0 and a comoving object at z. d_luminosity(z) = (1 + z) * d_comoving(z)
-
double lightTravelDistance2Redshift(double distance)
Redshift of a comoving object at a given light travel distance to an observer at z = 0. d_lighttravel(z) = c/H0 * int_0^z dz’ / ((1 + z’) * E(z’))
-
double redshift2LightTravelDistance(double redshift)
Light travel distance between an observer at z = 0 and a comoving object at z. d_lighttravel(z) = c/H0 * int_0^z dz’ / ((1 + z’) * E(z’))
-
double comoving2LightTravelDistance(double distance)
-
double lightTravel2ComovingDistance(double distance)
-
int nucleusId(int a, int z)
This implements the 2012 Monte Carlo nuclear code scheme. Ion numbers are +/- 10LZZZAAAI. AAA is A - total baryon number ZZZ is Z - total charge L is the total number of strange quarks. I is the isomer number, with I=0 corresponding to the ground state.
-
int chargeNumber(int id)
-
int massNumber(int id)
-
bool isNucleus(int id)
-
std::string convertIdToName(int id)
-
double nuclearMass(int id)
Get the nucleus mass by lookup from a table. The masses are the atomic masses from the NIST database: http://www.nist.gov/pml/data/comp.cfm minus electron masses, neglecting electron binding energies. Unmeasured atomic masses are taken to be A * amu minus electron masses. The data table is generated by data-tools/NuclearMass/createNuclearMassTable.
- Parameters:
id – id of the particle following the PDG numbering scheme
- Returns:
The mass of a the nucleus
-
double nuclearMass(int A, int Z)
Get the nucleus mass by lookup from a table. The masses are the atomic masses from the NIST database: http://www.nist.gov/pml/data/comp.cfm minus electron masses, neglecting electron binding energies. Unmeasured atomic masses are taken to be A * amu minus electron masses. The data table is generated by data-tools/NuclearMass/createNuclearMassTable.
- Parameters:
A – atomic mass number of the nucleus
Z – atomic number of the nucleus
- Returns:
The mass of a the nucleus
Variables
-
static const double meter = 1
-
static const double second = 1
-
static const double kilogram = 1
-
static const double ampere = 1
-
static const double mol = 1
-
static const double kelvin = 1
-
static const double rad = 1
-
static const double deg = M_PI / 180.
-
static const double yocto = 1E-24
-
static const double zepto = 1E-21
-
static const double atto = 1E-18
-
static const double femto = 1E-15
-
static const double pico = 1E-12
-
static const double nano = 1E-9
-
static const double micro = 1E-6
-
static const double milli = 1E-3
-
static const double kilo = 1E3
-
static const double mega = 1E6
-
static const double giga = 1E9
-
static const double tera = 1E12
-
static const double peta = 1E15
-
static const double exa = 1E18
-
static const double zetta = 1E21
-
static const double yotta = 1E24
-
static const double radius_electron = eplus * eplus / 4. / M_PI / epsilon0 / mass_electron / c_squared
-
static const double sigma_thomson = 8. * M_PI / 3. * radius_electron * radius_electron
-
static const double muG = microgauss
-
static const double kiloelectronvolt = 1e3 * electronvolt
-
static const double megaelectronvolt = 1e6 * electronvolt
-
static const double gigaelectronvolt = 1e9 * electronvolt
-
static const double teraelectronvolt = 1e12 * electronvolt
-
static const double petaelectronvolt = 1e15 * electronvolt
-
static const double exaelectronvolt = 1e18 * electronvolt
-
static const double eV = electronvolt
-
static const double keV = kiloelectronvolt
-
static const double MeV = megaelectronvolt
-
static const double GeV = gigaelectronvolt
-
static const double TeV = teraelectronvolt
-
static const double PeV = petaelectronvolt
-
static const double EeV = exaelectronvolt
-
static const double kpc = kiloparsec
-
static const double Mpc = megaparsec
-
static const double Gpc = gigaparsec
-
static const double cm = centimeter
-
static const double ns = nanosecond
-
static const double mus = microsecond
-
static const double ms = millisecond
-
void setCosmologyParameters(double hubbleParameter, double omegaMatter)