Commit 4c2376cb authored by Marco Clemencic's avatar Marco Clemencic

Merge branch 'dev/updateConstants' into 'master'

update units and constants

See merge request !1101
parents 0133ed1d 3c18c85c
Pipeline #1963735 passed with stages
in 15 minutes and 59 seconds
......@@ -71,7 +71,7 @@ namespace Gaudi {
// hbar = 6.58212e-13 MeV*ns
// hbarc = 197.32705e-12 MeV*mm
//
constexpr double h_Planck = 6.6260755e-34 * joule * s;
constexpr double h_Planck = 6.62606896e-34 * joule * s;
constexpr double hbar_Planck = h_Planck / twopi;
constexpr double hbarc = hbar_Planck * c_light;
constexpr double hbarc_squared = hbarc * hbarc;
......@@ -83,10 +83,10 @@ namespace Gaudi {
// amu_c2 - atomic equivalent mass unit
// amu - atomic mass unit
//
constexpr double electron_mass_c2 = 0.51099906 * MeV;
constexpr double proton_mass_c2 = 938.27231 * MeV;
constexpr double neutron_mass_c2 = 939.56563 * MeV;
constexpr double amu_c2 = 931.49432 * MeV;
constexpr double electron_mass_c2 = 0.510998910 * MeV;
constexpr double proton_mass_c2 = 938.272013 * MeV;
constexpr double neutron_mass_c2 = 939.56536 * MeV;
constexpr double amu_c2 = 931.494028 * MeV;
constexpr double amu = amu_c2 / c_squared;
//
......@@ -109,7 +109,7 @@ namespace Gaudi {
constexpr double twopi_mc2_rcl2 = twopi * electron_mass_c2 * classic_electr_radius * classic_electr_radius;
constexpr double k_Boltzmann = 8.617385e-11 * MeV / kelvin;
constexpr double k_Boltzmann = 8.617343e-11 * MeV / kelvin;
constexpr double STP_Temperature = 273.15 * kelvin;
constexpr double STP_Pressure = 1. * atmosphere;
......
......@@ -87,6 +87,12 @@ namespace Gaudi {
constexpr double nanobarn = 1.e-9 * barn;
constexpr double picobarn = 1.e-12 * barn;
// volume
constexpr double liter = 1.e+3 * centimeter3;
constexpr double dL = 1.e-1 * liter;
constexpr double cL = 1.e-2 * liter;
constexpr double mL = 1.e-3 * liter;
// symbols
constexpr double nm = nanometer;
constexpr double um = micrometer;
......@@ -109,6 +115,8 @@ namespace Gaudi {
constexpr double pc = parsec;
constexpr double L = liter;
//
// Angle
//
......@@ -131,7 +139,9 @@ namespace Gaudi {
constexpr double second = 1.e+9 * nanosecond;
constexpr double millisecond = 1.e-3 * second;
constexpr double microsecond = 1.e-6 * second;
constexpr double us = microsecond;
constexpr double picosecond = 1.e-12 * second;
constexpr double ps = picosecond;
constexpr double femtosecond = 1.e-15 * second;
constexpr double hertz = 1. / second;
......@@ -146,9 +156,9 @@ namespace Gaudi {
//
// Electric charge [Q]
//
constexpr double eplus = 1.; // positron charge
constexpr double e_SI = 1.60217733e-19; // positron charge in coulomb
constexpr double coulomb = eplus / e_SI; // coulomb = 6.24150 e+18 * eplus
constexpr double eplus = 1.; // positron charge
constexpr double e_SI = 1.602176487e-19; // positron charge in coulomb
constexpr double coulomb = eplus / e_SI; // coulomb = 6.24150 e+18 * eplus
//
// Energy [E]
......@@ -196,6 +206,7 @@ namespace Gaudi {
// Pressure [E][L^-3]
//
constexpr double Pa = newton / m2; // pascal = 6.24150 e+3 * MeV/mm3
constexpr double hep_pascal = Pa; // to match CLHEP
constexpr double bar = 100000 * Pa; // bar = 6.24150 e+8 * MeV/mm3
constexpr double atmosphere = 101325 * Pa; // atm = 6.32420 e+8 * MeV/mm3
......@@ -259,13 +270,28 @@ namespace Gaudi {
//
// Activity [T^-1]
//
constexpr double becquerel = 1. / second;
constexpr double curie = 3.7e+10 * becquerel;
constexpr double becquerel = 1. / second;
constexpr double curie = 3.7e+10 * becquerel;
constexpr double kilobecquerel = 1.e+3 * becquerel;
constexpr double megabecquerel = 1.e+6 * becquerel;
constexpr double gigabecquerel = 1.e+9 * becquerel;
constexpr double millicurie = 1.e-3 * curie;
constexpr double microcurie = 1.e-6 * curie;
constexpr double Bq = becquerel;
constexpr double kBq = kilobecquerel;
constexpr double MBq = megabecquerel;
constexpr double GBq = gigabecquerel;
constexpr double Ci = curie;
constexpr double mCi = millicurie;
constexpr double uCi = microcurie;
//
// Absorbed dose [L^2][T^-2]
//
constexpr double gray = joule / kilogram;
constexpr double gray = joule / kilogram;
constexpr double kilogray = 1.e+3 * gray;
constexpr double milligray = 1.e-3 * gray;
constexpr double microgray = 1.e-6 * gray;
//
// Luminous intensity [I]
......
......@@ -47,6 +47,7 @@
# 23.02.96 Created
# 26.03.96 Added constants for standard conditions of temperature
# and pressure; also added Gas threshold.
# 08.07.20 Updated
# -----
from GaudiKernel.SystemOfUnits import *
......@@ -76,7 +77,7 @@ c_squared = c_light * c_light
# hbar = 6.58212e-13 MeV*ns
# hbarc = 197.32705e-12 MeV*mm
#
h_Planck = 6.6260755e-34 * joule * s
h_Planck = 6.62606896e-34 * joule * s
hbar_Planck = h_Planck / twopi
hbarc = hbar_Planck * c_light
hbarc_squared = hbarc * hbarc
......@@ -91,10 +92,10 @@ e_squared = eplus * eplus
# amu_c2 - atomic equivalent mass unit
# amu - atomic mass unit
#
electron_mass_c2 = 0.51099906 * MeV
proton_mass_c2 = 938.27231 * MeV
neutron_mass_c2 = 939.56563 * MeV
amu_c2 = 931.49432 * MeV
electron_mass_c2 = 0.510998910 * MeV
proton_mass_c2 = 938.272013 * MeV
neutron_mass_c2 = 939.56536 * MeV
amu_c2 = 931.494028 * MeV
amu = amu_c2 / c_squared
#
......@@ -120,7 +121,7 @@ twopi_mc2_rcl2 = twopi * electron_mass_c2 * \
#
#
#
k_Boltzmann = 8.617385e-11 * MeV / kelvin
k_Boltzmann = 8.617343e-11 * MeV / kelvin
#
#
......
......@@ -87,6 +87,12 @@ microbarn = 1.e-6 * barn
nanobarn = 1.e-9 * barn
picobarn = 1.e-12 * barn
liter = 1.e+3 * centimeter3
L = liter
dL = 1.e-1 * liter
cL = 1.e-2 * liter
mL = 1.e-3 * liter
# symbols
mm = millimeter
mm2 = millimeter2
......@@ -139,12 +145,14 @@ megahertz = 1.e+6 * hertz
ns = nanosecond
s = second
ms = millisecond
us = microsecond
ps = picosecond
#
# Electric charge [Q]
#
eplus = 1. # positron charge
e_SI = 1.60217733e-19 # positron charge in coulomb
e_SI = 1.602176487e-19 # positron charge in coulomb
coulomb = eplus / e_SI # coulomb = 6.24150 e+18 * eplus
#
......@@ -262,11 +270,26 @@ mole = 1.
#
becquerel = 1. / second
curie = 3.7e+10 * becquerel
kilobecquerel = 1.e+3 * becquerel
megabecquerel = 1.e+6 * becquerel
gigabecquerel = 1.e+9 * becquerel
millicurie = 1.e-3 * curie
microcurie = 1.e-6 * curie
Bq = becquerel
kBq = kilobecquerel
MBq = megabecquerel
GBq = gigabecquerel
Ci = curie
mCi = millicurie
uCi = microcurie
#
# Absorbed dose [L^2][T^-2]
#
gray = joule / kilogram
kilogray = 1.e+3 * gray
milligray = 1.e-3 * gray
microgray = 1.e-6 * gray
#
# Luminous intensity [I]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment