Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 3613)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 3614)
@@ -25,4 +25,5 @@
    * mcalib/MHCalibrationChargeHiGainPix.[h,cc]
    * mcalib/MHCalibrationChargeLoGainPix.[h,cc]
+   * mcalib/MHCalibrationChargeBlindPix.[h,cc]
      - updated and enlarged documentation
 
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc	(revision 3613)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc	(revision 3614)
@@ -27,14 +27,19 @@
 //  MHCalibrationChargeBlindPix
 //
-//  Performs all the Single Photo-Electron Fit to extract
-//  the mean number of photons and to derive the light flux
-//
-// The fit result is accepted under condition that:
-// 1) the Probability is greater than gkProbLimit (default 0.001 == 99.7%)
-// 2) at least 100 events are in the single Photo-electron peak
-//
-// Used numbers are the following:
-//
-// Electronic conversion factor:
+//  Histogram container for the calibration Blind Pixel information
+//  Performs the Single Photo-electron fit to extract the Poisson mean and its errors
+//
+//  Different fits can be chosen with the function ChangeFitFunc()
+//
+//  The fit result is accepted under condition that:
+//  1) the Probability is greater than fProbLimit (default 0.001 == 99.7%)
+//  2) at least fNumSinglePheLimit events are found in the single Photo-electron peak
+//
+//  The single FADC slice entries are averaged and stored in fASinglePheFADCSlices, if 
+//  their sum exceeds fSinglePheCut, otherwise in fAPedestalFADCSlices.
+//
+//  Used numbers are the following:
+//
+//  Electronic conversion factor:
 //   Assume, we have N_e electrons at the anode, 
 //   thus a charge of N_e*e (e = electron charge) Coulomb.
@@ -92,5 +97,4 @@
 const Axis_t   MHCalibrationChargeBlindPix::fgChargeFirst        = -100.5;
 const Axis_t   MHCalibrationChargeBlindPix::fgChargeLast         = 5199.5;
-
 const Float_t  MHCalibrationChargeBlindPix::fgSinglePheCut       = 200.;
 const Float_t  MHCalibrationChargeBlindPix::fgNumSinglePheLimit  =  50.;
@@ -99,7 +103,24 @@
 // Default Constructor. 
 //
+// Sets: 
+// - the default number for fChargeNbins  (fgChargeNbins)
+// - the default number for fChargeFirst  (fgChargeFirst)
+// - the default number for fChargeLast   (fgChargeLast)
+// - the default number for fSinglePheCut (fgSingePheCut)
+// - the default number for fNumSinglePheLimit (fgNumSinglePheLimit)
+//
+// - the default name of the  fHGausHist ("HCalibrationChargeBlindPix")
+// - the default title of the fHGausHist ("Distribution of Summed FADC slices Blind Pixel ")
+// - the default x-axis title for fHGausHist ("Sum FADC Slices")
+// - the default y-axis title for fHGausHist ("Nr. of events")
+//
+// Initializes:
+// - all pointers to NULL
+// - all variables to 0., except the fit result variables to -999.
+// - all flags to kFALSE
+// - the default Fit function to kEPoisson5
+//
 MHCalibrationChargeBlindPix::MHCalibrationChargeBlindPix(const char *name, const char *title)
-    :  fBlindPix(NULL), fSignal(NULL),  fRawEvt(NULL), 
-       fASinglePheFADCSlices(30), fAPedestalFADCSlices(30), 
+    :  fBlindPix(NULL), fSignal(NULL), fRawEvt(NULL), 
        fSinglePheFit(NULL), 
        fFitLegend(NULL),
