Index: trunk/MagicSoft/Mars/msignal/MExtractTimeFastSpline.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeFastSpline.cc	(revision 4283)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeFastSpline.cc	(revision 4284)
@@ -53,4 +53,5 @@
 const Byte_t  MExtractTimeFastSpline::fgLoGainLast   = 14;
 const Float_t MExtractTimeFastSpline::fgResolution   = 0.003;
+const Float_t MExtractTimeFastSpline::fgRiseTime     = 1.5;
 // --------------------------------------------------------------------------
 //
@@ -72,4 +73,5 @@
 
   SetResolution();
+  SetRiseTime  ();
   SetRange(fgHiGainFirst, fgHiGainLast, fgLoGainFirst, fgLoGainLast);
 
@@ -144,4 +146,5 @@
 
     }
+
 }
 
@@ -154,5 +157,5 @@
                                         Byte_t &sat, const MPedestalPix &ped) const
 {
-  
+
   const Int_t range = fHiGainLast - fHiGainFirst + 1;
   const Byte_t *end = first + range;
@@ -352,5 +355,5 @@
   // 
   klo   = maxpos;
-  while (klo > maxpos-4)
+  while (klo > maxpos-fStartBeforeMax)
     {
       if (*(first+klo) < (Byte_t)halfmax)
Index: trunk/MagicSoft/Mars/msignal/MExtractTimeFastSpline.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeFastSpline.h	(revision 4283)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeFastSpline.h	(revision 4284)
@@ -15,4 +15,5 @@
   static const Byte_t  fgLoGainLast;     // Default for fLoGainLast   (now set to: 14)
   static const Float_t fgResolution;     // Default for fResolution   (now set to: 0.003)
+  static const Float_t fgRiseTime  ;     // Default for fRiseTime     (now set to: 1.5  C  
 
   Float_t *fHiGainFirstDeriv;
@@ -22,4 +23,6 @@
 
   Float_t fResolution;                        // The time resolution in FADC units
+  Float_t fRiseTime  ;                        // The rise time of the pulse 
+  Byte_t  fStartBeforeMax;                    // Slices to start searching for the halfmax before max
   
   void FindTimeHiGain(Byte_t *first, Float_t &time, Float_t &dtime, Byte_t &sat, const MPedestalPix &ped) const;
@@ -33,4 +36,5 @@
   void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);      
   void SetResolution(Float_t f=fgResolution)     { fResolution = f;  }
+  void SetRiseTime  (Float_t f=fgRiseTime  )     { fRiseTime   = f; fStartBeforeMax = (Int_t)(2*fRiseTime); }  
   
   ClassDef(MExtractTimeFastSpline, 0)   // Task to Extract the Arrival Times using a Fast Spline
