Index: trunk/MagicSoft/Simulation/Detector/StarResponse/starresponse.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/StarResponse/starresponse.cxx	(revision 2977)
+++ trunk/MagicSoft/Simulation/Detector/StarResponse/starresponse.cxx	(revision 2978)
@@ -40,11 +40,11 @@
   data.SetFwhmTrig ( trigger->GetFwhm() ) ; 
   
-  //  Get infroamtion from FADC instance !!!!!
+  //  Get information from FADC instance !!!!!
 
   Float_t   fadcresp[45] ; 
   fadc->GetResponse (fadcresp ) ;   
   data.SetFadcResponse( fadcresp ) ; 
- 
-  data.SetAmplFadc ( fadc->GetAmplitude() ) ; 
+
+  data.SetIntegFadc ( fadc->GetIntegral() ) ; 
   data.SetFwhmFadc ( fadc->GetFwhm() ) ; 
  
@@ -58,11 +58,11 @@
     
     a = trigger->FillStar( 500, 10.) ;   // random the amplitude 
-    time=Zufall.Rndm() * TIMERANGE ;    // random the time
+    time=Zufall.Rndm() * TIMERANGE ;     // random the time
 
-    data.FillResponse(a, time ) ;       // fill the response function 
+    data.FillResponse(a, time ) ;        // fill the response function 
     
   }
 
-  if(brightness<1.0)
+  if(brightness<=1.0)
     sprintf(filename, "%sBrightness%.2f.slt", path, brightness) ; 
   else
@@ -75,5 +75,9 @@
     data.ReadBinary( filename ) ;
     
-    sprintf(filename, "%sBrightness%.1f.root", path, brightness) ; 
+    if(brightness<1.0)
+      sprintf(filename, "%sBrightness%.2f.root", path, brightness) ; 
+    else
+      sprintf(filename, "%sBrightness%.1f.root", path, brightness) ; 
+    sprintf(filename, "%sBrightness%.2f.root", path, brightness) ; 
     cout << " the file will be written in " << filename
 	 << endl ; 
@@ -104,5 +108,5 @@
 
   float trig_fwhm,trig_ampl,trig_shape;
-  float fadc_fwhm,fadc_ampl,fadc_shape;
+  float fadc_fwhm,fadc_integral,fadc_shape;
 
   // 
@@ -112,6 +116,6 @@
 
   //  Instance of MFadc and MTrigger needed inside BuildStarLight
-  MTrigger *trigger= new MTrigger(1); 
-  MFadc *fadc= new MFadc;
+  MTrigger *trigger;//= new MTrigger(1); 
+  MFadc *fadc;//= new MFadc;
 
   if(argc == 1){
@@ -132,10 +136,8 @@
 
   get_trig_properties(&trig_shape, &trig_ampl, &trig_fwhm);
-  trigger->SetAmpl(trig_ampl);
-  trigger->SetFwhm(trig_fwhm);
+  trigger = new MTrigger(1,0.,0.,trig_ampl,trig_fwhm);
 
-  get_fadc_properties(&fadc_shape, &fadc_ampl, &fadc_fwhm);
-  fadc->SetAmpl(fadc_ampl);
-  fadc->SetFwhm(fadc_fwhm);
+  get_fadc_properties(&fadc_shape, &fadc_integral, &fadc_fwhm);
+  fadc = new MFadc(1,fadc_integral,fadc_fwhm,fadc_integral,fadc_fwhm);
 
   for (Float_t b=nphe_min; b<=nphe_max; b=b+nphe_pre )  //  loop over Brightness
