Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc	(revision 3511)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc	(revision 3551)
@@ -62,5 +62,5 @@
 // =============================================
 //
-// 9: Number of Photo-electrons obtained with the F-Factor method
+//  9: Number of Photo-electrons obtained with the F-Factor method
 // 10: Error on Number of Photo-electrons obtained with the F-Factor method
 // 11: Mean conversion factor obtained with the F-Factor method
@@ -68,50 +68,42 @@
 // 13: Overall F-Factor of the readout obtained with the F-Factor method
 // 14: Error on Overall F-Factor of the readout obtained with the F-Factor method
-// 15: Number of Photons inside Plexiglass obtained with the Blind Pixel method
-// 16: Error on Number of Photons inside Plexiglass obtained with the Blind Pixel method
-// 17: Mean conversion factor obtained with the Blind Pixel method
-// 18: Error on the mean conversion factor obtained with the Blind Pixel method
-// 19: Overall F-Factor of the readout obtained with the Blind Pixel method
-// 20: Error on Overall F-Factor of the readout obtained with the Blind Pixel method
-// 21: Number of Photons outside Plexiglass obtained with the PIN Diode method
-// 22: Error on Number of Photons outside Plexiglass obtained with the PIN Diode method
-// 23: Mean conversion factor obtained with the PIN Diode method
-// 24: Error on the mean conversion factor obtained with the PIN Diode method
-// 25: Overall F-Factor of the readout obtained with the PIN Diode method
-// 26: Error on Overall F-Factor of the readout obtained with the PIN Diode method
+// 15: Pixels with valid calibration by the F-Factor-Method
+// 16: Mean conversion factor obtained with the Blind Pixel method
+// 17: Error on the mean conversion factor obtained with the Blind Pixel method
+// 18: Overall F-Factor of the readout obtained with the Blind Pixel method
+// 19: Error on Overall F-Factor of the readout obtained with the Blind Pixel method
+// 20: Pixels with valid calibration by the Blind Pixel-Method
+// 21: Mean conversion factor obtained with the PIN Diode method
+// 22: Error on the mean conversion factor obtained with the PIN Diode method
+// 23: Overall F-Factor of the readout obtained with the PIN Diode method
+// 24: Error on Overall F-Factor of the readout obtained with the PIN Diode method
+// 25: Pixels with valid calibration by the PIN Diode-Method
 //
 // Localized defects:
 // ==================
 //
-// 27: Excluded Pixels
-// 28: Pixels where the fit did not succeed --> results obtained only from the histograms
-// 29: Number of probable pickup events in the Hi Gain 
-// 30: Number of probable pickup events in the Lo Gain
+// 26: Excluded Pixels
+// 27: Pixels where the fit did not succeed --> results obtained only from the histograms
+// 28: Number of probable pickup events in the Hi Gain 
+// 29: Number of probable pickup events in the Lo Gain
 //
 // Other classifications of pixels:
 // ================================
 //
-// 31: Pixels with saturated Hi-Gain
-//
-// Classification of validity of the calibrations:
-// ===============================================
-//
-// 32: Pixels with valid calibration by the F-Factor-Method
-// 33: Pixels with valid calibration by the Blind Pixel-Method
-// 34: Pixels with valid calibration by the PIN Diode-Method
+// 30: Pixels with saturated Hi-Gain
 //
 // Used Pedestals:
 // ===============
 //
-// 35: Mean Pedestal over the entire range of signal extraction
-// 36: Error on the Mean Pedestal over the entire range of signal extraction
-// 37: Pedestal RMS over the entire range of signal extraction
-// 38: Error on the Pedestal RMS over the entire range of signal extraction
+// 31: Mean Pedestal over the entire range of signal extraction
+// 32: Error on the Mean Pedestal over the entire range of signal extraction
+// 33: Pedestal RMS over the entire range of signal extraction
+// 34: Error on the Pedestal RMS over the entire range of signal extraction
 //
 // Calculated absolute arrival times (very low precision!):
 // ========================================================
 //
-// 39: Absolute Arrival time of the signal
-// 40: RMS of the Absolute Arrival time of the signal
+// 35: Absolute Arrival time of the signal
+// 36: RMS of the Absolute Arrival time of the signal
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -422,8 +414,17 @@
 // 8: Error of Reduced Sigma per Charge 
 //
