Index: /fact/tools/rootmacros/zerosearch.C
===================================================================
--- /fact/tools/rootmacros/zerosearch.C	(revision 12305)
+++ /fact/tools/rootmacros/zerosearch.C	(revision 12306)
@@ -281,4 +281,33 @@
 }
 
+size_t removeMaximaAbove(
+	vector<Region> &regions,
+	float threshold,
+	int VerbosityLevel)
+{
+	if (threshold < 0){
+		if (VerbosityLevel > 0)
+			cout << "removeMaximaAbove: threshold < 0" << endl;
+			cout << "threshold=" << threshold << endl;
+			cout << "returning." << endl;
+		return regions.size();
+	}
+
+	vector<Region>::iterator it = regions.begin();
+	while( it != regions.end() )
+	{
+		if (it->maxVal > threshold ) {
+			if (VerbosityLevel > 3){
+				cout << "removing max " << it->maxVal << "\t";
+				cout << " @ " << it->maxPos << "\t";
+				cout << endl;
+			}
+			it = regions.erase( it ) ;
+		}else
+			++it;
+	}
+
+	return regions.size();
+}
 
 ////////////////
Index: /fact/tools/rootmacros/zerosearch.h
===================================================================
--- /fact/tools/rootmacros/zerosearch.h	(revision 12305)
+++ /fact/tools/rootmacros/zerosearch.h	(revision 12306)
@@ -42,3 +42,8 @@
 	int VerbosityLevel=0);
 
+size_t removeMaximaAbove(
+	vector<Region> &regions,
+	float threshold= 14.0,
+	int VerbosityLevel=0);
+
 #endif
