Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc	(revision 3355)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc	(revision 3356)
@@ -25,8 +25,8 @@
 /////////////////////////////////////////////////////////////////////////////
 //                                                                         //
-// MCalibrationChargePix                                                         //
+// MCalibrationChargePix                                                   //
 //                                                                         //
-// This is the storage container to hold informations about the pedestal   //
-// (offset) value of one Pixel (PMT).                                      //
+// Storage container to hold informations about the calibration values     //
+// values of one Pixel (PMT).                                              //
 //                                                                         //
 // The following values are initialized to meaningful values:
@@ -34,6 +34,6 @@
 // - The Electronic Rms to 1.5 per FADC slice
 // - The uncertainty about the Electronic RMS to 0.3 per slice
-// - The F-Factor is assumed to have been measured in Munich to 1.13 - 1.17. 
-//   with the Munich definition of the F-Factor, thus: 
+// - The F-Factor is assumed to have been measured in Munich to 1.13 - 1.17.
+//   with the Munich definition of the F-Factor, thus:
 //   F = Sigma(Out)/Mean(Out) * Mean(In)/Sigma(In)
 //   Mean F-Factor  = 1.15
@@ -243,4 +243,41 @@
 }
   
+
+void  MCalibrationChargePix::SetMeanCharge( const Float_t f ) 
+{
+    if (IsHiGainSaturation())
+	fLoGainMeanCharge = f;
+    else
+	fHiGainMeanCharge = f;
+}
+
+void  MCalibrationChargePix::SetMeanChargeErr( const Float_t f ) 
+{
+    if (IsHiGainSaturation())
+	fLoGainMeanChargeErr = f;
+    else
+	fHiGainMeanChargeErr = f;
+
+}
+
+void  MCalibrationChargePix::SetSigmaCharge( const Float_t f )  
+{
+    if (IsHiGainSaturation())
+	fLoGainSigmaCharge = f;
+    else
+	fHiGainSigmaCharge = f;
+}
+
+
+void  MCalibrationChargePix::SetSigmaChargeErr( const Float_t f )   
+{
+    if (IsHiGainSaturation())
+	fLoGainSigmaChargeErr = f;
+    else
+	fHiGainSigmaChargeErr = f;
+
+}
+
+
 
 // --------------------------------------------------------------------------
@@ -735,4 +772,7 @@
   fPheFFactorMethod = ffactorsquare * chargeSquare / rsigmaSquare;
 
+  if (fPheFFactorMethod < 0.)
+      return kFALSE;
+
   //
   // Calculate the Error of Nphe
@@ -751,6 +791,4 @@
   fMeanConversionFFactorMethod         =  fPheFFactorMethod / fAverageQE / GetMeanCharge();
 
-  if (fMeanConversionFFactorMethod < 0.)
-      return kFALSE;
 
   //
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h	(revision 3355)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h	(revision 3356)
@@ -167,4 +167,9 @@
   void SetLoGainSigmaChargeErr  ( const Float_t f ) { fLoGainSigmaChargeErr  = f; }
 
+  void SetMeanCharge            ( const Float_t f );                
+  void SetMeanChargeErr         ( const Float_t f );             
+  void SetSigmaCharge           ( const Float_t f );               
+  void SetSigmaChargeErr        ( const Float_t f );            
+
   void SetHiGainNumPickup       ( const Int_t   i ) { fHiGainNumPickup       = i; }
   void SetLoGainNumPickup       ( const Int_t   i ) { fLoGainNumPickup       = i; }
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc	(revision 3355)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc	(revision 3356)
@@ -31,6 +31,5 @@
 //
 // MHCalibrationChargeHiGainPix, MHCalibrationChargeLoGainPix for each pixel 
-// and additionally two classes containing an average of the inner and the outer 
-// pixels, respectively
+// and additionally for an average of the inner and the outer pixels, respectively.
 // 
 // By default, subsequently the hi-gain classes are treated unless 
@@ -44,10 +43,11 @@
 // its errors and the fit probability are extracted. If none of these values are 
 // NaN's and if the probability is bigger than fProbLimit (default: 0.5%), the fit 
-// is declared valid. Otherwise, histogram means and RMS's are taken directly, but the 
-// flag kFitValid is set to FALSE. Outliers of more than fPickUpLimit (default: 5) sigmas 
+// is declared valid. Otherwise, the fit is repeated within ranges of the previous mean 
+// +- 5 sigma. In case that this does not help, the histogram means and RMS's are taken directly,
+// but the flag kFitValid is set to FALSE. Outliers of more than fPickUpLimit (default: 5) sigmas 
 // from the mean are counted as PickUp events. 
 //
 // Additionally, the slice number with the highest value is stored and a corresponding 
-// histogram is filled. This histogram serves only for a rought cross-check if the 
+// histogram is filled. This histogram serves only for a rough cross-check if the 
 // signal does not lie at the edges of chose extraction window. 
 //
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.cc	(revision 3355)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.cc	(revision 3356)
@@ -80,31 +80,11 @@
 }
 
-void MHCalibrationChargeHiGainPix::Draw(const Option_t *opt)
-{
-
-  TString option(opt);
-  option.ToLower();
-  
-  Int_t win = 1;
-
-  TVirtualPad *oldpad = gPad ? gPad : MH::MakeDefCanvas(this,600, 600);
-  TVirtualPad *pad    = NULL;
-
-  oldpad->SetBorderMode(0);  
-
-  pad->SetTicks();
-  pad->SetBorderMode(0);
-    
-
-  pad->Divide(1,win);
-  pad->cd(1);
-
-  if (!IsEmpty())
-    pad->SetLogy();
-
-  MHGausEvents::Draw(opt);
-
-}
 
 
 
+
+
+
+
+
+
