Index: trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc	(revision 2250)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc	(revision 2252)
@@ -139,10 +139,13 @@
 	  (pow(emax,expo) - pow(emin,expo)) ;
 
-	const Int_t nbinx = fCollArea->GetHistAll()->GetNbinsX();
-
+        TH2 &hall = *fCollArea->GetHistAll();
+
+	const Int_t nbinx = hall.GetNbinsX();
+
+        TAxis &axe = *hall.GetXaxis();
 	for (Int_t i = 1; i <= nbinx; i++)
 	  {
-	    const Float_t e1 = fCollArea->GetHistAll()->GetXaxis()->GetBinLowEdge(i);
-	    const Float_t e2 = fCollArea->GetHistAll()->GetXaxis()->GetBinLowEdge(i+1);
+	    const Float_t e1 = axe.GetBinLowEdge(i);
+	    const Float_t e2 = axe.GetBinLowEdge(i+1);
 
 	    if (e1 < emin || e2 > emax)
@@ -151,5 +154,5 @@
 	    const Float_t events = k * (pow(e2, expo) - pow(e1, expo));
 	    //
-	    // We fill the ith energy bin, with the total number of events
+	    // We fill the i-th energy bin, with the total number of events
 	    // Second argument of Fill would be impact parameter of each
 	    // event, but we don't really need it for the collection area,
@@ -158,5 +161,5 @@
 
 	    const Float_t energy = (e1+e2)/2.;
-	    fCollArea->GetHistAll()->Fill(energy, 1., events);
+	    hall.Fill(energy, 1., events);
 	  }
 
