- Timestamp:
- 07/19/01 10:29:53 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r781 r886 21 21 // 22 22 // $RCSfile: camera.cxx,v $ 23 // $Revision: 1.2 5$23 // $Revision: 1.26 $ 24 24 // $Author: blanch $ 25 // $Date: 2001-0 5-08 08:07:54$25 // $Date: 2001-07-19 09:29:53 $ 26 26 // 27 27 //////////////////////////////////////////////////////////////////////// … … 231 231 static int Trigger_Loop = FALSE; 232 232 233 //@: flag: TRUE: Different threshold for each pixel ; FALSE: same threshold for all pixels 234 static int Individual_Thres_Pixel = FALSE; 235 233 236 //@: Properties of the trigger 234 237 static float Trigger_gate_length = 6.0; … … 242 245 243 246 //@: Trigger conditions for a single trigger mode 244 static float Trigger_threshold = 7.0;247 static float qThreshold[TRIGGER_PIXELS]; 245 248 static int Trigger_multiplicity = 4; 246 249 static int Trigger_topology = 2; … … 386 389 //@' 387 390 388 int ioscar=0;389 390 391 char inname[256]; //@< input file name 391 392 char starfieldname[256]; //@< starfield input file name … … 455 456 }; 456 457 457 float qThreshold; //@< Threshold value458 458 float qTailCut; //@< Tail Cut value 459 459 int nIslandsCut; //@< Islands Cut value 460 int countIslands ; //@< Will we count the islands?460 int countIslands=FALSE; //@< Will we count the islands? 461 461 int anaPixels; 462 462 … … 471 471 UShort_t numPix; //@< number of sets of fadc written counts 472 472 473 float fpixelthres[TRIGGER_PIXELS]; 473 float fpixelthres[TRIGGER_PIXELS]; //@< Threshold values 474 474 475 475 TArrayC *fadcValues; //@< the analog Fadc siganl for pixels … … 568 568 Trigger_Scan = get_Trigger_Scan(); 569 569 570 Individual_Thres_Pixel = get_indi_thres_pixel(); 571 570 572 get_FADC_properties( &FADC_response_ampl, &FADC_response_fwhm); 571 573 … … 579 581 580 582 if (!Trigger_Loop){ 581 get_Trigger_Single ( &Trigger_threshold, &Trigger_multiplicity, &Trigger_topology);583 get_Trigger_Single (qThreshold, &Trigger_multiplicity, &Trigger_topology); 582 584 icontrigger=1; 583 585 } 586 else 587 get_threshold(qThreshold); 584 588 585 589 // get filenames … … 595 599 // get different parameters of the simulation 596 600 597 qThreshold = get_threshold();598 601 qTailCut = get_tail_cut(); 599 602 simulateNSB = get_nsb( &meanNSB, &nphe2NSB ); … … 628 631 rootname_loop); 629 632 } 630 else {633 else if (Individual_Thres_Pixel == FALSE){ 631 634 log(SIGNATURE, 632 635 "%s:\n\t%20s: %f\n\t%20s: %i\n\t%20s: %i\n", 633 636 "Single Trigger mode", 634 "Threshold", Trigger_threshold,637 "Threshold",qThreshold[0], 635 638 "Multiplicity",Trigger_multiplicity, 636 639 "Topology",Trigger_topology); 637 640 } 638 641 else{ 642 log(SIGNATURE, 643 "%s:\n\t%20s: %s\n\t%20s: %i\n\t%20s: %i\n", 644 "Single Trigger mode", 645 "Threshold","Different for each pixel", 646 "Multiplicity",Trigger_multiplicity, 647 "Topology",Trigger_topology); 648 } 639 649 // log flags information 640 650 … … 659 669 660 670 log(SIGNATURE, 661 "%s:\n\t%20s: %f\n\t%20s: %f \n\t%20s: %f %s\n\t%20s: %f%s\n",671 "%s:\n\t%20s: %f\n\t%20s: %f %s\n", 662 672 "Parameters", 663 "q0 (Threshold)", qThreshold,664 673 "t0 (Tail-cut)", qTailCut, 665 "NSB (phes/pixel)", meanNSB, ONoff(simulateNSB), 666 "i0 (Islands-cut)", nIslandsCut, ONoff(countIslands)); 674 "NSB (phes/pixel)", meanNSB, ONoff(simulateNSB)); 667 675 668 676 // log selections … … 886 894 HeaderTrig[0]->SetTopology((Short_t) Trigger_topology); 887 895 HeaderTrig[0]->SetMultiplicity((Short_t) Trigger_multiplicity); 888 for(i=0;i<TRIGGER_PIXELS;i++){ 889 fpixelthres[i]=(Float_t)Trigger_threshold; 890 } 891 HeaderTrig[0]->SetThreshold( fpixelthres); 896 HeaderTrig[0]->SetThreshold(qThreshold); 892 897 HeaderTrig[0]->SetAmplitud(Trigger_response_ampl); 893 898 HeaderTrig[0]->SetFwhm(Trigger_response_fwhm); … … 902 907 HeaderTrig[iconcount]->SetTopology((Short_t) itopocount+Trigger_loop_ltop); 903 908 HeaderTrig[iconcount]->SetMultiplicity((Short_t) imulticount+Trigger_loop_lmult); 904 for(i=0;i<TRIGGER_PIXELS;i++){ 905 fpixelthres[i]=(Float_t)(ithrescount+Trigger_loop_lthres); 909 for(int i=0;i<TRIGGER_PIXELS;i++){ 910 fpixelthres[i]= 911 ((Float_t)(ithrescount+Trigger_loop_lthres)>=qThreshold[i])? 912 (Float_t)(ithrescount+Trigger_loop_lthres):qThreshold[i]; 906 913 } 907 914 HeaderTrig[iconcount]->SetThreshold( fpixelthres); … … 1359 1366 for (int iconcount=0,ithrescount=Trigger_loop_lthres;ithrescount<=Trigger_loop_uthres;ithrescount++){ 1360 1367 for (i=0;i<TRIGGER_PIXELS;i++) 1361 fpixelthres[i]=(float) ithrescount; 1368 fpixelthres[i]= 1369 ((Float_t)(ithrescount)>=qThreshold[i])? 1370 (Float_t)(ithrescount):qThreshold[i]; 1362 1371 Trigger.SetThreshold(fpixelthres); 1363 1372 … … 1496 1505 Trigger.SetMultiplicity(Trigger_multiplicity); 1497 1506 Trigger.SetTopology(Trigger_topology); 1498 for (i =0;i<TRIGGER_PIXELS;i++)1499 fpixelthres[i]= Trigger_threshold;1507 for (int i=0;i<TRIGGER_PIXELS;i++) 1508 fpixelthres[i]=qThreshold[i]; 1500 1509 Trigger.SetThreshold(fpixelthres); 1501 1510 … … 3238 3247 // 3239 3248 // $Log: not supported by cvs2svn $ 3249 // Revision 1.25 2001/05/08 08:07:54 blanch 3250 // New numbering for branches from different trigger conditions has been 3251 // implemented. Now, they are calles: ClassName;1., ClasNema;2., ... 3252 // The MontaCarlo Headers (MMcTrigHeader and MMcFadcHeader) have been move to 3253 // the RunHeaders tree. Also the MRawRunHeader is thera with some of its 3254 // information already filled. 3255 // 3240 3256 // Revision 1.24 2001/04/06 16:48:09 magicsol 3241 3257 // New camera version able to read the new format of the reflector output: … … 3294 3310 // 3295 3311 // $Log: not supported by cvs2svn $ 3312 // Revision 1.25 2001/05/08 08:07:54 blanch 3313 // New numbering for branches from different trigger conditions has been 3314 // implemented. Now, they are calles: ClassName;1., ClasNema;2., ... 3315 // The MontaCarlo Headers (MMcTrigHeader and MMcFadcHeader) have been move to 3316 // the RunHeaders tree. Also the MRawRunHeader is thera with some of its 3317 // information already filled. 3318 // 3296 3319 // Revision 1.24 2001/04/06 16:48:09 magicsol 3297 3320 // New camera version able to read the new format of the reflector output:
Note:
See TracChangeset
for help on using the changeset viewer.