+// Useful variables derived from the fit results:
+// =============================================
+//
+// 4: Returned probability of Gauss fit to Charge distribution
+// 5: Reduced Sigma of fitted Charge --> sqrt(sigma_Q^2 - PedRMS^2)
+// 6: Error Reduced Sigma of fitted Charge 
+// 7: Reduced Sigma per Charge 
+// 8: Error of Reduced Sigma per Charge 
+//
 // Results of the different calibration methods:
 // =============================================
 //
-// 9: Number of Photo-electrons obtained with the F-Factor method
+//  9: Number of Photo-electrons obtained with the F-Factor method
 // 10: Error on Number of Photo-electrons obtained with the F-Factor method
 // 11: Mean conversion factor obtained with the F-Factor method
@@ -431,50 +432,42 @@
 // 13: Overall F-Factor of the readout obtained with the F-Factor method
 // 14: Error on Overall F-Factor of the readout obtained with the F-Factor method
-// 15: Number of Photons inside Plexiglass obtained with the Blind Pixel method
-// 16: Error on Number of Photons inside Plexiglass obtained with the Blind Pixel method
-// 17: Mean conversion factor obtained with the Blind Pixel method
-// 18: Error on the mean conversion factor obtained with the Blind Pixel method
-// 19: Overall F-Factor of the readout obtained with the Blind Pixel method
-// 20: Error on Overall F-Factor of the readout obtained with the Blind Pixel method
-// 21: Number of Photons outside Plexiglass obtained with the PIN Diode method
-// 22: Error on Number of Photons outside Plexiglass obtained with the PIN Diode method
-// 23: Mean conversion factor obtained with the PIN Diode method
-// 24: Error on the mean conversion factor obtained with the PIN Diode method
-// 25: Overall F-Factor of the readout obtained with the PIN Diode method
-// 26: Error on Overall F-Factor of the readout obtained with the PIN Diode method
+// 15: Pixels with valid calibration by the F-Factor-Method
+// 16: Mean conversion factor obtained with the Blind Pixel method
+// 17: Error on the mean conversion factor obtained with the Blind Pixel method
+// 18: Overall F-Factor of the readout obtained with the Blind Pixel method
+// 19: Error on Overall F-Factor of the readout obtained with the Blind Pixel method
+// 20: Pixels with valid calibration by the Blind Pixel-Method
+// 21: Mean conversion factor obtained with the PIN Diode method
+// 22: Error on the mean conversion factor obtained with the PIN Diode method
+// 23: Overall F-Factor of the readout obtained with the PIN Diode method
+// 24: Error on Overall F-Factor of the readout obtained with the PIN Diode method
+// 25: Pixels with valid calibration by the PIN Diode-Method
 //
 // Localized defects:
 // ==================
 //
-// 27: Excluded Pixels
-// 28: Pixels where the fit did not succeed --> results obtained only from the histograms
-// 29: Number of probable pickup events in the Hi Gain 
-// 30: Number of probable pickup events in the Lo Gain
+// 26: Excluded Pixels
+// 27: Pixels where the fit did not succeed --> results obtained only from the histograms
+// 28: Number of probable pickup events in the Hi Gain 
+// 29: Number of probable pickup events in the Lo Gain
 //
 // Other classifications of pixels:
 // ================================
 //
-// 31: Pixels with saturated Hi-Gain
-//
-// Classification of validity of the calibrations:
-// ===============================================
-//
-// 32: Pixels with valid calibration by the F-Factor-Method
-// 33: Pixels with valid calibration by the Blind Pixel-Method
-// 34: Pixels with valid calibration by the PIN Diode-Method
+// 30: Pixels with saturated Hi-Gain
 //
 // Used Pedestals:
 // ===============
 //
-// 35: Mean Pedestal over the entire range of signal extraction
-// 36: Error on the Mean Pedestal over the entire range of signal extraction
-// 37: Pedestal RMS over the entire range of signal extraction
-// 38: Error on the Pedestal RMS over the entire range of signal extraction
+// 31: Mean Pedestal over the entire range of signal extraction
+// 32: Error on the Mean Pedestal over the entire range of signal extraction
+// 33: Pedestal RMS over the entire range of signal extraction
+// 34: Error on the Pedestal RMS over the entire range of signal extraction
 //
 // Calculated absolute arrival times (very low precision!):
 // ========================================================
 //
-// 39: Absolute Arrival time of the signal
-// 40: RMS of the Absolute Arrival time of the signal
+// 35: Absolute Arrival time of the signal
+// 36: RMS of the Absolute Arrival time of the signal
 //
 Bool_t MCalibrationChargeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
