Index: trunk/MagicSoft/Mars/mpedestal/MHPedestalCor.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MHPedestalCor.cc	(revision 8571)
+++ trunk/MagicSoft/Mars/mpedestal/MHPedestalCor.cc	(revision 8573)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MHPedestalCor.cc,v 1.2 2006-12-11 11:43:32 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MHPedestalCor.cc,v 1.3 2007-06-17 20:50:58 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -124,16 +124,17 @@
     Int_t fExtractWinLast  = ns;
 
-    Float_t fMaxSignalVar = 40;
+    Float_t fMaxSignalVar =  40;
+    Float_t fMaxSignalAbs = 250;
 
     for (int k=0; k<np; k++)
     {
         // This is the fast workaround to put hi- and lo-gains together
-        Byte_t *slices = evt->GetSamplesRaw(k);//pixel.GetSamples();
-
-        UShort_t max = 0;
-        UShort_t min = (UShort_t)-1;
+        USample_t *slices = evt->GetSamplesRaw(k);//pixel.GetSamples();
+
+        USample_t max = 0;
+        USample_t min = (USample_t)-1;
 
         // Find the maximum and minimum signal per slice in the high gain window
-        for (Byte_t *slice=slices+fCheckWinFirst; slice<slices+fCheckWinLast; slice++)
+        for (USample_t *slice=slices+fCheckWinFirst; slice<slices+fCheckWinLast; slice++)
         {
             if (*slice > max)
@@ -144,5 +145,5 @@
 
         // If the maximum in the high gain window is smaller than
-        if (max-min>=fMaxSignalVar || max>=250)
+        if (max-min>=fMaxSignalVar || max>=fMaxSignalAbs)
             continue;
 