@@ -127,4 +148,15 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Default Destructor. 
+//
+// Deletes (if Pointer is not NULL):
+// 
+// - fSinglePheFit
+// - fFitLegend 
+// - fHSinglePheFADCSlices
+// - fHPedestalFADCSlices    
+// 
 MHCalibrationChargeBlindPix::~MHCalibrationChargeBlindPix()
 {
@@ -144,10 +176,26 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Sets:
+// - fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast);
+//
 void MHCalibrationChargeBlindPix::Init()
 {
-
   fHGausHist.SetBins( fChargeNbins, fChargeFirst, fChargeLast);
 }
 
+// --------------------------------------------------------------------------
+//
+// Sets:
+// - all variables to 0., except the fit result variables to -999.
+// - all flags to kFALSE
+// - all pointers to NULL
+//
+// Deletes: 
+// - all pointers unequal NULL
+//
+// Executes MHCalibrationChargePix::Clear()
+//
 void MHCalibrationChargeBlindPix::Clear(Option_t *o)
 {
@@ -168,14 +216,5 @@
   fLambdaCheckErr = -999.;
   
-  fMeanPedestal     = 0.;
-  fMeanPedestalErr  = 0.;
-  fSigmaPedestal    = 0.;
-  fSigmaPedestalErr = 0.;
-
   fFitFunc = kEPoisson5;
-
-  fExtractSlices    = 0;
-  fNumSinglePhes    = 0;
-  fNumPedestals     = 0;
 
   fNumSinglePhes    = 0;
@@ -238,20 +277,36 @@
 }
   
+// --------------------------------------------------------------------------
+//
+// Gets the pointers to:
+// - MRawEvtData
+// - MExtractedSignalBlindPixel
+// 
+// Initializes:
+// - fASinglePheFADCSlices(0);
+// - fAPedestalFADCSlices(0);
+//
+// Calls Init()
+//
 Bool_t MHCalibrationChargeBlindPix::SetupFill(const MParList *pList) 
 {
-   fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
-    if (!fRawEvt)
+
+  fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
+  if (!fRawEvt)
     {
       *fLog << err << "MRawEvtData not found... aborting." << endl;
       return kFALSE;
     }
-
+  
   fSignal  = (MExtractedSignalBlindPixel*)pList->FindObject("MExtractedSignalBlindPixel");
   if (!fSignal)
-  {
+    {
       *fLog << err << "MExtractedSignalBlindPixel not found... aborting " << endl;
       return kFALSE;
-  }
-
+    }
+  
+  fASinglePheFADCSlices(0);
+  fAPedestalFADCSlices(0);
+  
   Init();
   
@@ -259,4 +314,13 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Gets or creates the pointers to:
+// - MCalibrationChargeBlindPix
+//
+// Resizes:
+// - fASinglePheFADCSlices to sum of HiGain and LoGain samples
+// - fAPedestalFADCSlices to sum of HiGain and LoGain samples
+//
 Bool_t MHCalibrationChargeBlindPix::ReInit(MParList *pList)
 {
@@ -266,7 +330,29 @@
       return kFALSE;
 
+  Int_t samples = (Int_t)fRawEvt->GetNumHiGainSamples()+(Int_t)fRawEvt->GetNumLoGainSamples();
+
+  if (fASinglePheFADCSlices.GetNrows() != samples)
+    {
+      fASinglePheFADCSlices.ResizeTo(samples);
+      fAPedestalFADCSlices.ResizeTo(samples);
+    }
+  
+
   return kTRUE;
 }
 
+// --------------------------------------------------------------------------
+//
+// Retrieves from MExtractedSignalBlindPixel:
+// - number of FADC samples
+// - extracted signal 
+// - blind Pixel ID
+//
+// Executes MHGausEvents::FillHistAndArray(signal)
+//
+// Creates MRawEvtPixelIter, jumps to blind pixel ID, 
+// fills the vectors fASinglePheFADCSlices and fAPedestalFADCSlices 
+// with the full FADC slices, depending on the size of the signal w.r.t. fSinglePheCut
+//
 Bool_t MHCalibrationChargeBlindPix::Fill(const MParContainer *par, const Stat_t w)
 {
@@ -281,12 +367,4 @@
     }
   
-  if (fExtractSlices != 0. && slices != fExtractSlices )
-    {
-      *fLog << err << "Number of used signal slices changed in MExtractedSignalCam  ... abort." 
-            << endl;
-      return kFALSE;
-    }
-  fExtractSlices = slices;
-
   //
   // Signal extraction and histogram filling
@@ -298,6 +376,8 @@
   // IN order to study the single-phe posistion, we extract the slices
   //
+  const Int_t blindpixIdx = fSignal->GetBlindPixelIdx();
+
   MRawEvtPixelIter pixel(fRawEvt);
-  pixel.Jump(fSignal->GetBlindPixelIdx());
+  pixel.Jump(blindpixIdx);
 
   if (signal > fSinglePheCut)
@@ -309,4 +389,15 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Returns kFALSE, if empty
+//
+// - Creates the fourier spectrum and sets bit IsFourierSpectrumOK()
+// - Retrieves the pedestals from MExtractedSignalBlindPixel
+// - Normalizes fASinglePheFADCSlices and fAPedestalFADCSlices
+// - Executes FitPedestal()
+// - Executes FitSinglePhe()
+// - Retrieves fit results and stores them in MCalibrationChargeBlindPix
+// 
 Bool_t MHCalibrationChargeBlindPix::Finalize() 
 {
@@ -355,4 +446,9 @@
 }
 
+
+// --------------------------------------------------------------------------
+//
+// Checks again for the size and fills fASinglePheFADCSlices with the FADC slice entries
+// 
 void MHCalibrationChargeBlindPix::FillSinglePheFADCSlices(const MRawEvtPixelIter &iter)
 {
@@ -380,4 +476,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Checks again for the size and fills fAPedestalFADCSlices with the FADC slice entries
+// 
 void MHCalibrationChargeBlindPix::FillPedestalFADCSlices(const MRawEvtPixelIter &iter)
 {
@@ -405,5 +505,8 @@
 
 
-
+// --------------------------------------------------------------------------
+//
+// Task to simulate single phe spectrum with the given parameters
+// 
 Bool_t MHCalibrationChargeBlindPix::SimulateSinglePhe(Double_t lambda, Double_t mu0, Double_t mu1, Double_t sigma0, Double_t sigma1) 
 {
@@ -427,4 +530,11 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// - Get the ranges from the stripped histogram
+// - choose reasonable start values for the fit
+// - initialize the fit function depending on fFitFunc
+// - initialize parameter names and limits depending on fFitFunc
+//
 Bool_t MHCalibrationChargeBlindPix::InitFit()
 {
@@ -570,4 +680,9 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// - Retrieve the parameters depending on fFitFunc
+// - Retrieve probability, Chisquare and NDF
+//
 void MHCalibrationChargeBlindPix::ExitFit()
 {
@@ -623,5 +738,16 @@
 }
 
-
+// --------------------------------------------------------------------------
+//
+// - Executes InitFit()
+// - Fits the fHGausHist with fSinglePheFit
+// - Executes ExitFit()
+//
+// The fit result is accepted under condition:
+// 1) The results are not nan's
+// 2) The NDF is not smaller than fNDFLimit (5)
+// 3) The Probability is greater than fProbLimit (default 0.001 == 99.9%)
+// 4) at least fNumSinglePheLimit events are in the single Photo-electron peak
+//
 Bool_t MHCalibrationChargeBlindPix::FitSinglePhe(Option_t *opt) 
 {
@@ -640,4 +766,5 @@
   // 3) The Probability is greater than fProbLimit (default 0.001 == 99.9%)
   // 4) at least fNumSinglePheLimit events are in the single Photo-electron peak
+  //
   if (   TMath::IsNaN(fLambda) 
       || TMath::IsNaN(fLambdaErr)
@@ -671,4 +798,11 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// - Retrieves limits for the fit
+// - Fits the fHGausHist with Gauss 
+// - Retrieves the results to fLambdaCheck and fLambdaCheckErr
+// - Sets a flag IsPedestalFitOK()
+//
 void MHCalibrationChargeBlindPix::FitPedestal  (Option_t *opt)
 {
@@ -777,4 +911,9 @@
 // Draw the histogram
 //
+// The following options can be chosen:
+//
+// "": displays the fHGausHist, the legend and fASinglePheFADCSlices and fAPedestalFADCSlices
+// "all": executes additionally MHGausEvents::Draw(), with option "fourierevents"
+//
 void MHCalibrationChargeBlindPix::Draw(Option_t *opt) 
 {
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h	(revision 3613)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h	(revision 3614)
@@ -27,65 +27,58 @@
 private:
 
-  MCalibrationChargeBlindPix *fBlindPix;  //! Storage container of the results  
-  MExtractedSignalBlindPixel *fSignal;    //! Storage container of the extracted signal
-  MRawEvtData                *fRawEvt;    //! Storage container of the raw data
-
-  static const Int_t    fgChargeNbins;
-  static const Axis_t   fgChargeFirst;
-  static const Axis_t   fgChargeLast;  
-
-  static const Float_t  fgSinglePheCut;  
-
-  static const Float_t  fgNumSinglePheLimit;
-
-  static const Double_t gkElectronicAmp;
-  static const Double_t gkElectronicAmpErr;
-
-  TVector fASinglePheFADCSlices;           // Array containing the averaged FADC slice entries for the supposed single-phe events
-  TVector fAPedestalFADCSlices;            // Array containing the averaged FADC slice entries for the supposed pedestal   events
-
-  TF1 *fSinglePheFit;                      //-> Single Phe Fit (Gaussians convoluted with Poisson) (needs to be a pointer, initialized later)
-
-  UInt_t  fNumSinglePhes;
-  UInt_t  fNumPedestals;
-
-  Float_t fSinglePheCut;  
-
-  Float_t fNumSinglePheLimit;
-
-  Double_t  fLambda; 
-  Double_t  fMu0; 
-  Double_t  fMu1; 
-  Double_t  fSigma0; 
-  Double_t  fSigma1; 
-
-  Double_t  fLambdaErr; 
-  Double_t  fMu0Err; 
-  Double_t  fMu1Err; 
-  Double_t  fSigma0Err; 
-  Double_t  fSigma1Err; 
-
-  Double_t  fLambdaCheck;
-  Double_t  fLambdaCheckErr;
-
-  Double_t  fChisquare;
-  Int_t     fNDF;
-  Double_t  fProb;
-
-  Double_t  fMeanPedestal;
-  Double_t  fMeanPedestalErr;
-  Double_t  fSigmaPedestal;
-  Double_t  fSigmaPedestalErr;
-
-  Float_t   fExtractSlices;
-
-  Byte_t    fFlags;
-
-  enum { kSinglePheFitOK, kPedestalFitOK };
-
-  TPaveText *fFitLegend;                        //!
-  TH1F      *fHSinglePheFADCSlices;             //!
-  TH1F      *fHPedestalFADCSlices;              //!
-
+  static const Int_t    fgChargeNbins;       // Default for fChargeNBins  (now set to: 5300   )
+  static const Axis_t   fgChargeFirst;       // Default for fChargeFirst  (now set to: -100.5 )
+  static const Axis_t   fgChargeLast;        // Default for fChargeLast   (now set to: 5199.5 )
+  static const Float_t  fgSinglePheCut;      // Default for fSinglePheCut (now set to: 200   )
+  static const Float_t  fgNumSinglePheLimit; // Default for fNumSinglePheLimit (now set to: 50  )
+
+  static const Double_t gkElectronicAmp;     // Electronic Amplification after the PMT (in FADC counts/N_e)
+  static const Double_t gkElectronicAmpErr;  // Error of the electronic amplification
+
+  Float_t fSinglePheCut;                     // Value of summed FADC slices upon which event considered as single-phe
+  Float_t fNumSinglePheLimit;                // Minimum number of single-phe events 
+
+  MCalibrationChargeBlindPix *fBlindPix;     //! Storage container results  
+  MExtractedSignalBlindPixel *fSignal;       //! Storage container extracted signal
+  MRawEvtData                *fRawEvt;       //! Storage container raw data
+ 
+  TVector fASinglePheFADCSlices;             // Averaged FADC slice entries supposed single-phe events
+  TVector fAPedestalFADCSlices;              // Averaged FADC slice entries supposed pedestal   events
+ 
+  TF1 *fSinglePheFit;                        //-> Single Phe Fit (Gaussians convoluted with Poisson) 
+
+  UInt_t  fNumSinglePhes;                    // Number of entries in fASinglePheFADCSlices
+  UInt_t  fNumPedestals;                     // Number of entries in fAPedestalFADCSlices
+
+  Double_t  fLambda;                         // Poisson mean from Single-phe fit 
+  Double_t  fLambdaCheck;                    // Poisson mean from Pedestal fit alone
+  Double_t  fMu0;                            // Mean of the pedestal
+  Double_t  fMu1;                            // Mean of single-phe peak
+  Double_t  fSigma0;                         // Sigma of the pedestal
+  Double_t  fSigma1;                         // Sigma of single-phe peak
+
+  Double_t  fLambdaErr;                      // Error of Poisson mean from Single-phe fit 
+  Double_t  fLambdaCheckErr;                 // Error of Poisson mean from Pedestal fit alone 
+  Double_t  fMu0Err;                         // Error of  Mean of the pedestal    
+  Double_t  fMu1Err;                         // Error of  Mean of single-phe peak 
+  Double_t  fSigma0Err;                      // Error of  Sigma of the pedestal   
+  Double_t  fSigma1Err;                      // Error of  Sigma of single-phe peak
+ 
+  Double_t  fChisquare;                      // Chisquare of single-phe fit 
+  Int_t     fNDF;                            // Ndof of single-phe fit 
+  Double_t  fProb;                           // Probability of singleo-phe fit
+ 
+  Double_t  fMeanPedestal;                   // Mean pedestal from pedestal run
+  Double_t  fSigmaPedestal;                  // Sigma pedestal from pedestal run
+
+  Double_t  fMeanPedestalErr;                // Error of Mean pedestal from pedestal run 
+  Double_t  fSigmaPedestalErr;               // Error of Sigma pedestal from pedestal run
+
+  Byte_t    fFlags;                          // Bit-field for the flags
+  enum { kSinglePheFitOK, kPedestalFitOK };  // Possible bits to be set
+
+  TPaveText *fFitLegend;                     //! Some legend to display the fit results
+  TH1F      *fHSinglePheFADCSlices;          //! A histogram created and deleted only in Draw()
+  TH1F      *fHPedestalFADCSlices;           //! A histogram created and deleted only in Draw()
 
   // Fill histos
@@ -117,11 +110,11 @@
   void SetNumSinglePheLimit ( const Float_t lim =fgNumSinglePheLimit )    { fNumSinglePheLimit = lim;      }
 
-  void SetMeanPedestal     ( const Float_t f )   { fMeanPedestal     = f;  }
-  void SetMeanPedestalErr  ( const Float_t f )   { fMeanPedestalErr  = f;  }
-  void SetSigmaPedestal    ( const Float_t f )   { fSigmaPedestal    = f;  }
-  void SetSigmaPedestalErr ( const Float_t f )   { fSigmaPedestalErr = f;  }
-
-  void SetSinglePheFitOK   ( const Bool_t b=kTRUE);
-  void SetPedestalFitOK( const Bool_t b=kTRUE);
+  void SetMeanPedestal      ( const Float_t f )   { fMeanPedestal     = f;  }
+  void SetMeanPedestalErr   ( const Float_t f )   { fMeanPedestalErr  = f;  }
+  void SetSigmaPedestal     ( const Float_t f )   { fSigmaPedestal    = f;  }
+  void SetSigmaPedestalErr  ( const Float_t f )   { fSigmaPedestalErr = f;  }
+
+  void SetSinglePheFitOK    ( const Bool_t b=kTRUE);
+  void SetPedestalFitOK     ( const Bool_t b=kTRUE);
   
   // Getters
@@ -140,12 +133,12 @@
   const Double_t GetSigma1Err()      const { return fSigma1Err;      }
 
-  TVector &GetASinglePheFADCSlices()                { return fASinglePheFADCSlices;  }
-  const TVector &GetASinglePheFADCSlices()    const { return fASinglePheFADCSlices;  }
-
-  TVector &GetAPedestalFADCSlices()                 { return fAPedestalFADCSlices;  }  
-  const TVector &GetAPedestalFADCSlices()     const { return fAPedestalFADCSlices;  }  
-
-  const Bool_t  IsSinglePheFitOK()     const;
-  const Bool_t  IsPedestalFitOK()  const;
+  TVector &GetASinglePheFADCSlices()             { return fASinglePheFADCSlices;  }
+  const TVector &GetASinglePheFADCSlices() const { return fASinglePheFADCSlices;  }
+
+  TVector &GetAPedestalFADCSlices()              { return fAPedestalFADCSlices;  }  
+  const TVector &GetAPedestalFADCSlices()  const { return fAPedestalFADCSlices;  }  
+
+  const Bool_t  IsSinglePheFitOK()         const;
+  const Bool_t  IsPedestalFitOK()          const;
   
   // Draws
@@ -157,5 +150,5 @@
   // Fits
 public:
-  enum FitFunc_t  { kEPoisson4, kEPoisson5, kEPoisson6, kEPoisson7, kEPolya, kEMichele };
+  enum FitFunc_t  { kEPoisson4, kEPoisson5, kEPoisson6, kEPoisson7, kEPolya, kEMichele }; // The possible fit functions
 
 private:
@@ -166,14 +159,12 @@
   void   FitPedestal  (Option_t *opt="RL0+Q");
 
-  void   ChangeFitFunc(FitFunc_t func)                 { fFitFunc = func;  }
+  void   ChangeFitFunc(const FitFunc_t func)  { fFitFunc = func;  }
   
   // Simulation
-  Bool_t SimulateSinglePhe(Double_t lambda,
-                           Double_t mu0,Double_t mu1,
-                           Double_t sigma0,Double_t sigma1);
+  Bool_t SimulateSinglePhe(const Double_t lambda,
+                           const Double_t mu0,    const Double_t mu1,
+                           const Double_t sigma0, const Double_t sigma1);
   
 private:
-
-  const static Double_t fNoWay = 10000000000.0;
 
   inline static Double_t fFitFuncMichele(Double_t *x, Double_t *par)
@@ -194,8 +185,8 @@
       
       if (mu1cat    < mu0)
-        return fNoWay;
+        return FLT_MAX;
 
       if (sigma1cat < sigma0)
-        return fNoWay;
+        return FLT_MAX;
 
       // if (sigma1cat < sigma1dyn)
@@ -269,5 +260,5 @@
       
       if (mu1 < mu0)
-        return fNoWay;
+        return FLT_MAX;
 
       Double_t sigma0 = par[3];
@@ -275,5 +266,5 @@
       
       if (sigma1 < sigma0)
-        return fNoWay;
+        return FLT_MAX;
       
       Double_t mu2 = (2.*mu1)-mu0;  
@@ -326,5 +317,5 @@
       
       if (mu1 < mu0)
-        return fNoWay;
+        return FLT_MAX;
       
       Double_t sigma0 = par[3];
@@ -332,5 +323,5 @@
       
       if (sigma1 < sigma0)
-        return fNoWay;
+        return FLT_MAX;
       
       
@@ -391,5 +382,5 @@
       
       if (mu1 < mu0)
-        return fNoWay;
+        return FLT_MAX;
       
       Double_t sigma0 = par[3];
@@ -397,5 +388,5 @@
       
       if (sigma1 < sigma0)
-        return fNoWay;
+        return FLT_MAX;
       
       
@@ -515,5 +506,5 @@
 
   
-  ClassDef(MHCalibrationChargeBlindPix, 1)  // Histograms from the Calibration Blind Pixel
+  ClassDef(MHCalibrationChargeBlindPix, 1)  // Histogram class for the Calibration Blind Pixel
 };
 
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.cc	(revision 3613)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.cc	(revision 3614)
@@ -27,5 +27,5 @@
 //  MHCalibrationChargeLoGainPix
 //
-//  Performs all the necessary fits to extract the mean number of summed FADC slices
+//  Store the histogrammed Hi Gain summed FADC slices and the arrival times
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -59,6 +59,21 @@
 // Default Constructor. 
 //
+// Sets: 
+// - the default number for fChargeNbins  (fgChargeNbins)
+// - the default number for fChargeFirst  (fgChargeFirst)
+// - the default number for fChargeLast   (fgChargeLast)
+// - the default number for fAbsTimeNbins (fgAbstTimeNbins)
+// - the default number for fAbsTimeFirst (fgAbsTimeFirst)
+// - the default number for fAbsTimeLast  (fgAbsTimeLast)
+//
+// - the default name of the  fHGausHist ("HCalibrationChargeLoGainPix")
+// - the default title of the fHGausHist ("Distribution of Summed Lo Gain FADC slices Pixel ")
+//
+// - the default name of the  fHAbsTime ("HAbsTimeLoGainPix")
+// - the default title of the fHAbsTime ("Distribution of Absolute Arrival Times Lo Gain Pixel ")
+//
 MHCalibrationChargeLoGainPix::MHCalibrationChargeLoGainPix(const char *name, const char *title)
 {
+
   fName  = name  ? name  : "MHCalibrationChargeLoGainPix";
   fTitle = title ? title : "Fill the FADC sums of the Low Gain events and perform the fits Pixel ";
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.h	(revision 3613)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.h	(revision 3614)
@@ -11,11 +11,10 @@
 private:
 
-  static const Int_t   fgChargeNbins;
-  static const Axis_t  fgChargeFirst;
-  static const Axis_t  fgChargeLast;  
-
-  static const Int_t   fgAbsTimeNbins;
-  static const Axis_t  fgAbsTimeFirst;
-  static const Axis_t  fgAbsTimeLast;
+  static const Int_t   fgChargeNbins;      // Default for fChargeNBins  (now set to: 200   )
+  static const Axis_t  fgChargeFirst;      // Default for fChargeFirst  (now set to: -0.5  )
+  static const Axis_t  fgChargeLast;       // Default for fChargeLast   (now set to: 199.5 )
+  static const Int_t   fgAbsTimeNbins;     // Default for fAbsTimeNbins (now set to: 15    )
+  static const Axis_t  fgAbsTimeFirst;     // Default for fAbsTimeFirst (now set to: -0.5  )
+  static const Axis_t  fgAbsTimeLast;      // Default for fAbsTimeLast  (now set to: 14.5  )
 
 public:
@@ -33,5 +32,5 @@
   void SetAbsTimeLast (const Axis_t last =fgAbsTimeLast)         { fAbsTimeLast  = last;    }
 
-  ClassDef(MHCalibrationChargeLoGainPix, 1)  // Histogram class for a Calibration Pixel with extracted Low Gain 
+  ClassDef(MHCalibrationChargeLoGainPix, 1)  // Histogram class for Low Gain Part of Calibration Pixel
 };
 
Index: /trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc	(revision 3613)
+++ /trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc	(revision 3614)
@@ -278,5 +278,5 @@
 //
 // Fills fHGausHist with f
-// Returns kFALSE, if overflow or underflow occurred
+// Returns kFALSE, if overflow or underflow occurred, else kTRUE
 //
 Bool_t MHGausEvents::FillHist(const Float_t f)