@@ -592,68 +585,68 @@
       break;
     case 15:
-      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
-        return kFALSE;
-      //      val = fBlindPixel->GetMeanFluxInsidePlexiglass()*area;
-      val = 1.;
+      if ((*this)[idx].IsExcluded())
+        return kFALSE;
+      if ((*this)[idx].IsFFactorMethodValid())
+        val = 1;
+      else
+        return kFALSE;
       break;
     case 16:
       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
         return kFALSE;
-      //      val = fBlindPixel->GetMeanFluxErrInsidePlexiglass()*area;
-      val = 1.;
+      val = (*this)[idx].GetMeanConversionBlindPixelMethod();
       break;
     case 17:
       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
         return kFALSE;
-      val = (*this)[idx].GetMeanConversionBlindPixelMethod();
+      val = (*this)[idx].GetConversionBlindPixelMethodErr();
       break;
     case 18:
       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
         return kFALSE;
-      val = (*this)[idx].GetConversionBlindPixelMethodErr();
+      val = (*this)[idx].GetTotalFFactorBlindPixelMethod();
       break;
     case 19:
       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
         return kFALSE;
-      val = (*this)[idx].GetTotalFFactorBlindPixelMethod();
+      val = (*this)[idx].GetTotalFFactorBlindPixelMethodErr();
       break;
     case 20:
-      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsBlindPixelMethodValid())
-        return kFALSE;
-      val = (*this)[idx].GetTotalFFactorBlindPixelMethodErr();
+      if ((*this)[idx].IsExcluded())
+        return kFALSE;
+      if ((*this)[idx].IsBlindPixelMethodValid())
+        val = 1;
+      else
+        return kFALSE;
       break;
     case 21:
       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
         return kFALSE;
-      //      val = fPINDiode->GetMeanFluxOutsidePlexiglass()*area;
-      val = 1.;
+      val = (*this)[idx].GetMeanConversionPINDiodeMethod();
       break;
     case 22:
       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
         return kFALSE;
-      //      val = fPINDiode->GetMeanFluxErrOutsidePlexiglass()*area;
-      val = 1.;
+      val = (*this)[idx].GetConversionPINDiodeMethodErr();
       break;
     case 23:
       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
         return kFALSE;
-      val = (*this)[idx].GetMeanConversionPINDiodeMethod();
+      val = (*this)[idx].GetTotalFFactorPINDiodeMethod();
       break;
     case 24:
       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
         return kFALSE;
-      val = (*this)[idx].GetConversionPINDiodeMethodErr();
+      val = (*this)[idx].GetTotalFFactorPINDiodeMethodErr();
       break;
     case 25:
-      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
-        return kFALSE;
-      val = (*this)[idx].GetTotalFFactorPINDiodeMethod();
+      if ((*this)[idx].IsExcluded())
+        return kFALSE;
+      if ((*this)[idx].IsPINDiodeMethodValid())
+        val = 1;
+      else
+        return kFALSE;
       break;
     case 26:
-      if ((*this)[idx].IsExcluded() || !(*this)[idx].IsPINDiodeMethodValid())
-        return kFALSE;
-      val = (*this)[idx].GetTotalFFactorPINDiodeMethodErr();
-      break;
-    case 27:
       if ((*this)[idx].IsExcluded())
         val = 1.;
@@ -661,5 +654,5 @@
         return kFALSE;
       break;
-    case 28:
+    case 27:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
@@ -669,69 +662,45 @@
         return kFALSE;
       break;
+    case 28:
+      if ((*this)[idx].IsExcluded())
+        return kFALSE;
+      val = (*this)[idx].GetHiGainNumPickup();
+      break;
     case 29:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
-      val = (*this)[idx].GetHiGainNumPickup();
+      val = (*this)[idx].GetLoGainNumPickup();
       break;
     case 30:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
-      val = (*this)[idx].GetLoGainNumPickup();
+      val = (*this)[idx].IsHiGainSaturation();
       break;
     case 31:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
-      val = (*this)[idx].IsHiGainSaturation();
+      val = (*this)[idx].GetPed();
       break;
     case 32:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
-      if ((*this)[idx].IsFFactorMethodValid())
-        val = 1;
-      else
-        return kFALSE;
+      val = (*this)[idx].GetPedErr();
       break;
     case 33:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
-      if ((*this)[idx].IsBlindPixelMethodValid())
-        val = 1;
-      else
-        return kFALSE;
+      val = (*this)[idx].GetPedRms();
       break;
     case 34:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
