Changeset 5418 for trunk/MagicSoft/Simulation/Detector
- Timestamp:
- 11/17/04 11:38:28 (20 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
r5317 r5418 19 19 //= 20 20 //= $RCSfile: creadparam.cxx,v $ 21 //= $Revision: 1.3 3$21 //= $Revision: 1.34 $ 22 22 //= $Author: moralejo $ 23 //= $Date: 2004-1 0-26 13:58:59$23 //= $Date: 2004-11-17 11:36:07 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 118 118 static int selected_pixel = -1; // Selected pixel: if >= 0 ==> only this pixel is filled! 119 119 120 static int gain_fluctuations = 1; // Is 0 if PMT gain fluctuations are disabled 120 static int gain_fluctuations = 1; // Is 0 if PMT gain fluctuations are disabled for signal 121 static int noise_gain_fluctuations = 1; // Is 0 if PMT gain fluctuations are disabled for NSB noise 121 122 122 123 // Coordinates of CT locations, in centimeters, in the Corsika system. … … 629 630 break; 630 631 632 case noise_gain_fluctuations_off: 633 634 noise_gain_fluctuations = 0; 635 636 break; 637 631 638 case end_file: //@< end of the parameters file 632 639 … … 1411 1418 } 1412 1419 1420 int apply_noise_gain_fluctuations() 1421 { 1422 return noise_gain_fluctuations; 1423 } 1424 1413 1425 1414 1426 //=------------------------------------------------------------ … … 1418 1430 // 1419 1431 // $Log: not supported by cvs2svn $ 1432 // Revision 1.33 2004/10/26 13:58:59 moralejo 1433 // 1434 // Added option gain_fluctuations_off 1435 // 1420 1436 // Revision 1.32 2004/10/14 16:53:49 moralejo 1421 1437 // -
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.h
r5317 r5418 19 19 //= 20 20 //= $RCSfile: creadparam.h,v $ 21 //= $Revision: 1. 29$21 //= $Revision: 1.30 $ 22 22 //= $Author: moralejo $ 23 //= $Date: 2004-1 0-26 13:58:59$23 //= $Date: 2004-11-17 11:36:07 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 116 116 T(mirror_fraction), /* Fraction of dish mirror really operative */ \ 117 117 T(calibration_run), /* option to produce a calibration file */ \ 118 T(gain_fluctuations_off), /* Switches off PMT gain fluctuations */ \ 118 T(gain_fluctuations_off), /* Switches off PMT gain fluctuations for signal */ \ 119 T(noise_gain_fluctuations_off), /* Switches off PMT gain fluctuations for NSB noise */ \ 119 120 T(end_file) /* end of the parameters file */ 120 121 … … 197 198 float *sigma_time, int *nevents, int *selected_pixel); 198 199 int apply_gain_fluctuations(); 200 int apply_noise_gain_fluctuations(); 199 201 //!@} 200 202 … … 212 214 /* 213 215 * $Log: not supported by cvs2svn $ 216 * Revision 1.29 2004/10/26 13:58:59 moralejo 217 * 218 * Added option gain_fluctuations_off 219 * 214 220 * Revision 1.28 2004/10/13 17:05:05 moralejo 215 221 * *** empty log message *** -
trunk/MagicSoft/Simulation/Detector/StarResponse/starresponse.cxx
r5408 r5418 25 25 MStarLight data(fadc->GetFadcSlicesPerNanosec(), fadc->GetResponseSlicesFadc()); 26 26 // create instance of the MStarLight 27 28 data.SetGainFluctuations(apply_gain_fluctuations()); 27 29 28 30 // Shall I write the root file??? -
trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.cxx
r5306 r5418 19 19 fFwhmFadc = 2.0; 20 20 21 fGainFluctuations = 1; 22 21 23 RandomNumber = new TRandom(); 22 24 RandomNumber -> SetSeed(0); … … 26 28 MLons::MLons(Int_t in_shapeT, Float_t in_amplT, Float_t in_FwhmT, 27 29 Int_t in_shapeF, Float_t in_integF, Float_t in_FwhmF, 28 Float_t in_Fadc_Slices_per_ns )30 Float_t in_Fadc_Slices_per_ns, Int_t in_Gain_Fluctuations) 29 31 { 30 32 //-------------------------------------------------------------------- … … 43 45 fFadcSlicesPerNanosec = in_Fadc_Slices_per_ns; 44 46 47 fGainFluctuations = in_Gain_Fluctuations; 48 45 49 MSLStored = new MStarLight; 46 50 … … 63 67 fIntegFadc = 0.; 64 68 fFwhmFadc = 0.; 69 70 fGainFluctuations = 1; 65 71 66 72 MSLStored->Reset(); … … 221 227 strcat(filename_slt, ".slt"); 222 228 223 // If brightness is different it check if the new file has the229 // If brightness is different it checks if the new file has the 224 230 // required parameters. 225 231 // Note: I could be faster to store the whole trigger and fadc … … 236 242 return 0; 237 243 } 244 245 if ( !MSLStored->GetGainFluctuations() && fGainFluctuations) 246 { 247 cout << endl << "ERROR! The read NSB database in " << filename_slt << endl; 248 cout << "has been produced without PMT gain fluctuations. This is incompatible" << endl; 249 cout << "with the camera input card you are using. Please change the camera" << endl; 250 cout << "input card (adding the noise_gain_fluctuations_off command) or" << endl; 251 cout << "produce a new NSB database (using program StarResponse) without" << endl; 252 cout << "gain fluctuations. Exiting..." << endl << endl; 253 return 0; 254 } 255 256 else if ( MSLStored->GetGainFluctuations() && !fGainFluctuations) 257 { 258 cout << endl << "ERROR! The read NSB database in " << filename_slt << endl; 259 cout << "has been produced with PMT gain fluctuations. This is incompatible" << endl; 260 cout << "with the camera input card command noise_gain_fluctuations_off" << endl; 261 cout << "that you are using. Please change the camera input card or produce a" << endl; 262 cout << "new NSB database (using program StarResponse) without gain fluctuations." << endl; 263 cout << "Exiting..." << endl << endl; 264 return 0; 265 } 266 238 267 MSLStored->SetBrightness(in_br); 239 268 -
trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.hxx
r5306 r5418 57 57 Float_t fFadcSlicesPerNanosec; // The sampling frequency (GHz) of the FADC 58 58 59 Int_t fGainFluctuations; // Indicates whether or not gain fluctuations have 60 // been simulated for producing the NSB database 61 62 59 63 TRandom *RandomNumber; // RandomGenerator 60 64 … … 65 69 MLons(Int_t in_shapeT, Float_t in_amplT, Float_t in_FwhmT, 66 70 Int_t in_shapeF, Float_t in_integF, Float_t in_FwhmF, 67 Float_t in_Fadc_Slices_per_ns );71 Float_t in_Fadc_Slices_per_ns, Int_t in_Gain_Fluctuations); 68 72 69 73 void Reset() ; … … 83 87 Float_t GetFwhmFadc() ; 84 88 Float_t GetFadcSlicesPerNanosec() {return fFadcSlicesPerNanosec;} 89 Int_t GetGainFluctuations() const { return fGainFluctuations; } 90 85 91 86 92 void GetPath(Char_t *out);
Note:
See TracChangeset
for help on using the changeset viewer.