Changeset 2288 for trunk/MagicSoft/Simulation/Detector
- Timestamp:
- 07/17/03 19:04:53 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
r1756 r2288 19 19 //= 20 20 //= $RCSfile: creadparam.cxx,v $ 21 //= $Revision: 1. 19$21 //= $Revision: 1.20 $ 22 22 //= $Author: blanch $ 23 //= $Date: 2003-0 2-12 13:47:32$23 //= $Date: 2003-07-17 18:04:53 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 76 76 static char Loop_filename[PATH_MAX_LENGTH]; //@< special data filename 77 77 static char CT_filename[PATH_MAX_LENGTH]; //@< name of the CT def. file 78 static char QE_filename[PATH_MAX_LENGTH]; //@< name of the qe file 78 79 static char NSB_directory[PATH_MAX_LENGTH]; //@< database for NSB 80 static char NSB_outer_directory[PATH_MAX_LENGTH]; //@< database for NSB 79 81 static int Starfield_rotate = FALSE; //@< switch on starfield rotation 80 82 static int ElecNoise = TRUE; //@< Will we add ElecNoise? 83 static float FADC_pedestal = 50.0; //@< Value for FADC Pedestal 81 84 static float FADC_Noise = 2.0; //@< Value for FADC ElecNoise 82 85 static float Trig_Noise = 0.3; //@< Factor for Trigger ElecNoise … … 89 92 static float RiseDisc = -1.0; 90 93 static float SecureDisc = 7.0; 91 static float qTailCut; //@< Tail Cut value92 static int nIslandsCut; //@< Islands Cut value93 static int countIslands = TRUE; //@< Will we count the islands?94 94 static long int Seeds[2]; 95 95 static int *Skip; 96 96 static int nSkip=0; 97 97 static int Data_From_STDIN = FALSE; 98 static int Read_Phe = FALSE;99 static int Read_Phe_All = FALSE;100 98 static int Write_All_Images = FALSE; 101 99 static int Write_McEvt = TRUE; … … 107 105 static float Select_Energy_le = 0.0; //@< GeV 108 106 static float Select_Energy_ue = 100000.0; //@< GeV 109 static float Trigger_Radius;110 static int Set_Trigger_Radius=FALSE;111 static float fCorrection;112 static int Apply_Correction=FALSE;113 107 static int Trigger_Scan = FALSE; 114 108 static int FADC_Scan = FALSE; … … 130 124 static float FADC_response_ampl = MFADC_RESPONSE_AMPLITUDE; 131 125 static float FADC_response_fwhm = MFADC_RESPONSE_FWHM; 132 static float Telescope_axis_th = 0.; //<@ Theta of the axis telescope133 static float Telescope_axis_ph = 90.; //<@ Phi of the axis telescope126 static float FADC_resp_ampl_out = MFADC_RESPONSE_AMPLITUDE; 127 static float FADC_resp_fwhm_out = MFADC_RESPONSE_FWHM; 134 128 static float Source_offset_th=0.; //<@ Displacement in Theta of the 135 129 //<@ source from the center 136 130 static float Source_offset_ph=0.; //<@ Displacement in Phi of the 137 131 //<@ source from the center 138 static int Corsika_vers=5200; //<@ Version of Corsika139 132 140 133 //!@} … … 261 254 break; 262 255 256 case qe_file: //@< name of the telescope file 257 258 // get the name of the ct_file from the line 259 sscanf(line, "%s %s", token, QE_filename); 260 261 break; 262 263 263 case elec_noise_off: //@< add ElecNoise? 264 264 … … 270 270 break; 271 271 272 case fadc_pedestal: //@< FADC ElecNoise 273 274 // value for FADC Pedestal 275 sscanf(line, "%s %f", token, &FADC_pedestal); 276 277 break; 278 272 279 case fadc_noise: //@< FADC ElecNoise 273 280 … … 317 324 case nsb_directory: //@< name of the output file 318 325 319 // get the name of the output_file from the line326 // get the name of the NSB diretory for inner pixels 320 327 sscanf(line, "%s %s", token, NSB_directory); 328 329 break; 330 331 case nsb_dir_outer: //@< name of the output file 332 333 // get the name of the NSB diretory for outer pixels 334 sscanf(line, "%s %s", token, NSB_outer_directory); 321 335 322 336 break; … … 344 358 RiseDisc=aux; 345 359 SecureDisc=aux2; 346 347 break;348 349 case tail_cut: //@< value of tail_cut (t0)350 351 // get value of tail_cut (in ph.e.)352 sscanf(line, "%s %f", token, &qTailCut);353 cerr << "Skipping unknown token in [" << line << "]\n";354 355 break;356 357 case islands_on: //@< DO count islands358 359 // DO count islands360 countIslands = TRUE;361 cerr << "Skipping unknown token in [" << line << "]\n";362 363 break;364 365 case islands_off: //@< do NOT count islands366 367 // do NOT count islands368 countIslands = FALSE;369 cerr << "Skipping unknown token in [" << line << "]\n";370 371 break;372 373 case islands_cut: //@< value of islands_cut (i0)374 375 // get value of islands_cut (in ph.e.)376 sscanf(line, "%s %d", token, &nIslandsCut);377 countIslands = TRUE;378 cerr << "Skipping unknown token in [" << line << "]\n";379 360 380 361 break; … … 406 387 break; 407 388 408 case read_phe: //@< to read PHE files409 410 // change boolean value411 Read_Phe = TRUE;412 413 break;414 415 case read_phe_all: //@< to read PHE files from write_all_events416 417 // change boolean value418 Read_Phe_All = TRUE;419 420 break;421 422 389 case write_all_events: //@< to write ALL the images 423 390 … … 470 437 break; 471 438 472 case trigger_radius: //@< set radius of trigger area473 474 // get trigger radius475 sscanf(line, "%s %f", token, &Trigger_Radius);476 Set_Trigger_Radius = TRUE;477 478 break;479 480 case correction: //@< apply a kind of correction to pixel values481 482 // get trigger radius483 sscanf(line, "%s %f", token, &fCorrection);484 Apply_Correction = TRUE;485 486 break;487 488 439 case fadc_scan: 489 440 … … 497 448 // Get parameters for the fadc response for one phe 498 449 sscanf(line, "%s %f %f", token, &FADC_response_ampl,&FADC_response_fwhm); 450 451 break; 452 453 case fadc_outer: 454 455 // Get parameters for the fadc response for one phe 456 sscanf(line, "%s %f %f", token, &FADC_resp_ampl_out,&FADC_resp_fwhm_out); 499 457 500 458 break; … … 548 506 break; 549 507 550 case telescope_axis:551 552 // Get axis of the telescope553 sscanf(line, "%s %f %f", token, &Telescope_axis_th, &Telescope_axis_ph);554 cerr << "Skipping unknown token in [" << line << "]\n";555 556 break;557 558 508 case source_offset: 559 509 560 510 // Get offset of source 561 511 sscanf(line, "%s %f %f", token, &Source_offset_th, &Source_offset_ph); 562 563 break;564 565 case corsika_vers:566 567 // Get Corsika version568 sscanf(line, "%s %i", token, &Corsika_vers);569 cerr << "Skipping unknown token in [" << line << "]\n";570 512 571 513 break; … … 756 698 757 699 //!----------------------------------------------------------- 700 // @name get_qe_filename 701 // 702 // @desc get name of QE definition file 703 // 704 // @return Name of the QE definition file 705 // 706 // @date Thu Jul 10 14:10:13 CEST 2003 707 //------------------------------------------------------------ 708 // @function 709 710 //!@{ 711 char * 712 get_qe_filename(void) 713 { 714 return (QE_filename); 715 } 716 //!@} 717 718 //!----------------------------------------------------------- 758 719 // @name get_nsb_directory 759 720 // … … 771 732 { 772 733 return (NSB_directory); 734 } 735 //!@} 736 737 738 739 //!----------------------------------------------------------- 740 // @name get_nsb_directory_outer 741 // 742 // @desc get name of the directory where the database for NSB is 743 // 744 // @return Name of the NSB directory for outer pixels 745 // 746 // @date Thu Jul 10 14:10:13 CEST 2003 747 //------------------------------------------------------------ 748 // @function 749 750 //!@{ 751 char * 752 get_nsb_directory_outer(void) 753 { 754 return (NSB_outer_directory); 773 755 } 774 756 //!@} … … 878 860 879 861 //!----------------------------------------------------------- 880 // @name get_tail_cut881 //882 // @desc get tail cut value883 //884 // @return Value for the Tail-cut885 //886 // @date Mon Sep 14 13:27:56 MET DST 1998887 //------------------------------------------------------------888 // @function889 890 //!@{891 float892 get_tail_cut(void)893 {894 return( qTailCut );895 }896 //!@}897 898 899 //!-----------------------------------------------------------900 // @name get_islands_cut901 //902 // @desc are we going to count the islands ?903 //904 // @var *n Cut on islands number905 // @return TRUE: we'll count the islands; FALSE: we won't906 //907 // @date Mon Sep 14 13:27:56 MET DST 1998908 //------------------------------------------------------------909 // @function910 911 //!@{912 int913 get_islands_cut(int *n)914 {915 *n = nIslandsCut;916 return ( countIslands );917 }918 //!@}919 920 921 //!-----------------------------------------------------------922 862 // @name get_ana_pixels 923 863 // … … 1023 963 1024 964 //!----------------------------------------------------------- 1025 // @name get_read_phe1026 //1027 // @desc get whether we will read PHE files1028 //1029 // @return TRUE: we'll read PHE files; FALSE: we won't1030 //1031 // @date Wed Nov 25 13:21:00 MET 19981032 //------------------------------------------------------------1033 // @function1034 1035 //!@{1036 int1037 get_read_phe(void)1038 {1039 return ( Read_Phe );1040 }1041 //!@}1042 1043 1044 //!-----------------------------------------------------------1045 // @name get_read_phe_all1046 //1047 // @desc get whether we will read PHE files, with write_all_events1048 //1049 // @return TRUE: we'll do it; FALSE: we won't1050 //1051 // @date Wed Nov 25 13:21:00 MET 19981052 //------------------------------------------------------------1053 // @function1054 1055 //!@{1056 int1057 get_read_phe_all(void)1058 {1059 return ( Read_Phe_All );1060 }1061 //!@}1062 1063 1064 //!-----------------------------------------------------------1065 965 // @name write_all_events 1066 966 // … … 1196 1096 //!@} 1197 1097 1198 1199 //!-----------------------------------------------------------1200 // @name get_trigger_radius1201 //1202 // @desc return the radius of the trigger area in the camera (if set)1203 //1204 // @var *radius Radius of the trigger area in the camera1205 // @return TRUE: we choose a given radius for the trigger area1206 //1207 // @date Fri May 7 11:07:43 MET DST 19991208 //------------------------------------------------------------1209 // @function1210 1211 //!@{1212 int get_trigger_radius(float *radius)1213 {1214 *radius = Trigger_Radius;1215 return ( Set_Trigger_Radius );1216 }1217 //!@}1218 1219 1220 //!-----------------------------------------------------------1221 // @name get_trigger_radius1222 //1223 // @desc return the radius of the trigger area in the camera (if set)1224 //1225 // @var *radius Radius of the trigger area in the camera1226 // @return TRUE: we choose a given radius for the trigger area1227 //1228 // @date Fri May 7 11:07:43 MET DST 19991229 //------------------------------------------------------------1230 // @function1231 1232 //!@{1233 int get_correction(float *corr)1234 {1235 *corr = fCorrection;1236 return ( Apply_Correction );1237 }1238 //!@}1239 1240 1098 //!----------------------------------------------------------- 1241 1099 // @name FADC_Scan … … 1284 1142 //!@{ 1285 1143 void 1286 get_FADC_properties(float *ra, float *rf )1144 get_FADC_properties(float *ra, float *rf, float *rao, float *rfo) 1287 1145 { 1288 1146 *ra=FADC_response_ampl; 1289 1147 *rf=FADC_response_fwhm; 1148 *rao=FADC_resp_ampl_out; 1149 *rfo=FADC_resp_fwhm_out; 1290 1150 1291 1151 } … … 1358 1218 1359 1219 //!----------------------------------------------------------- 1360 // @name get_teles_axis1361 //1362 // @desc give axis of the telescope1363 //1364 //------------------------------------------------------------1365 // @function1366 1367 //!@{1368 void get_teles_axis(float *th, float *p){1369 *th=Telescope_axis_th;1370 *p=Telescope_axis_ph;1371 }1372 //!@}1373 1374 //!-----------------------------------------------------------1375 1220 // @name get_source_off 1376 1221 // … … 1388 1233 1389 1234 //!----------------------------------------------------------- 1390 // @name get_corsika_vers 1391 // 1392 // @desc give the vrsion of corsika 1393 // 1394 //------------------------------------------------------------ 1395 // @function 1396 1397 //!@{ 1398 int get_corsika_ver(void){ 1399 return(Corsika_vers); 1400 } 1401 //!@} 1402 1403 1235 // @name get_FADC_pedesta 1236 // 1237 // @desc get the value for the FADC pedestals 1238 // 1239 //------------------------------------------------------------ 1240 // @function 1241 1242 //!@{ 1243 1244 1245 float get_FADC_pedestal(void){ 1246 1247 return FADC_pedestal; 1248 1249 } 1250 1251 //!@} 1404 1252 //=------------------------------------------------------------ 1405 1253 //!@subsection Log of this file. … … 1408 1256 // 1409 1257 // $Log: not supported by cvs2svn $ 1258 // Revision 1.19 2003/02/12 13:47:32 blanch 1259 // *** empty log message *** 1260 // 1410 1261 // Revision 1.18 2003/01/14 13:37:47 blanch 1411 1262 // Option to set a dc value to rise the discriminator threshold has been added.
Note:
See TracChangeset
for help on using the changeset viewer.