Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3601)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3602)
@@ -31,4 +31,5 @@
 
    * mcalib/MHCalibrationChargeCam.cc
+   * mbadpixels/MBadPixelsCam.cc
      - adopt to new style in MBadPixelsPix.h
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 3601)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 3602)
@@ -211,4 +211,9 @@
 using namespace std;
 
+const Float_t MCalibrationChargeCalc::fgChargeLimit              = 3.;
+const Float_t MCalibrationChargeCalc::fgChargeErrLimit           = 0.;
+const Float_t MCalibrationChargeCalc::fgChargeRelErrLimit        = 1.;
+const Float_t MCalibrationChargeCalc::fgTimeLowerLimit           = 1.;
+const Float_t MCalibrationChargeCalc::fgTimeUpperLimit           = 2.;
 // --------------------------------------------------------------------------
 //
@@ -231,4 +236,11 @@
 
     Clear();
+
+    SetChargeLimit();
+    SetChargeErrLimit();  
+    
+    SetChargeRelErrLimit();
+    SetTimeLowerLimit();
+    SetTimeUpperLimit();
 }
 
@@ -380,8 +392,4 @@
       }
 
-      pix.SetAbsTimeBordersHiGain(fSignals->GetFirstUsedSliceHiGain(),
-                                  fSignals->GetLastUsedSliceHiGain());
-      pix.SetAbsTimeBordersLoGain(fSignals->GetFirstUsedSliceLoGain(),
-                                  fSignals->GetLastUsedSliceLoGain());
     }
 
@@ -451,5 +459,5 @@
   if (cal.IsHiGainSaturation())
     {
-      cal.SetPedestal(avped/avnum  * fNumLoGainSamples,
+      cal.SetPedestal(avped/avnum * fNumLoGainSamples,
                       avrms/avnum * fSqrtLoGainSamples,
                       avrms/avnum * fSqrtLoGainSamples/avnum);
@@ -458,5 +466,5 @@
   else
     {
-      cal.SetPedestal(avped/avnum  * fNumHiGainSamples,
+      cal.SetPedestal(avped/avnum * fNumHiGainSamples,
                       avrms/avnum * fSqrtHiGainSamples,
                       avrms/avnum * fSqrtHiGainSamples/avnum);
@@ -475,6 +483,74 @@
 {
   
-  cal.CheckChargeValidity (&bad);
-  cal.CheckTimeValidity   (&bad);
+  //
+  // The check return kTRUE if:
+  //
+  // 1) Pixel has a fitted charge greater than fChargeLimit*PedRMS
+  // 2) Pixel has a fit error greater than fChargeVarLimit
+  // 3) Pixel has a fitted charge greater its fChargeRelVarLimit times its charge error
+  // 4) Pixel has a charge sigma bigger than its Pedestal RMS
+  // 
+  if (cal.GetMeanCharge() < fChargeLimit*cal.GetPedRms())
+    {
+      *fLog << warn << "WARNING: Fitted Charge: " << cal.GetMeanCharge() << " is smaller than "
+            << fChargeLimit << " Pedestal RMS: " <<  cal.GetPedRms() << " in Pixel  " << cal.GetPixId() << endl;
+      bad.SetUncalibrated( MBadPixelsPix::kChargeIsPedestal);
+      bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun   );
+    }
+  
+  if (cal.GetMeanChargeErr() < fChargeErrLimit) 
+    {
+      *fLog << warn << "WARNING: Sigma of Fitted Charge: " << cal.GetMeanChargeErr() << " is smaller than "
+            << fChargeErrLimit << " in Pixel  " << cal.GetPixId() << endl;
+      bad.SetUncalibrated( MBadPixelsPix::kChargeErrNotValid );
+      bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun     );
+    }
+      
+   if (cal.GetMeanCharge() < fChargeRelErrLimit*cal.GetMeanChargeErr()) 
+    {
+      *fLog << warn << "WARNING: Fitted Charge: " << cal.GetMeanCharge() << " is smaller than "
+            << fChargeRelErrLimit << "* its error: " << cal.GetMeanChargeErr() << " in Pixel  " << cal.GetPixId() << endl;
+      bad.SetUncalibrated( MBadPixelsPix::kChargeRelErrNotValid );
+      bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun        );
+    }
+
+  if (cal.GetSigmaCharge() < cal.GetPedRms())
+    {
+      *fLog << warn << "WARNING: Sigma of Fitted Charge: " << cal.GetSigmaCharge() 
+	    << " smaller than Pedestal RMS: " << cal.GetPedRms() << " in Pixel  " << cal.GetPixId() << endl;
+      bad.SetUncalibrated( MBadPixelsPix::kChargeSigmaNotValid );
+      bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun       );
+    }
+
+  //
+  // The check returns kTRUE if:
+  //
+  // The mean arrival time is at least 1.0 slices from the lower edge slices and 2 slices from the upper edge
+  //
+  const Byte_t loweredge  = cal.IsHiGainSaturation() ? fSignals->GetFirstUsedSliceLoGain() 
+                                                     : fSignals->GetFirstUsedSliceHiGain();
+  const Byte_t upperedge  = cal.IsHiGainSaturation() ? fSignals->GetLastUsedSliceLoGain()
+                                                     : fSignals->GetLastUsedSliceHiGain();
+
+  const Float_t lowerlimit = (Float_t)loweredge + fTimeLowerLimit;
+  const Float_t upperlimit = (Float_t)upperedge + fTimeUpperLimit;  
+
+  if ( cal.GetAbsTimeMean() < lowerlimit)
+    {
+      *fLog << warn << "WARNING: Mean ArrivalTime in first " << fTimeLowerLimit 
+            << " extraction bin of the Pixel " << cal.GetPixId() << endl;
+      *fLog << cal.GetAbsTimeMean() << "   " << lowerlimit << endl;
+      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInFirstBin );
+      bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun      );
+    }
+  
+  if ( cal.GetAbsTimeMean() > upperlimit )
+    {
+      *fLog << warn << "WARNING: Mean ArrivalTime in last " << fTimeUpperLimit 
+            << " two extraction bins of the Pixel " << cal.GetPixId() << endl;
+      *fLog << cal.GetAbsTimeMean() << "   " << upperlimit << endl;
+      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInLast2Bins );
+      bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun       );
+    }
       
   if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
