Changeset 884 for trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
- Timestamp:
- 07/19/01 10:28:30 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
r672 r884 19 19 //= 20 20 //= $RCSfile: creadparam.cxx,v $ 21 //= $Revision: 1. 9$21 //= $Revision: 1.10 $ 22 22 //= $Author: blanch $ 23 //= $Date: 2001-0 3-05 10:43:18$23 //= $Date: 2001-07-19 09:28:30 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 78 78 static float meanNSB; //@< NSB mean value (per pixel) 79 79 static int nphe2NSB=0; //@< Number of phe from shower to do NSB simulation 80 static float qThreshold; //@< Threshold value 80 static float qThreshold[TRIGGER_PIXELS]; //@< Threshold values 81 static int Individual_Thres = FALSE; 81 82 static char NSB_directory[PATH_MAX_LENGTH]; //@< database for NSB 82 83 static float qTailCut; //@< Tail Cut value … … 142 143 char line[LINE_MAX_LENGTH]; //@< line to get from the stdin 143 144 char token[ITEM_MAX_LENGTH]; //@< a single token 144 int i, j; //@< dummy counters 145 int i, j, k; //@< dummy counters 146 float aux; //@< auxiliar variable 145 147 ifstream ifile; 146 148 … … 268 270 break; 269 271 270 case threshold: //@< value of threshold for trigger (q0)272 case pixel_thres: //@< value of threshold for trigger (q0) 271 273 272 274 // get value of threshold (in ph.e.) 273 sscanf(line, "%s %f", token, &qThreshold); 275 sscanf(line, "%s %i %f", token,&k, &aux); 276 qThreshold[k]=aux; 277 Individual_Thres = TRUE; 274 278 275 279 break; … … 436 440 sscanf(line, "%s %d %d %d %d %d %d", token, &Trigger_loop_lthres, &Trigger_loop_uthres, &Trigger_loop_lmult, &Trigger_loop_umult, &Trigger_loop_ltop, &Trigger_loop_utop ); 437 441 442 // Set qThreshold to a global value 443 for(k=0;k<TRIGGER_PIXELS;k++){ 444 qThreshold[k]=Trigger_loop_lthres; 445 } 446 438 447 // change boolean value 439 448 Trigger_Loop = TRUE; 440 449 Write_RawEvt = FALSE; 450 Individual_Thres = FALSE; 441 451 442 452 break; … … 446 456 // Get trigger conditions 447 457 sscanf(line, "%s %f %d %d", token, &Trigger_threshold, &Trigger_multiplicity, &Trigger_topology); 458 459 // Set qThreshold to a global value 460 for(k=0;k<TRIGGER_PIXELS;k++){ 461 qThreshold[k]=Trigger_threshold; 462 } 448 463 449 464 // change boolean value 450 465 Trigger_Loop = FALSE; 451 466 Write_RawEvt = TRUE; 467 Individual_Thres = FALSE; 452 468 453 469 break; … … 653 669 654 670 //!@{ 655 float 656 get_threshold(void) 657 { 658 return( qThreshold ); 671 void 672 get_threshold(float *t) 673 { 674 for(int i=0;i<TRIGGER_PIXELS;i++) 675 t[i]=qThreshold[i]; 676 } 677 //!@} 678 679 680 //!----------------------------------------------------------- 681 // @name get_indi_thres_pixel 682 // 683 // @desc get boolean information about global (FALSE) or 684 // @desc individual (TRUE) pixel trigger threshold 685 // 686 // @return Value for the Individual_Thres 687 // 688 // @date Wed Jul 18 16:29:43 CEST 2001 689 //------------------------------------------------------------ 690 // @function 691 692 //!@{ 693 int get_indi_thres_pixel(void){ 694 return Individual_Thres; 659 695 } 660 696 //!@} … … 1132 1168 get_Trigger_Single(float *t, int *m, int *g) 1133 1169 { 1134 *t=Trigger_threshold; 1170 for(int i=0;i<TRIGGER_PIXELS;i++) 1171 t[i]=qThreshold[i]; 1135 1172 *m=Trigger_multiplicity; 1136 1173 *g=Trigger_topology; … … 1145 1182 // 1146 1183 // $Log: not supported by cvs2svn $ 1184 // Revision 1.9 2001/03/05 10:43:18 blanch 1185 // New input commands have been added: 1186 // 1187 // - write_McFadc: to write the FADC simulation information. 1188 // - fadc_prop: gives the shape of the single phe response of the FADC 1189 // 1190 // And new value has been added in the mean_NSB command that tells how many phes 1191 // have to come from the shower to do the NSB simulation in that shower (it speeds 1192 // up the simulation). 1193 // 1147 1194 // Revision 1.8 2001/02/23 10:55:43 magicsol 1148 1195 // An input commmand that talls the path for the NSB database has been added.
Note:
See TracChangeset
for help on using the changeset viewer.