Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 3682)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 3683)
@@ -1009,11 +1009,11 @@
   MCalibrationQEPix     &qepix = (MCalibrationQEPix&)  fQECam->GetAverageArea(0);  
 
-  const Float_t avphotonflux = avpix.GetPheFFactorMethod()       
-                             / qepix.GetQEFFactor(fPulserColor)
-                             / fQECam->GetPlexiglassQE();
-
-  const Float_t avfluxrelvar = avpix.GetPheFFactorMethodRelVar() 
-                             + qepix.GetQEFFactorRelVar(fPulserColor)
-                             + fQECam->GetPlexiglassQERelVar();
+  const Float_t avphotons   = avpix.GetPheFFactorMethod()       
+                           / qepix.GetQEFFactor(fPulserColor)
+                           / fQECam->GetPlexiglassQE();
+
+  const Float_t avphotrelvar = avpix.GetPheFFactorMethodRelVar() 
+                            + qepix.GetQEFFactorRelVar(fPulserColor)
+                            + fQECam->GetPlexiglassQERelVar();
 
   const UInt_t npixels  = fGeom->GetNumPixels();
@@ -1031,8 +1031,8 @@
         }
       
-      const Float_t photons = avphotonflux / fGeom->GetPixRatio(i);
+      const Float_t photons = avphotons / fGeom->GetPixRatio(i);
       const Float_t qe      = pix.GetPheFFactorMethod() / photons ;
 
-      if (!pix.CalcMeanFFactor( photons , avfluxrelvar ))
+      if (!pix.CalcMeanFFactor( photons , avphotrelvar ))
         {
           pix.SetFFactorMethodValid(kFALSE);
@@ -1041,5 +1041,5 @@
         }
 
-      const Float_t qerelvar = avfluxrelvar +  pix.GetPheFFactorMethodRelVar();
+      const Float_t qerelvar = avphotrelvar +  pix.GetPheFFactorMethodRelVar();
 
       qepix.SetQEFFactor    ( qe            , fPulserColor );
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc	(revision 3682)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc	(revision 3683)
@@ -497,5 +497,5 @@
       if (pix.IsExcluded() || !pix.IsFFactorMethodValid())
         return kFALSE;
-      val = pix.GetMeanFFactorFADC2Phot();
+      val = pix.GetMeanFFactorFADC2PhotErr();
       break;
     case 15:
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc	(revision 3682)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc	(revision 3683)
@@ -659,12 +659,12 @@
 //
 // Calculate the total F-Factor with the formula:
-//   fMeanFFactorFADC2Phot = fRSigmaSquare / GetMeanSquare() * sqrt(photflux)
+//   fMeanFFactorFADC2Phot = Sqrt ( fRSigmaSquare / GetMeanSquare() ) * nphotons
 //
 // Calculate the error of the total F-Factor
 //
-Bool_t MCalibrationChargePix::CalcMeanFFactor( const Float_t photflux, const Float_t photfluxrelvar )
-{
-
-  if (photflux <= 0.)
+Bool_t MCalibrationChargePix::CalcMeanFFactor( const Float_t nphotons, const Float_t nphotonsrelvar )
+{
+
+  if (nphotons <= 0.)
     {
       *fLog << warn << GetDescriptor() << ": Assumed photon flux is smaller or equal 0." << endl;
@@ -672,5 +672,5 @@
     }
 
-  if (photfluxrelvar < 0.)
+  if (nphotonsrelvar < 0.)
     {
       *fLog << warn << GetDescriptor() << ": Assumed photon flux variance is smaller than 0." << endl;
@@ -678,5 +678,5 @@
     }
 
-  fMeanFFactorFADC2Phot =  fRSigmaSquare / GetMeanSquare() * TMath::Sqrt(photflux);
+  fMeanFFactorFADC2Phot =  TMath::Sqrt(fRSigmaSquare) / GetMean() * nphotons;
   
   if (fMeanFFactorFADC2Phot < 0.)
@@ -686,7 +686,7 @@
     }
   
-  const Float_t ffactorrelvar = fRSigmaSquareVar / ( fRSigmaSquare * fRSigmaSquare) 
-                              + 4.   * GetMeanRelVar() 
-                              + 0.25 * photfluxrelvar;
+  const Float_t ffactorrelvar = 0.25 * fRSigmaSquareVar / ( fRSigmaSquare * fRSigmaSquare) 
+                              + GetMeanRelVar() 
+                              + nphotonsrelvar;
   
   fMeanFFactorFADC2PhotVar    = ffactorrelvar * fMeanFFactorFADC2Phot * fMeanFFactorFADC2Phot;
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h	(revision 3682)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h	(revision 3683)
@@ -102,5 +102,5 @@
   Bool_t CalcReducedSigma  ();
   Bool_t CalcFFactorMethod ();
-  Bool_t CalcMeanFFactor   ( const Float_t photflux, const Float_t phtfluxrelvar );
+  Bool_t CalcMeanFFactor   ( const Float_t nphotons, const Float_t nphotonsrelvar );
   
   ClassDef(MCalibrationChargePix, 1)	// Container Charge Calibration Results Pixel
