Changeset 1613


Ignore:
Timestamp:
11/14/02 17:13:46 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc

    r1610 r1613  
    3636
    3737#include "MH.h"
     38#include "MBinning.h"
    3839#include "MHMcEfficiency.h"
    3940#include "MHMcEnergyImpact.h"
     
    5253    //   initialize the histogram for the distribution r vs E
    5354    //
    54     //   we set the energy range from 1 Gev to 10000 GeV (in log 5 orders
     55    //   we set the energy range from 10 Gev to 20000 GeV (in log 5 orders
    5556    //   of magnitude) and for each order we take 10 subdivision --> 50 xbins
    5657    //
    5758    //   we set the radius range from 0 m to 500 m with 10 m bin --> 50 ybins
    58 
    59  
     59    //
    6060    fName  = name  ? name  : "MHMcCollectionArea";
    6161    fTitle = title ? title : "Collection Area vs. Energy";
    6262
    63     const Int_t  nbins = 50;
    64     const Float_t maxx = 5;
    65     const Float_t maxy = 500;
    66 
    67     Float_t *binsx = new Float_t[nbins+1];
    68     for (int i=0; i<nbins+1; i++)
    69         binsx[i] = pow(10, maxx*i/nbins);
    70 
    71     Float_t *binsy = new Float_t[nbins+1];
    72     for (int i=0; i<nbins+1; i++)
    73         binsy[i] = maxy*i/nbins;
    74 
    75     fHistAll = new TH2D("AllEvents", "All showers - Radius vs Energy distribution",
    76                         nbins, binsx, nbins, binsy);
    77     fHistSel = new TH2D("SelectedEvents", "Selected showers - Radius vs Energy distribution",
    78                         nbins, binsx, nbins, binsy);
    79 
    80     delete binsx;
    81     delete binsy;
    82 
     63    MBinning binsx;
     64    MBinning binsy;
     65    binsx.SetEdgesLog(50, 10, 20000);
     66    binsy.SetEdges   (50,  0,   500);
     67
     68    fHistAll = new TH2D;
     69    fHistSel = new TH2D;
    8370    fHistCol = new TH1D;
     71 
     72    MH::SetBinning(fHistAll, &binsx, &binsy);
     73    MH::SetBinning(fHistSel, &binsx, &binsy);
     74
    8475    fHistCol->SetName(fName);
     76    fHistAll->SetName("AllEvents");
     77    fHistSel->SetName("SelectedEvents");
     78
    8579    fHistCol->SetTitle(fTitle);
     80    fHistAll->SetTitle("All showers - Radius vs Energy distribution");
     81    fHistSel->SetTitle("Selected showers - Radius vs Energy distribution");
    8682
    8783    fHistAll->SetDirectory(NULL);
  • trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc

    r1612 r1613  
    9595
    9696    if (fTheta>=0 && fTheta!=runheader->GetTelesTheta())
    97         *fLog << warn << dbginf << "Warning - Read files have different TelesTheta... exit." << endl;
     97        *fLog << warn << dbginf << "Warning - Read files have different TelesTheta..." << endl;
    9898
    9999    fTheta = runheader->GetTelesTheta();
    100100
    101101    if (fCorsikaVersion!=0 && fCorsikaVersion!=runheader->GetCorsikaVersion())
    102         *fLog << warn << dbginf << "Warning - Read files have different Corsika versions... exit." << endl;
     102        *fLog << warn << dbginf << "Warning - Read files have different Corsika versions..." << endl;
    103103
    104104    fCorsikaVersion = runheader->GetCorsikaVersion();
Note: See TracChangeset for help on using the changeset viewer.