Changeset 5600 for trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
- Timestamp:
- 12/15/04 01:56:39 (20 years ago)
- File:
-
- 1 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 //
Note:
See TracChangeset
for help on using the changeset viewer.