Changeset 2391 for trunk/MagicSoft/Simulation
- Timestamp:
- 10/17/03 20:40:24 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
r2355 r2391 19 19 //= 20 20 //= $RCSfile: creadparam.cxx,v $ 21 //= $Revision: 1.2 3$21 //= $Revision: 1.24 $ 22 22 //= $Author: blanch $ 23 //= $Date: 2003- 09-23 17:38:48$23 //= $Date: 2003-10-17 19:40:24 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 70 70 static char Input_filename[100][PATH_MAX_LENGTH]; //@< input filename 71 71 static char Starfield_filename[PATH_MAX_LENGTH]; //@< starfield input filename 72 static int Starfield_center[6] ;//@< center of the starfield FOV72 static int Starfield_center[6]={0,0,0,0,0,0}; //@< center of the starfield FOV 73 73 //@< RA(H,M,S) & DEC (D,M,S) 74 74 static char Data_filename[PATH_MAX_LENGTH]; //@< data filename … … 82 82 static int Starfield_rotate = FALSE; //@< switch on starfield rotation 83 83 static int ElecNoise = TRUE; //@< Will we add ElecNoise? 84 static float FADC_pedestal = 50.0; //@< Value for FADC Pedestal84 static float FADC_pedestal = 10.0; //@< Value for FADC Pedestal 85 85 static float FADC_Noise = 2.0; //@< Value for FADC ElecNoise 86 static float Digital_Noise = 1.0; //@< Value for FADC digital Noise 86 87 static float Trig_Noise = 0.3; //@< Factor for Trigger ElecNoise 87 88 static int simulateNSB = TRUE; //@< Will we simulate NSB? … … 92 93 static float RiseDisc = -1.0; 93 94 static float SecureDisc = 7.0; 94 static long int Seeds[2] ;95 static long int Seeds[2]={69184,10406}; 95 96 static int *Skip; 96 97 static int nSkip=0; … … 126 127 static float FADC_resp_ampl_out = MFADC_RESPONSE_AMPLITUDE; 127 128 static float FADC_resp_fwhm_out = MFADC_RESPONSE_FWHM; 128 static float Source_offset_th=0.; //<@ Displacement in Theta of the 129 //<@ source from the center 130 static float Source_offset_ph=0.; //<@ Displacement in Phi of the 131 //<@ source from the center 129 static float High_to_Low = 10.0; //@< Low gain channel respct to High 130 static float Source_offset_th=0.; //@< Displacement in Theta of the 131 //@< source from the center 132 static float Source_offset_ph=0.; //@< Displacement in Phi of the 133 //@< source from the center 132 134 133 135 //!@} … … 215 217 // get the name of the input_file from the line 216 218 sscanf(line, "%s %i %s", token,&k, filename_tmp); 219 if(k>99 || k<0){ 220 printf("ERROR : The input_file command in input card is faulty. \n\t Most likely the control index for CT is missing.\n"); 221 exit(1); 222 } 217 223 strcpy(&Input_filename[k][0],&filename_tmp[0]); 218 224 break; … … 285 291 break; 286 292 293 case high_to_low: //@< FADC ElecNoise 294 295 // Value for the Low Gain channel respect to the High gain 296 sscanf(line, "%s %f", token, &High_to_Low); 297 298 break; 299 287 300 case fadc_noise: //@< FADC ElecNoise 288 301 289 302 // value for FADC Elec Noise 290 sscanf(line, "%s %f ", token, &FADC_Noise);303 sscanf(line, "%s %f %f", token, &FADC_Noise, &Digital_Noise); 291 304 ElecNoise = TRUE; 292 305 … … 348 361 // get value of threshold (in ph.e.) 349 362 sscanf(line, "%s %i %f", token,&k, &aux); 363 if(k>99 || k<0){ 364 printf("ERROR : The input_file command in input card is faulty. \n\t Most likely the control index for CT is missing.\n"); 365 exit(1); 366 } 350 367 qThreshold[0][k]=aux; 351 368 Individual_Thres = TRUE; … … 494 511 // Get trigger conditions 495 512 sscanf(line, "%s %d %f %d %d", token, &j, &aux, &aux3, &aux4); 513 if(j>99 || j<0){ 514 printf("ERROR : The input_file command in input card is faulty. \n\t Most likely the control index for CT is missing.\n"); 515 exit(1); 516 } 496 517 Trigger_threshold[j]=aux; 497 518 Trigger_multiplicity[j]=aux3; … … 793 814 //!@{ 794 815 int 795 add_elec_noise(float *fadc, float * trig)816 add_elec_noise(float *fadc, float *digi, float *trig) 796 817 { 797 818 *fadc = FADC_Noise; 819 *digi = Digital_Noise; 798 820 *trig = Trig_Noise; 821 799 822 return ( ElecNoise); 800 823 } … … 1255 1278 1256 1279 //!@} 1280 //!----------------------------------------------------------- 1281 // @name get_High_to_Low 1282 // 1283 // @desc get the conversion factor between high and low gain 1284 // 1285 //------------------------------------------------------------ 1286 // @function 1287 1288 //!@{ 1289 1290 1291 float get_High_to_Low(void){ 1292 1293 return High_to_Low; 1294 1295 } 1296 1297 //!@} 1257 1298 //=------------------------------------------------------------ 1258 1299 //!@subsection Log of this file. … … 1261 1302 // 1262 1303 // $Log: not supported by cvs2svn $ 1304 // Revision 1.23 2003/09/23 17:38:48 blanch 1305 // ana_pixels command has been removed. 1306 // 1263 1307 // Revision 1.22 2003/09/23 16:52:07 blanch 1264 1308 // We do not read ct_file anymore.
Note:
See TracChangeset
for help on using the changeset viewer.