Index: trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc	(revision 4291)
+++ trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc	(revision 4296)
@@ -253,29 +253,33 @@
     // (at angle = 90 deg)
 
-    // Set now the conversion from ADC counts to photoelectrons (in case
-    // no previous calibration existed in the parameter list).
+    // Set now the default conversion from ADC counts to "photoelectrons" 
+    // (in case no previous calibration existed in the parameter list).
     // As default we want 1 photon = 1 inner pixel ADC count
-    // (this will make Size to be in ADC counts which is what we want for
-    // the MC calibration loop. To achieve this we set the ADC to 
+    // (this will make Size to be in ADC counts, which is what we want for
+    // the MC calibration loop). To achieve this we set the ADC to 
     // photoelectron conversion equal to the QE, which will later make the 
-    // ADC to photon conversion factor to be = 1.
+    // ADC to photon conversion factor (= ADC2PhotEl/QE) to be = 1.
     //
     fADC2PhElInner = MCalibrationQEPix::gkDefaultAverageQE;
 
     //
-    // Set the ADC to photons conversion factor for outer pixels.
-    // One can choose not to apply the known (in MC) gain factor between
-    // inner and outer pixels, (fOuterPixelsGainScaling = kFALSE),
+    // Set the default ADC to "photoelectrons" conversion factor for outer 
+    // pixels. One can choose not to apply the known (in MC) gain factor 
+    // between inner and outer pixels, (in case fOuterPixelsGainScaling = kFALSE),
     // which may be useful for display purposes.
-    // If we apply the factor, we must take into account the different
-    // gain photoelectrons->ADC counts, and also apply the correct QE
-    // (see comment above) for the outer pixels through the factor
-    // fOuterPixelsLightCollection.
+    // If on the contrary we apply the factor, we must take into account the 
+    // different gains photoelectrons->ADC counts, given in MC by fAmplitude
+    // and fAmplitudeOuter. This "default" calibration is such that a shower
+    // completely contained in the inner part would have Size in ADC counts, 
+    // whereas one partially in the outer part would have Size in "equivalent 
+    // inner ADC counts" : the "same" shower (light density distribution) would
+    // have the same Size no matter where in the camera it lies. For this we have 
+    // also to set later (see below) the right QE for outer pixels, which may 
+    // be different from that of inner pixels.
     //
 
     if (fOuterPixelsGainScaling)
       fADC2PhElOuter =  MCalibrationQEPix::gkDefaultAverageQE 
-	  * fOuterPixelsLightCollection
-	  * (fAmplitude / fAmplitudeOuter);
+	* (fAmplitude / fAmplitudeOuter);
     else
       fADC2PhElOuter = fADC2PhElInner;
@@ -306,4 +310,5 @@
 	  fADC2PhElOuter : fADC2PhElInner;
 
+
 	calpix.SetMeanConvFADC2Phe(adc2photel);
         calpix.SetMeanConvFADC2PheVar(0.);
@@ -314,5 +319,5 @@
     //
     // Now set the average QE for each type of pixels. Correct outer pixels
-    // by different light collection efficiency.
+    // for different light collection efficiency.
     //
     num = fQECam->GetSize();
@@ -320,8 +325,10 @@
     {
         MCalibrationQEPix &qepix = (MCalibrationQEPix&)(*fQECam)[i];
-	Float_t avqe = 
-  	    (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))?
-  	    MCalibrationQEPix::gkDefaultAverageQE*fOuterPixelsLightCollection:
-  	    MCalibrationQEPix::gkDefaultAverageQE;
+
+	Float_t avqe = MCalibrationQEPix::gkDefaultAverageQE;
+
+	if (fOuterPixelsGainScaling)
+	  if (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))
+	    avqe = MCalibrationQEPix::gkDefaultAverageQE*fOuterPixelsLightCollection;
 
 	qepix.SetAverageQE(avqe);
