- Timestamp:
- 03/02/05 21:45:06 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r6696 r6712 1 1 ////!//////////////////////////////////////////////////////////////////// 2 2 // 3 // camera 3 // camera 4 4 // 5 5 // @file camera.cxx … … 221 221 222 222 //@: PMT time jitter 223 static float pmt_jitter =0.25;223 static float pmt_jitter; 224 224 225 225 … … 4135 4135 4136 4136 float time; 4137 float pmtjit; 4137 float *pmtjit; 4138 4139 pmtjit = new float[camgeom->GetNumPixels()]; 4138 4140 4139 4141 // reset variables 4140 4142 4141 for ( i=0; i<camgeom->GetNumPixels(); ++i ) 4142 nphe[i] = 0.0; 4143 4143 TRandom random; 4144 random.SetSeed(seed); 4145 4146 for ( i = 0; i < camgeom->GetNumPixels(); ++i ) 4147 { 4148 nphe[i] = 0.0; 4149 // 4150 // PMT time jitter: gaussian, not negative (MTrigger::FillShow does 4151 // not accept negative times!) 4152 // 4153 do 4154 pmtjit[i] = random.Gaus(3.*pmt_jitter, pmt_jitter); 4155 while (pmtjit[i] < 0.); 4156 } 4144 4157 4145 4158 *itotnphe = 0; … … 4147 4160 4148 4161 radius_mm = camgeom->GetMaxRadius(); 4149 4150 TRandom random;4151 random.SetSeed(seed);4152 4162 4153 4163 float C1, C2, C3, rho; … … 4319 4329 nphe[ipixnum] += 1.0; 4320 4330 4321 //4322 // PMT time jitter: gaussian, not negative (MTrigger::FillShow does4323 // not accept negative times!)4324 //4325 do4326 pmtjit = random.Gaus(3.*pmt_jitter, pmt_jitter);4327 while(pmtjit<0.);4328 4329 4331 // store the new photoelectron 4330 4332 4331 4333 fadc->Fill(ipixnum, 4332 (time-*tmin_ns) + pmtjit + fadc_jitter,4333 trigger->FillShow(ipixnum, time-*tmin_ns + pmtjit + fadc_jitter),4334 (time-*tmin_ns) + pmtjit[ipixnum] + fadc_jitter, 4335 trigger->FillShow(ipixnum, time-*tmin_ns + pmtjit[ipixnum] + fadc_jitter), 4334 4336 !((*camgeom)[ipixnum].GetD()>(*camgeom)[0].GetD())); 4335 4337 … … 4859 4861 float radius_mm, focal_dist_mm; 4860 4862 int total_photons; 4861 float pmtjit;4863 float *pmtjit; 4862 4864 4863 4865 static UInt_t seed = (UInt_t)(get_seeds(0)*get_seeds(1)); 4864 4866 4867 pmtjit = new float[camgeom->GetNumPixels()]; 4868 4865 4869 // reset variables 4866 4870 4871 TRandom random; 4872 random.SetSeed(seed); 4873 4867 4874 for ( uint i = 0; i < camgeom->GetNumPixels(); i++ ) 4868 nphe[i] = 0.0; 4875 { 4876 nphe[i] = 0.0; 4877 4878 // 4879 // PMT time jitter: gaussian, not negative (MTrigger::FillShow does 4880 // not accept negative times!) 4881 // 4882 do 4883 pmtjit[i] = random.Gaus(3.*pmt_jitter, pmt_jitter); 4884 while(pmtjit[i]<0.); 4885 } 4869 4886 4870 4887 *itotnphe = 0; 4871 4888 *nphot = 0; 4872 4873 TRandom random;4874 random.SetSeed(seed);4875 4889 4876 4890 // … … 4887 4901 // dish to the edge of the camera: 4888 4902 float cos_epsilon_max = cos(atan2(radius_mm, focal_dist_mm)); 4903 4889 4904 4890 4905 … … 5029 5044 nphe[ipixnum] += 1.; 5030 5045 5031 //5032 // PMT time jitter: gaussian, not negative (MTrigger::FillShow does5033 // not accept negative times!)5034 //5035 do5036 pmtjit = random.Gaus(3.*pmt_jitter, pmt_jitter);5037 while(pmtjit<0.);5038 5039 5046 // store the new photoelectron 5040 5047 5041 fadc->Fill(ipixnum, time + pmtjit + fadc_jitter,5042 trigger->FillShow(ipixnum, time + pmtjit + fadc_jitter),5048 fadc->Fill(ipixnum, time + pmtjit[ipixnum] + fadc_jitter, 5049 trigger->FillShow(ipixnum, time + pmtjit[ipixnum] + fadc_jitter), 5043 5050 !((*camgeom)[ipixnum].GetD()>(*camgeom)[0].GetD())); 5044 5051 … … 5061 5068 // 5062 5069 // $Log: not supported by cvs2svn $ 5070 // Revision 1.96 2005/03/01 21:57:01 moralejo 5071 // 5072 // Set parameters for the shape of the low gain pulse in the FADC to more 5073 // precise values. Low gain pulse from real data was provided by H. Bartko. 5074 // 5063 5075 // Revision 1.95 2005/03/01 20:13:17 moralejo 5064 5076 // Added comments
Note:
See TracChangeset
for help on using the changeset viewer.