Index: trunk/MagicSoft/Simulation/Detector/TimeCam/MTrigger.card
===================================================================
--- trunk/MagicSoft/Simulation/Detector/TimeCam/MTrigger.card	(revision 359)
+++ trunk/MagicSoft/Simulation/Detector/TimeCam/MTrigger.card	(revision 362)
@@ -1,6 +1,6 @@
-channel_threshold    2.5
+channel_threshold    4.
 gate_length          3.
 
-response_fwhm        2.5
+response_fwhm        2
 response_ampl        1.   
 exit
Index: trunk/MagicSoft/Simulation/Detector/TimeCam/timecam.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/TimeCam/timecam.cxx	(revision 359)
+++ trunk/MagicSoft/Simulation/Detector/TimeCam/timecam.cxx	(revision 362)
@@ -21,7 +21,7 @@
 //
 // $RCSfile: timecam.cxx,v $
-// $Revision: 1.2 $
+// $Revision: 1.3 $
 // $Author: harald $ 
-// $Date: 2000-02-09 12:45:28 $
+// $Date: 2000-02-16 12:50:12 $
 //
 ////////////////////////////////////////////////////////////////////////
@@ -1164,18 +1164,13 @@
 	  
 	  // get wavelength
-	  
+
 	  last_wl = wl;
 	  wl = cphoton.get_wl();
 	  
-	  if ( wl < 1.0 )
-	    break;
-	  
-	  if ( (wl > 600.0) || (wl < 290.0) )
-	    break;
-	  
-	  // check if photon is inside outermost camera radius
-
-	  if(sqrt(cx*cx + cy*cy) > (cam.dxc[ct_NPixels-1]+1.5*ct_PixelWidth)){ 
-	   
+	  // check if photon has valid wavelength and is inside outermost camera radius
+	  
+	  if( (wl > 800.0) || (wl < 290.0) ||
+	      (sqrt(cx*cx + cy*cy) > (cam.dxc[ct_NPixels-1]+1.5*ct_PixelWidth)) ){ 
+	    
 	    // read next CPhoton
 	    if ( Data_From_STDIN ) 
@@ -1186,63 +1181,28 @@
 	    // go to beginning of loop, the photon is lost
 	    continue;
-
+	    
 	  }
 
 	  // cout << "@#1 " << nshow << ' ' << cx << ' ' << cy << endl;
 	  
-	  ci = floor( (cx - cy*COS60/SIN60)/ ct_2Apot + 0.5);
-	  cj = floor( (cy/SIN60) / ct_2Apot + 0.5);
-	  
-	  ici = (int)(ci);
-	  icj = (int)(cj);
-	  
-	  iici = ici+PIX_ARRAY_HALF_SIDE;
-	  iicj = icj+PIX_ARRAY_HALF_SIDE;
-	  
-	  // is it inside the array?
-	  
-	  if ( (iici > 0) && (iici < PIX_ARRAY_SIDE) &&
-	       (iicj > 0) && (iicj < PIX_ARRAY_SIDE) ) {
-	    	  
-	    // try to put into pixel
+	  nPMT = -1;
+
+	  for(i=0; i<ct_NPixels; i++){
+	    if( bpoint_is_in_pix( cx, cy, i, &cam) ){
+	      nPMT = i;
+	      break;
+	    }
+	  }
+	   
+	  if(nPMT==-1){// the photon is in none of the pixels
+
+	    // read next CPhoton
+	    if ( Data_From_STDIN ) 
+	      cin.read( flag, SIZE_OF_FLAGS );
+	    else
+	      inputfile.read ( flag, SIZE_OF_FLAGS );
 	    
-	    // obtain the pixel number for this photon
-	    
-	    nPMT = (int)
-	      pixels[ici+PIX_ARRAY_HALF_SIDE][icj+PIX_ARRAY_HALF_SIDE][PIXNUM];
-	  
-	  }
-	  else{
-
-	    nPMT = -1;
-
-	  }
-
-	  // check if outside the central camera
-	  
-	  if ( (nPMT < 0) || (nPMT >= ct_NCentralPixels) ) {
-
-	    // check the outer pixels
-	    nPMT = -1;
-
-	    for(i=ct_NCentralPixels; i<ct_NPixels; i++){
-	      if( bpoint_is_in_pix( cx, cy, i, &cam) ){
-		nPMT = i;
-		break;
-	      }
-	    }
-	   
-	    if(nPMT==-1){// the photon is in none of the pixels
-
-	      // read next CPhoton
-	      if ( Data_From_STDIN ) 
-		cin.read( flag, SIZE_OF_FLAGS );
-	      else
-		inputfile.read ( flag, SIZE_OF_FLAGS );
-	      
-	      // go to beginning of loop, the photon is lost
-	      continue;
-	    }
-	    
+	    // go to beginning of loop, the photon is lost
+	    continue;
 	  }
 	  
@@ -2635,4 +2595,7 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.2  2000/02/09 12:45:28  harald
+// small changes to run the timecam program.
+//
 // Revision 1.1.1.1  2000/02/08 15:13:44  harald
 // this is just the starting point of the further development of the camera
