// ESAF : Euso Simulation and Analysis Framework // $Id: EConst.hh,v 1.10 2005/10/21 13:28:28 moreggia Exp $ // A.Thea created Dec, 4 2003 // // Encapsulate useful constants // #ifndef __ECONST_HH__ #define __ECONST_HH__ #include "euso.hh" #include "ESystemOfUnits.hh" #include #include "TMath.h" namespace EConst { // atomic mass as a function of atom's name Double_t AtomicMass(const string type); // velocity of light inline Double_t Clight() { return 2.99792458e8*sou::m/sou::s; } // m s^-1 // velocity of light inline Double_t Csquared() { return Clight()*Clight(); } // electron charge inline Double_t ElectronCharge() { return 1.60217653E-19; } // Earth radius inline Double_t EarthRadius() { return 6.370949e6*sou::m; } // m // Avogadro number inline Double_t Avogadro() { return 6.0221367e+23/sou::mole; } // Plank constant inline Double_t Hplanck() { return 6.6260755e-34 * sou::joule*sou::s; } // Plank constant inline Double_t H_bar() { return Hplanck()/TMath::TwoPi(); } // Plank constant inline Double_t HbarC() { return H_bar()*Clight(); } // Boltzmann constant inline Double_t kBoltzmann() { return 1.3806505e-23 * sou::joule/sou::kelvin; } // R (ideal gas law, Pv=nRT) inline Double_t R_ideal() {return Avogadro()*kBoltzmann();} // Loschmidt's number (= no. of air molecules/cm3 @ STP) inline Double_t Loschmidt() {return 2.687e19 / sou::cm3; } inline Double_t STP_Temperature() { return 273.15*sou::kelvin; } inline Double_t STP_Pressure() { return 1.*sou::atmosphere; } inline Double_t kGasThreshold() { return 10.*sou::mg/sou::cm3; } inline Double_t ElectronMassC2() { return 0.51099906 * sou::MeV; } inline Double_t ProtonMassC2() { return 938.27231 * sou::MeV; } inline Double_t NeutronMassC2() { return 939.56563 * sou::MeV; } // amu_c2 - atomic equivalent mass unit inline Double_t AmuC2() { return 931.49432 * sou::MeV; } // get the Cerenkov yield integrated on an energy distribution inline Double_t Amu() { return AmuC2()/Clight(); } inline Double_t Esquared() { return sou::eplus * sou::eplus; } // permeability of free space mu0 = 2.01334e-16 Mev*(ns*eplus)^2/mm inline Double_t Mu0() { return 4*TMath::Pi()*1.e-7 * sou::henry/sou::m; } // permittivity of free space epsil0 = 5.52636e+10 eplus^2/(MeV*mm) inline Double_t Epsilon0() { return 1./(Csquared()*Mu0()); } // electromagnetic coupling = 1.43996e-12 MeV*mm/(eplus^2) inline Double_t ElmCoupling() { return Esquared()/(4*TMath::Pi()*Epsilon0()); } inline Double_t FineStructureConst() { return ElmCoupling()/HbarC(); } inline Double_t ClassicElectrRadius() { return ElmCoupling()/ElectronMassC2(); } inline Double_t ElectronComptonLength() { return HbarC()/ElectronMassC2(); } inline Double_t BohrRadius() { return ElectronComptonLength()/FineStructureConst(); } } #endif /* __ECONST_HH__ */