Commit df5be864 authored by Lynn Garren's avatar Lynn Garren
Browse files

Merge branch 'gcosmo/CLHEP-si_units' into develop

parents 8ccf3485 c821ee36
......@@ -44,8 +44,8 @@ namespace CLHEP {
* @ingroup random
*/
typedef unsigned long int myID_t;
typedef unsigned long long int myuint_t;
using myID_t = std::uint32_t;
using myuint_t = unsigned long long int;
class MixMaxRng: public HepRandomEngine {
......
......@@ -225,24 +225,24 @@ void MixMaxRng::setSeed(long longSeed, int /* extraSeed */)
void MixMaxRng::setSeeds(const long* Seeds, int seedNum)
{
unsigned long seed0, seed1= 0, seed2= 0, seed3= 0;
myID_t seed0, seed1= 0, seed2= 0, seed3= 0;
if( seedNum < 1 ) { // Assuming at least 2 seeds in vector...
seed0= static_cast<unsigned long>(Seeds[0]) & MASK32;
seed1= static_cast<unsigned long>(Seeds[1]) & MASK32;
seed0= static_cast<myID_t>(Seeds[0]) & MASK32;
seed1= static_cast<myID_t>(Seeds[1]) & MASK32;
}
else
{
if( seedNum < 4 ) {
seed0= static_cast<unsigned long>(Seeds[0]) & MASK32;
if( seedNum > 1){ seed1= static_cast<unsigned long>(Seeds[1]) & MASK32; }
if( seedNum > 2){ seed2= static_cast<unsigned long>(Seeds[2]) & MASK32; }
seed0= static_cast<myID_t>(Seeds[0]) & MASK32;
if( seedNum > 1){ seed1= static_cast<myID_t>(Seeds[1]) & MASK32; }
if( seedNum > 2){ seed2= static_cast<myID_t>(Seeds[2]) & MASK32; }
}
if( seedNum >= 4 ) {
seed0= static_cast<unsigned long>(Seeds[0]) & MASK32;
seed1= static_cast<unsigned long>(Seeds[1]) & MASK32;
seed2= static_cast<unsigned long>(Seeds[2]) & MASK32;
seed3= static_cast<unsigned long>(Seeds[3]) & MASK32;
seed0= static_cast<myID_t>(Seeds[0]) & MASK32;
seed1= static_cast<myID_t>(Seeds[1]) & MASK32;
seed2= static_cast<myID_t>(Seeds[2]) & MASK32;
seed3= static_cast<myID_t>(Seeds[3]) & MASK32;
}
}
theSeed = Seeds[0];
......
......@@ -35,6 +35,7 @@
// and pressure; also added Gas threshold.
// 29.04.08 use PDG 2006 values
// 03.11.08 use PDG 2008 values
// 17.07.20 use PDG 2019 values
#ifndef HEP_PHYSICAL_CONSTANTS_H
#define HEP_PHYSICAL_CONSTANTS_H
......@@ -47,7 +48,7 @@ namespace CLHEP {
//
//
//
static constexpr double Avogadro = 6.02214179e+23/mole;
static constexpr double Avogadro = 6.02214076e+23/mole;
//
// c = 299.792458 mm/ns
......@@ -61,7 +62,7 @@ static constexpr double c_squared = c_light * c_light;
// hbar = 6.58212e-13 MeV*ns
// hbarc = 197.32705e-12 MeV*mm
//
static constexpr double h_Planck = 6.62606896e-34 * joule*s;
static constexpr double h_Planck = 6.62607015e-34 * joule*s;
static constexpr double hbar_Planck = h_Planck/twopi;
static constexpr double hbarc = hbar_Planck * c_light;
static constexpr double hbarc_squared = hbarc * hbarc;
......@@ -109,7 +110,7 @@ static constexpr double twopi_mc2_rcl2 = twopi*electron_mass_c2
//
//
//
static constexpr double k_Boltzmann = 8.617343e-11 * MeV/kelvin;
static constexpr double k_Boltzmann = 8.617333e-11 * MeV/kelvin;
//
//
......
......@@ -42,6 +42,7 @@
// 03.11.08 use PDG 2008 value of e_SI
// 19.08.15 added liter and its sub units (mma)
// 12.01.16 added symbols for microsecond (us) and picosecond (ps) (mma)
// 17.07.20 use PDG 2019 value of e_SI
#ifndef HEP_SYSTEM_OF_UNITS_H
#define HEP_SYSTEM_OF_UNITS_H
......@@ -157,7 +158,7 @@ namespace CLHEP {
// Electric charge [Q]
//
static constexpr double eplus = 1. ;// positron charge
static constexpr double e_SI = 1.602176487e-19;// positron charge in coulomb
static constexpr double e_SI = 1.602176634e-19;// positron charge in coulomb
static constexpr double coulomb = eplus/e_SI;// coulomb = 6.24150 e+18 * eplus
//
......
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