Changeset 1430 for trunk/WuerzburgSoft/Thomas
- Timestamp:
- 07/24/02 10:11:36 (22 years ago)
- Location:
- trunk/WuerzburgSoft/Thomas/mphys
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc
r1428 r1430 30 30 #include "MElectron.h" 31 31 32 #include <math.h> // for aqlphas 32 33 #include <iostream.h> 33 34 … … 52 53 } 53 54 54 Double_t DiSum(Double_t *x, Double_t *k=NULL)55 Double_t MElectron::DiSum(Double_t *x, Double_t *k) 55 56 { 56 57 Double_t t = x[0]; … … 78 79 } 79 80 80 Double_t MElectron::Li2(Double_t *x, Double_t *k =NULL)81 Double_t MElectron::Li2(Double_t *x, Double_t *k) 81 82 { 82 83 // … … 100 101 } 101 102 102 Double_t MElectron::Flim(Double_t *x, Double_t *k =NULL) // F(omegap)-F(omegam) mit b-->1 (Maple)103 Double_t MElectron::Flim(Double_t *x, Double_t *k) // F(omegap)-F(omegam) mit b-->1 (Maple) 103 104 { 104 105 const Double_t w = x[0]; … … 134 135 } 135 136 136 Double_t MElectron::InteractionLength(Double_t *E, Double_t *k =NULL)137 Double_t MElectron::InteractionLength(Double_t *E, Double_t *k) 137 138 { 138 139 // E = electron energy, ~ TeV(?) 1e12 … … 205 206 // -------------------------------------------------------------------------- 206 207 207 inlineDouble_t MElectron::p_e(Double_t *x, Double_t *k)208 /*inline*/ Double_t MElectron::p_e(Double_t *x, Double_t *k) 208 209 { 209 210 Double_t e = pow(10, x[0]); -
trunk/WuerzburgSoft/Thomas/mphys/MElectron.h
r1370 r1430 21 21 // ---------------------------------------------------------------- 22 22 23 static Double_t DiSum(Double_t *x, Double_t *k=NULL); 23 24 static Double_t Li(Double_t *x, Double_t *k); 24 25 static Double_t Li2(Double_t *x, Double_t *k=NULL); -
trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc
r1428 r1430 79 79 TH2D *hist2; 80 80 81 Double_t MParticle::Planck(Double_t *x, Double_t *k =NULL)81 Double_t MParticle::Planck(Double_t *x, Double_t *k) 82 82 { 83 83 static Bool_t isloaded = kFALSE; … … 91 91 Double_t konst = 4.*TMath::Pi() * 2. / (hc*hc*hc); 92 92 93 ifstream fin(" background.txt");93 ifstream fin("mphys/background.txt"); 94 94 95 95 hist2 = new TH2D; -
trunk/WuerzburgSoft/Thomas/mphys/MPhoton.cc
r1428 r1430 39 39 ClassImp(MPhoton); 40 40 41 Double_t MPhoton::Sigma_gg(Double_t *x, Double_t *k =NULL)41 Double_t MPhoton::Sigma_gg(Double_t *x, Double_t *k) 42 42 { 43 43 const Double_t m2 = x[0]; // m2: (E0/sqrt(s))^2 … … 63 63 } 64 64 65 Double_t MPhoton::Int1(Double_t *x, Double_t *k =NULL)65 Double_t MPhoton::Int1(Double_t *x, Double_t *k) 66 66 { 67 67 const Double_t costheta = x[0]; … … 108 108 // Returns 0 in case IL becomes (numerically) infinite. 109 109 // 110 Double_t MPhoton::InteractionLength(Double_t *x, Double_t *k =NULL)110 Double_t MPhoton::InteractionLength(Double_t *x, Double_t *k) 111 111 { 112 112 Double_t E0 = 511e-6; // [GeV] -
trunk/WuerzburgSoft/Thomas/mphys/phys.C
r1429 r1430 137 137 Double_t R = MParticle::RofZ(&startz); // [kpc] 138 138 139 const char *filename = " delme3H.root";139 const char *filename = "cascade_0.03_24_1e2_1e6_256_1.root"; 140 140 141 141 const Double_t B = 0; // [T] mean magnetic field 142 142 143 Double_t runtime = 8*60*60; // [s] maximum time to run the simulation143 Double_t runtime = 3.5*60*60; // [s] maximum time to run the simulation 144 144 145 145 Int_t nbins = 24; // number of bins produced in energy spectrum … … 157 157 cout << "R = " << R << "kpc" << endl; 158 158 cout << "Z = " << startz << endl; 159 160 cout << "Setting up: Histograms... " << flush; 159 161 160 162 MPairProduction pair; … … 209 211 // ------------------------------ 210 212 211 void *ptr = NULL; 213 cout << "Output File... " << flush; 214 212 215 TFile file(filename, "RECREATE", "Intergalactic cascade", 9); 216 cout << "Trees... " << flush; 213 217 TTree *T1 = new TTree ("Photons", "Photons from Cascade"); 214 218 TTree *T2 = new TTree ("Electrons", "Electrons in the Cascade"); 219 cout << "Branches... " << flush; 220 MPhoton dummyp; 221 void *ptr = &dummyp; 215 222 TBranch *B1 = T1->Branch("MPhoton.", "MPhoton", &ptr); 223 MPhoton dummye; 224 ptr = &dummye; 216 225 TBranch *B2 = T2->Branch("MElectron.", "MElectron", &ptr); 217 226 218 227 // ------------------------------ 228 229 cout << "Timers... " << flush; 219 230 220 231 TTimer timer("gSystem->ProcessEvents();", 250, kFALSE); … … 223 234 TStopwatch clock; 224 235 clock.Start(); 236 237 cout << "Done. " << endl; 225 238 226 239 Int_t n=0; … … 339 352 340 353 cout << ":" << flush; 341 int test = counter<0 ? -1 : counter;342 while (test<0 ? true : (test++< 256))354 int test = counter<0 ? -1 : 0; 355 while (test<0 ? true : (test++<counter)) 343 356 { 344 357
Note:
See TracChangeset
for help on using the changeset viewer.