Index: trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx	(revision 2290)
+++ trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx	(revision 2291)
@@ -55,12 +55,23 @@
 
   Float_t  sig[CAMERA_PIXELS][(Int_t) SLICES_MFADC] ; //  the analog signal for pixels
-  UChar_t  output[CAMERA_PIXELS][FADC_SLICES];  //  the analog signal for pixels that is read after a trigger occurs.
+  Float_t noise[CAMERA_PIXELS*(Int_t) SLICES_MFADC*101];
+
+  UChar_t  output[CAMERA_PIXELS][FADC_SLICES];  //  the analog signal for pixels that is read after a trigger occurs (high gain).
+
+  UChar_t  output_lowgain[CAMERA_PIXELS][FADC_SLICES]; //  analog signal, low gain.
 
   //
   //    first the data for the response function
   //
-  Float_t fwhm_resp ;                      // fwhm of the phe_response function 
-  Float_t ampl_resp ;                      // amplitude of the phe_response function (in mV)
+  Float_t fwhm_resp ;                      // fwhm of the phe_response function (in ns)
+  Float_t ampl_resp ;                      // area below curve of the phe_response function (in counts * ns)
   Float_t sing_resp[ RESPONSE_SLICES_MFADC ] ;   // the shape of the phe_response function 
+
+  //
+  //    We may end up with a different reponse for the outer pixels
+  //
+  Float_t fwhm_resp_outer ;                      // fwhm of the phe_response function (in ns)
+  Float_t ampl_resp_outer ;                      // area below curve of the phe_response function (in counts * ns)
+  Float_t sing_resp_outer[ RESPONSE_SLICES_MFADC ] ;   // the shape of the phe_response function 
   //
   //   RandomGenerator for the Electonic Noise
@@ -72,9 +83,16 @@
 public:
 
-  MFadc(Float_t ampl=MFADC_RESPONSE_AMPLITUDE, Float_t fwhm=MFADC_RESPONSE_FWHM) ;
+  MFadc(Float_t ampl=MFADC_RESPONSE_AMPLITUDE, 
+	Float_t fwhm=MFADC_RESPONSE_FWHM,
+	Float_t amplout=MFADC_RESPONSE_AMPLITUDE, 
+	Float_t fwhmout=MFADC_RESPONSE_FWHM) ;
   
   void Reset() ; 
 
+  void Fill( Int_t, Float_t, Float_t, Int_t  ) ;  
+
   void Fill( Int_t, Float_t, Float_t  ) ;  
+
+  void FillOuter( Int_t, Float_t, Float_t  ) ;  
 
   void Set( Int_t iPix, Float_t res[(Int_t) SLICES_MFADC]);
@@ -94,4 +112,12 @@
   }
 
+  void SetFwhmOuter( Float_t fwhm){
+    fwhm_resp_outer=fwhm;
+  }
+
+  void SetAmplOuter( Float_t ampl){
+    ampl_resp_outer=ampl;
+  }
+
   void Baseline();
 
@@ -99,4 +125,6 @@
 
   void Offset( Float_t, Int_t );
+
+  void SetElecNoise(Float_t value=2.0);
 
   void ElecNoise(Float_t value=2.0) ; 
@@ -116,4 +144,6 @@
   UChar_t GetFadcSignal(Int_t pixel, Int_t slice);
 
+  UChar_t GetFadcLowGainSignal(Int_t pixel, Int_t slice);
+
   Float_t GetAmplitude() {
     return ampl_resp ; 
@@ -124,4 +154,11 @@
   }
 
+  Float_t GetAmplitudeOuter() {
+    return ampl_resp_outer ; 
+  }
+
+  Float_t GetFwhmOuter() {
+    return fwhm_resp_outer ; 
+  }
   
 } ; 
