Index: /trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc
===================================================================
--- /trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc	(revision 1429)
+++ /trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc	(revision 1430)
@@ -30,4 +30,5 @@
 #include "MElectron.h"
 
+#include <math.h>     // for aqlphas
 #include <iostream.h>
 
@@ -52,5 +53,5 @@
 }
 
-Double_t DiSum(Double_t *x, Double_t *k=NULL)
+Double_t MElectron::DiSum(Double_t *x, Double_t *k)
 {
     Double_t t = x[0];
@@ -78,5 +79,5 @@
 }
 
-Double_t MElectron::Li2(Double_t *x, Double_t *k=NULL)
+Double_t MElectron::Li2(Double_t *x, Double_t *k)
 {
     //
@@ -100,5 +101,5 @@
 }
 
-Double_t MElectron::Flim(Double_t *x, Double_t *k=NULL) // F(omegap)-F(omegam)  mit  b-->1   (Maple)
+Double_t MElectron::Flim(Double_t *x, Double_t *k) // F(omegap)-F(omegam)  mit  b-->1   (Maple)
 {
     const Double_t w = x[0];
@@ -134,5 +135,5 @@
 }
 
-Double_t MElectron::InteractionLength(Double_t *E, Double_t *k=NULL)
+Double_t MElectron::InteractionLength(Double_t *E, Double_t *k)
 {
     // E    = electron energy,          ~  TeV(?)  1e12
@@ -205,5 +206,5 @@
 // --------------------------------------------------------------------------
 
-inline Double_t MElectron::p_e(Double_t *x, Double_t *k)
+/*inline*/ Double_t MElectron::p_e(Double_t *x, Double_t *k)
 {
     Double_t e = pow(10, x[0]);
Index: /trunk/WuerzburgSoft/Thomas/mphys/MElectron.h
===================================================================
--- /trunk/WuerzburgSoft/Thomas/mphys/MElectron.h	(revision 1429)
+++ /trunk/WuerzburgSoft/Thomas/mphys/MElectron.h	(revision 1430)
@@ -21,4 +21,5 @@
     // ----------------------------------------------------------------
 
+    static Double_t DiSum(Double_t *x, Double_t *k=NULL);
     static Double_t Li(Double_t *x, Double_t *k);
     static Double_t Li2(Double_t *x, Double_t *k=NULL);
Index: /trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc
===================================================================
--- /trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc	(revision 1429)
+++ /trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc	(revision 1430)
@@ -79,5 +79,5 @@
 TH2D *hist2;
 
-Double_t MParticle::Planck(Double_t *x, Double_t *k=NULL)
+Double_t MParticle::Planck(Double_t *x, Double_t *k)
 {
     static Bool_t isloaded = kFALSE;
@@ -91,5 +91,5 @@
         Double_t konst = 4.*TMath::Pi() * 2. / (hc*hc*hc);
 
-        ifstream fin("background.txt");
+        ifstream fin("mphys/background.txt");
 
         hist2 = new TH2D;
Index: /trunk/WuerzburgSoft/Thomas/mphys/MPhoton.cc
===================================================================
--- /trunk/WuerzburgSoft/Thomas/mphys/MPhoton.cc	(revision 1429)
+++ /trunk/WuerzburgSoft/Thomas/mphys/MPhoton.cc	(revision 1430)
@@ -39,5 +39,5 @@
 ClassImp(MPhoton);
 
-Double_t MPhoton::Sigma_gg(Double_t *x, Double_t *k=NULL)
+Double_t MPhoton::Sigma_gg(Double_t *x, Double_t *k)
 {
     const Double_t m2 = x[0]; // m2: (E0/sqrt(s))^2
@@ -63,5 +63,5 @@
 }
 
-Double_t MPhoton::Int1(Double_t *x, Double_t *k=NULL)
+Double_t MPhoton::Int1(Double_t *x, Double_t *k)
 {
     const Double_t costheta = x[0];
@@ -108,5 +108,5 @@
 // Returns 0 in case IL becomes (numerically) infinite.
 //
-Double_t MPhoton::InteractionLength(Double_t *x, Double_t *k=NULL)
+Double_t MPhoton::InteractionLength(Double_t *x, Double_t *k)
 {
     Double_t E0 = 511e-6;                  // [GeV]
Index: /trunk/WuerzburgSoft/Thomas/mphys/phys.C
===================================================================
--- /trunk/WuerzburgSoft/Thomas/mphys/phys.C	(revision 1429)
+++ /trunk/WuerzburgSoft/Thomas/mphys/phys.C	(revision 1430)
@@ -137,9 +137,9 @@
     Double_t R      = MParticle::RofZ(&startz); // [kpc]
 
-    const char *filename = "delme3H.root";
+    const char *filename = "cascade_0.03_24_1e2_1e6_256_1.root";
 
     const Double_t B = 0; // [T] mean magnetic field
 
-    Double_t runtime = 8*60*60; // [s] maximum time to run the simulation
+    Double_t runtime = 3.5*60*60; // [s] maximum time to run the simulation
 
     Int_t nbins = 24;     // number of bins produced in energy spectrum
@@ -157,4 +157,6 @@
     cout << "R = " << R << "kpc" << endl;
     cout << "Z = " << startz << endl;
+
+    cout << "Setting up: Histograms... " << flush;
 
     MPairProduction pair;
@@ -209,12 +211,21 @@
     // ------------------------------
 
-    void *ptr = NULL;
+    cout << "Output File... " << flush;
+
     TFile file(filename, "RECREATE", "Intergalactic cascade", 9);
+    cout << "Trees... " << flush;
     TTree   *T1 = new TTree ("Photons",    "Photons from Cascade");
     TTree   *T2 = new TTree ("Electrons",  "Electrons in the Cascade");
+    cout << "Branches... " << flush;
+    MPhoton dummyp;
+    void *ptr = &dummyp;
     TBranch *B1 = T1->Branch("MPhoton.",   "MPhoton",   &ptr);
+    MPhoton dummye;
+    ptr = &dummye;
     TBranch *B2 = T2->Branch("MElectron.", "MElectron", &ptr);
 
     // ------------------------------
+
+    cout << "Timers... " << flush;
 
     TTimer timer("gSystem->ProcessEvents();", 250, kFALSE);
@@ -223,4 +234,6 @@
     TStopwatch clock;
     clock.Start();
+
+    cout << "Done. " << endl;
 
     Int_t n=0;
@@ -339,6 +352,6 @@
 
                 cout << ":" << flush;
-                int test = counter<0 ? -1 : counter;
-                while (test<0 ? true : (test++<256))
+                int test = counter<0 ? -1 : 0;
+                while (test<0 ? true : (test++<counter))
                 {
 
