Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3696)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3697)
@@ -25,4 +25,10 @@
      - put abs. time consistency check from MCalibrationChargeCalc into 
        MHCalibrationChargePINDiode and MHCalibrationChargeCam
+
+   * mcalib/MHCalibrationCam.[h,cc]	
+   * mcalib/MHCalibrationChargeCalc.[h,cc]	
+     - number of used FADC slices also stored in MHCalibrationCam, 
+       MHCalibrationChargeCalc needs no pointer to the signal extractors
+       any more -> removed
 
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 3696)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 3697)
@@ -76,4 +76,6 @@
 // Initializes:
 // - fPulserColor to kCT1 
+// - fNumHiGainFADCSlices to 0.
+// - fNumLoGainFADCSlices to 0.
 //
 // Creates a TClonesArray of MBadPixelsPix containers for the TClonesArray's: 
@@ -86,5 +88,6 @@
 //
 MCalibrationCam::MCalibrationCam(const char *name, const char *title)
-    : fPulserColor(kCT1), fPixels(NULL), fAverageAreas(NULL), fAverageSectors(NULL)
+    : fNumHiGainFADCSlices(0.), fNumLoGainFADCSlices(0.), fPulserColor(kCT1), 
+      fPixels(NULL), fAverageAreas(NULL), fAverageSectors(NULL)
 {
     fName  = name  ? name  : "MCalibrationCam";
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 3696)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 3697)
@@ -18,5 +18,4 @@
 class MCalibrationCam : public MParContainer, public MCamEvent
 {
-
 public:
 
@@ -25,4 +24,7 @@
   
 protected:
+
+  Float_t fNumHiGainFADCSlices;      // Number High-Gain FADC slices used by extractor      
+  Float_t fNumLoGainFADCSlices;      // Number Low -Gain FADC slices used by extractor
   
   PulserColor_t fPulserColor;        // Colour of the pulsed LEDs
@@ -53,7 +55,9 @@
   const Int_t            GetAverageSectors   ()           const;  
   const MCalibrationPix &GetAverageSector    ( UInt_t i ) const;
+  const Float_t          GetNumHiGainFADCSlices()         const { return fNumHiGainFADCSlices; }
+  const Float_t          GetNumLoGainFADCSlices()         const { return fNumLoGainFADCSlices; }  
   virtual Bool_t         GetPixelContent     ( Double_t &val, Int_t idx, 
                                                const MGeomCam &cam, Int_t type=0) const;
-  const PulserColor_t    GetPulserColor()                 const { return fPulserColor; }
+  const PulserColor_t    GetPulserColor()                 const { return fPulserColor;         }
   const Int_t            GetSize()                        const;
 
@@ -62,11 +66,13 @@
 
   // Inits
-  void  Init               ( const MGeomCam &geom       );
-  void  InitSize           ( const UInt_t i             );
-  void  InitAverageAreas   ( const UInt_t i             );
-  void  InitAverageSectors ( const UInt_t i             );
+  void  Init                   ( const MGeomCam &geom         );
+  void  InitSize               ( const UInt_t i               );
+  void  InitAverageAreas       ( const UInt_t i               );
+  void  InitAverageSectors     ( const UInt_t i               );
 
   // Setters
-  void  SetPulserColor     ( const PulserColor_t col=kCT1 )  { fPulserColor = col; }
+  void  SetNumHiGainFADCSlices ( const Float_t f              )  { fNumHiGainFADCSlices = f; }
+  void  SetNumLoGainFADCSlices ( const Float_t f              )  { fNumLoGainFADCSlices = f; }  
+  void  SetPulserColor         ( const PulserColor_t col=kCT1 )  { fPulserColor = col; }
   
   ClassDef(MCalibrationCam, 1)	// Base class Container for Calibration Results Camera
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 3696)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 3697)
@@ -28,11 +28,12 @@
 //
 //   Task to calculate the calibration conversion factors and quantum efficiencies 
