Index: trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc	(revision 2268)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc	(revision 2273)
@@ -52,5 +52,6 @@
 //   - collection area (result)
 //
-MHMcCT1CollectionArea::MHMcCT1CollectionArea(const char *name, const char *title)
+MHMcCT1CollectionArea::MHMcCT1CollectionArea(const char *name, const char *title) :
+    fEaxis(kLog10)
 { 
   //
@@ -66,6 +67,4 @@
   fTitle = title ? title : "Collection Area vs. log10 Energy";
 
-  fEaxis = kLog10Energy;
-
   fHistAll = new TH2D;
   fHistSel = new TH2D;
@@ -84,13 +83,13 @@
   fHistCol->SetDirectory(NULL);
 
-  fHistAll->SetXTitle("log10 E [GeV]");
-  fHistAll->SetYTitle("theta [deg]");
-  fHistAll->SetZTitle("N");
-
-  fHistSel->SetXTitle("log10 E [GeV]");
-  fHistSel->SetYTitle("theta [deg]");
-  fHistSel->SetZTitle("N");
-
-  fHistCol->SetXTitle("log10 E [GeV]");
+  fHistAll->SetXTitle("log10(E [GeV])");
+  fHistAll->SetYTitle("\\Theta [\\circ]");
+  fHistAll->SetZTitle("Counts");
+
+  fHistSel->SetXTitle("log10(E [GeV])");
+  fHistSel->SetYTitle("\\Theta [\\circ]");
+  fHistSel->SetZTitle("Counts");
+
+  fHistCol->SetXTitle("log10(E [GeV])");
   fHistCol->SetYTitle("theta [deg]");
   fHistCol->SetZTitle("A [m^{2}]");
@@ -133,14 +132,14 @@
     fHistCol->Sumw2();
 
-    if (fEaxis == kEnergy)
-      {
-	fTitle = "Collection Area vs. Energy";
-	fHistCol->SetTitle(fTitle);
-	fHistAll->SetTitle("All showers - Theta vs Energy distribution");
-	fHistSel->SetTitle("Selected showers - Theta vs Energy distribution");
-	fHistCol->SetXTitle("E [GeV]");
-	fHistAll->SetXTitle("E [GeV]");
-	fHistSel->SetXTitle("E [GeV]");
-      }
+    if (fEaxis == kLinear)
+    {
+        fTitle = "Collection Area vs. Energy";
+        fHistCol->SetTitle(fTitle);
+        fHistAll->SetTitle("All showers - Theta vs Energy distribution");
+        fHistSel->SetTitle("Selected showers - Theta vs Energy distribution");
+        fHistCol->SetXTitle("E [GeV]");
+        fHistAll->SetXTitle("E [GeV]");
+        fHistSel->SetXTitle("E [GeV]");
+    }
 
     return kTRUE;
@@ -156,8 +155,7 @@
   MMcEvt &mcevt = *(MMcEvt*)par;
 
-  if (fEaxis == kLog10Energy)
-    fHistSel->Fill(log10(mcevt.GetEnergy()), kRad2Deg*mcevt.GetTelescopeTheta(), w);
-  else
-    fHistSel->Fill(mcevt.GetEnergy(), kRad2Deg*mcevt.GetTelescopeTheta(), w);
+  const Double_t E = fEaxis==kLinear ? mcevt.GetEnergy() : log10(mcevt.GetEnergy());
+
+  fHistSel->Fill(E, kRad2Deg*mcevt.GetTelescopeTheta(), w);
 
   return kTRUE;
@@ -211,5 +209,5 @@
 
   c.cd(1);
-  if (fEaxis == kEnergy)
+  if (fEaxis == kLinear)
     gPad->SetLogx();
   fHistCol->SetDirectory(NULL);
@@ -217,5 +215,5 @@
 
   c.cd(2);
-  if (fEaxis == kEnergy)
+  if (fEaxis == kLinear)
     gPad->SetLogx();
   fHistSel->SetDirectory(NULL);
@@ -223,5 +221,5 @@
 
   c.cd(3);
-  if (fEaxis == kEnergy)
+  if (fEaxis == kLinear)
     gPad->SetLogx();
   fHistAll->SetDirectory(NULL);
@@ -462,5 +460,5 @@
 	  Float_t e2;
 
-	  if (fEaxis == kLog10Energy)
+	  if (fEaxis == kLog10)
 	    {
 	      e1 = pow(10.,fHistAll->GetXaxis()->GetBinLowEdge(i));
@@ -547,10 +545,8 @@
 	  //
 
-	  Float_t area;
+	  Float_t area = dr;
 
 	  if (theta < 50)
-	    area = dr * cos(theta*TMath::Pi()/180.);
-	  else
-	    area = dr;
+	    area *= cos(theta*TMath::Pi()/180.);
 
 	  // Above 50 degrees MC was generated with Corsika 6.xx, and the cores
Index: trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h
===================================================================
--- trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h	(revision 2268)
+++ trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h	(revision 2273)
@@ -6,13 +6,14 @@
 #endif
 
-enum {
-  kLog10Energy,
-  kEnergy
-};
-
 class TH2D;
 
 class MHMcCT1CollectionArea : public MH
 {
+public:
+    enum FillType_t {
+        kLog10,
+        kLinear
+    };
+
 private:
     TH2D *fHistAll; //  all simulated showers
@@ -20,5 +21,5 @@
     TH2D *fHistCol; //  the collection area
 
-    Byte_t  fEaxis;
+    FillType_t fEaxis;
 
 public:
@@ -32,5 +33,5 @@
     void DrawSel(Option_t *option="");
 
-    void SetEaxis(Byte_t x) { fEaxis = x; }
+    void SetEaxis(FillType_t x) { fEaxis = x; }
 
     const TH2D *GetHist() const { return fHistCol; }
