source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/common/base/include/EConst.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 3.0 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: EConst.hh 2248 2005-10-21 13:30:08Z moreggia $
3// A.Thea created Dec,  4 2003
4//
5// Encapsulate useful constants
6//
7
8#ifndef __ECONST_HH__
9#define __ECONST_HH__
10
11#include "euso.hh"
12#include "ESystemOfUnits.hh"
13#include <string>
14#include "TMath.h"
15
16namespace EConst {
17    // atomic mass as a function of atom's name
18    Double_t AtomicMass(const string type);
19
20    // velocity of light
21    inline Double_t Clight() { return 2.99792458e8*sou::m/sou::s; }        // m s^-1
22
23    // velocity of light
24    inline Double_t Csquared() { return Clight()*Clight(); }
25   
26    // electron charge
27    inline Double_t ElectronCharge() { return 1.60217653E-19; }
28
29    // Earth radius
30    inline Double_t EarthRadius() { return 6.370949e6*sou::m; }      // m
31
32    // Avogadro number
33    inline Double_t Avogadro() { return 6.0221367e+23/sou::mole; }
34
35    // Plank constant
36    inline Double_t Hplanck() { return 6.6260755e-34 * sou::joule*sou::s; }
37
38    // Plank constant
39    inline Double_t H_bar() { return Hplanck()/TMath::TwoPi(); }
40
41    // Plank constant
42    inline Double_t HbarC() { return H_bar()*Clight(); }
43
44    // Boltzmann constant
45    inline Double_t kBoltzmann() { return 1.3806505e-23 * sou::joule/sou::kelvin; }
46
47    // R (ideal gas law, Pv=nRT)
48    inline Double_t R_ideal()  {return Avogadro()*kBoltzmann();}
49
50    // Loschmidt's number (= no. of air molecules/cm3 @ STP)
51    inline Double_t Loschmidt() {return 2.687e19 / sou::cm3; }
52
53    inline Double_t STP_Temperature() { return 273.15*sou::kelvin; }
54    inline Double_t STP_Pressure() { return 1.*sou::atmosphere; }
55    inline Double_t kGasThreshold() { return 10.*sou::mg/sou::cm3; }
56
57    inline Double_t ElectronMassC2() { return 0.51099906 * sou::MeV; }
58    inline Double_t   ProtonMassC2() { return 938.27231 * sou::MeV; }
59    inline Double_t  NeutronMassC2() { return 939.56563 * sou::MeV; }
60
61    // amu_c2 - atomic equivalent mass unit
62    inline Double_t          AmuC2() { return 931.49432 * sou::MeV; }
63
64    // get the Cerenkov yield integrated on an energy distribution
65    inline Double_t            Amu() { return AmuC2()/Clight(); }
66
67    inline Double_t Esquared() { return sou::eplus * sou::eplus; }
68
69    // permeability of free space mu0    = 2.01334e-16 Mev*(ns*eplus)^2/mm
70    inline Double_t Mu0() { return 4*TMath::Pi()*1.e-7 * sou::henry/sou::m; }
71   
72    // permittivity of free space epsil0 = 5.52636e+10 eplus^2/(MeV*mm)
73    inline Double_t Epsilon0() { return 1./(Csquared()*Mu0()); }
74
75    // electromagnetic coupling = 1.43996e-12 MeV*mm/(eplus^2)
76    inline Double_t ElmCoupling() { return Esquared()/(4*TMath::Pi()*Epsilon0()); }
77    inline Double_t FineStructureConst() { return ElmCoupling()/HbarC(); }
78    inline Double_t ClassicElectrRadius() { return ElmCoupling()/ElectronMassC2(); }
79    inline Double_t ElectronComptonLength() { return HbarC()/ElectronMassC2(); }
80    inline Double_t BohrRadius() { return ElectronComptonLength()/FineStructureConst(); }
81   
82
83}
84
85#endif  /* __ECONST_HH__ */
86
Note: See TracBrowser for help on using the repository browser.