-//   from the FADC time slices. The integrated time slices have to be delivered by an 
-//   MExtractedSignalCam, pedestals by an MPedestalCam.
-//
-//   The output container MCalibrationCam holds one entry of type MCalibrationChargePix 
-//   for every pixel. It is filled in the following way:
-//
-//   PreProcess(): Initialize MCalibrationCam
+//   from the fit results to the summed FADC slice distributions delivered by 
+//   MCalibrationChargeCam, MCalibrationChargePix, MCalibrationChargeBlindPix and 
+//   MCalibrationChargePINDiode, calculated and filled by MHCalibrationChargeCam, 
+//   MHCalibrationChargePix, MHCalibrationChargeBlindPix and MHCalibrationChargePINDiode.
+//
+//   PreProcess(): Initialize pointers to MCalibrationChargeCam, MCalibrationChargeBlindPix
+//                 MCalibrationChargePINDiode and  MCalibrationQECam
+//
 //                 Initialize pulser light wavelength
 //               
@@ -231,6 +232,4 @@
 const Float_t MCalibrationChargeCalc::fgLambdaCheckLimit       = 0.2;
 const Float_t MCalibrationChargeCalc::fgPheErrLimit            = 5.;
-const Float_t MCalibrationChargeCalc::fgTimeLowerLimit         = 1.;
-const Float_t MCalibrationChargeCalc::fgTimeUpperLimit         = 2.;
 // --------------------------------------------------------------------------
 //
@@ -251,6 +250,4 @@
 // - fLambdaCheckLimit  to fgLambdaCheckLimit 
 // - fLambdaErrLimit    to fgLambdaErrLimit 
-// - fTimeLowerLimit    to fgTimeLowerLimit 
-// - fTimeUpperLimit    to fgTimeUpperLimit 
 // - fPheErrLimit       to fgPheErrLimit  
 // - fPulserColor       to MCalibrationCam::kCT1
@@ -261,6 +258,5 @@
 MCalibrationChargeCalc::MCalibrationChargeCalc(const char *name, const char *title)
     : fBadPixels(NULL), fCam(NULL), fBlindPixel(NULL), fPINDiode(NULL), 
-      fQECam(NULL), fSignals(NULL), fSigBlind(NULL), fSigPIN(NULL),
-      fGeom(NULL), fPedestals(NULL), fEvtTime(NULL)
+      fQECam(NULL), fGeom(NULL), fPedestals(NULL), fEvtTime(NULL)
       {
 
@@ -280,6 +276,4 @@
   SetPheErrLimit();
   SetPulserColor(MCalibrationCam::kCT1);
-  SetTimeLowerLimit();
-  SetTimeUpperLimit();
 
   Clear();
@@ -302,6 +296,4 @@
 // The following container are searched for and execution aborted if not in MParList:
 //  - MPedestalCam
-//  - MExtractedSignalCam
-//  - MCalibrationChargeCam
 //
 // The following containers are searched and created if they were not found:
@@ -313,6 +305,6 @@
 // cannot be found, the corresponding calibration part is only skipped.
 //
-//  - MExtractedSignalBlindPixel and MCalibrationChargeBlindPix
-//  - MExtractedSignalPINDiode   and MCalibrationChargePINDiode
+//  - MCalibrationChargeBlindPix
+//  - MCalibrationChargePINDiode
 //  - MTime
 //
@@ -336,19 +328,4 @@
     }
   
-  fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
-  if (!fSignals)
-    {
-      *fLog << err << "MExtractedSignalCam not found... aborting" << endl;
-      return kFALSE;
-    }
-  
-  fCam = (MCalibrationChargeCam*)pList->FindObject("MCalibrationChargeCam");
-  if (!fCam)
-    {
-      *fLog << err << "Cannot find MCalibrationChargeCam... aborting" << endl;
-      *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
-      return kFALSE;
-    }
-
   // 
   // Containers that are created in case that they are not there.
@@ -368,32 +345,4 @@
     }
 