-      if ((*this)[idx].IsPINDiodeMethodValid())
-        val = 1;
-      else
-        return kFALSE;
+      val = (*this)[idx].GetPedErr()/2.;
       break;
     case 35:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
-      val = (*this)[idx].GetPed();
+      val = (*this)[idx].GetAbsTimeMean();
       break;
     case 36:
-      if ((*this)[idx].IsExcluded())
-        return kFALSE;
-      val = (*this)[idx].GetPedErr();
-      break;
-    case 37:
-      if ((*this)[idx].IsExcluded())
-        return kFALSE;
-      val = (*this)[idx].GetPedRms();
-      break;
-    case 38:
-      if ((*this)[idx].IsExcluded())
-        return kFALSE;
-      val = (*this)[idx].GetPedErr()/2.;
-      break;
-    case 39:
-      if ((*this)[idx].IsExcluded())
-        return kFALSE;
-      val = (*this)[idx].GetAbsTimeMean();
-      break;
-    case 40:
       if ((*this)[idx].IsExcluded())
         return kFALSE;
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc	(revision 3511)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc	(revision 3551)
@@ -20,7 +20,5 @@
 !   Copyright: MAGIC Software Development, 2000-2004
 !
-!
 \* ======================================================================== */
-
 /////////////////////////////////////////////////////////////////////////////
 //                                                                         //
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc	(revision 3511)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc	(revision 3551)
@@ -89,7 +89,7 @@
 const Double_t MHCalibrationChargeBlindPix::gkElectronicAmpErr   = 0.002;
 
-const Int_t    MHCalibrationChargeBlindPix::fgChargeNbins        = 1400;
-const Axis_t   MHCalibrationChargeBlindPix::fgChargeFirst        = -200.5;
-const Axis_t   MHCalibrationChargeBlindPix::fgChargeLast         = 1199.5;
+const Int_t    MHCalibrationChargeBlindPix::fgChargeNbins        = 5300;
+const Axis_t   MHCalibrationChargeBlindPix::fgChargeFirst        = -100.5;
+const Axis_t   MHCalibrationChargeBlindPix::fgChargeLast         = 5199.5;
 
 const Float_t  MHCalibrationChargeBlindPix::fgSinglePheCut       = 200.;
@@ -116,4 +116,6 @@
     SetSinglePheCut();
     SetNumSinglePheLimit();
+
+    SetBinsAfterStripping(30);
 
     fHGausHist.SetName("HCalibrationChargeBlindPix");
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc	(revision 3511)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc	(revision 3551)
@@ -65,4 +65,6 @@
 #include <TCanvas.h>
 #include <TPad.h>
+#include <TText.h>
+#include <TPaveText.h>
 
 #include "MLog.h"
@@ -151,4 +153,16 @@
     fNumOuterPixels = 0; 
     fNumExcluded    = 0;
+
+    fAverageInnerSat            = 0;
+    fAverageOuterSat            = 0;  
+    fAverageInnerPixSigma       = 0.;
+    fAverageOuterPixSigma       = 0.;  
+    fAverageInnerPixSigmaErr    = 0.;
+    fAverageOuterPixSigmaErr    = 0.;  
+    fAverageInnerPixRelSigma    = 0.;
+    fAverageOuterPixRelSigma    = 0.;  
+    fAverageInnerPixRelSigmaErr = 0.;
+    fAverageOuterPixRelSigmaErr = 0.;  
+
 }
 
@@ -169,4 +183,5 @@
   delete fAverageHiGainOuterPix;
   delete fAverageLoGainOuterPix;
+
 }
 
@@ -542,13 +557,13 @@
     FinalizeLoGainHists(*fAverageLoGainOuterPix,*fCam->GetAverageOuterPix(),*fCam->GetAverageOuterBadPix());
 
