Index: /fact/tools/rootmacros/zerosearch.C
===================================================================
--- /fact/tools/rootmacros/zerosearch.C	(revision 13613)
+++ /fact/tools/rootmacros/zerosearch.C	(revision 13614)
@@ -21,5 +21,5 @@
 
 vector<Region> * ZeroPositions = new vector<Region>;
-Region currentRegion = {0, 0, 0, 0.0, 0, 0};
+Region currentRegion = {0, 0, 0, 0.0, 0, 0.0, 0.0, 0};
     if (step < 1){
         if (VerbosityLevel > 0)
@@ -510,7 +510,31 @@
 
         reg->halfRisingEdgePos = result;
+
         reg->distanceEdgeToMax = reg->maxPos - result;
+        reg->interceptRisingEdge = intercept;
         reg->slopeOfRisingEdge = slope;
     }
     return regions.size();
 }
+
+size_t removeRegionWithToFlatSlope(
+    vector<Region> &regions,
+    float minSlope,
+    int VerbosityLevel)
+{
+    vector<Region>::iterator it = regions.begin();
+    while( it != regions.end() )
+    {
+        if (it->slopeOfRisingEdge < minSlope ) {
+            if (VerbosityLevel > 3){
+                cout << "removing max " << it->maxVal << "\t";
+                cout << " @ " << it->maxPos << "\t";
+                cout << endl;
+            }
+            it = regions.erase( it ) ;
+        }else
+            ++it;
+    }
+
+    return regions.size();
+}