-  // 
-  // Optional Containers 
-  //
-  fSigBlind = (MExtractedSignalBlindPixel*)pList->FindObject("MExtractedSignalBlindPixel");
-  if (!fSigBlind)
-    *fLog << warn << "MExtractedSignalBlindPixel not found... no blind pixel method! " << endl;
-  else
-    {
-      fBlindPixel = (MCalibrationChargeBlindPix*)pList->FindCreateObj("MCalibrationChargeBlindPix");
-      if (!fBlindPixel)
-        {
-          *fLog << err << "Cannot find nor create MCalibrationChargeBlindPix... aborting" << endl;
-          return kFALSE;
-        }
-    }
-  
-  fSigPIN  = (MExtractedSignalPINDiode*)pList->FindObject("MExtractedSignalPINDiode");
-  if (!fSigPIN)
-    *fLog << warn << "MExtractedSignalPINDiode not found... no PIN Diode method! " << endl;
-  else
-    {
-      fPINDiode = (MCalibrationChargePINDiode*)pList->FindCreateObj("MCalibrationChargePINDiode");
-      if (!fPINDiode)
-        {
-          *fLog << err << "Cannot find nor create MCalibrationChargePINDiode... aborting" << endl;
-          return kFALSE;
-        }
-    }
   
   fEvtTime = (MTime*)pList->FindObject("MTime");
@@ -418,6 +367,7 @@
 // The ReInit searches for the following input containers:
 //  - MGeomCam
-//
-// It retrieves the following variables from MExtractedSignalCam:
+//  - MCalibrationChargeCam
+//
+// It retrieves the following variables from MCalibrationChargeCam:
 //
 //  - fNumHiGainSamples 
@@ -446,6 +396,33 @@
     }
   
-  fNumHiGainSamples  =  fSignals->GetNumUsedHiGainFADCSlices();
-  fNumLoGainSamples  =  fSignals->GetNumUsedLoGainFADCSlices();
+  fCam = (MCalibrationChargeCam*)pList->FindObject("MCalibrationChargeCam");
+  if (!fCam)
+    {
+      *fLog << err << "Cannot find MCalibrationChargeCam... aborting" << endl;
+      *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
+      return kFALSE;
+    }
+
+  // 
+  // Optional Containers 
+  //
+  fBlindPixel = (MCalibrationChargeBlindPix*)pList->FindObject("MCalibrationChargeBlindPix");
+  if (!fBlindPixel)
+    {
+      *fLog << warn << GetDescriptor() 
+            << ": MCalibrationChargeBlindPix not found... no blind pixel method! " << endl;
+      return kFALSE;
+    }
+  
+  fPINDiode = (MCalibrationChargePINDiode*)pList->FindCreateObj("MCalibrationChargePINDiode");
+  if (!fPINDiode)
+    {
+      *fLog << warn << GetDescriptor() 
+            << "MCalibrationChargePINDiode not found... no PIN Diode method! " << endl;
+      return kFALSE;
+    }
+
+  fNumHiGainSamples  =  fCam->GetNumHiGainFADCSlices();
+  fNumLoGainSamples  =  fCam->GetNumLoGainFADCSlices();
   fSqrtHiGainSamples =  TMath::Sqrt(fNumHiGainSamples);
   fSqrtLoGainSamples =  TMath::Sqrt(fNumLoGainSamples);
@@ -565,5 +542,4 @@
 // Finalize charges per pixel: 
 // - Check chage validity
-// - Check absolute time validity
 // - Calculate the reduced sigma
 // - Calculate the number of photo-electrons
@@ -609,34 +585,4 @@
     }
 
-  //
-  // The check returns kTRUE if:
-  //
-  // The mean arrival time is at least fTimeLowerLimit slices from the lower edge 
-  // and fUpperLimit 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 << GetDescriptor() << ": Mean ArrivalTime in first " << fTimeLowerLimit 
-            << " extraction bin of the Pixel " << cal.GetPixId() << endl;
-      *fLog << cal.GetAbsTimeMean() << "   " << lowerlimit << endl;
-      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInFirstBin );
-    }
-  
-  if ( cal.GetAbsTimeMean() > upperlimit )
-    {
-      *fLog << warn << GetDescriptor() << ": Mean ArrivalTime in last " << fTimeUpperLimit 
-            << " two extraction bins of the Pixel " << cal.GetPixId() << endl;
-      *fLog << cal.GetAbsTimeMean() << "   " << upperlimit << endl;
-      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInLast2Bins );
-    }
-      
   if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     return kFALSE;
@@ -671,6 +617,4 @@
 // 3) PINDiode has a fitted charge smaller its fChargeRelErrLimit times its charge error
 // 4) PINDiode has a charge sigma smaller than its Pedestal RMS
-// 5) The mean arrival time is in fTimeLowerLimit slices from the lower edge 
-//    and fUpperLimit slices from the upper edge
 // 
 // Calls:
