Index: trunk/Mars/mdrs/MCalibrateDrsTimes.cc
===================================================================
--- trunk/Mars/mdrs/MCalibrateDrsTimes.cc	(revision 18205)
+++ trunk/Mars/mdrs/MCalibrateDrsTimes.cc	(revision 18243)
@@ -153,5 +153,7 @@
 
         const Float_t signal = (*fSignals)[sw].GetArrivalTime();
+        const Float_t slope  = (*fSignals)[sw].GetArrivalTimeHiGainError();
         const Float_t offset = fCalib ? fCalib->GetOffset(hw, start[hw], signal) : 0;
+        const Float_t offset2 = (fCalib && (signal-slope)>=0) ? fCalib->GetOffset(hw, start[hw], signal-slope) : 0;
         const Float_t delay  = fCalib ? fCalib->GetDelay(hw) : 0;
 
@@ -160,6 +162,8 @@
 
         // convert from slices to ns
-        const Float_t utime = 1000*(signal       )/fFreq-delay; // [ns]
-        const Float_t time  = 1000*(signal-offset)/fFreq-delay; // [ns]
+        const Float_t utime      = 1000*(signal       )/fFreq-delay;  // [ns]
+        const Float_t time       = 1000*(signal-offset)/fFreq-delay;  // [ns]
+        const Float_t slopecal   = (slope-offset+offset2)<0 ? -1 : 1000*(slope-offset+offset2)/fFreq; // [ns]
+        const Float_t uslope     = slope<0 ? -1 : 1000*(slope)/fFreq;                // [ns]
 
         /*
@@ -172,6 +176,10 @@
         {
             (*fArrivalTime)[idx[j]].SetArrivalTime(time);
+            (*fArrivalTime)[idx[j]].SetTimeSlope(slopecal);
             if (fArrivalTimeU)
+            {
                 (*fArrivalTimeU)[idx[j]].SetArrivalTime(utime);
+                (*fArrivalTimeU)[idx[j]].SetTimeSlope(uslope);
+            }
         }
     }
Index: trunk/Mars/mhist/MHEvent.cc
===================================================================
--- trunk/Mars/mhist/MHEvent.cc	(revision 18205)
+++ trunk/Mars/mhist/MHEvent.cc	(revision 18243)
@@ -194,4 +194,9 @@
         fHist->SetName("Island Index");
         fHist->SetYTitle("Index");
+	fHist->SetPrettyPalette();
+        break;
+     case kEvtTimeSlope:
+        fHist->SetName("Time Slope");
+        fHist->SetYTitle("delta_t [ns]");
 	fHist->SetPrettyPalette();
         break;
@@ -295,4 +300,7 @@
         fHist->SetCamContent(*event, 5);
         break;
+    case kEvtTimeSlope:
+        fHist->SetCamContent(*event, 12);
+        break; 
     default:
         *fLog << "ERROR - Case " << (int)fType << " not implemented..." << endl;
Index: trunk/Mars/mhist/MHEvent.h
===================================================================
--- trunk/Mars/mhist/MHEvent.h	(revision 18205)
+++ trunk/Mars/mhist/MHEvent.h	(revision 18243)
@@ -27,5 +27,5 @@
         kEvtCleaningLevels, kEvtCleaningData,
         kEvtIdxMax, kEvtArrTime, kEvtArrTimeCleaned,
-        kEvtTrigPix, kEvtIslandIndex
+        kEvtTrigPix, kEvtIslandIndex, kEvtTimeSlope
     };
 
Index: trunk/Mars/msignal/MExtractFACT.cc
===================================================================
--- trunk/Mars/msignal/MExtractFACT.cc	(revision 18205)
+++ trunk/Mars/msignal/MExtractFACT.cc	(revision 18243)
@@ -171,4 +171,5 @@
         //
         Float_t max  = -1;
+        Float_t tmax  = -1;
         if (pmax>pbeg && pmax<pend-1)
         {
@@ -194,7 +195,7 @@
                         max = exp(a + b*dx + c*dx*dx);
 
-                        // Time is position of maximum
-                        //time = dx;
-                        //time += Int_t(pmax-ptr);
+                        // tmax is position of maximum
+                        tmax = dx;
+                        tmax += Int_t(pmax-ptr);
                     }
                 }
@@ -203,4 +204,5 @@
 
         Float_t time = -1;
+        Float_t slope = -1;
         if (max>=0)
         {
@@ -217,4 +219,5 @@
                 time = (max/2-pmax[0])/(pmax[1]-pmax[0]);
                 time += Int_t(pmax-ptr);
+                slope = tmax - time;
             }
         }
@@ -232,5 +235,5 @@
         pix.SetGainSaturation(0);
 
-        tix.SetArrivalTime(time);
+        tix.SetArrivalTime(time, slope);
         tix.SetGainSaturation(0);
     }
Index: trunk/Mars/msignal/MSignalCam.cc
===================================================================
--- trunk/Mars/msignal/MSignalCam.cc	(revision 18205)
+++ trunk/Mars/msignal/MSignalCam.cc	(revision 18243)
@@ -584,4 +584,5 @@
 // 10: as 0, but returns kFALSE if signal <=0
 // 11: as 8, but returns kFALSE if signal <=0
+// 12: time slope
 //
 Bool_t MSignalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
@@ -668,4 +669,8 @@
         return pix.GetNumPhotons()>0;
 
+    case 12: // time slope
+        val = pix.GetTimeSlope();
+        break;
+
     case 9:
     default:
Index: trunk/Mars/msignal/MSignalPix.cc
===================================================================
--- trunk/Mars/msignal/MSignalPix.cc	(revision 18205)
+++ trunk/Mars/msignal/MSignalPix.cc	(revision 18243)
@@ -64,4 +64,8 @@
 //    size of the calibrated data by roughly 0.5%
 //
+// Version 8:
+// ----------
+//  - added new time variable fTimeSlope describing the width of the rise time
+//
 ////////////////////////////////////////////////////////////////////////////
 #include "MSignalPix.h"
@@ -80,5 +84,6 @@
 MSignalPix::MSignalPix(Float_t phot, Float_t errphot) :
     fIsCore(kFALSE), fRing(1), fIdxIsland(-1),
-    fPhot(phot), fErrPhot(errphot), fArrivalTime(-1)
+    fPhot(phot), fErrPhot(errphot), fArrivalTime(-1),
+    fTimeSlope(-1)
 {
     MMath::ReducePrecision(fPhot);
@@ -94,4 +99,5 @@
     fErrPhot     =  0;
     fArrivalTime = -1;
+    fTimeSlope = -1;
 }
 
Index: trunk/Mars/msignal/MSignalPix.h
===================================================================
--- trunk/Mars/msignal/MSignalPix.h	(revision 18205)
+++ trunk/Mars/msignal/MSignalPix.h	(revision 18243)
@@ -19,4 +19,5 @@
     Float_t  fErrPhot;       // the error of fPhot
     Float_t  fArrivalTime;   // Calibrated Arrival Time
+    Float_t  fTimeSlope;     // Time between half rise time and position of maximum
 
 public:
@@ -24,5 +25,6 @@
     MSignalPix(const MSignalPix &pix)
         : fIsCore(pix.fIsCore), fRing(pix.fRing), fIdxIsland(pix.fIdxIsland),
-        fPhot(pix.fPhot), fErrPhot(pix.fErrPhot), fArrivalTime(pix.fArrivalTime)
+        fPhot(pix.fPhot), fErrPhot(pix.fErrPhot), fArrivalTime(pix.fArrivalTime),
+        fTimeSlope(pix.fTimeSlope)
     {
     }
@@ -39,4 +41,5 @@
         pix.fErrPhot     = fErrPhot;
         pix.fArrivalTime = fArrivalTime;
+        pix.fTimeSlope   = fTimeSlope;
     }
     void    Print(Option_t *opt = NULL) const;
@@ -46,4 +49,5 @@
     Float_t GetErrorPhot() const          { return fErrPhot; }
     Float_t GetArrivalTime() const        { return fArrivalTime; }
+    Float_t GetTimeSlope() const          { return fTimeSlope; }
 
     Bool_t  IsPixelUsed() const           { return fRing>0; }
@@ -65,9 +69,10 @@
     void    Set(Float_t np, Float_t ep)   { MMath::ReducePrecision(np); MMath::ReducePrecision(ep);  fPhot = np; fErrPhot = ep; }
     void    SetArrivalTime(Float_t tm)    { fArrivalTime = tm; }
+    void    SetTimeSlope(Float_t ts)      { fTimeSlope = ts; }
 
     //void    AddNumPhotons(Float_t f)      { fPhot += f; }
     //void    Scale(Float_t f)              { fPhot /= f; }
 
-    ClassDef(MSignalPix, 7)  // class containing information about the Cerenkov Photons in a pixel
+    ClassDef(MSignalPix, 8)  // class containing information about the Cerenkov Photons in a pixel
 };
 
