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 newton = 1 * kilogram * meter / second / second
static const double pascal = 1 * newton / meter / meter
static const double joule = 1 * newton * meter
static const double tesla = 1 * newton / ampere / meter
static const double volt = 1 * kilogram * meter * meter / ampere / second / second / second
static const double coulomb = 1 * ampere * second
static const double hertz = 1 / second
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 eplus = 1.602176487e-19 * ampere * second
static const double c_light = 2.99792458e8 * meter / second
static const double c_squared = c_light * c_light
static const double amu = 1.660538921e-27 * kilogram
static const double mass_proton = 1.67262158e-27 * kilogram
static const double mass_neutron = 1.67492735e-27 * kilogram
static const double mass_electron = 9.10938291e-31 * kilogram
static const double h_planck = 6.62606957e-34 * joule * second
static const double k_boltzmann = 1.3806488e-23 * joule / kelvin
static const double mu0 = 4 * M_PI * 1e-7 * newton / ampere / ampere
static const double epsilon0 = 1.0 / mu0 / c_squared * ampere * second / volt / meter
static const double alpha_finestructure = eplus * eplus / 2. / epsilon0 / h_planck / c_light
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 gauss = 1e-4 * tesla
static const double microgauss = 1e-6 * gauss
static const double nanogauss = 1e-9 * gauss
static const double muG = microgauss
static const double nG = nanogauss
static const double erg = 1E-7 * joule
static const double electronvolt = eplus * volt
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 barn = 1E-28 * meter * meter
static const double au = 149597870700 * meter
static const double ly = 365.25 * 24 * 3600 * second * c_light
static const double parsec = 648000 / M_PI * au
static const double kiloparsec = 1e3 * parsec
static const double megaparsec = 1e6 * parsec
static const double gigaparsec = 1e9 * parsec
static const double pc = parsec
static const double kpc = kiloparsec
static const double Mpc = megaparsec
static const double Gpc = gigaparsec
static const double kilometer = 1000 * meter
static const double centimeter = 0.01 * meter
static const double km = kilometer
static const double cm = centimeter
static const double nanosecond = 1e-9 * second
static const double microsecond = 1e-6 * second
static const double millisecond = 1e-3 * second
static const double minute = 60 * second
static const double hour = 3600 * second
static const double ns = nanosecond
static const double mus = microsecond
static const double ms = millisecond
static const double sec = second
static const double ccm = cm * cm * cm