@@ -680,7 +624,4 @@
 {
 
-  if (!fSigPIN)
-    return kFALSE;
-  
   if (!fPINDiode)
     return kFALSE;  
@@ -709,28 +650,9 @@
   if (fPINDiode->GetSigma() < fPINDiode->GetPedRms())
     {
-      *fLog << warn << GetDescriptor() << ": Sigma of Fitted Charge smaller than Pedestal RMS in PINDiode " << endl;
-    }
-      return kFALSE;
-
-  const Byte_t  loweredge  = fSigPIN->GetFirstUsedSlice();
-  const Byte_t  upperedge  = fSigPIN->GetLastUsedSlice();
-  const Float_t lowerlimit = (Float_t)loweredge + fTimeLowerLimit;
-  const Float_t upperlimit = (Float_t)upperedge + fTimeUpperLimit;  
-
-  if (fPINDiode->GetAbsTimeMean() < lowerlimit)
-    {
-      *fLog << warn << GetDescriptor() << ": Mean ArrivalTime in first " << fTimeLowerLimit 
-            << " extraction bin in PIN Diode " << endl;
-      *fLog << fPINDiode->GetAbsTimeMean() << "   " << lowerlimit << endl;
-      return kFALSE;
-    }
-  
-  if ( fPINDiode->GetAbsTimeMean() > upperlimit )
-    {
-      *fLog << warn << GetDescriptor() << ": Mean ArrivalTime in last " << fTimeUpperLimit 
-            << " two extraction bins in PIN Diode " << endl;
-      *fLog << fPINDiode->GetAbsTimeMean() << "   " << upperlimit << endl;
-      return kFALSE;
-    }
+      *fLog << warn << GetDescriptor() 
+            << ": Sigma of Fitted Charge smaller than Pedestal RMS in PINDiode " << endl;
+      return kFALSE;
+    }
+
 
   if (!fPINDiode->CalcFluxOutsidePlexiglass())
@@ -760,7 +682,4 @@
 {
 
-  if (!fSigBlind)
-    return kFALSE;
-  
   if (!fBlindPixel)
     return kFALSE;  
@@ -1340,7 +1259,7 @@
                     "Pixels with Low Gain Saturation:                  ");
   PrintUncalibrated(MBadPixelsPix::kMeanTimeInFirstBin, 
-                    Form("%s%2.1f%s","Mean Abs. Arr. Time in First ",fTimeLowerLimit," Bin(s):          "));
+                    Form("%s%2.1f%s","Mean Abs. Arr. Time in First ",1," Bin(s):          "));
   PrintUncalibrated(MBadPixelsPix::kMeanTimeInLast2Bins, 
-                    Form("%s%2.1f%s","Mean Abs. Arr. Time in Last ",fTimeUpperLimit," Bin(s):           "));
+                    Form("%s%2.1f%s","Mean Abs. Arr. Time in Last ",2," Bin(s):           "));
   PrintUncalibrated(MBadPixelsPix::kHiGainOscillating,   
                     "Pixels with changing Hi Gain signal over time:    ");
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h	(revision 3696)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h	(revision 3697)
@@ -49,6 +49,4 @@
   static const Float_t fgLambdaErrLimit;       //! Default for fLabmdaErrLimit    (now set to: 0.2)
   static const Float_t fgPheErrLimit;          //! Default for fPheErrLimit       (now set to: 5.)
-  static const Float_t fgTimeLowerLimit;       //! Default for fTimeLowerLimit    (now set to: 1.) 
-  static const Float_t fgTimeUpperLimit;       //! Default for fTimeUpperLimit    (now set to: 2.)
 
   // Variables
@@ -56,5 +54,5 @@
   Float_t fChargeErrLimit;                     // Limit acceptance charge error (in abs. numbers)
   Float_t fChargeRelErrLimit;                  // Limit acceptance rel. error mean (in abs. numbers)
-  Int_t   fFlags;                              // Bit-field for the flags
+  Byte_t  fFlags;                              // Bit-field for the flags
   Float_t fLambdaCheckLimit;                   // Limit rel. diff. lambda and lambdacheck in Blind Pixel
   Float_t fLambdaErrLimit;                     // Limit acceptance lambda error in Blind Pixel
