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)

Return 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.

double nuclearMass(int A, int Z)

Variables

const double meter = 1
const double second = 1
const double kilogram = 1
const double ampere = 1
const double mol = 1
const double kelvin = 1
const double newton = 1 * kilogram * meter / second / second
const double pascal = 1 * newton / meter / meter
const double joule = 1 * newton * meter
const double tesla = 1 * newton / ampere / meter
const double volt = 1 * kilogram * meter * meter / ampere / second / second / second
const double coulomb = 1 * ampere * second
const double hertz = 1 / second
const double rad = 1
const double deg = M_PI / 180.
const double yocto = 1E-24
const double zepto = 1E-21
const double atto = 1E-18
const double femto = 1E-15
const double pico = 1E-12
const double nano = 1E-9
const double micro = 1E-6
const double milli = 1E-3
const double kilo = 1E3
const double mega = 1E6
const double giga = 1E9
const double tera = 1E12
const double peta = 1E15
const double exa = 1E18
const double zetta = 1E21
const double yotta = 1E24
const double eplus = 1.602176487e-19 * ampere * second
const double c_light = 2.99792458e8 * meter / second
const double c_squared = c_light * c_light
const double amu = 1.660538921e-27 * kilogram
const double mass_proton = 1.67262158e-27 * kilogram
const double mass_neutron = 1.67492735e-27 * kilogram
const double mass_electron = 9.10938291e-31 * kilogram
const double h_planck = 6.62606957e-34 * joule * second
const double k_boltzmann = 1.3806488e-23 * joule / kelvin
const double mu0 = 4 * M_PI * 1e-7 * newton / ampere / ampere
const double epsilon0 = 1.0 / mu0 / c_squared * ampere * second / volt / meter
const double gauss = 1e-4 * tesla
const double microgauss = 1e-6 * gauss
const double nanogauss = 1e-9 * gauss
const double muG = microgauss
const double nG = nanogauss
const double erg = 1E-7 * joule
const double electronvolt = eplus * volt
const double kiloelectronvolt = 1e3 * electronvolt
const double megaelectronvolt = 1e6 * electronvolt
const double gigaelectronvolt = 1e9 * electronvolt
const double teraelectronvolt = 1e12 * electronvolt
const double petaelectronvolt = 1e15 * electronvolt
const double exaelectronvolt = 1e18 * electronvolt
const double eV = electronvolt
const double keV = kiloelectronvolt
const double MeV = megaelectronvolt
const double GeV = gigaelectronvolt
const double TeV = teraelectronvolt
const double PeV = petaelectronvolt
const double EeV = exaelectronvolt
const double barn = 1E-28 * meter * meter
const double au = 149597870700 * meter
const double ly = 365.25 * 24 * 3600 * second * c_light
const double parsec = 648000 / M_PI * au
const double kiloparsec = 1e3 * parsec
const double megaparsec = 1e6 * parsec
const double gigaparsec = 1e9 * parsec
const double pc = parsec
const double kpc = kiloparsec
const double Mpc = megaparsec
const double Gpc = gigaparsec
const double kilometer = 1000 * meter
const double centimeter = 0.01 * meter
const double km = kilometer
const double cm = centimeter
const double nanosecond = 1e-9 * second
const double microsecond = 1e-6 * second
const double millisecond = 1e-3 * second
const double minute = 60 * second
const double hour = 3600 * second
const double ns = nanosecond
const double mus = microsecond
const double ms = millisecond
const double sec = second
const double ccm = cm*cm*cm