-    fCam->GetAverageInnerPix()->SetSigmaCharge   (fCam->GetAverageInnerPix()->GetSigmaCharge()   
-                                                  *TMath::Sqrt((Float_t)fNumInnerPixels));
-    fCam->GetAverageOuterPix()->SetSigmaCharge   (fCam->GetAverageOuterPix()->GetSigmaCharge()   
-                                                  *TMath::Sqrt((Float_t)fNumOuterPixels));
-    fCam->GetAverageInnerPix()->SetSigmaChargeErr(fCam->GetAverageInnerPix()->GetSigmaChargeErr()
-                                                  *TMath::Sqrt((Float_t)fNumInnerPixels));
-    fCam->GetAverageOuterPix()->SetSigmaChargeErr(fCam->GetAverageOuterPix()->GetSigmaChargeErr()
-                                                  *TMath::Sqrt((Float_t)fNumOuterPixels));
-    
+    FinalizeAveragePix(*fCam->GetAverageInnerPix(),fNumInnerPixels, 
+                       fAverageInnerPixSigma, fAverageInnerPixSigmaErr,
+                       fAverageInnerPixRelSigma, fAverageInnerPixRelSigmaErr,
+                       fAverageInnerSat);
+    FinalizeAveragePix(*fCam->GetAverageOuterPix(),fNumOuterPixels, 
+                       fAverageOuterPixSigma, fAverageOuterPixSigmaErr,
+                       fAverageOuterPixRelSigma, fAverageOuterPixRelSigmaErr,
+                       fAverageOuterSat);
+
     return kTRUE;
 }
@@ -693,4 +708,30 @@
       }
 }    
+
+void MHCalibrationChargeCam::FinalizeAveragePix(MCalibrationChargePix &pix, Int_t npix, 
+                                                Float_t &sigma, Float_t &sigmaerr, 
+                                                Float_t &relsigma, Float_t &relsigmaerr, 
+                                                Bool_t &b)
+{
+
+  if (pix.IsHiGainSaturation())
+    b = kTRUE;
+
+  sigma    = pix.GetSigmaCharge    () * TMath::Sqrt((Float_t)npix);
+  sigmaerr = pix.GetSigmaChargeErr () * TMath::Sqrt((Float_t)npix);
+
+  relsigma     = sigma / pix.GetMeanCharge();
+
+  relsigmaerr  = sigmaerr*sigmaerr / sigma / sigma;
+  relsigmaerr += pix.GetMeanChargeErr()*pix.GetMeanChargeErr() / pix.GetMeanCharge() / pix.GetMeanCharge();
+
+  relsigmaerr *= relsigma;
+  relsigmaerr  = TMath::Sqrt(relsigmaerr);
+
+  pix.SetSigmaCharge   (sigma);
+  pix.SetSigmaChargeErr(sigmaerr);
+
+}
+
 
 Bool_t MHCalibrationChargeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
@@ -729,25 +770,69 @@
   pad->cd(1);
 
-  if (!fAverageHiGainInnerPix->IsEmpty())
-    gPad->SetLogy();
   fAverageHiGainInnerPix->Draw(opt);
+  
+  if (!fAverageInnerSat)
+    DrawAverageSigma(fAverageInnerSat, 1,
+                     fAverageInnerPixSigma, fAverageInnerPixSigmaErr,
+                     fAverageInnerPixRelSigma, fAverageInnerPixRelSigmaErr);
 
   pad->cd(2);
 
-  if (!fAverageLoGainInnerPix->IsEmpty())
-    gPad->SetLogy();
   fAverageLoGainInnerPix->Draw(opt);
 
+  if (fAverageInnerSat)
+    DrawAverageSigma(fAverageInnerSat, 1,
+                     fAverageInnerPixSigma, fAverageInnerPixSigmaErr,
+                     fAverageInnerPixRelSigma, fAverageInnerPixRelSigmaErr);
+
   pad->cd(3);
 
-  if (!fAverageHiGainOuterPix->IsEmpty())
-    gPad->SetLogy();
   fAverageHiGainOuterPix->Draw(opt);
 
+  if (!fAverageOuterSat)
+    DrawAverageSigma(fAverageOuterSat, 0,
+                     fAverageOuterPixSigma, fAverageOuterPixSigmaErr,
+                     fAverageOuterPixRelSigma, fAverageOuterPixRelSigmaErr);
+
   pad->cd(4);
 
-  if (!fAverageLoGainOuterPix->IsEmpty())
-    gPad->SetLogy();
   fAverageLoGainOuterPix->Draw(opt);
 
