Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.cc	(revision 3641)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.cc	(revision 3642)
@@ -85,5 +85,5 @@
 //
 MCalibrationChargePINDiode::MCalibrationChargePINDiode(const char *name, const char *title)
-    : fFlags(0)
+    : fCalibFlags(0)
 {
 
@@ -112,14 +112,9 @@
 {
 
-    SetChargeFitValid     ( kFALSE );
-    SetTimeFitValid       ( kFALSE );
-    SetMeanTimeInFirstBin ( kFALSE );
-    SetMeanTimeInLastBin  ( kFALSE );
+  SetChargeFitValid     ( kFALSE );
+  SetTimeFitValid       ( kFALSE );
+  SetMeanTimeInFirstBin ( kFALSE );
+  SetMeanTimeInLastBin  ( kFALSE );
     
-  fMeanCharge                       =  -1.;
-  fMeanChargeErr                    =  -1.;
-  fSigmaCharge                      =  -1.;
-  fSigmaChargeErr                   =  -1.;
-  fChargeProb                       =  -1.;
   fPed                              =  -1.;
   fPedRms                           =  -1.;
@@ -163,14 +158,5 @@
 void  MCalibrationChargePINDiode::SetOscillating( const Bool_t b)
 {
-    b ? SETBIT(fFlags,kOscillating) : CLRBIT(fFlags,kOscillating);
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the Excluded Bit from outside 
-//
-void MCalibrationChargePINDiode::SetExcluded(Bool_t b )
-{ 
-  b ?  SETBIT(fFlags, kExcluded) : CLRBIT(fFlags, kExcluded); 
+    b ? SETBIT(fCalibFlags,kOscillating) : CLRBIT(fCalibFlags,kOscillating);
 }
 
@@ -182,5 +168,5 @@
 void MCalibrationChargePINDiode::SetExcludeQualityCheck(Bool_t b )
 { 
-  b ?  SETBIT(fFlags, kExcludeQualityCheck) : CLRBIT(fFlags, kExcludeQualityCheck); 
+  b ?  SETBIT(fCalibFlags, kExcludeQualityCheck) : CLRBIT(fCalibFlags, kExcludeQualityCheck); 
 }
 
@@ -191,5 +177,5 @@
 void MCalibrationChargePINDiode::SetChargeFitValid(Bool_t b )    
 { 
-  b ?  SETBIT(fFlags, kChargeFitValid) : CLRBIT(fFlags, kChargeFitValid); 
+  b ?  SETBIT(fCalibFlags, kChargeFitValid) : CLRBIT(fCalibFlags, kChargeFitValid); 
 }
 
@@ -200,45 +186,40 @@
 void MCalibrationChargePINDiode::SetTimeFitValid(Bool_t b )    
 { 
-  b ?  SETBIT(fFlags, kTimeFitValid) : CLRBIT(fFlags, kTimeFitValid); 
+  b ?  SETBIT(fCalibFlags, kTimeFitValid) : CLRBIT(fCalibFlags, kTimeFitValid); 
 }
 
 void MCalibrationChargePINDiode::SetFluxOutsidePlexiglassAvailable (const Bool_t b)
 {
-  b ?  SETBIT(fFlags, kFluxOutsidePlexiglassAvailable) : CLRBIT(fFlags, kFluxOutsidePlexiglassAvailable); 
+  b ?  SETBIT(fCalibFlags, kFluxOutsidePlexiglassAvailable) : CLRBIT(fCalibFlags, kFluxOutsidePlexiglassAvailable); 
 }
 
 void MCalibrationChargePINDiode::SetMeanTimeInFirstBin(const Bool_t b)
 {
-  b ? SETBIT(fFlags,kMeanTimeInFirstBin) : CLRBIT(fFlags,kMeanTimeInFirstBin);
+  b ? SETBIT(fCalibFlags,kMeanTimeInFirstBin) : CLRBIT(fCalibFlags,kMeanTimeInFirstBin);
 }
 
 void MCalibrationChargePINDiode::SetMeanTimeInLastBin(const Bool_t b)
 {
-  b ? SETBIT(fFlags,kMeanTimeInLastBin) : CLRBIT(fFlags,kMeanTimeInLastBin);
+  b ? SETBIT(fCalibFlags,kMeanTimeInLastBin) : CLRBIT(fCalibFlags,kMeanTimeInLastBin);
 }
 
 Bool_t MCalibrationChargePINDiode::IsMeanTimeInFirstBin() const
 {
-  return TESTBIT(fFlags,kMeanTimeInFirstBin);
+  return TESTBIT(fCalibFlags,kMeanTimeInFirstBin);
 }
 
 Bool_t MCalibrationChargePINDiode::IsMeanTimeInLastBin() const
 {
-  return TESTBIT(fFlags,kMeanTimeInLastBin);
-}
-
-Bool_t MCalibrationChargePINDiode::IsExcluded()       const
-{ 
-   return TESTBIT(fFlags,kExcluded);  
+  return TESTBIT(fCalibFlags,kMeanTimeInLastBin);
 }
 
 Bool_t MCalibrationChargePINDiode::IsChargeFitValid() const 
 {
-  return TESTBIT(fFlags, kChargeFitValid);  
+  return TESTBIT(fCalibFlags, kChargeFitValid);  
 }
 
 Bool_t MCalibrationChargePINDiode::IsTimeFitValid()   const 
 {
-  return TESTBIT(fFlags, kTimeFitValid);  
+  return TESTBIT(fCalibFlags, kTimeFitValid);  
 }
 
@@ -255,5 +236,5 @@
 
 
-  if (fMeanCharge < fChargeLimit*GetPedRms())
+  if (GetMean() < fChargeLimit*GetPedRms())
     {
       *fLog << warn << "WARNING: Fitted Charge is smaller than "
@@ -262,5 +243,5 @@
     }
   
-  if (fMeanChargeErr < fChargeErrLimit) 
+  if (GetMeanErr() < fChargeErrLimit) 
     {
       *fLog << warn << "WARNING: Error of Fitted Charge is smaller than "
@@ -269,5 +250,5 @@
     }
       
-  if (fMeanCharge < fChargeRelErrLimit*fMeanChargeErr) 
+  if (GetMean() < fChargeRelErrLimit*GetMeanErr()) 
     {
       *fLog << warn << "WARNING: Fitted Charge is smaller than "
@@ -276,5 +257,5 @@
     }
       
-  if (fSigmaCharge < GetPedRms())
+  if (GetSigma() < GetPedRms())
     {
       *fLog << warn << "WARNING: Sigma of Fitted Charge smaller than Pedestal RMS in PINDiode " << endl;
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.h	(revision 3641)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.h	(revision 3642)
@@ -2,9 +2,9 @@
 #define MARS_MCalibrationChargePINDiode
 
-#ifndef MARS_MParContainer
-#include "MParContainer.h"
+#ifndef MARS_MCalibrationPix
+#include "MCalibrationPix.h"
 #endif
 
-class MCalibrationChargePINDiode : public MParContainer
+class MCalibrationChargePINDiode : public MCalibrationPix
 {
 private:
@@ -42,10 +42,4 @@
   Float_t fPedRms;                // The pedestal  RMS (from MPedestalPix)
 
-  Float_t fMeanCharge;            // The mean charge after the fit
-  Float_t fMeanChargeErr;         // The error of mean charge after the fit
-  Float_t fSigmaCharge;           // The sigma of the mean charge after the fit
-  Float_t fSigmaChargeErr;        // The error of the sigma of the mean charge after the fit
-  Float_t fChargeProb;            // The probability of the fit function 
-
   Float_t fRmsChargeMean;
   Float_t fRmsChargeMeanErr;
@@ -53,5 +47,5 @@
   Float_t fRmsChargeSigmaErr;
 
-  Byte_t  fFlags;                            // Flag for the set Bits
+  Byte_t  fCalibFlags;                            // Flag for the set Bits
 
   Float_t fAbsTimeMean;
@@ -69,5 +63,5 @@
   PulserColor_t fColor;  
 
-  enum  { kExcluded, kExcludeQualityCheck, kOscillating,
+  enum  { kExcludeQualityCheck, kOscillating,
           kChargeFitValid, kTimeFitValid, 
 	  kMeanTimeInFirstBin, kMeanTimeInLastBin, 
@@ -83,9 +77,4 @@
   // Setters
   void SetColor(   const PulserColor_t color )  {  fColor = color;         }
-
-  void SetMeanCharge     (   const Float_t f )    { fMeanCharge        = f;  }
-  void SetMeanChargeErr  (   const Float_t f )    { fMeanChargeErr     = f;  }
-  void SetSigmaCharge    (   const Float_t f )    { fSigmaCharge       = f;  }
-  void SetSigmaChargeErr (   const Float_t f )    { fSigmaChargeErr    = f;  }
 
   void SetRmsChargeMean    ( const Float_t f )    { fRmsChargeMean     = f;  }
@@ -107,5 +96,4 @@
 
   void SetOscillating     ( const Bool_t b=kTRUE);
-  void SetExcluded           ( const Bool_t b = kTRUE );
   void SetExcludeQualityCheck( const Bool_t b = kTRUE );
   void SetChargeFitValid     ( const Bool_t b = kTRUE );
@@ -118,10 +106,4 @@
 
   // Getters
-  Float_t GetMeanCharge()      const { return fMeanCharge;         }
-  Float_t GetMeanChargeErr()   const { return fMeanChargeErr;      }
-  Float_t GetSigmaCharge()     const { return fSigmaCharge;        }
-  Float_t GetSigmaChargeErr()  const { return fSigmaChargeErr;     }
-  Float_t GetChargeProb()      const { return fChargeProb;         }    
-
   Float_t GetMeanFluxOutsidePlexiglass()    const { return fMeanFluxOutsidePlexiglass; }
   Float_t GetMeanFluxErrOutsidePlexiglass() const { return fMeanFluxErrOutsidePlexiglass; }
@@ -132,5 +114,4 @@
 
 
-  Bool_t  IsExcluded()          const;
   Bool_t  IsChargeFitValid()    const;
   Bool_t  IsTimeFitValid()      const;
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.cc	(revision 3641)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.cc	(revision 3642)
@@ -702,4 +702,5 @@
       }
   
+  hist.Renorm();
   //
   // 4) Check for oscillations
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc	(revision 3641)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc	(revision 3642)
@@ -232,4 +232,6 @@
                                         "Relative Arrival Times average sector ");
 
+          InitHists(GetAverageHiGainSector(j),fCam->GetAverageBadSector(j),j);
+
           GetAverageHiGainSector(j).GetHGausHist()->SetTitle("Relative Arrival Times average Sector ");
           GetAverageHiGainSector(j).SetNbins(fAverageNbins);
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc	(revision 3641)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc	(revision 3642)
@@ -31,4 +31,11 @@
 //  pixel number 1 (hardware index: 2). Times are taken from MArrivalTimePix
 //
+//  Results are re-normalized to a value per time (ns) with the formulae:
+//
+// - Mean Rel. Time         = Mean Rel. Time        * fFADCSliceWidth
+// - Mean Rel. Time Error   = Mean Rel. Time Error  * fFADCSliceWidth
+// - Sigma Rel. Time        = Sigma Rel. Time       * fFADCSliceWidth
+// - Sigma Rel. Time Error  = Sigma Rel. Time Error * fFADCSliceWidth
+// 
 //////////////////////////////////////////////////////////////////////////////
 #include "MHCalibrationRelTimePix.h"
@@ -43,4 +50,5 @@
 const Axis_t  MHCalibrationRelTimePix::fgRelTimeFirst    = -13.;
 const Axis_t  MHCalibrationRelTimePix::fgRelTimeLast     =  13.;
+const Float_t MHCalibrationRelTimePix::fgFADCSliceWidth  =  3.3333;
 // --------------------------------------------------------------------------
 //
@@ -56,7 +64,6 @@
 // - the default x-axis title for fHGausHist ("FADC Slice")
 // - the default y-axis title for fHGausHist ("Nr. of events")
-//
-// Executes:
-// - MHGausEvents::Clear()
+// 
+// - the default number for fFADCSliceWidth (fgFADCSliceWidth)
 //
 MHCalibrationRelTimePix::MHCalibrationRelTimePix(const char *name, const char *title) 
@@ -69,4 +76,5 @@
   SetFirst ( fgRelTimeFirst );
   SetLast  ( fgRelTimeLast  );
+  SetFADCSliceWidth();
 
   // Create a large number of bins, later we will rebin
@@ -75,6 +83,4 @@
   fHGausHist.SetXTitle("FADC Slice");
   fHGausHist.SetYTitle("Nr. of events");
-
-  Clear();
 
 }
@@ -89,3 +95,25 @@
 }
 
+// --------------------------------------------------------------------------
+// 
+// If mean and sigma have not yet been set, returns.
+//
+// Results are re-normalized to a value per time (ns) with the formulae:
+//
+// - Mean Rel. Time         = Mean Rel. Time        * fFADCSliceWidth
+// - Mean Rel. Time Error   = Mean Rel. Time Error  * fFADCSliceWidth
+// - Sigma Rel. Time        = Sigma Rel. Time       * fFADCSliceWidth
+// - Sigma Rel. Time Error  = Sigma Rel. Time Error * fFADCSliceWidth
+// 
+void MHCalibrationRelTimePix::Renorm()
+{
 
+  if (fMean == fMeanErr == fSigma == fSigmaErr == 0.)
+    return;
+
+  fMean    *= fFADCSliceWidth;
+  fMeanErr *= fFADCSliceWidth;
+  fSigma   *= fFADCSliceWidth;
+  fSigmaErr*= fFADCSliceWidth;
+  
+}
