Changeset 1419
- Timestamp:
- 07/16/02 17:15:22 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r1311 r1419 21 21 // 22 22 // $RCSfile: camera.cxx,v $ 23 // $Revision: 1. 39$23 // $Revision: 1.40 $ 24 24 // $Author: blanch $ 25 // $Date: 2002-0 4-27 10:48:39$25 // $Date: 2002-07-16 16:15:22 $ 26 26 // 27 27 //////////////////////////////////////////////////////////////////////// … … 367 367 368 368 extern char FileName[]; 369 370 369 // switch on starfield rotation 370 static int Starfield_rotate = TRUE; 371 static float zenith = 0.0;//zenith angle for starfield rotation 372 static float azimutal = 90.0;//azimuth angle for starfield rotation 371 373 //=----------------------------------------------------------- 372 374 // @subsection Main program. … … 622 624 623 625 Select_Energy = get_select_energy( &Select_Energy_le, &Select_Energy_ue); 624 626 627 //parameters for starfield rotation 628 get_teles_axis(&zenith, &azimutal); 629 Starfield_rotate = get_starfield_rotate(); 630 log(SIGNATURE, 631 "%s:\n\t%20s: %s\n\t%20s: %f\n\t%20s: %f \n", 632 "Starfield Rotate", 633 "Rotate Starfield", ONoff(Starfield_rotate), 634 "Zenith Angle",zenith, 635 "Azimutal Angle",azimutal 636 ); 637 625 638 // log filenames information 626 639 … … 1323 1336 &ncph, // will be changed by the function! 1324 1337 &arrtmin_ns, // will be changed by the function! 1325 &arrtmax_ns // will be changed by the function!1326 );1338 &arrtmax_ns, // will be changed by the function! 1339 -1 ); // photons from the shower 1327 1340 1328 1341 if( k != 0 ){ // non-zero returnvalue means error … … 2913 2926 int *incph, // total number of cph read 2914 2927 float *tmin_ns, // minimum arrival time of all phes 2915 float *tmax_ns // maximum arrival time of all phes 2916 ){ 2928 float *tmax_ns, // maximum arrival time of all phes 2929 int star // star=0 starfield rotation star=-1 not rotation 2930 ){ 2917 2931 2918 2932 static int i, k, ipixnum; … … 2922 2936 static char flag[SIZE_OF_FLAGS + 1]; 2923 2937 static float radius; 2924 2938 static float SFR , C3 , C2 , C1; 2939 const double pi = 3.14159; 2925 2940 2926 2941 // reset variables … … 2976 2991 // Pixelization 2977 2992 // 2978 2979 cx = photon.get_x(); 2980 cy = photon.get_y(); 2993 2994 // Where the photon provide(0 from starfield, -1 from Mmcs ??? 2995 2996 if ( star == 0 && Starfield_rotate == TRUE ) 2997 2998 { 2999 get_teles_axis(&zenith, &azimutal); 3000 // Introduction SFR angle 3001 3002 zenith = (pi/180) * zenith; 3003 3004 azimutal =( pi/180) * azimutal; 3005 3006 C1 = 0.48 * sin(zenith) - 0.87 * cos(zenith) * cos(azimutal); 3007 3008 C3 = (0.87 * cos(zenith) - 0.48 * sin(zenith) * cos(azimutal)); 3009 3010 C2 = sqrt( sin(zenith) * sin(zenith) * sin(azimutal) * sin(azimutal) + C3 * C3 ); 3011 3012 SFR = acos( C1/C2 ); 3013 3014 if ( sin(azimutal) < 0) 3015 { 3016 SFR = 2 * pi - SFR; 3017 } 3018 else 3019 { 3020 SFR = SFR; 3021 } 3022 3023 //final of introduction SFR angle// 3024 3025 cx = photon.get_x() * cos(SFR) - photon.get_y() * sin(SFR); 3026 cy = photon.get_y() * cos(SFR) + photon.get_x() * sin(SFR); 3027 3028 } 3029 else 3030 { 3031 cx = photon.get_x(); 3032 cy = photon.get_y(); 3033 3034 } 3035 2981 3036 2982 3037 // get wavelength … … 3185 3240 &incph, 3186 3241 &tmin_ns, 3187 &tmax_ns ); 3242 &tmax_ns, 3243 0 ); // photons from starfield 3188 3244 3189 3245 if( k != 0 ){ // non-zero returnvalue means error … … 3353 3409 // 3354 3410 // $Log: not supported by cvs2svn $ 3411 // Revision 1.39 2002/04/27 10:48:39 blanch 3412 // Some unused varibles have been removed. 3413 // 3355 3414 // Revision 1.38 2002/03/18 18:44:29 blanch 3356 3415 // Small modificatin to set the electronic Noise in the MMcTrigHeader class. … … 3469 3528 // 3470 3529 // $Log: not supported by cvs2svn $ 3530 // Revision 1.39 2002/04/27 10:48:39 blanch 3531 // Some unused varibles have been removed. 3532 // 3471 3533 // Revision 1.38 2002/03/18 18:44:29 blanch 3472 3534 // Small modificatin to set the electronic Noise in the MMcTrigHeader class.
Note:
See TracChangeset
for help on using the changeset viewer.