Index: trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.cxx	(revision 5104)
+++ trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.cxx	(revision 5248)
@@ -206,10 +206,10 @@
   x0 = 3*sigma ; 
   
-  for (i=0; i< RESPONSE_SLICES ; i++ ) {  
-
-    x = i * (1./((Float_t)SLICES_PER_NSEC)) 
-      + (1./( 2 * (Float_t)SLICES_PER_NSEC ))  ; 
+  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) {  
+
+    x = i * (1./((Float_t)TRIG_SLICES_PER_NSEC)) 
+      + (1./( 2 * (Float_t)TRIG_SLICES_PER_NSEC ))  ; 
     
-    sing_resp[i] = 
+    sing_resp[i] = (Float_t)
       ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ; 
   
@@ -224,5 +224,5 @@
   Int_t imax  = 0  ;
   Float_t max = 0. ; 
-  for (i=0; i< RESPONSE_SLICES ; i++ ) {  
+  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) {  
     if ( sing_resp[i] > max ) {
       imax = i ; 
@@ -231,5 +231,5 @@
   }
  
-  peak_time = ( (Float_t) imax )  / ( (Float_t) SLICES_PER_NSEC ) ;
+  peak_time = ( (Float_t) imax )  / ( (Float_t) TRIG_SLICES_PER_NSEC ) ;
  
 
@@ -357,6 +357,6 @@
   
   for ( i = 0 ; i < 5 ; i++) {
-    SlicesFirst[i]  = -50 ; 
-    SlicesSecond[i] = -50 ;
+    SlicesFirst[i]  = 0; 
+    SlicesSecond[i] = 0;
     PixelsFirst[i]  = -1;
     PixelsSecond[i] = -1;
@@ -454,10 +454,10 @@
   x0 = 3*sigma ; 
   
-  for (i=0; i< RESPONSE_SLICES ; i++ ) {  
-
-    x = i * (1./((Float_t)SLICES_PER_NSEC)) 
-      + (1./( 2 * (Float_t)SLICES_PER_NSEC ))  ; 
+  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) {  
+
+    x = i * (1./((Float_t)TRIG_SLICES_PER_NSEC)) 
+      + (1./( 2 * (Float_t)TRIG_SLICES_PER_NSEC ))  ; 
     
-    sing_resp[i] = 
+    sing_resp[i] = (Float_t)
       ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ; 
   
@@ -472,5 +472,5 @@
   Int_t imax  = 0  ;
   Float_t max = 0. ; 
-  for (i=0; i< RESPONSE_SLICES ; i++ ) {  
+  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) {  
     if ( sing_resp[i] > max ) {
       imax = i ; 
@@ -479,5 +479,5 @@
   }
  
-  peak_time = ( (Float_t) imax )  / ( (Float_t) SLICES_PER_NSEC ) ;
+  peak_time = ( (Float_t) imax )  / ( (Float_t) TRIG_SLICES_PER_NSEC ) ;
  
   //
@@ -588,6 +588,6 @@
   
   for ( i = 0 ; i < 5 ; i++) {
-    SlicesFirst[i]  = -50 ; 
-    SlicesSecond[i] = -50 ;
+    SlicesFirst[i]  = 0 ; 
+    SlicesSecond[i] = 0 ;
     PixelsFirst[i]  = -1;
     PixelsSecond[i] = -1;
@@ -683,10 +683,10 @@
   x0 = 3*sigma ; 
   
-  for (i=0; i< RESPONSE_SLICES ; i++ ) {  
-
-    x = i * (1./((Float_t)SLICES_PER_NSEC)) 
-      + (1./( 2 * (Float_t)SLICES_PER_NSEC ))  ; 
+  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) {  
+
+    x = i * (1./((Float_t)TRIG_SLICES_PER_NSEC)) 
+      + (1./( 2 * (Float_t)TRIG_SLICES_PER_NSEC ))  ; 
     
-    sing_resp[i] = 
+    sing_resp[i] = (Float_t)
       ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ; 
   
@@ -701,5 +701,5 @@
   Int_t imax  = 0  ;
   Float_t max = 0. ; 
-  for (i=0; i< RESPONSE_SLICES ; i++ ) {  
+  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) {  
     if ( sing_resp[i] > max ) {
       imax = i ; 
@@ -708,5 +708,5 @@
   }
  
-  peak_time = ( (Float_t) imax )  / ( (Float_t) SLICES_PER_NSEC ) ;
+  peak_time = ( (Float_t) imax )  / ( (Float_t) TRIG_SLICES_PER_NSEC ) ;
  
   //
@@ -772,6 +772,6 @@
   
   for ( i = 0 ; i < 5 ; i++) {
-    SlicesFirst[i]  = -50 ; 
-    SlicesSecond[i] = -50 ;
+    SlicesFirst[i]  = 0 ; 
+    SlicesSecond[i] = 0 ;
     PixelsFirst[i]  = -1;
     PixelsSecond[i] = -1;
@@ -843,5 +843,5 @@
   
   for ( i = 0 ; i < 5 ; i++) {
-    SlicesFirst[i]  = -50 ; 
+    SlicesFirst[i]  = 0 ; 
     PixelsFirst[i]  = -1;
   }
@@ -872,5 +872,5 @@
   //
   //     Fills the information of one single Phe electron that 
-  //     comes from the shower 
+  //     comes from the NSB
   //
 
@@ -892,6 +892,5 @@
   //
   //     Fills the information of one single Phe electron that 
-  //     comes from the shower 
-  //
+  //     comes from a star
 
   //
@@ -969,5 +968,5 @@
     //
 
-    Int_t ichan = (Int_t) ( time * ((Float_t) SLICES_PER_NSEC) ) ; 
+    Int_t ichan = (Int_t) ( time * ((Float_t) TRIG_SLICES_PER_NSEC) ) ; 
 
     //
@@ -975,5 +974,5 @@
     //
 
-    for ( i = 0 ; i<RESPONSE_SLICES; i++ ) {
+    for ( i = 0 ; i<RESPONSE_SLICES_TRIG; i++ ) {
       
       if ( (ichan+i) >= 0  &&  
@@ -1132,10 +1131,10 @@
   x0 = 3*sigma ; 
   
-  for (i=0; i< RESPONSE_SLICES ; i++ ) {  
-
-    x = i * (1./((Float_t)SLICES_PER_NSEC)) 
-      + (1./( 2 * (Float_t)SLICES_PER_NSEC ))  ; 
+  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) {  
+
+    x = i * (1./((Float_t)TRIG_SLICES_PER_NSEC)) 
+      + (1./( 2 * (Float_t)TRIG_SLICES_PER_NSEC ))  ; 
     
-    sing_resp[i] = 
+    sing_resp[i] = (Float_t)
       ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ; 
   
@@ -1244,5 +1243,5 @@
   //    puts the standard response function into the array resp
 
-  for ( Int_t i=0; i< RESPONSE_SLICES; i++ ) {
+  for ( Int_t i=0; i< RESPONSE_SLICES_TRIG; i++ ) {
 
     resp[i] = sing_resp[i] ; 
@@ -1288,5 +1287,5 @@
 
 
-  Int_t  jmax = (Int_t) (gate_leng * SLICES_PER_NSEC )  ; 
+  Int_t  jmax = (Int_t) (gate_leng * TRIG_SLICES_PER_NSEC )  ; 
 
   //
@@ -1572,6 +1571,6 @@
       if (SlicesZero[iSli]){
 	//
-	//  Loop over trigger cells. It is topology analisy,
-	//  therefore it is keep here after multiplicity and 
+	//  Loop over trigger cells. It is topology analysis,
+	//  therefore it is kept here after multiplicity and 
 	//  threshold checks.
 	//
@@ -1645,5 +1644,5 @@
 		  SlicesFirst[nFirst++] = iSli ; // We save time when it triggers
 		  iReturn++ ;
-		  iSli+=(50*SLICES_PER_NSEC);  // We skip the following 50 ns (dead time)
+		  iSli+=(LEVEL1_DEAD_TIME*TRIG_SLICES_PER_NSEC);  // We skip the following 50 ns (dead time)
 		  iCell=TRIGGER_CELLS;         // We skip the remaining trigger cells 
 		  break ; 
@@ -1675,5 +1674,5 @@
 		  SlicesFirst[nFirst++] = iSli ; //  We save when it triggers
 		  iReturn++ ;
-		  iSli+=(50*SLICES_PER_NSEC);  // We skip the following 50 ns (dead time)
+		  iSli+=(LEVEL1_DEAD_TIME*TRIG_SLICES_PER_NSEC);  // We skip the following 50 ns (dead time)
 		  iCell=TRIGGER_CELLS;         // We skip the remaining trigger cells 
 		  break ; 
@@ -1768,5 +1767,5 @@
 		    SlicesFirst[nFirst++] = iSli ; //  We save time when it triggers
 		    iReturn++ ;
-		    iSli+=(50*SLICES_PER_NSEC);  // We skip the following 50 ns (dead time)
+		    iSli+=(LEVEL1_DEAD_TIME*TRIG_SLICES_PER_NSEC);  // We skip the following 50 ns (dead time)
 		    iCell=TRIGGER_CELLS;         // We skip the remaining trigger cells 
 		    break ; 
@@ -1863,5 +1862,5 @@
   //  It gives the time for the il trigger at first level
 
-  return((Float_t) ((Float_t) SlicesFirst[il]/((Float_t) SLICES_PER_NSEC)));
+  return((Float_t) ((Float_t) SlicesFirst[il]/((Float_t) TRIG_SLICES_PER_NSEC)));
 }
 
@@ -1885,5 +1884,5 @@
 
   // Translation from ns to slices
-  iNumSli=(int) (overlaping_time*SLICES_PER_NSEC);
+  iNumSli=(int) (overlaping_time*TRIG_SLICES_PER_NSEC);
   if (iNumSli<1) iNumSli=1;
 
@@ -1901,5 +1900,2 @@
 
 }
-
-
-
Index: trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx	(revision 5104)
+++ trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx	(revision 5248)
@@ -109,8 +109,9 @@
   //    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 sing_resp[ RESPONSE_SLICES ] ;   // the shape of the phe_response function 
-  Float_t peak_time  ;                      // the time from the start of the response function to the maximum peak 
+  Float_t fwhm_resp ;                       // fwhm of the phe_response function 
+  Float_t ampl_resp ;                       // amplitude of the phe_response function (in mV)
+  Float_t sing_resp[RESPONSE_SLICES_TRIG] ; // the shape of the phe_response function 
+  Float_t peak_time  ;                      // the time from the start of the response 
+                                            // function to the maximum peak 
 
   TH1F     *histPmt ; 
