Index: trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 2324)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 2325)
@@ -151,6 +151,4 @@
         return kTRUE;
 
-    ScalePedestals();
-
     MMcRunHeader *mcrunheader = (MMcRunHeader*)pList->FindObject("MMcRunHeader");
     if (!mcrunheader)
@@ -161,7 +159,10 @@
 
     fEnableFix = kFALSE;
+
     if (mcrunheader->GetCamVersion() <= 40)
         fEnableFix = kTRUE;
 
+    ScalePedestals();
+
     return kTRUE;
 }
@@ -175,6 +176,12 @@
         MPedestalPix &ped = (*fPedestals)[idx];
 
+	// This converts the pedestal info contained in ped  from the pedestal 
+	// of each FADC slice to the pedesal of the pixel signal (depends on
+	// how many FADC slices are added up).
+
         const Double_t offset = fEnableFix ? ped.GetPedestal()-0.5 : ped.GetPedestal();
-        ped.Set(offset, ped.GetPedestalRms()*sqrt(fSumQuadWeights));
+
+        ped.Set(offset*fSumQuadWeights*fSumQuadWeights,
+		ped.GetPedestalRms()*fSumQuadWeights);
     }
 
