Index: trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc	(revision 9359)
+++ trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc	(revision 9362)
@@ -211,5 +211,5 @@
 void MHCollectionArea::GetImpactMax()
 {
-    if (fHeader->GetImpactMax()<=fMcAreaRadius*100)
+    if (fHeader->GetImpactMax()<=fMcAreaRadius*100 || fHeader->GetImpactMax()<0)
         return;
 
@@ -454,4 +454,11 @@
 Int_t MHCollectionArea::Fill(const MParContainer *par, const Stat_t weight)
 {
+    // This is not perfect because it selects the maximum impact only
+    // from the selected events. Hoever, it will get overwritten
+    // in finalize anyway.
+    const Double_t impact = fMcEvt->GetImpact()*0.01; // cm->m
+    if (impact>fMcAreaRadius)
+        fMcAreaRadius = impact;
+
     const Double_t energy = fMcEvt->GetEnergy();
     const Double_t theta  = fMcEvt->GetTelescopeTheta()*TMath::RadToDeg();
Index: trunk/MagicSoft/Mars/mhflux/MHThreshold.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHThreshold.cc	(revision 9359)
+++ trunk/MagicSoft/Mars/mhflux/MHThreshold.cc	(revision 9362)
@@ -97,14 +97,7 @@
         return kFALSE;
     }
-/*
-    MBinning binse;
-    binse.SetEdges(fHEnergy, 'x');
 
-    MBinning *bins = (MBinning*)pl->FindObject("BinningEnergyEst", "MBinning");
-    if (bins)
-        binse.SetEdges(*bins);
+    ApplyBinning(*pl, "Threshold", &fHEnergy);
 
-    binse.Apply(fHEnergy);
-  */
     return kTRUE;
 }