@@ -64,6 +62,4 @@
   Float_t fSqrtHiGainSamples;                  // Square root nr. High-Gain FADC slices used by extractor
   Float_t fSqrtLoGainSamples;                  // Square root nr. Low -Gain FADC slices used by extractor 
-  Float_t fTimeLowerLimit;                     // Limit dist. to first signal slice (in units of FADC slices) 
-  Float_t fTimeUpperLimit;                     // Limit dist. to last signal slice  (in units of FADC slices) 
   MCalibrationCam::PulserColor_t fPulserColor; // Calibration LEDs colour 
 
@@ -74,7 +70,4 @@
   MCalibrationChargePINDiode *fPINDiode;       //  Calibrated Charges of the PIN Diode
   MCalibrationQECam          *fQECam;          //  Calibrated Quantum Efficiencies of all pixels 
-  MExtractedSignalCam        *fSignals;        //! Extracted signal of all pixels 
-  MExtractedSignalBlindPixel *fSigBlind;       //! Extracted signal of Blind Pixel
-  MExtractedSignalPINDiode   *fSigPIN;         //! Extracted signal of PIN Diode 
   MGeomCam                   *fGeom;           //! Camera geometry
   MPedestalCam               *fPedestals;      //! Pedestals all pixels (calculated previously from ped.file)
@@ -119,6 +112,4 @@
   void SetPheErrLimit       ( const Float_t f=fgPheErrLimit            ) { fPheErrLimit       = f;   }  
   void SetPulserColor       ( const MCalibrationCam::PulserColor_t col ) { fPulserColor       = col; }
-  void SetTimeLowerLimit    ( const Float_t f=fgTimeLowerLimit         ) { fTimeLowerLimit    = f;   }
-  void SetTimeUpperLimit    ( const Float_t f=fgTimeUpperLimit         ) { fTimeUpperLimit    = f;   }
 
   void SkipHiLoGainCalibration ( const Bool_t b=kTRUE )
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h	(revision 3696)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h	(revision 3697)
@@ -17,7 +17,8 @@
   TH2D* fOffvsSlope;                 //! Histogram with Higain-vs-LoGain fit result Offsets vs. Slopes
 
+  Byte_t  fFlags;                    // Bit-field to hold the flags
+
   enum  { kFFactorMethodValid };
 
-  Byte_t  fFlags;                    // Bit-field to hold the flags
   
 public:
@@ -27,22 +28,19 @@
   
   void   Clear ( Option_t *o="" );
-
-  // Setters   
-  void   SetFFactorMethodValid     ( const Bool_t  b=kTRUE );
+  
+  // Draws
+//  void DrawHiLoFits();
+  void   DrawPixelContent(Int_t num)   const;    
 
   // Getters
   Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &ffactor );
-
+  Bool_t GetPixelContent           ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
   Bool_t IsFFactorMethodValid()      const;
 
   // Prints
-  void Print(Option_t *o="")         const;
-  
-  // Draws
-//  void DrawHiLoFits();
-  
-  // Others
-  Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
-  void DrawPixelContent(Int_t num)   const;    
+  void   Print(Option_t *o="")         const;
+
+  // Setters   
+  void   SetFFactorMethodValid (const Bool_t b=kTRUE );
 
   ClassDef(MCalibrationChargeCam, 1) // Container Charge Calibration Results Camera
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc	(revision 3696)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc	(revision 3697)
@@ -144,4 +144,6 @@
 const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.01;
 const Float_t MHCalibrationChargeCam::fgNumLoGainSaturationLimit = 0.005;
+const Float_t MHCalibrationChargeCam::fgTimeLowerLimit           = 1.;
+const Float_t MHCalibrationChargeCam::fgTimeUpperLimit           = 2.;
 // --------------------------------------------------------------------------
 //
@@ -154,13 +156,17 @@
 // - fNumHiGainSaturationLimit to fgNumHiGainSaturationLimit
 // - fNumLoGainSaturationLimit to fgNumLoGainSaturationLimit
+// - fTimeLowerLimit           to fgTimeLowerLimit 
+// - fTimeUpperLimit           to fgTimeUpperLimit 
 //
 MHCalibrationChargeCam::MHCalibrationChargeCam(const char *name, const char *title)
