Index: trunk/MagicSoft/Simulation/Detector/StarResponse/MStarLight.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/StarResponse/MStarLight.cxx	(revision 2965)
+++ trunk/MagicSoft/Simulation/Detector/StarResponse/MStarLight.cxx	(revision 2975)
@@ -16,5 +16,5 @@
   fBinsFadc    = FADCBINS   ; 
   fFadcShape   = 0. ; 
-  fAmplFadc    = 0. ; 
+  fIntegFadc    = 0. ; 
   fFwhmFadc    = 0. ; 
 
@@ -46,5 +46,5 @@
   fBinsFadc    = FADCBINS   ; 
   fFadcShape   = 0. ; 
-  fAmplFadc    = 0. ; 
+  fIntegFadc    = 0. ; 
   fFwhmFadc    = 0. ; 
 
@@ -96,12 +96,12 @@
 
 
-Float_t MStarLight::GetAmplFadc () 
-{
-  return fAmplFadc  ; 
-}
-
-void MStarLight::SetAmplFadc (Float_t in ) 
-{
-  fAmplFadc = in ; 
+Float_t MStarLight::GetIntegFadc () 
+{
+  return fIntegFadc  ; 
+}
+
+void MStarLight::SetIntegFadc (Float_t in ) 
+{
+  fIntegFadc = in ; 
 }
 
@@ -125,8 +125,7 @@
 
 void MStarLight::SetFadcResponse( Float_t *in ) {
-  
-  for (Int_t i= 0; i<45; i++) 
+
+  for (Int_t i= 0; i<45; i++)
     fFadcResp[i] = in[i] ; 
-  
 }
 
@@ -155,6 +154,4 @@
   //   fill the FADC content
   //
-  //
-  //
 
   startbin = (Int_t) ( time / 0.6666666666 );
@@ -167,5 +164,15 @@
   //
 
-  for ( Int_t i = 0 ; i< 45; i++ ) {
+  //
+  // Changed, Jan 2004, A. Moralejo: now the FADC does not integrate all
+  // the signal within each FADC slice, but measures just the signal height
+  // at one point, like the real FADC does. By default, each FADC slice 
+  // contains 5 bins of the response histogram(fFadcResp[45]). Warning:
+  // do not change this unless you do the corresponding modifications also
+  // in MFadc.cxx, or the signal and the noise photoelectrons will be treated 
+  // differently!!
+  //
+
+  for ( Int_t i = 0 ; i < 45; i += 5 ) {
     ichanfadc = (Int_t) ((startbin+i)/5) ; 
     
@@ -331,5 +338,5 @@
   fwrite ( &fBinsFadc  , sizeof(Float_t), 1, datei ) ; 
   fwrite ( &fFadcShape , sizeof(Float_t), 1, datei ) ; 
-  fwrite ( &fAmplFadc  , sizeof(Float_t), 1, datei ) ; 
+  fwrite ( &fIntegFadc , sizeof(Float_t), 1, datei ) ; 
   fwrite ( &fFwhmFadc  , sizeof(Float_t), 1, datei ) ; 
 
@@ -390,5 +397,5 @@
     cout<<" Error: You are trying to read database VERSION "<<
       read_version<<endl;
-    cout<<" You must generate a databse for the current VERSION "<<
+    cout<<" You must generate a database for the current VERSION "<<
       current_version<<endl;
     exit (230);
@@ -406,5 +413,5 @@
   fread ( &fBinsFadc  , sizeof(Float_t), 1, datei ) ; 
   fread ( &fFadcShape , sizeof(Float_t), 1, datei ) ; 
-  fread ( &fAmplFadc  , sizeof(Float_t), 1, datei ) ; 
+  fread ( &fIntegFadc , sizeof(Float_t), 1, datei ) ; 
   fread ( &fFwhmFadc  , sizeof(Float_t), 1, datei ) ; 
 
