Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1896)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1897)
@@ -809,6 +809,6 @@
     // both Theta and ThetaSmeared are in [radians]
     // the edges are in [degrees]
-    const Int_t bin = fBinningT->FindLoEdge(theta * 180.0/TMath::Pi());
-    if (bin == -1)
+    const Int_t bin = fBinningT->FindLoEdge(theta * 180/TMath::Pi());
+    if (bin<0)
         return theta;
 
@@ -817,5 +817,6 @@
     const Double_t up  = fBinningT->GetEdges()[bin+1];
 
-    return (low + gRandom->Rndm(1) * (up-low)) * TMath::Pi()/180;
+    // "up-": Do not allow the upper edge
+    return (up - gRandom->Uniform() * (up-low)) * TMath::Pi()/180;
 }
 