@@ -633,16 +709,8 @@
   fCam->SetReadyToSave();
 
-  PrintInfo();
-  
-  return kTRUE;
-}
-
-void MCalibrationChargeCalc::PrintInfo()
-{
-  
   *fLog << inf << endl;
   *fLog << GetDescriptor() << ": Calibration statistics:" << endl;
   *fLog << dec << setfill(' ');
-  
+
   UInt_t countinner = 0;
   UInt_t countouter = 0;  
@@ -662,10 +730,47 @@
         << "Inner: " << countinner << " Outer: " << countouter << endl;
   
-  countinner = 0;
-  countouter = 0;
+  PrintUnsuitable(MBadPixelsPix::kUnsuitableRun, "Bad Pixels:                     ");
+  PrintUnsuitable(MBadPixelsPix::kUnreliableRun, "Unreliable Pixels:              ");
+
+  *fLog << inf << endl;
+  *fLog << GetDescriptor() << ": Errors statistics:" << endl;  
+
+  PrintUncalibrated(MBadPixelsPix::kChargeIsPedestal,    
+                    Form("%s%2.1f%s","Signal less than ",fChargeLimit," Pedestal RMS:                "));
+  PrintUncalibrated(MBadPixelsPix::kChargeErrNotValid, 
+                    Form("%s%2.1f%s","Signal Error smaller than ",fChargeErrLimit,":                    "));
+  PrintUncalibrated(MBadPixelsPix::kChargeRelErrNotValid,
+                    Form("%s%2.1f%s","Signal Error bigger than ",fChargeRelErrLimit," times Mean Signal:   "));
+  PrintUncalibrated(MBadPixelsPix::kChargeSigmaNotValid, 
+                    "Signal Sigma smaller than Pedestal RMS:           ");
+  PrintUncalibrated(MBadPixelsPix::kLoGainSaturation,    
+                    "Pixels with Low Gain Saturation:                  ");
+  PrintUncalibrated(MBadPixelsPix::kMeanTimeInFirstBin, 
+                    Form("%s%2.1f%s","Mean Abs. Arr. Time in First ",fTimeLowerLimit," Bin(s):          "));
+  PrintUncalibrated(MBadPixelsPix::kMeanTimeInLast2Bins, 
+                    Form("%s%2.1f%s","Mean Abs. Arr. Time in Last ",fTimeUpperLimit," Bin(s):           "));
+  PrintUncalibrated(MBadPixelsPix::kHiGainOscillating,   
+                    "Pixels with changing Hi Gain signal over time:    ");
+  PrintUncalibrated(MBadPixelsPix::kLoGainOscillating,   
+                    "Pixels with changing Lo Gain signal over time:    ");
+  PrintUncalibrated(MBadPixelsPix::kDeviatingNumPhes,    
+                    "Pixels with deviating number of phes:             ");
+  PrintUncalibrated(MBadPixelsPix::kHiGainNotFitted,     
+                    "Pixels with unsuccesful Gauss fit to the Hi Gain: ");
+  PrintUncalibrated(MBadPixelsPix::kLoGainNotFitted,     
+                    "Pixels with unsuccesful Gauss fit to the Lo Gain: ");
+
+  return kTRUE;
+}
+
+void MCalibrationChargeCalc::PrintUnsuitable(MBadPixelsPix::UnsuitableType_t typ, const char *text) const 
+{
+
+  UInt_t countinner = 0;
+  UInt_t countouter = 0;
   for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     {
       MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
+      if (bad.IsUnsuitable(typ))
         {
           if (fGeom->GetPixRatio(i) == 1.)
@@ -676,13 +781,17 @@
     }
 
-  *fLog << " " << setw(7) << "Bad Pixels:                     " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-  countinner = 0;
-  countouter = 0;
+  *fLog << " " << setw(7) << text 
+        << Form("%s%3i%s%3i","Inner: ",countinner," Outer: ",countouter) << endl;
+}
+
+void MCalibrationChargeCalc::PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const 
+{
+  
+  UInt_t countinner = 0;
+  UInt_t countouter = 0;
   for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     {
       MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsUnsuitable(MBadPixelsPix::kUnreliableRun))
+      if (bad.IsUncalibrated(typ))
         {
           if (fGeom->GetPixRatio(i) == 1.)
@@ -693,196 +802,6 @@
     }
 
-  *fLog << " " << setw(7) << "Unreliable Pixels:              " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-  *fLog << inf << endl;
-  *fLog << GetDescriptor() << ": Errors statistics:" << endl;  
-
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsChargeIsPedestal())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Signal less than 3 Pedestal RMS:                 " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsChargeErrNotValid())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Signal Error smaller than 0:                     " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-  
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsChargeRelErrNotValid())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Signal Error bigger than Mean Signal:            " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-  
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsChargeSigmaNotValid())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Signal Sigma smaller than Pedestal RMS:          " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-  
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsLoGainSaturation())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Pixels with Low Gain Saturation:                 " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsMeanTimeInFirstBin())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Pixels with Mean Abs. Arr. Time in First Bin:    " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsMeanTimeInLastBin())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Pixels with Mean Abs. Arr. Time in Last 2 Bins:  " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-  
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsHiGainOscillating())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Pixels with changing Hi Gain signal over time:   " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsLoGainOscillating())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Pixels with changing Lo Gain signal over time:   " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (!bad.IsCalibrationFitOK())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Pixels with unsuccessful signal fit:             " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-  countinner = 0;
-  countouter = 0;
-  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
-    {
-      MBadPixelsPix &bad = (*fBadPixels)[i];
-      if (bad.IsDeviatingNumPhes())
-        {
-          if (fGeom->GetPixRatio(i) == 1.)
-            countinner++;
-          else
-            countouter++;
-        }
-    }
-
-  *fLog << " " << setw(7) << "Pixels with deviating number of phes:            " 
-        << "Inner: " << countinner << " Outer: " << countouter << endl;
-
-}
+  *fLog << " " << setw(7) << text  
+        << Form("%s%3i%s%3i","Inner: ",countinner," Outer: ",countouter) << endl;
+}
+
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h	(revision 3601)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h	(revision 3602)
@@ -13,4 +13,8 @@
 #ifndef MARS_MTask
 #include "MTask.h"
