Changeset 362 for trunk/MagicSoft
- Timestamp:
- 02/16/00 12:50:12 (25 years ago)
- 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.51 channel_threshold 4. 2 2 gate_length 3. 3 3 4 response_fwhm 2 .54 response_fwhm 2 5 5 response_ampl 1. 6 6 exit -
trunk/MagicSoft/Simulation/Detector/TimeCam/timecam.cxx
r357 r362 21 21 // 22 22 // $RCSfile: timecam.cxx,v $ 23 // $Revision: 1. 2$23 // $Revision: 1.3 $ 24 24 // $Author: harald $ 25 // $Date: 2000-02- 09 12:45:28$25 // $Date: 2000-02-16 12:50:12 $ 26 26 // 27 27 //////////////////////////////////////////////////////////////////////// … … 1164 1164 1165 1165 // get wavelength 1166 1166 1167 1167 last_wl = wl; 1168 1168 wl = cphoton.get_wl(); 1169 1169 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 1180 1175 // read next CPhoton 1181 1176 if ( Data_From_STDIN ) … … 1186 1181 // go to beginning of loop, the photon is lost 1187 1182 continue; 1188 1183 1189 1184 } 1190 1185 1191 1186 // cout << "@#1 " << nshow << ' ' << cx << ' ' << cy << endl; 1192 1187 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 ); 1208 1204 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; 1247 1207 } 1248 1208 … … 2635 2595 // 2636 2596 // $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 // 2637 2600 // Revision 1.1.1.1 2000/02/08 15:13:44 harald 2638 2601 // this is just the starting point of the further development of the camera
Note:
See TracChangeset
for help on using the changeset viewer.