-}
+  if (fAverageOuterSat)
+    DrawAverageSigma(fAverageOuterSat, 0,
+                     fAverageOuterPixSigma, fAverageOuterPixSigmaErr,
+                     fAverageOuterPixRelSigma, fAverageOuterPixRelSigmaErr);
+}
+
+void MHCalibrationChargeCam::DrawAverageSigma(Bool_t sat, Bool_t inner,
+                                              Float_t sigma, Float_t sigmaerr,
+                                              Float_t relsigma, Float_t relsigmaerr) const 
+{
+  
+  if (sigma != 0)
+    {
+      
+      TPad *newpad = new TPad("newpad","transparent",0,0,1,1);
+      newpad->SetFillStyle(4000);
+      newpad->Draw();
+      newpad->cd();
+      
+      TPaveText *text = new TPaveText(sat? 0.1 : 0.35,0.7,sat ? 0.4 : 0.7,1.0);
+      text->SetTextSize(0.07);
+      const TString line1 = Form("%s%s%s",inner ? "Inner" : "Outer",
+                                 " Pixels ", sat ? "Low Gain" : "High Gain");
+      TText *txt1 = text->AddText(line1.Data());
+      const TString line2 = Form("Sigma per Pixel: %2.2f #pm %2.2f",sigma,sigmaerr);
+      TText *txt2 = text->AddText(line2.Data());
+      const TString line3 = Form("Rel. Sigma per Pixel: %2.2f #pm %2.2f",relsigma,relsigmaerr);
+      TText *txt3 = text->AddText(line3.Data());
+      text->Draw("");
+      
+      text->SetBit(kCanDelete);
+      txt1->SetBit(kCanDelete);
+      txt2->SetBit(kCanDelete);
+      txt3->SetBit(kCanDelete);
+      newpad->SetBit(kCanDelete);
+    }
+}
+
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h	(revision 3511)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h	(revision 3551)
@@ -13,4 +13,5 @@
 #endif
 
+class TText;
 class MRawEvtData;
 class MGeomCam;
@@ -47,7 +48,29 @@
   Int_t fNumExcluded;
 
+  Bool_t  fAverageInnerSat;
+  Bool_t  fAverageOuterSat;  
+  
+  Float_t fAverageInnerPixSigma;
+  Float_t fAverageOuterPixSigma;  
+  
+  Float_t fAverageInnerPixSigmaErr;
+  Float_t fAverageOuterPixSigmaErr;  
+
+  Float_t fAverageInnerPixRelSigma;
+  Float_t fAverageOuterPixRelSigma;  
+  
+  Float_t fAverageInnerPixRelSigmaErr;
+  Float_t fAverageOuterPixRelSigmaErr;  
+
   void FinalizeHiGainHists(MHCalibrationChargeHiGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
   void FinalizeLoGainHists(MHCalibrationChargeLoGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
-
+  void FinalizeAveragePix (MCalibrationChargePix &pix, Int_t npix,
+                           Float_t &sigma, Float_t &sigmaerr,
+                           Float_t &relsigma, Float_t &relsigmaerr, 
+                           Bool_t &b);
+  void DrawAverageSigma(Bool_t sat, Bool_t inner,
+                        Float_t sigma, Float_t sigmaerr,
+                        Float_t relsigma, Float_t relsigmaerr) const; 
+  
 public:
 
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.cc	(revision 3511)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.cc	(revision 3551)
@@ -211,4 +211,12 @@
   gPad->SetTicks();
 
+  fHGausHist.GetXaxis()->SetLabelSize(0.06);
+  fHGausHist.GetYaxis()->SetLabelSize(0.07);
+  fHGausHist.GetXaxis()->SetLabelOffset(0.01);
+  fHGausHist.GetYaxis()->SetLabelOffset(0.01);
+  fHGausHist.GetXaxis()->SetTitleSize(0.065);
+  fHGausHist.GetYaxis()->SetTitleSize(0.07);
+  fHGausHist.GetXaxis()->SetTitleOffset(0.6);
+  fHGausHist.GetYaxis()->SetTitleOffset(0.6);
   fHGausHist.Draw(opt); 
   if (fFGausFit)
@@ -220,4 +228,13 @@
   pad->cd(2);
   gPad->SetTicks();
+
+  fHAbsTime.GetXaxis()->SetLabelSize(0.06);
+  fHAbsTime.GetYaxis()->SetLabelSize(0.07);
+  fHAbsTime.GetXaxis()->SetLabelOffset(0.01);
+  fHAbsTime.GetYaxis()->SetLabelOffset(0.01);
+  fHAbsTime.GetXaxis()->SetTitleSize(0.065);
+  fHAbsTime.GetYaxis()->SetTitleSize(0.07);
+  fHAbsTime.GetXaxis()->SetTitleOffset(0.6);
+  fHAbsTime.GetYaxis()->SetTitleOffset(0.6);
   fHAbsTime.Draw(opt);
 
