Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 4198)
+++ trunk/MagicSoft/Mars/Changelog	(revision 4199)
@@ -31,4 +31,5 @@
 
    * mcalib/MCalibrationQEPix.cc
+   * mcalib/MCalibrationChargeCalc.cc
      - several small bugs fixed concerning calibration with the blind pixel
        or the PIN Diode
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.cc	(revision 4198)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.cc	(revision 4199)
@@ -412,5 +412,6 @@
 
   *fLog << inf << endl;
-  *fLog << inf << " Photon flux [ph/mm^2] inside Plexiglass: " 
+  *fLog << inf << GetDescriptor() 
+        << ": Photon flux [ph/mm^2] inside Plexiglass: " 
         << Form("%5.3f%s%5.3f",fFluxInsidePlexiglass," +- ",GetFluxInsidePlexiglassErr()) << endl;
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc	(revision 4198)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc	(revision 4199)
@@ -1099,9 +1099,8 @@
     return kFALSE;
 
-  weightedav /= sumweights;
-
-  fAvNormBlindPixel     = gkDefaultAverageQE   *  weightedav;
-  fAvNormBlindPixelVar  = GetAverageQERelVar() + (sumweights / weightedav / weightedav );  
-  fAvNormBlindPixelVar *= fAvNormBlindPixel * fAvNormBlindPixel;
+  fAvNormBlindPixel     = weightedav / sumweights;
+  fAvNormBlindPixelVar  = 1./ sumweights ;
+
+  SetAverageQEBlindPixelAvailable();
 
   return kTRUE;
@@ -1126,9 +1125,8 @@
     return kFALSE;
 
-  weightedav /= sumweights;
-
-  fAvNormCombined     = gkDefaultAverageQE   *  weightedav;
-  fAvNormCombinedVar  = GetAverageQERelVar() + (sumweights / weightedav / weightedav );  
-  fAvNormCombinedVar *= fAvNormCombined * fAvNormCombined;
+  fAvNormCombined     = weightedav / sumweights;
+  fAvNormCombinedVar  = 1./ sumweights ;
+
+  SetAverageQECombinedAvailable();
 
   return kTRUE;
@@ -1182,9 +1180,8 @@
     return kFALSE;
 
-  weightedav /= sumweights;
-
-  fAvNormPINDiode     = gkDefaultAverageQE   *  weightedav;
-  fAvNormPINDiodeVar  = GetAverageQERelVar() + (sumweights / weightedav / weightedav );  
-  fAvNormPINDiodeVar *= fAvNormPINDiode * fAvNormPINDiode;
+  fAvNormPINDiode     = weightedav / sumweights;
+  fAvNormPINDiodeVar  = 1./ sumweights ;
+
+  SetAverageQEPINDiodeAvailable();
 
   return kTRUE;