-    : fRawEvt(NULL)
-{
-    fName  = name  ? name  : "MHCalibrationChargeCam";
-    fTitle = title ? title : "Class to fill the calibration histograms ";
-
-    SetNumHiGainSaturationLimit();
-    SetNumLoGainSaturationLimit();
+    : fRawEvt(NULL), fSig(NULL)
+{
+  fName  = name  ? name  : "MHCalibrationChargeCam";
+  fTitle = title ? title : "Class to fill the calibration histograms ";
+  
+  SetNumHiGainSaturationLimit();
+  SetNumLoGainSaturationLimit();
+  SetTimeLowerLimit();
+  SetTimeUpperLimit();
 }
 
@@ -169,4 +175,5 @@
 // Gets the pointers to:
 // - MRawEvtData
+// - MExtractedSignalCam
 //
 Bool_t MHCalibrationChargeCam::SetupHists(const MParList *pList)
@@ -180,4 +187,11 @@
   }
 
+  MExtractedSignalCam *fSig = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
+  if (!fSig)
+  {
+      *fLog << err << "MExtractedSignalCam not found... abort." << endl;
+      return kFALSE;
+  }
+
   return kTRUE;
 }
@@ -187,7 +201,8 @@
 // Gets or creates the pointers to:
 // - MCalibrationChargeCam
-//
-// Searches pointer to:
-// - MExtractedSignalCam
+// - MBadPixelsCam
+//
+// Initializes the number of used FADC slices from MExtractedSignalCam 
+// into MCalibrationChargeCam and test for changes in that variable
 //
 // Initializes, if empty to MGeomCam::GetNumPixels():
@@ -229,10 +244,24 @@
     }
 
-  MExtractedSignalCam *signal = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
-  if (!signal)
-  {
-      *fLog << err << "MExtractedSignalCam not found... abort." << endl;
+  const Float_t numhigain = fSig->GetNumUsedHiGainFADCSlices();
+  const Float_t numlogain = fSig->GetNumUsedLoGainFADCSlices();  
+
+  if (fCam->GetNumHiGainFADCSlices() == 0.)
+    fCam->SetNumHiGainFADCSlices ( numhigain );
+  else if (fCam->GetNumHiGainFADCSlices() != numhigain)
+    {
+      *fLog << err << GetDescriptor() 
+            << ": Number of High Gain FADC extraction slices has changes, abort..." << endl;
       return kFALSE;
-  }
+    }
+  
+  if (fCam->GetNumLoGainFADCSlices() == 0.)
+    fCam->SetNumLoGainFADCSlices ( numlogain );
+  else if (fCam->GetNumLoGainFADCSlices() != numlogain)
+    {
+      *fLog << err << GetDescriptor() 
+            << ": Number of Low Gain FADC extraction slices has changes, abort..." << endl;
+      return kFALSE;
+    }
 
   const Int_t npixels  = fGeom->GetNumPixels();
@@ -532,4 +561,10 @@
 {
 
+  const Byte_t firsthi = fSig->GetFirstUsedSliceHiGain();
+  const Byte_t lasthi  = fSig->GetLastUsedSliceHiGain();
+  const Byte_t firstlo = fSig->GetFirstUsedSliceLoGain();
+  const Byte_t lastlo  = fSig->GetLastUsedSliceLoGain();
+
+
   for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
     {
@@ -537,4 +572,5 @@
       MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)(*this)[i];
       MCalibrationChargePix  &pix    = (MCalibrationChargePix&)(*fCam)[i];
+      MBadPixelsPix          &bad    = (*fBadPixels)[i];
       
       if (histhi.IsExcluded())
@@ -548,6 +584,5 @@
         }
 
-      pix.SetAbsTimeMean ( histhi.GetAbsTimeMean());
-      pix.SetAbsTimeRms  ( histhi.GetAbsTimeRms() );
+      FinalizeAbsTimes(histhi, pix, bad, firsthi, lasthi);
     }
 
@@ -572,8 +607,5 @@
       
       if (pix.IsHiGainSaturation())
-        {
-          pix.SetAbsTimeMean     ( histlo.GetAbsTimeMean());
-          pix.SetAbsTimeRms      ( histlo.GetAbsTimeRms() );
-        }	    
+        FinalizeAbsTimes(histlo, pix, bad, firstlo, lastlo);
     }
 
