Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc	(revision 4775)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc	(revision 4776)
@@ -40,5 +40,6 @@
 // -  fLoGainPedRmsSquare and fLoGainPedRmsSquareVar (see CalcLoGainPedestal())
 // -  fRSigmaSquare and fRSigmaSquareVar             (see CalcReducedSigma()  )
-// -  fPheFFactorMethod and fPheFFactorMethodVar     (see CalcFFactorMethod() )
+// -  fPheFFactorMethod and fPheFFactorMethodVar     (see CalcFFactor()       )
+// -  fMeanConvFADC2Phe and fMeanConvFADC2PheVar     (see CalcConvFFactor()  )
 //
 // The following variables are set by MHCalibrationChargeCam:
@@ -746,5 +747,5 @@
 //
 // If fRSigmaSquare is smaller than 0 (i.e. has not yet been set),
-// set kFFactorMethodValid to kFALSE and return kFALSE
+// return kFALSE
 //
 // Calculate the number of photo-electrons with the F-Factor method:
@@ -768,9 +769,7 @@
 // - If fPheFFactorMethod is less than fPheFFactorMethodLimit, 
 //   set kFFactorMethodValid to kFALSE and return kFALSE
-//   else: Set kFFactorMethodValid to kTRUE and return kTRUE
-//
-Bool_t MCalibrationChargePix::CalcFFactorMethod()
-{
-
+//
+Bool_t MCalibrationChargePix::CalcFFactor()
+{
 
   if (fRSigmaSquare < 0.)
@@ -810,5 +809,5 @@
   //
   const Float_t pheRelVar = ffactorsquareRelVar + meanSquareRelVar + rsigmaSquareRelVar;
-  fPheFFactorMethodVar =  pheRelVar * fPheFFactorMethod * fPheFFactorMethod;
+  fPheFFactorMethodVar    = pheRelVar * fPheFFactorMethod * fPheFFactorMethod;
 
   if (IsDebug())
@@ -825,11 +824,47 @@
     return kFALSE;
   
+}
+
+// ------------------------------------------------------------------
+//
+// If fPheFFactorMethod is smaller than 0 (i.e. has not yet been set),
+// return kFALSE
+//
+// If GetCovertedMean() is smaller than 0 (i.e. has not yet been set),
+// return kFALSE
+//
+// Calculate fMeanConvFADC2Phe with the following formula:
+//
+//      fMeanConvFADC2Phe    =  fPheFFactorMethod / GetConvMean();
+//
+// Calculate the rel. variance of fMeanConvFADC2Phe, taking into account that 
+// in the calculation of the number of phe's one mean square has already been used. 
+// Now, dividing by another mean, one mean calcels out, one cannot directly propagate
+// the errors, but instead havs to take into account this cancellation:
+// 
+//     convrelvar = ffactorsquareRelVar + GetMeanRelVar() + rsigmaSquareRelVar;
+//
+// If confrelvar is smaller than 0. or greater than fConvFFactorRelVarLimit, 
+// return kFALSE
+// 
+// Calculate the variance of fMeanConvFADC2Phe with the formula:
+//
+//    fMeanConvFADC2PheVar =  convrelvar * fMeanConvFADC2Phe * fMeanConvFADC2Phe;
+// 
+// Set kFFactorMethodValid to kTRUE and 
+// return kTRUE
+//
+Bool_t MCalibrationChargePix::CalcConvFFactor()
+{
+  
+  if (fPheFFactorMethod <= 0.)
+    return kFALSE;
+
   const Float_t convmean = GetConvertedMean();
-  
-
-  if (convmean > 0.)
-    fMeanConvFADC2Phe    =  fPheFFactorMethod / GetConvertedMean();
-  else
-    fMeanConvFADC2Phe    =  -1.;
+
+  if (convmean <= 0.)
+    return kFALSE;
+  
+  fMeanConvFADC2Phe    =  fPheFFactorMethod / convmean;
 
   if (IsDebug())
@@ -841,7 +876,6 @@
     }
 
-  if (fMeanConvFADC2Phe < 0. )
-    return kFALSE;
-  
+  const Float_t ffactorsquareRelVar = 4.* GetFFactorRelVar();
+  const Float_t rsigmaSquareRelVar  =     fRSigmaSquareVar / fRSigmaSquare / fRSigmaSquare;
   //
   // In the calculation of the number of phe's one mean square has already been used. 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h	(revision 4775)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h	(revision 4776)
@@ -110,5 +110,6 @@
   void   CalcLoGainPedestal       ( const Float_t logainsamples, const Int_t aidx );
   Bool_t CalcReducedSigma  (  );
-  Bool_t CalcFFactorMethod ();
+  Bool_t CalcFFactor       (  );
+  Bool_t CalcConvFFactor   (  );  
   Bool_t CalcMeanFFactor   ( const Float_t nphotons, const Float_t nphotonsrelvar );
   
