Changeset 5600 for trunk/MagicSoft/Simulation/Detector/Camera
- Timestamp:
- 12/15/04 01:56:39 (20 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector/Camera
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r5419 r5600 11 11 // @date Thu May 7 16:24:22 1998 12 12 // 13 //----------------------------------------------------------------------14 //15 // Created: Thu May 7 16:24:22 199816 // Author: Jose Carlos Gonzalez17 // Purpose: Program for reflector simulation18 // Notes: See files README for details19 //20 //----------------------------------------------------------------------21 //22 // $RCSfile: camera.cxx,v $23 // $Revision: 1.83 $24 // $Author: moralejo $25 // $Date: 2004-11-17 11:43:13 $26 //27 ////////////////////////////////////////////////////////////////////////28 // @tableofcontents @coverpage29 13 30 14 //=----------------------------------------------------------- 31 15 //!@section Source code of |camera.cxx|. 32 33 /*!@"34 35 In this section we show the (commented) code of the program for the36 read-out of the output files generated by the simulator of the37 reflector, |reflector 0.3|.38 39 @"*/40 16 41 17 //=----------------------------------------------------------- … … 229 205 static float Azimutal = 90.0; 230 206 231 //@: Mis s Pointing Simulation207 //@: Mispointing Simulation 232 208 static int missPointing = 0; 233 209 static float missP_x = 0.0; … … 238 214 static float Spot_y=0.0; 239 215 static float Spotsigma=0.0; 216 217 //@: PMT time jitter 218 static float pmt_jitter=0.25; 240 219 241 220 … … 737 716 missPointing = get_misspointing(&missP_x,&missP_y); 738 717 Spotsigma = get_sigma_xy_cm_spot(&Spot_x,&Spot_y); 718 pmt_jitter = get_pmt_jitter_ns(); 739 719 740 720 … … 2967 2947 McConfigRunHeader[ict]->InitSizePMTs(ct_NPixels); 2968 2948 for(int i=0; i<(Int_t)((MGeomCam*)(camgeom.UncheckedAt(ict)))->GetNumPixels();i++){ 2969 McConfigRunHeader[ict]->AddPMT(i); 2970 MGeomPMT &pmt = McConfigRunHeader[ict]->GetPMT(i); 2971 qe_pmt.Set(pointsQE[ict],QE[ict][i][1]); 2972 wav_pmt.Set(pointsQE[ict],QElambda); 2973 pmt.SetArraySize(pointsQE[ict]); 2974 pmt.SetPMTContent(i,wav_pmt,qe_pmt); 2949 McConfigRunHeader[ict]->SetPmtTimeJitter(pmt_jitter); 2950 McConfigRunHeader[ict]->AddPMT(i); 2951 MGeomPMT &pmt = McConfigRunHeader[ict]->GetPMT(i); 2952 qe_pmt.Set(pointsQE[ict],QE[ict][i][1]); 2953 wav_pmt.Set(pointsQE[ict],QElambda); 2954 pmt.SetArraySize(pointsQE[ict]); 2955 pmt.SetPMTContent(i,wav_pmt,qe_pmt); 2975 2956 } 2976 2957 … … 4076 4057 static UInt_t seed = (UInt_t)(get_seeds(0)*get_seeds(1)); 4077 4058 4078 Float_t t; 4059 float time; 4060 float pmtjit; 4079 4061 4080 4062 // reset variables … … 4119 4101 // Check if photon is inside trigger time range 4120 4102 4121 t = photon.get_t() ;4122 4123 if (t -*tmin_ns>TOTAL_TRIGGER_TIME) {4103 time = photon.get_t() ; 4104 4105 if (time-*tmin_ns>TOTAL_TRIGGER_TIME) { 4124 4106 continue; 4125 4107 } … … 4216 4198 4217 4199 // 4218 // Apply inci ent angular correction due to Light Guides, plexiglas,4200 // Apply incident angular correction due to Light Guides, plexiglas, 4219 4201 // 1st dynode collection efficiency, double crossings... etc. 4220 4202 // This information is contained in the file Data/LightCollection.dat … … 4260 4242 nphe[ipixnum] += 1.0; 4261 4243 4244 // 4245 // PMT time jitter: gaussian, not negative (MTrigger::FillShow does 4246 // not accept negative times!) 4247 // 4248 do 4249 pmtjit = random.Gaus(3.*pmt_jitter, pmt_jitter); 4250 while(pmtjit<0.); 4262 4251 4263 4252 // store the new photoelectron 4264 4253 4265 fadc->Fill(ipixnum,(t-*tmin_ns) + fadc_jitter , 4266 trigger->FillShow(ipixnum, t-*tmin_ns + fadc_jitter), 4254 fadc->Fill(ipixnum, 4255 (time-*tmin_ns) + pmtjit + fadc_jitter, 4256 trigger->FillShow(ipixnum, time-*tmin_ns + pmtjit + fadc_jitter), 4267 4257 !((*camgeom)[ipixnum].GetD()>(*camgeom)[0].GetD())); 4268 4258 … … 4770 4760 float **qept; 4771 4761 float radius_mm, focal_dist_mm; 4772 int total_photons; 4762 int total_photons; 4763 float pmtjit; 4764 4773 4765 static UInt_t seed = (UInt_t)(get_seeds(0)*get_seeds(1)); 4774 4766 … … 4939 4931 nphe[ipixnum] += 1.; 4940 4932 4933 // 4934 // PMT time jitter: gaussian, not negative (MTrigger::FillShow does 4935 // not accept negative times!) 4936 // 4937 do 4938 pmtjit = random.Gaus(3.*pmt_jitter, pmt_jitter); 4939 while(pmtjit<0.); 4940 4941 4941 // store the new photoelectron 4942 4942 4943 fadc->Fill(ipixnum, time + fadc_jitter,4944 trigger->FillShow(ipixnum, time + fadc_jitter),4943 fadc->Fill(ipixnum, time + pmtjit + fadc_jitter, 4944 trigger->FillShow(ipixnum, time + pmtjit + fadc_jitter), 4945 4945 !((*camgeom)[ipixnum].GetD()>(*camgeom)[0].GetD())); 4946 4946 … … 4963 4963 // 4964 4964 // $Log: not supported by cvs2svn $ 4965 // Revision 1.83 2004/11/17 11:43:13 moralejo 4966 // 4967 // Made the necessary changes in starresponse to account for the new option 4968 // to switch off gain fluctuations for the NSB noise database generation. 4969 // The option in the Star Response card is "gain_fluctuations_off". The 4970 // version number of the NSB database has been updated to 1004 (see 4971 // MStarLight.hxx), now including information on whether the gain 4972 // fluctuations were on or off when the NSB database was generated. 4973 // 4965 4974 // Revision 1.82 2004/11/17 11:34:49 moralejo 4966 4975 // -
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
r5418 r5600 19 19 //= 20 20 //= $RCSfile: creadparam.cxx,v $ 21 //= $Revision: 1.3 4$22 //= $Author: moralejo$23 //= $Date: 2004-1 1-17 11:36:07$21 //= $Revision: 1.35 $ 22 //= $Author: MAGIC $ 23 //= $Date: 2004-12-15 01:56:39 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 106 106 // time window and the trigger instant. 107 107 108 static float pmt_jitter = 0.25; // Time jitter in ns (sigma of gaussian) 109 // of the PMT (per phe) 110 108 111 static float CTcoor[MAX_NUMBER_OF_CTS][3]; 109 112 … … 563 566 break; 564 567 568 case pmt_jitter_ns: 569 570 sscanf(line, "%s %f", token, &pmt_jitter); 571 break; 572 565 573 566 574 case sigma_xy_cm_spot: … … 1389 1397 } 1390 1398 1399 float get_pmt_jitter_ns(){ 1400 1401 return pmt_jitter; 1402 1403 } 1404 1391 1405 float get_telescope_location_cm(int j, int icoor){ 1392 1406 … … 1430 1444 // 1431 1445 // $Log: not supported by cvs2svn $ 1446 // Revision 1.34 2004/11/17 11:36:07 moralejo 1447 // *** empty log message *** 1448 // 1432 1449 // Revision 1.33 2004/10/26 13:58:59 moralejo 1433 1450 // -
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.h
r5418 r5600 19 19 //= 20 20 //= $RCSfile: creadparam.h,v $ 21 //= $Revision: 1.3 0$22 //= $Author: moralejo$23 //= $Date: 2004-1 1-17 11:36:07$21 //= $Revision: 1.31 $ 22 //= $Author: MAGIC $ 23 //= $Date: 2004-12-15 01:56:39 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 118 118 T(gain_fluctuations_off), /* Switches off PMT gain fluctuations for signal */ \ 119 119 T(noise_gain_fluctuations_off), /* Switches off PMT gain fluctuations for NSB noise */ \ 120 T(pmt_jitter_ns), /* Sets the time jitter of each phe in the PMT */ \ 120 121 T(end_file) /* end of the parameters file */ 121 122 … … 193 194 float get_telescope_location_cm(int j, int icoor); 194 195 float get_mirror_fraction(int j); 196 float get_pmt_jitter_ns(); 195 197 196 198 int is_calibration_run(); … … 214 216 /* 215 217 * $Log: not supported by cvs2svn $ 218 * Revision 1.30 2004/11/17 11:36:07 moralejo 219 * *** empty log message *** 220 * 216 221 * Revision 1.29 2004/10/26 13:58:59 moralejo 217 222 *
Note:
See TracChangeset
for help on using the changeset viewer.