Ignore:
Timestamp:
02/16/00 12:50:12 (25 years ago)
Author:
harald
Message:
At the meeting in Barcelona Dirk preseted an error in the pixelization
of the cphotons in the camera. He changed this in the camera program.
Now this change is also in the timecam.cxx code. It was tested and looks
allright now.
Location:
trunk/MagicSoft/Simulation/Detector/TimeCam
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/TimeCam/MTrigger.card

    r353 r362  
    1 channel_threshold    2.5
     1channel_threshold    4.
    22gate_length          3.
    33
    4 response_fwhm        2.5
     4response_fwhm        2
    55response_ampl        1.   
    66exit
  • trunk/MagicSoft/Simulation/Detector/TimeCam/timecam.cxx

    r357 r362  
    2121//
    2222// $RCSfile: timecam.cxx,v $
    23 // $Revision: 1.2 $
     23// $Revision: 1.3 $
    2424// $Author: harald $
    25 // $Date: 2000-02-09 12:45:28 $
     25// $Date: 2000-02-16 12:50:12 $
    2626//
    2727////////////////////////////////////////////////////////////////////////
     
    11641164         
    11651165          // get wavelength
    1166          
     1166
    11671167          last_wl = wl;
    11681168          wl = cphoton.get_wl();
    11691169         
    1170           if ( wl < 1.0 )
    1171             break;
    1172          
    1173           if ( (wl > 600.0) || (wl < 290.0) )
    1174             break;
    1175          
    1176           // check if photon is inside outermost camera radius
    1177 
    1178           if(sqrt(cx*cx + cy*cy) > (cam.dxc[ct_NPixels-1]+1.5*ct_PixelWidth)){
    1179            
     1170          // check if photon has valid wavelength and is inside outermost camera radius
     1171         
     1172          if( (wl > 800.0) || (wl < 290.0) ||
     1173              (sqrt(cx*cx + cy*cy) > (cam.dxc[ct_NPixels-1]+1.5*ct_PixelWidth)) ){
     1174           
    11801175            // read next CPhoton
    11811176            if ( Data_From_STDIN )
     
    11861181            // go to beginning of loop, the photon is lost
    11871182            continue;
    1188 
     1183           
    11891184          }
    11901185
    11911186          // cout << "@#1 " << nshow << ' ' << cx << ' ' << cy << endl;
    11921187         
    1193           ci = floor( (cx - cy*COS60/SIN60)/ ct_2Apot + 0.5);
    1194           cj = floor( (cy/SIN60) / ct_2Apot + 0.5);
    1195          
    1196           ici = (int)(ci);
    1197           icj = (int)(cj);
    1198          
    1199           iici = ici+PIX_ARRAY_HALF_SIDE;
    1200           iicj = icj+PIX_ARRAY_HALF_SIDE;
    1201          
    1202           // is it inside the array?
    1203          
    1204           if ( (iici > 0) && (iici < PIX_ARRAY_SIDE) &&
    1205                (iicj > 0) && (iicj < PIX_ARRAY_SIDE) ) {
    1206                  
    1207             // try to put into pixel
     1188          nPMT = -1;
     1189
     1190          for(i=0; i<ct_NPixels; i++){
     1191            if( bpoint_is_in_pix( cx, cy, i, &cam) ){
     1192              nPMT = i;
     1193              break;
     1194            }
     1195          }
     1196           
     1197          if(nPMT==-1){// the photon is in none of the pixels
     1198
     1199            // read next CPhoton
     1200            if ( Data_From_STDIN )
     1201              cin.read( flag, SIZE_OF_FLAGS );
     1202            else
     1203              inputfile.read ( flag, SIZE_OF_FLAGS );
    12081204           
    1209             // obtain the pixel number for this photon
    1210            
    1211             nPMT = (int)
    1212               pixels[ici+PIX_ARRAY_HALF_SIDE][icj+PIX_ARRAY_HALF_SIDE][PIXNUM];
    1213          
    1214           }
    1215           else{
    1216 
    1217             nPMT = -1;
    1218 
    1219           }
    1220 
    1221           // check if outside the central camera
    1222          
    1223           if ( (nPMT < 0) || (nPMT >= ct_NCentralPixels) ) {
    1224 
    1225             // check the outer pixels
    1226             nPMT = -1;
    1227 
    1228             for(i=ct_NCentralPixels; i<ct_NPixels; i++){
    1229               if( bpoint_is_in_pix( cx, cy, i, &cam) ){
    1230                 nPMT = i;
    1231                 break;
    1232               }
    1233             }
    1234            
    1235             if(nPMT==-1){// the photon is in none of the pixels
    1236 
    1237               // read next CPhoton
    1238               if ( Data_From_STDIN )
    1239                 cin.read( flag, SIZE_OF_FLAGS );
    1240               else
    1241                 inputfile.read ( flag, SIZE_OF_FLAGS );
    1242              
    1243               // go to beginning of loop, the photon is lost
    1244               continue;
    1245             }
    1246            
     1205            // go to beginning of loop, the photon is lost
     1206            continue;
    12471207          }
    12481208         
     
    26352595//
    26362596// $Log: not supported by cvs2svn $
     2597// Revision 1.2  2000/02/09 12:45:28  harald
     2598// small changes to run the timecam program.
     2599//
    26372600// Revision 1.1.1.1  2000/02/08 15:13:44  harald
    26382601// this is just the starting point of the further development of the camera
Note: See TracChangeset for help on using the changeset viewer.