Index: trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc	(revision 2031)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc	(revision 2036)
@@ -28,5 +28,5 @@
 //  MHMcCollectionAreaCalc
 //
-//  Remark: The initialization is maily done in the ReInit function.
+//  Remark: The initialization is mainly done in the ReInit function.
 //          Please make sure, that you don't use MReadTree when processing
 //          a file. Use a 'ReInit'-calling task like MReadMarsFile
@@ -44,4 +44,5 @@
 #include "MMcTrig.hxx"
 #include "MMcRunHeader.hxx"
+#include "MMcCorsikaRunHeader.h"
 
 #include "MHMcCollectionArea.h"
@@ -77,5 +78,8 @@
         return kFALSE;
 
-    fTheta                    = -1;
+    fTheta                    =  -1;
+    fEmin                     =  -1;
+    fEmax                     =  -1;
+    fSlope                    =   0;
     fTotalNumSimulatedShowers =  0;
     fCorsikaVersion           =  0;
@@ -91,4 +95,11 @@
     {
         *fLog << err << dbginf << "Error - MMcRunHeader not found... exit." << endl;
+        return kFALSE;
+    }
+
+    MMcCorsikaRunHeader *corrunheader  = (MMcCorsikaRunHeader*)plist->FindObject("MMcCorsikaRunHeader");
+    if (!corrunheader)
+    {
+        *fLog << err << dbginf << "Error - MMcCorsikaRunHeader not found... exit." << endl;
         return kFALSE;
     }
@@ -110,4 +121,14 @@
 
     fCorsikaVersion = runheader->GetCorsikaVersion();
+
+    if ( fEmin > 0 &&
+	 (fEmin  != corrunheader->GetELowLim() ||
+	  fEmax  != corrunheader->GetEUppLim() ||
+	  fSlope != corrunheader->GetSlopeSpec()) )
+      *fLog << warn << dbginf << "Warning - Read files have different energy distribution..." << endl;
+
+    fEmin  = corrunheader->GetELowLim();
+    fEmax  = corrunheader->GetEUppLim();
+    fSlope = corrunheader->GetSlopeSpec();
 
     fAllEvtsTriggered |= runheader->GetAllEvtsTriggered();
@@ -167,6 +188,5 @@
     {
         *fLog << inf << "Total number of showers: " << fTotalNumSimulatedShowers << endl;
-        fCollArea->CalcEfficiency(fTotalNumSimulatedShowers,
-                                  fCorsikaVersion == 5200 ? fTheta : 0);
+        fCollArea->CalcEfficiency(fTotalNumSimulatedShowers, fEmin, fEmax, fSlope);
     }
 
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h	(revision 2031)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h	(revision 2036)
@@ -24,4 +24,7 @@
     UInt_t fCorsikaVersion;
     Float_t fTheta;
+    Float_t fEmin;
+    Float_t fEmax;
+    Float_t fSlope;
 
     Bool_t fAllEvtsTriggered;
