Ignore:
Timestamp:
06/30/03 11:02:21 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc

    r2250 r2252  
    139139          (pow(emax,expo) - pow(emin,expo)) ;
    140140
    141         const Int_t nbinx = fCollArea->GetHistAll()->GetNbinsX();
    142 
     141        TH2 &hall = *fCollArea->GetHistAll();
     142
     143        const Int_t nbinx = hall.GetNbinsX();
     144
     145        TAxis &axe = *hall.GetXaxis();
    143146        for (Int_t i = 1; i <= nbinx; i++)
    144147          {
    145             const Float_t e1 = fCollArea->GetHistAll()->GetXaxis()->GetBinLowEdge(i);
    146             const Float_t e2 = fCollArea->GetHistAll()->GetXaxis()->GetBinLowEdge(i+1);
     148            const Float_t e1 = axe.GetBinLowEdge(i);
     149            const Float_t e2 = axe.GetBinLowEdge(i+1);
    147150
    148151            if (e1 < emin || e2 > emax)
     
    151154            const Float_t events = k * (pow(e2, expo) - pow(e1, expo));
    152155            //
    153             // We fill the ith energy bin, with the total number of events
     156            // We fill the i-th energy bin, with the total number of events
    154157            // Second argument of Fill would be impact parameter of each
    155158            // event, but we don't really need it for the collection area,
     
    158161
    159162            const Float_t energy = (e1+e2)/2.;
    160             fCollArea->GetHistAll()->Fill(energy, 1., events);
     163            hall.Fill(energy, 1., events);
    161164          }
    162165
Note: See TracChangeset for help on using the changeset viewer.