Changeset 5417 for trunk/MagicSoft/Simulation/Detector/Camera
- Timestamp:
- 11/17/04 11:34:49 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r5341 r5417 21 21 // 22 22 // $RCSfile: camera.cxx,v $ 23 // $Revision: 1.8 1$23 // $Revision: 1.82 $ 24 24 // $Author: moralejo $ 25 // $Date: 2004-11- 04 22:00:51$25 // $Date: 2004-11-17 11:34:49 $ 26 26 // 27 27 //////////////////////////////////////////////////////////////////////// … … 839 839 840 840 if (! apply_gain_fluctuations()) 841 log(SIGNATURE, "PMT gain fluctuations have been switched OFF in the input card.\n\n"); 841 { 842 log(SIGNATURE, "PMT gain fluctuations for the signal phes have been switched OFF"); 843 log(SIGNATURE, "in the input card.\n\n"); 844 } 845 if (! apply_noise_gain_fluctuations()) 846 { 847 log(SIGNATURE, "PMT gain fluctuations for the NSB phes have been switched OFF\n"); 848 log(SIGNATURE, "in the input card.\n\n"); 849 } 850 851 if ( apply_gain_fluctuations() && !apply_noise_gain_fluctuations()) 852 { 853 log(SIGNATURE, "Warning: you switched off PMT gain fluctuations for the NSB\n"); 854 log(SIGNATURE, "photoelectrons, but not for the signal photoelectrons.\n\n"); 855 } 856 else if ( !apply_gain_fluctuations() && apply_noise_gain_fluctuations()) 857 { 858 log(SIGNATURE, "Warning: you switched off PMT gain fluctuations for the signal\n"); 859 log(SIGNATURE, "photoelectrons, but not for the NSB photoelectrons.\n"); 860 } 861 842 862 843 863 // log flags information … … 1223 1243 HeaderTrig[0]->SetGate(Trigger_gate_length); 1224 1244 HeaderTrig[0]->SetElecNoise(Trigger_noise); 1225 } 1245 HeaderTrig[0]->SetGainFluctuations(Trigger_CT[0]->GetGainFluctuations()); 1246 HeaderTrig[0]->SetNoiseGainFluctuations((Bool_t)apply_noise_gain_fluctuations()); 1247 } 1248 1226 1249 if(!Trigger_Loop && Write_McTrig && ct_Number>1){ 1227 1250 for(int i=0;i<ct_Number;i++){ … … 1234 1257 HeaderTrig[i]->SetGate(Trigger_gate_length); 1235 1258 HeaderTrig[i]->SetElecNoise(Trigger_noise); 1236 } 1259 HeaderTrig[i]->SetGainFluctuations(Trigger_CT[i]->GetGainFluctuations()); 1260 HeaderTrig[i]->SetNoiseGainFluctuations((Bool_t)apply_noise_gain_fluctuations()); 1261 } 1237 1262 } 1238 1263 if(Trigger_Loop && Write_McTrig){ … … 1255 1280 HeaderTrig[iconcount]->SetGate(Trigger_gate_length); 1256 1281 HeaderTrig[iconcount]->SetElecNoise(Trigger_noise); 1282 HeaderTrig[iconcount]->SetGainFluctuations(Trigger_CT[0]->GetGainFluctuations()); 1283 HeaderTrig[iconcount]->SetNoiseGainFluctuations((Bool_t)apply_noise_gain_fluctuations()); 1257 1284 iconcount++; 1258 1285 } … … 1285 1312 HeaderFadc[0]->SetElecNoise(&fadc_elecnoise[0], &fadc_diginoise[0], 1286 1313 ((MGeomCam*)(camgeom.UncheckedAt(0)))->GetNumPixels()); 1314 1315 // 1316 // Fill also the flag indicating whether the PMT gain fluctuations 1317 // were simulated or not: 1318 // 1319 HeaderFadc[0]->SetGainFluctuations(Trigger_CT[0]->GetGainFluctuations()); 1320 HeaderFadc[0]->SetNoiseGainFluctuations((Bool_t)apply_noise_gain_fluctuations()); 1321 1287 1322 } 1288 1323 … … 1309 1344 HeaderFadc[i]->SetElecNoise(&fadc_elecnoise[0], &fadc_diginoise[0], 1310 1345 ((MGeomCam*)(camgeom.UncheckedAt(i)))->GetNumPixels()); 1346 1347 // 1348 // Fill also the flag indicating whether the PMT gain fluctuations 1349 // were simulated or not: 1350 // 1351 HeaderFadc[i]->SetGainFluctuations(Trigger_CT[i]->GetGainFluctuations()); 1352 HeaderFadc[i]->SetNoiseGainFluctuations((Bool_t)apply_noise_gain_fluctuations()); 1353 1311 1354 } 1312 1355 } … … 1338 1381 HeaderFadc[iconcount]->SetElecNoise(&fadc_elecnoise[0], 1339 1382 &fadc_diginoise[0],ct_NPixels); 1383 1384 HeaderFadc[iconcount]->SetGainFluctuations(Trigger_CT[0]->GetGainFluctuations()); 1385 HeaderFadc[iconcount]->SetNoiseGainFluctuations((Bool_t)apply_noise_gain_fluctuations()); 1386 1340 1387 iconcount++; 1341 1388 } … … 1449 1496 MLons lons(0, Trigger_response_ampl, Trigger_response_fwhm, 1450 1497 FADC_shape, FADC_response_integ, FADC_response_fwhm, 1451 FADC_slices_per_ns );1498 FADC_slices_per_ns, apply_noise_gain_fluctuations()); 1452 1499 1453 1500 lons.SetSeed(((UInt_t)(get_seeds(1)*get_seeds(1)*get_seeds(0)))); … … 1458 1505 MLons lons_outer(0, Trigger_response_ampl, Trigger_response_fwhm, 1459 1506 FADC_shape_out,FADC_resp_integ_out,FADC_resp_fwhm_out, 1460 FADC_slices_per_ns );1507 FADC_slices_per_ns, apply_noise_gain_fluctuations()); 1461 1508 1462 1509 lons_outer.SetSeed(((UInt_t)(get_seeds(1)*get_seeds(0)*get_seeds(0)))); … … 1617 1664 } 1618 1665 for(int ie=0; ie < empty_events; ie++){ 1619 Fadc_CT[ict]->Reset() 1620 if (addElecNoise){ 1666 Fadc_CT[ict]->Reset(); 1667 if (addElecNoise){ 1621 1668 Fadc_CT[ict]->ElecNoise() ; 1622 1669 } … … 1639 1686 else 1640 1687 { 1641 k =lons.GetResponse(nsb_phepns[ict][ui],0.01,1642 & nsb_trigresp[0],& nsb_fadcresp[0]);1688 k = lons.GetResponse(nsb_phepns[ict][ui],0.01, 1689 & nsb_trigresp[0],& nsb_fadcresp[0]); 1643 1690 } 1644 1691 … … 1688 1735 ((MGeomCam*)(camgeom.UncheckedAt(ict))) 1689 1736 ->GetNumPixels()); 1690 1691 //1692 // Fill also the flag indicating whether the PMT gain fluctuations1693 // were simulated or not:1694 //1695 HeaderFadc[ict]->SetGainFluctuations(Trigger_CT[ict]->GetGainFluctuations());1696 1737 } 1697 1738 … … 4922 4963 // 4923 4964 // $Log: not supported by cvs2svn $ 4965 // Revision 1.81 2004/11/04 22:00:51 moralejo 4966 // 4967 // Removed unused variables fTelesTheta and fTelesPhi from MMcRunHeader. They 4968 // were not useful because telescope orientation may change from event to 4969 // event. Added fMirrorFraction to the MMcConfigRunHeader container in the 4970 // camera output. 4971 // 4924 4972 // Revision 1.80 2004/10/26 19:21:05 moralejo 4925 4973 //
Note:
See TracChangeset
for help on using the changeset viewer.