Changeset 5320 for trunk/MagicSoft/Simulation
- Timestamp:
- 10/26/04 20:21:05 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r5318 r5320 21 21 // 22 22 // $RCSfile: camera.cxx,v $ 23 // $Revision: 1. 79$23 // $Revision: 1.80 $ 24 24 // $Author: moralejo $ 25 // $Date: 2004-10-26 1 4:02:32$25 // $Date: 2004-10-26 19:21:05 $ 26 26 // 27 27 //////////////////////////////////////////////////////////////////////// … … 995 995 } 996 996 997 float *fadc_jitter = new float[ct_Number]; 998 for (int i=0; i<ct_Number;i++) 999 fadc_jitter[i] = 0.; 1000 997 1001 MFadc **Fadc_CT; 998 1002 Fadc_CT = new MFadc *[ct_Number]; … … 1686 1690 ((MGeomCam*)(camgeom.UncheckedAt(ict))) 1687 1691 ->GetNumPixels()); 1692 1693 // 1694 // Fill also the flag indicating whether the PMT gain fluctuations 1695 // were simulated or not: 1696 // 1697 HeaderFadc[ict]->SetGainFluctuations(Trigger_CT[ict]->GetGainFluctuations()); 1688 1698 } 1689 1699 … … 1944 1954 inumphe_CT[ict]=0; 1945 1955 1956 1957 // Obtain the FADC jitter of 1 FADC slice. This is a time to be added to the 1958 // time of all photons in an event, before digitalization of the signal. It is 1959 // therefore the same time shift for all pixels in a CT. 1960 1961 fadc_jitter[ict] = 1962 (1./Fadc_CT[ict]->GetFadcSlicesPerNanosec()) * RandomNumber; //ns 1963 1946 1964 // read the photons and produce the photoelectrons 1947 1965 1948 1966 k = produce_phes( inputfile[ict], 1949 1967 ((MGeomCam*)(camgeom.UncheckedAt(ict))), … … 1958 1976 &arrtmax_ns, // will be changed by the function! 1959 1977 ict, 1960 mirror_frac[ict]); 1978 mirror_frac[ict], 1979 fadc_jitter[ict]); 1961 1980 1962 1981 inumphe=(inumphe<inumphe_CT[ict])?inumphe_CT[ict]:inumphe; … … 2324 2343 -1.0, 2325 2344 -1.0, 2326 -1.0); 2345 -1.0, 2346 fadc_jitter[0]); 2327 2347 } 2328 2348 else{ … … 2363 2383 mcevth_2[0].get_ElecFraction(), 2364 2384 mcevth_2[0].get_MuonFraction(), 2365 mcevth_2[0].get_OtherFraction()); 2385 mcevth_2[0].get_OtherFraction(), 2386 fadc_jitter[0]); 2366 2387 } 2367 2388 } … … 2538 2559 } // end CT loop 2539 2560 2540 // If there is trigger in some tele cope or we store all showers2561 // If there is trigger in some telescope or we store all showers 2541 2562 if(btrigger){ 2542 2563 if (Write_McEvt){ … … 2581 2602 -1.0, 2582 2603 -1.0, 2583 -1.0); 2604 -1.0, 2605 fadc_jitter[ict]); 2584 2606 } 2585 2607 else{ … … 2618 2640 mcevth_2[ict].get_ElecFraction(), 2619 2641 mcevth_2[ict].get_MuonFraction(), 2620 mcevth_2[ict].get_OtherFraction()); 2642 mcevth_2[ict].get_OtherFraction(), 2643 fadc_jitter[ict]); 2621 2644 } 2622 2645 } … … 4004 4027 float *tmax_ns, // maximum arrival time of all phes 4005 4028 int ict, // Telescope that is being analised to get the right QE. 4006 float mirror_fraction // Fraction of total mirror really present 4029 float mirror_fraction, // Fraction of total mirror really present 4030 float fadc_jitter // Random shift (max 1 slice) of pulses in 4031 // FADC, to simulate FADC clock noise. 4007 4032 ){ 4008 4033 … … 4034 4059 4035 4060 float C1, C2, C3, rho; 4036 4037 // A. Moralejo, October 20044038 // Introduced the FADC jitter of 1 FADC slice. This is a time to be added to the4039 // time of all photons in an event, before digitalization of the signal. We use4040 // a positive value between 0 and 1 slice for technical reasons, but it is4041 // totally equivalent to having made +- 1 FADC slice4042 4043 float fadc_jitter = (1./fadc->GetFadcSlicesPerNanosec()) * random.Uniform(0., 1.); //ns4044 4061 4045 4062 //- - - - - - - - - - - - - - - - - - - - - - - - - … … 4404 4421 fsetpos( infile, &fileposition); 4405 4422 4406 // produce photoelectrons 4423 // produce photoelectrons (photons from starfield) 4407 4424 4408 4425 k = produce_phes( infile, … … 4418 4435 &tmax_ns, 4419 4436 0, 4420 mirror_fraction); // photons from starfield 4437 mirror_fraction, 4438 0.); 4439 4421 4440 4422 4441 if( k != 0 ){ // non-zero returnvalue means error … … 4653 4672 4654 4673 McEvt[ict]->Fill( 0, 0, 0., -1.0, -1.0, -1.0, 0., 0., 0., 0., 0., 4655 0., 0., 0., pulsetime[ict], 0., 0., 0., 0.,4674 0., 0., 0., 0., 0., 0., 0., 0., 4656 4675 0., 0., 0., 0., 0, 0, 0, 4657 4676 (UInt_t) ntotphot[ict], 4658 4677 (UInt_t) ntotphe[ict], 4659 4678 (UInt_t) nphe_from_nsb[ict]+ ntotphe[ict], 4660 0., 0., 0. );4679 0., 0., 0., pulsetime[ict]); 4661 4680 4662 4681 // … … 4910 4929 // 4911 4930 // $Log: not supported by cvs2svn $ 4931 // Revision 1.79 2004/10/26 14:02:32 moralejo 4932 // 4933 // Added option to switch off gain fluctuations (gain_fluctuations_off) 4934 // 4912 4935 // Revision 1.78 2004/10/21 17:44:07 moralejo 4913 4936 // … … 5057 5080 // - The screen output information has been improved to prevent some 5058 5081 // non-desired running conditions just looking at the output screen. 5059 // - One MMcEvt for each Tels cope is stored in the output file.5082 // - One MMcEvt for each Telsecope is stored in the output file. 5060 5083 // - 500 empty events are simualted to get a more precise estimation of the 5061 5084 // pedestal Sigma for each pixel.
Note:
See TracChangeset
for help on using the changeset viewer.