Index: trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx	(revision 2451)
+++ trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx	(revision 2452)
@@ -42,5 +42,5 @@
   cout<< "[MFadc]       Response Are : "<<ampl<<" adc counts"<< endl ; 
   cout<< "[MFadc]       Response FWHM : "<<fwhm<<" ns"<< endl ; 
-  cout<< "[MFadc]    - Inner pixels :  "<< endl ; 
+  cout<< "[MFadc]    - Outer pixels :  "<< endl ; 
   cout<< "[MFadc]       Response Are : "<<amplout<<" adc counts"<< endl ; 
   cout<< "[MFadc]       Response FWHM : "<<fwhmout<<" ns"<< endl ; 
@@ -55,5 +55,5 @@
 
   sigma = fwhm_resp / 2.35 ; 
-  x0 = 3*sigma ; 
+  x0 = 3*sigma;
   
   Float_t   dX, dX2 ; 
@@ -61,4 +61,6 @@
   dX  = WIDTH_FADC_TIMESLICE / SUBBINS ; 
   dX2 = dX/2. ; 
+
+
   
   for (i=0; i< RESPONSE_SLICES_MFADC ; i++ ) {  
@@ -74,4 +76,5 @@
 
   } 
+
 
   sigma = fwhm_resp_outer / 2.35 ; 
@@ -380,6 +383,10 @@
 
   for(i=0;i<numpix;i++)
-    for(j=0;j<(Int_t)SLICES_MFADC;j++)
-      sig[i][j]+=pedestal[i];
+    for(j=0;j<(Int_t)SLICES_MFADC;j++){
+      if(used[i])
+      	sig[i][j]+=pedestal[i];
+      else
+      	sig[i][j]=pedestal[i];
+    }
 
 }
@@ -677,4 +684,5 @@
     sigma+=((Float_t)value-pedestal[pix])*((Float_t)value-pedestal[pix]);
   }
+
 
   sigma=sqrt(sigma/(SLICES_MFADC-1));
@@ -738,5 +746,4 @@
  	  }
       }
-
     }
   }  
