Changeset 1364 for trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc
- Timestamp:
- 06/14/02 09:03:11 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc
r1359 r1364 71 71 Double_t z1 = x[0] + 1; 72 72 73 const Double_t c = 299792458; // [m/s]74 const Double_t H0 = 50./3.0857e19; // [km / Mpc s] --> [s^-1]75 76 const Double_t ly = 3600.*24.*365.*c; // [m/ly]77 const Double_t pc = 1./3.258; // [pc/ly]73 const Double_t c = 299792458; // [m/s] 74 const Double_t H0 = 50./3.0857e19; // [km / Mpc s] --> [s^-1] 75 76 const Double_t ly = 3600.*24.*365.*c; // [m/ly] 77 const Double_t pc = 1./3.258; // [pc/ly] 78 78 79 79 const Double_t R = c/H0 * 2 * (1 - 1./sqrt(z1)); // [m] 80 80 81 return R * pc/ly/1e3; // [kpc] 81 return R * pc/ly/1e3; // [kpc] 82 } 83 84 Double_t MParticle::Planck(Double_t *x, Double_t *k) 85 { 86 // 87 // Planck, per unit volume, per unit energy 88 // 89 // constants (see below) moved out of function 90 // 91 const Double_t E = x[0]; // [GeV] 92 const Double_t z = k ? k[0] : 0; 93 94 const Double_t T = 2.96*(z+1); // [K] 95 const Double_t e = 1.602176462e-19; // [C] 96 const Double_t kB = 1e-9/e*1.3806503e-23; // [GeV/K] 97 98 const Double_t EkT = E/kB/T; 99 100 /* 101 //Double_t c = 299792458; // [m/s] 102 //Double_t h = 1e-9/e*6.62606876e-34; // [GeVs] 103 //Double_t hc = h*c; // [GeVm] 104 Double_t konst = 4.*TMath::Pi() * 2. / (hc*hc*hc); 105 return konst * E*E / (exp(EkT)-1.); // [1 / GeV / m^3 ] 106 */ 107 108 return E*E / (exp(EkT)-1.); // [GeV^2] 109 82 110 } 83 111
Note:
See TracChangeset
for help on using the changeset viewer.