Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2074)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2075)
@@ -1,4 +1,14 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2003/05/06: Abelardo Moralejo
+
+   * mhistmc/MHMcCollectionArea.cc
+     - in procedure Calc(TH2D &hsel, TH2D &hall) : changed the 
+       calculation of maximum impact parameter. Now it looks for
+       the highest non-empty impact parameter bin of histogram "hall"
+       The code could not work as it was before, but this had 
+       influence only when running over camera files containing all 
+       events, including non-triggers (while we usually run over files
+       containing only triggers).
 
  2003/05/06: Thomas Bretz
Index: trunk/MagicSoft/Mars/mhistmc/MHMcCollectionArea.cc
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcCollectionArea.cc	(revision 2074)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcCollectionArea.cc	(revision 2075)
@@ -210,5 +210,13 @@
     TH1D &pall = *hall.ProjectionX();
 
-    const Double_t max = psel.GetYaxis()->GetXmax();
+    TH1D &pally = *hall.ProjectionY();
+
+    Double_t max = 0.;
+    for (Int_t i = hall.GetNbinsY(); i > 0; i--)
+      if (pally.GetBinContent(i) > 0)
+	{
+	  max = pally.GetBinLowEdge(i+1);
+	  break;
+	}
 
     fHistCol->Divide(&psel, &pall, TMath::Pi()*max*max, 1);
