Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1898)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1899)
@@ -807,5 +807,5 @@
 //   SmearTheta [rad]
 //
-Float_t MCT1ReadPreProc::SmearTheta(Float_t theta)
+Double_t MCT1ReadPreProc::SmearTheta(Double_t theta)
 {
     const Int_t bin = fBinningT->FindLoEdge(theta * 180/TMath::Pi());
Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h	(revision 1898)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h	(revision 1899)
@@ -70,5 +70,5 @@
     void   ProcessEvent(const struct eventrecord &event);
 
-    Float_t SmearTheta(Float_t theta);
+    Double_t SmearTheta(Double_t theta);
 
     Bool_t PreProcess(MParList *pList);
Index: trunk/MagicSoft/Mars/mhist/MBinning.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MBinning.h	(revision 1898)
+++ trunk/MagicSoft/Mars/mhist/MBinning.h	(revision 1899)
@@ -46,5 +46,5 @@
         for (int i=0; i<fEdges.GetSize(); i++)
         {
-            if (val >= ((TArrayD)fEdges)[i])
+            if (((TArrayD)fEdges)[i] <= val)
                 return i;
         }
@@ -53,8 +53,8 @@
     Int_t FindHiEdge(Double_t val) const
     {
-        for (int i=0; i<fEdges.GetSize(); i++)
+        for (int i=0; i<fEdges.GetSize()-1; i++)
         {
-            if (val < ((TArrayD)fEdges)[i])
-                return i;
+            if (val <= ((TArrayD)fEdges)[i])
+                return i+1;
         }
         return -1;