+#endif
+
+#ifndef MARS_MBadPixelsPix
+#include "MBadPixelsPix.h"
 #endif
 
@@ -32,4 +36,16 @@
 {
 private:
+
+  static const Float_t fgChargeLimit;       // The default for fChargeLimit
+  static const Float_t fgChargeErrLimit;    // The default for fChargeErrLimit
+  static const Float_t fgChargeRelErrLimit; // The default for fChargeRelErrLimit
+  static const Float_t fgTimeLowerLimit;    // The default for fTimeLowerLimit
+  static const Float_t fgTimeUpperLimit;    // The default for fTimeUpperLimit
+  
+  Float_t fChargeLimit;          // The limit (in units of PedRMS) for acceptance of the fitted mean charge
+  Float_t fChargeErrLimit;       // The limit (in units of PedRMS) for acceptance of the fitted charge sigma square
+  Float_t fChargeRelErrLimit;    // The limit (in units of Sigma of fitted charge) for acceptance of the fitted mean  
+  Float_t fTimeLowerLimit;       // The limit (in units of FADC slices) for distance to first signal extraction slice
+  Float_t fTimeUpperLimit;       // The limit (in units of FADC slices) for distance to last signal extraction slice
 
   MPedestalCam               *fPedestals;     //! Pedestals of all pixels in the camera
@@ -67,6 +83,8 @@
   void FinalizeAvPedestals(MCalibrationChargePix &cal, Float_t avped, Float_t avrms, Int_t avnum);
   Bool_t FinalizeCharges(MCalibrationChargePix &cal, MBadPixelsPix &bad);
-  void PrintInfo();
-  
+
+  void PrintUnsuitable(MBadPixelsPix::UnsuitableType_t typ, const char *text) const;   
+  void PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
+
 public:
 
@@ -75,4 +93,11 @@
   void Clear(const Option_t *o="");
   
+  void SetChargeLimit    (   const Float_t f=fgChargeLimit       ) { fChargeLimit       = f; }
+  void SetChargeErrLimit (   const Float_t f=fgChargeErrLimit    ) { fChargeErrLimit    = f; }
+  void SetChargeRelErrLimit( const Float_t f=fgChargeRelErrLimit ) { fChargeRelErrLimit = f; }
+
+  void SetTimeLowerLimit (   const Float_t f=fgTimeLowerLimit    ) { fTimeLowerLimit  = f;   }
+  void SetTimeUpperLimit (   const Float_t f=fgTimeUpperLimit    ) { fTimeUpperLimit  = f;   }
+
   void SkipQualityChecks(Bool_t b=kTRUE)
       {b ? CLRBIT(fFlags, kUseQualityChecks)    : SETBIT(fFlags, kUseQualityChecks);}
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h	(revision 3601)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h	(revision 3602)
@@ -19,20 +19,7 @@
   static const Float_t gkFFactorErr;             // The laboratory F-factor Error of the PMTs
 
-  static const Float_t fgChargeLimit;            // The default limit (in units of PedRMS) for acceptance of the fitted mean charge
-  static const Float_t fgChargeErrLimit;         // The default limit (in units of PedRMS) for acceptance of the fitted charge sigma
-  static const Float_t fgChargeRelErrLimit;      // The default limit (in units of Error of fitted charge) for acceptance of the fitted mean  
-
-  static const Float_t fgTimeLimit;              // The limit (in units of FADC slices) for acceptance of the fitted time
-  static const Float_t fgTimeErrLimit;           // The limit (in units of FADC slices) for acceptance of the fitted time sigma
 
   static const Float_t fgPheFFactorMethodLimit;  // The default minimum number of Photo-electrons for a pixel to be accepted.
   
-  Float_t fChargeLimit;             // The limit (in units of PedRMS) for acceptance of the fitted mean charge
-  Float_t fChargeVarLimit;          // The limit (in units of PedRMS) for acceptance of the fitted charge sigma square
-  Float_t fChargeRelVarLimit;       // The limit (in units of Variance of fitted charge) for acceptance of the fitted mean  
-  
-  Float_t fTimeLimit;               // The limit (in units of FADC slices) for acceptance of the fitted time
-  Float_t fTimeVarLimit;            // The limit (in units of FADC slices) for acceptance of the fitted time sigma
-
   Float_t fElectronicPedRms;        // The pure electronic component of the RMS
   Float_t fElectronicPedRmsVar;     // The error of the pure electronic component of the RMS
@@ -69,10 +56,4 @@
   Float_t fAbsTimeRms;              // The rms of the mean absolute arrival time
   
-  Byte_t  fTimeFirstHiGain;         // The first used FADC slice
-  Byte_t  fTimeLastHiGain;          // The last used FADC slice
-  
-  Byte_t  fTimeFirstLoGain;         // The first used FADC slice
-  Byte_t  fTimeLastLoGain;          // The last used FADC slice
-  
   Float_t fPheFFactorMethod;        // The number of Phe's calculated (F-factor method)
   Float_t fPheFFactorMethodVar;     // The error on the number of Phe's calculated (F-factor method)
@@ -114,5 +95,4 @@
   enum  { kHiGainSaturation, kLoGainSaturation,
           kExcluded, 
-          kChargeValid, kTimeFitValid,
           kBlindPixelMethodValid, kFFactorMethodValid, 
 	  kPINDiodeMethodValid, kCombinedMethodValid };
@@ -132,10 +112,4 @@
   void SetConversionHiLo(     const Float_t c = gkConversionHiLo)       { fConversionHiLo      = c;    }
   void SetConversionHiLoErr(  const Float_t e = gkConversionHiLoErr)    { fConversionHiLoVar   = e*e;    }
-  void SetChargeLimit    (   const Float_t f=fgChargeLimit       ) { fChargeLimit       = f; }
-  void SetChargeErrLimit (   const Float_t f=fgChargeErrLimit    ) { fChargeVarLimit    = f*f; }
-  void SetChargeRelErrLimit( const Float_t f=fgChargeRelErrLimit ) { fChargeRelVarLimit = f*f; }
-
-  void SetTimeLimit      (   const Float_t f=fgTimeLimit         ) { fTimeLimit       = f;   }
-  void SetTimeErrLimit   (   const Float_t f=fgTimeErrLimit      ) { fTimeVarLimit    = f*f;   }
 
   void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit  ) { fPheFFactorMethodLimit  = f;   }
@@ -189,7 +163,4 @@
   void SetCombinedMethodValid (  const Bool_t b = kTRUE );
 
-  void SetAbsTimeBordersHiGain( Byte_t f, Byte_t l );
-  void SetAbsTimeBordersLoGain( Byte_t f, Byte_t l );
-  
   // Charges
   Float_t GetHiGainMeanCharge()          const { return fHiGainMeanCharge;      }
@@ -271,7 +242,4 @@
 
   // Miscellaneous
-  void CheckChargeValidity ( MBadPixelsPix *bad );
-  void CheckTimeValidity   ( MBadPixelsPix *bad );
-
   void  CalcLoGainPedestal(const Float_t logainsamples);
   Bool_t CalcReducedSigma();