@@ -583,4 +615,5 @@
       MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainArea(j);      
       MCalibrationChargePix  &pix    = (MCalibrationChargePix&)fCam->GetAverageArea(j);
+      MBadPixelsPix          &bad    = fCam->GetAverageBadArea(j);
       
       if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())
@@ -591,7 +624,6 @@
         }
 
-      pix.SetAbsTimeMean ( histhi.GetAbsTimeMean());
-      pix.SetAbsTimeRms  ( histhi.GetAbsTimeRms() );
-    }
+      FinalizeAbsTimes(histhi, pix, bad, firsthi, lasthi);
+   }
   
   for (Int_t j=0; j<fAverageLoGainAreas->GetSize(); j++)
@@ -600,5 +632,6 @@
       MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)GetAverageLoGainArea(j);      
       MCalibrationChargePix  &pix    = (MCalibrationChargePix&)fCam->GetAverageArea(j);
-      
+      MBadPixelsPix          &bad    = fCam->GetAverageBadArea(j);      
+
       if (histlo.GetSaturated() > fNumLoGainSaturationLimit*histlo.GetHGausHist()->GetEntries())
         {
@@ -609,8 +642,5 @@
 
       if (pix.IsHiGainSaturation())
-        {
-          pix.SetAbsTimeMean  ( histlo.GetAbsTimeMean());
-          pix.SetAbsTimeRms   ( histlo.GetAbsTimeRms() );
-        }	    
+        FinalizeAbsTimes(histlo, pix, bad, firstlo, lastlo);
     }
 
@@ -620,5 +650,6 @@
       MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainSector(j);      
       MCalibrationChargePix  &pix    = (MCalibrationChargePix&)fCam->GetAverageSector(j);
-      
+      MBadPixelsPix          &bad    = fCam->GetAverageBadSector(j);      
+
       if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())
         {
@@ -628,6 +659,5 @@
         }
 
-      pix.SetAbsTimeMean ( histhi.GetAbsTimeMean());
-      pix.SetAbsTimeRms  ( histhi.GetAbsTimeRms() );
+      FinalizeAbsTimes(histhi, pix, bad, firsthi, lasthi);
     }
   
@@ -648,8 +678,5 @@
 
       if (pix.IsHiGainSaturation())
-        {
-          pix.SetAbsTimeMean  ( histlo.GetAbsTimeMean());
-          pix.SetAbsTimeRms   ( histlo.GetAbsTimeRms() );
-        }	    
+        FinalizeAbsTimes(histlo, pix, bad, firstlo, lastlo);
     }
   
@@ -670,4 +697,42 @@
 }
 
+// --------------------------------------------------------------------------------
+//
+// Fill the absolute time results into MCalibrationChargePix
+//
+// Check absolute time validity:
+// - Mean arrival time is at least fTimeLowerLimit slices from the lower edge 
+// - Mean arrival time is at least fUpperLimit     slices from the upper edge
+//
+void MHCalibrationChargeCam::FinalizeAbsTimes(MHCalibrationChargePix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad, 
+                                              Byte_t first, Byte_t last)
+{
+  
+  const Float_t mean = hist.GetAbsTimeMean();
+  const Float_t rms  = hist.GetAbsTimeRms();
+
+  pix.SetAbsTimeMean ( mean );
+  pix.SetAbsTimeRms  ( rms  );
+  
+  const Float_t lowerlimit = (Float_t)first + fTimeLowerLimit;
+  const Float_t upperlimit = (Float_t)last  + fTimeUpperLimit;  
+
+  if ( mean < lowerlimit)
+    {
+      *fLog << warn << GetDescriptor() 
+            << Form("%s%3.1f%s%2i%s%4i",": Mean ArrivalTime: ",mean," smaller than ",fTimeLowerLimit,
+                    " FADC slices from lower edge in pixel ",hist.GetPixId()) << endl;
+      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInFirstBin );
+    }
+  
+  if ( mean  > upperlimit )
+    {
+      *fLog << warn << GetDescriptor() 
+            << Form("%s%3.1f%s%2i%s%4i",": Mean ArrivalTime: ",mean," greater than ",fTimeUpperLimit,
+                    " FADC slices from upper edge in pixel ",hist.GetPixId()) << endl;
+      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInLast2Bins );
+    }
+}
+
 // --------------------------------------------------------------------------
 //
