Index: /fact/tools/rootmacros/PulseTemplates/FPulseOverlay_filelist.C
===================================================================
--- /fact/tools/rootmacros/PulseTemplates/FPulseOverlay_filelist.C	(revision 15117)
+++ /fact/tools/rootmacros/PulseTemplates/FPulseOverlay_filelist.C	(revision 15118)
@@ -1170,14 +1170,19 @@
                 if (pos > reg->maxPos + 2)
                 {
+                    // check if the current slice is close to the end of the overlay window
                     if ( pos+5 >= Right )
                     {
                         break;
                     }
+                    // check if the next slice is larger than the pulse maximum
+                    // i guess it makes more sense to compare the average amplitude of the slices before
+                    //to the following  pulse
                     if (gVcorr[pos+1] > average_of_max)
                     {
                         break;
                     }
+
+                    // check if the next 5 slices have a steep slope
                     slope_of_follow = (gVcorr[pos+5] - gVcorr[pos+1])/5;
-
                     if (slope_of_follow > 1)
                     {
