Changeset 1367
- Timestamp:
- 06/14/02 10:41:23 (23 years ago)
- Location:
- trunk/WuerzburgSoft/Thomas/mphys
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WuerzburgSoft/Thomas/mphys/Changelog
r1364 r1367 8 8 - changed the eps of all integrals to 1e-2 9 9 - changed the p_e function to use the Compton function 10 - made all function which are used for integration only static 11 and changed the function definition from=0, to=0 10 12 11 13 * MPhoton.[h,cc]: … … 25 27 * phys.C: 26 28 - changed the integral eps to 1e-2 29 - small changed to the output 30 - removed integral==0, replaced by Ep==pow(10,0) 27 31 28 32 -
trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc
r1364 r1367 90 90 return DiSum(x); 91 91 92 TF1 IntLi("Li", Li, 0, z, 0); 92 // TF1 IntLi("Li", Li, 0, z, 0); 93 static TF1 IntLi("Li", Li, 0, 0, 0); 93 94 const Double_t integ = IntLi.Integral(0, z, (Double_t*)NULL, 1e-2); 94 95 return -integ; … … 160 161 const Double_t z = k ? k[0] : 0; 161 162 162 Double_t val[3] = { E[0], z }; // E[GeV]163 164 const Double_t from = 1e-17;165 const Double_t to = 1e-11;166 167 163 /* -------------- old ---------------- 168 164 Double_t from = 1e-15; … … 171 167 ----------------------------------- 172 168 */ 173 TF1 func("Compton", Compton, from, to, 2); // [0, inf] 169 static TF1 func("Compton", Compton, 0, 0, 2); // [0, inf] 170 171 const Double_t from = 1e-17; 172 const Double_t to = 1e-11; 173 174 Double_t val[3] = { E[0], z }; // E[GeV] 174 175 175 176 Double_t integ = func.Integral(from, to, val, 1e-2); // [Gev] [0, inf] … … 260 261 const Double_t Gamma = 4.*omega; 261 262 262 // --old-- fQ.SetRange(1e-6, 1./(1.+ 2.*Gamma));263 263 fQ.SetParameter(0, Gamma); 264 264 -
trunk/WuerzburgSoft/Thomas/mphys/MPairProduction.cc
r1363 r1367 16 16 ! 17 17 ! 18 ! Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de) 19 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de) 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 20 19 ! 21 ! Copyright: MAGIC Software Development, 2000-200 120 ! Copyright: MAGIC Software Development, 2000-2002 22 21 ! 23 22 ! -
trunk/WuerzburgSoft/Thomas/mphys/MPhoton.cc
r1364 r1367 92 92 Double_t val[2] = { Eg, Ep }; 93 93 94 const Double_t from = -1.0; 95 const Double_t to = 1.-E0*E0/(2.*Eg*Ep); // Originally Was: 1. 94 static TF1 f("int1", Int1, 0, 0, 2); 96 95 97 TF1 f("int1", Int1, from, to, 2);98 96 const Double_t from = -1.0; 97 const Double_t to = 1.-E0*E0/(2.*Eg*Ep); // Originally Was: 1. 99 98 const Double_t int1 = f.Integral(from, to, val, 1e-2); // [m^2] 100 const Double_t planck = MParticle::Planck(&Ep, &z); // [GeV^2]99 const Double_t planck = MParticle::Planck(&Ep, &z); // [GeV^2] 101 100 102 101 const Double_t res = planck * int1; … … 124 123 Double_t val[2] = { Eg, z }; 125 124 125 static TF1 f("int2", Int2, 0, 0, 2); 126 126 127 Double_t lolim = E0*E0/Eg; 127 128 Double_t inf = Eg<1e6 ? 3e-11*(z+1) : 3e-12*(z+1); 128 129 TF1 f("int2", Int2, lolim, inf, 2); 130 131 Double_t int2 = f.Integral(lolim, inf, val, 1e-2); //[GeV^3 m^2] 129 Double_t int2 = f.Integral(lolim, inf, val, 1e-2); //[GeV^3 m^2] 132 130 133 131 if (int2==0) -
trunk/WuerzburgSoft/Thomas/mphys/phys.C
r1366 r1367 61 61 TF1 func("RndTheta", Sbar_sigmas, 0, log10(f), 0); 62 62 63 func.SetNpx(50); 64 63 65 Double_t sbar = pow(10, func.GetRandom()); 64 66 Double_t theta = acos(1.-sbar*2/f); … … 116 118 void DoIt() 117 119 { 118 Double_t startz = 0.003; //MParticle::ZofR(&R);119 Double_t R = MParticle::RofZ(&startz); // [kpc]120 Double_t R = 100; //MParticle::RofZ(&startz); // [kpc] 121 Double_t startz = MParticle::ZofR(&R); 120 122 121 123 cout << "R = " << R << "kpc" << endl; … … 127 129 Double_t runtime = 15*60; // [s] 128 130 129 Double_t lo = 1e4; 131 Double_t lo = 1e4; 130 132 Double_t hi = 1e11; 131 133 Double_t alpha = -2; … … 274 276 phot.SetParameter(0, Eg); 275 277 phot.SetParameter(1, p->GetZ()); 278 /* 276 279 if (phot.Integral(-log10(Eg)-8, -10.5, (Double_t*)NULL, 1e-2)==0) 277 280 { … … 279 282 continue; 280 283 } 281 284 */ 282 285 Double_t Ep = pow(10, phot.GetRandom()); 286 if (Ep==pow(10,0)) 287 { 288 cout << "z" << flush; 289 continue; 290 } 283 291 Double_t theta = RandomTheta(Eg, Ep); 284 292 if (theta==0) … … 339 347 else 340 348 { 341 cout << "i" << flush; // ignored 349 if (p->GetEnergy()<=lo) 350 cout << "e" << flush; 351 else 352 cout << "t" << flush; // ignored 342 353 delete p; 343 354 } … … 374 385 375 386 cout << "Created " << n << " gammas from source with E^" << alpha << endl; 376 cout << "Process ed " << Form("%.1f", n/(TStopwatch::GetRealTime()-starttime)) << " gammas/sec." << endl;387 cout << "Processing time: " << Form("%.1f", (TStopwatch::GetRealTime()-starttime)/n) << " sec/gamma." << endl; 377 388 378 389 // ------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.