Ignore:
Timestamp:
07/24/02 10:11:36 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/WuerzburgSoft/Thomas/mphys
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc

    r1428 r1430  
    3030#include "MElectron.h"
    3131
     32#include <math.h>     // for aqlphas
    3233#include <iostream.h>
    3334
     
    5253}
    5354
    54 Double_t DiSum(Double_t *x, Double_t *k=NULL)
     55Double_t MElectron::DiSum(Double_t *x, Double_t *k)
    5556{
    5657    Double_t t = x[0];
     
    7879}
    7980
    80 Double_t MElectron::Li2(Double_t *x, Double_t *k=NULL)
     81Double_t MElectron::Li2(Double_t *x, Double_t *k)
    8182{
    8283    //
     
    100101}
    101102
    102 Double_t MElectron::Flim(Double_t *x, Double_t *k=NULL) // F(omegap)-F(omegam)  mit  b-->1   (Maple)
     103Double_t MElectron::Flim(Double_t *x, Double_t *k) // F(omegap)-F(omegam)  mit  b-->1   (Maple)
    103104{
    104105    const Double_t w = x[0];
     
    134135}
    135136
    136 Double_t MElectron::InteractionLength(Double_t *E, Double_t *k=NULL)
     137Double_t MElectron::InteractionLength(Double_t *E, Double_t *k)
    137138{
    138139    // E    = electron energy,          ~  TeV(?)  1e12
     
    205206// --------------------------------------------------------------------------
    206207
    207 inline Double_t MElectron::p_e(Double_t *x, Double_t *k)
     208/*inline*/ Double_t MElectron::p_e(Double_t *x, Double_t *k)
    208209{
    209210    Double_t e = pow(10, x[0]);
  • trunk/WuerzburgSoft/Thomas/mphys/MElectron.h

    r1370 r1430  
    2121    // ----------------------------------------------------------------
    2222
     23    static Double_t DiSum(Double_t *x, Double_t *k=NULL);
    2324    static Double_t Li(Double_t *x, Double_t *k);
    2425    static Double_t Li2(Double_t *x, Double_t *k=NULL);
  • trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc

    r1428 r1430  
    7979TH2D *hist2;
    8080
    81 Double_t MParticle::Planck(Double_t *x, Double_t *k=NULL)
     81Double_t MParticle::Planck(Double_t *x, Double_t *k)
    8282{
    8383    static Bool_t isloaded = kFALSE;
     
    9191        Double_t konst = 4.*TMath::Pi() * 2. / (hc*hc*hc);
    9292
    93         ifstream fin("background.txt");
     93        ifstream fin("mphys/background.txt");
    9494
    9595        hist2 = new TH2D;
  • trunk/WuerzburgSoft/Thomas/mphys/MPhoton.cc

    r1428 r1430  
    3939ClassImp(MPhoton);
    4040
    41 Double_t MPhoton::Sigma_gg(Double_t *x, Double_t *k=NULL)
     41Double_t MPhoton::Sigma_gg(Double_t *x, Double_t *k)
    4242{
    4343    const Double_t m2 = x[0]; // m2: (E0/sqrt(s))^2
     
    6363}
    6464
    65 Double_t MPhoton::Int1(Double_t *x, Double_t *k=NULL)
     65Double_t MPhoton::Int1(Double_t *x, Double_t *k)
    6666{
    6767    const Double_t costheta = x[0];
     
    108108// Returns 0 in case IL becomes (numerically) infinite.
    109109//
    110 Double_t MPhoton::InteractionLength(Double_t *x, Double_t *k=NULL)
     110Double_t MPhoton::InteractionLength(Double_t *x, Double_t *k)
    111111{
    112112    Double_t E0 = 511e-6;                  // [GeV]
  • trunk/WuerzburgSoft/Thomas/mphys/phys.C

    r1429 r1430  
    137137    Double_t R      = MParticle::RofZ(&startz); // [kpc]
    138138
    139     const char *filename = "delme3H.root";
     139    const char *filename = "cascade_0.03_24_1e2_1e6_256_1.root";
    140140
    141141    const Double_t B = 0; // [T] mean magnetic field
    142142
    143     Double_t runtime = 8*60*60; // [s] maximum time to run the simulation
     143    Double_t runtime = 3.5*60*60; // [s] maximum time to run the simulation
    144144
    145145    Int_t nbins = 24;     // number of bins produced in energy spectrum
     
    157157    cout << "R = " << R << "kpc" << endl;
    158158    cout << "Z = " << startz << endl;
     159
     160    cout << "Setting up: Histograms... " << flush;
    159161
    160162    MPairProduction pair;
     
    209211    // ------------------------------
    210212
    211     void *ptr = NULL;
     213    cout << "Output File... " << flush;
     214
    212215    TFile file(filename, "RECREATE", "Intergalactic cascade", 9);
     216    cout << "Trees... " << flush;
    213217    TTree   *T1 = new TTree ("Photons",    "Photons from Cascade");
    214218    TTree   *T2 = new TTree ("Electrons",  "Electrons in the Cascade");
     219    cout << "Branches... " << flush;
     220    MPhoton dummyp;
     221    void *ptr = &dummyp;
    215222    TBranch *B1 = T1->Branch("MPhoton.",   "MPhoton",   &ptr);
     223    MPhoton dummye;
     224    ptr = &dummye;
    216225    TBranch *B2 = T2->Branch("MElectron.", "MElectron", &ptr);
    217226
    218227    // ------------------------------
     228
     229    cout << "Timers... " << flush;
    219230
    220231    TTimer timer("gSystem->ProcessEvents();", 250, kFALSE);
     
    223234    TStopwatch clock;
    224235    clock.Start();
     236
     237    cout << "Done. " << endl;
    225238
    226239    Int_t n=0;
     
    339352
    340353                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))
    343356                {
    344357
Note: See TracChangeset for help on using the changeset viewer.