Ignore:
Timestamp:
11/17/04 11:38:28 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Simulation/Detector/include-MLons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.cxx

    r5306 r5418  
    1919  fFwhmFadc = 2.0;
    2020
     21  fGainFluctuations = 1;
     22
    2123  RandomNumber = new TRandom();
    2224  RandomNumber -> SetSeed(0);
     
    2628MLons::MLons(Int_t in_shapeT, Float_t in_amplT, Float_t in_FwhmT,
    2729             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)
    2931{
    3032  //--------------------------------------------------------------------
     
    4345  fFadcSlicesPerNanosec = in_Fadc_Slices_per_ns;
    4446
     47  fGainFluctuations = in_Gain_Fluctuations;
     48
    4549  MSLStored = new MStarLight;
    4650
     
    6367  fIntegFadc   = 0.;
    6468  fFwhmFadc    = 0.;
     69
     70  fGainFluctuations = 1;
    6571
    6672  MSLStored->Reset();
     
    221227      strcat(filename_slt, ".slt");
    222228 
    223       // If brightness is different it check if the new file has the
     229      // If brightness is different it checks if the new file has the
    224230      // required parameters.
    225231      // Note: I could be faster to store the whole trigger and fadc
     
    236242          return 0;
    237243        }
     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
    238267      MSLStored->SetBrightness(in_br);
    239268
  • trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.hxx

    r5306 r5418  
    5757  Float_t  fFadcSlicesPerNanosec; // The sampling frequency (GHz) of the FADC
    5858
     59  Int_t    fGainFluctuations; // Indicates whether or not  gain fluctuations have
     60                              // been simulated for producing the NSB database
     61
     62
    5963  TRandom  *RandomNumber; // RandomGenerator
    6064
     
    6569  MLons(Int_t in_shapeT, Float_t in_amplT, Float_t in_FwhmT,
    6670        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);
    6872
    6973  void Reset() ;
     
    8387  Float_t GetFwhmFadc() ;
    8488  Float_t GetFadcSlicesPerNanosec() {return fFadcSlicesPerNanosec;}
     89  Int_t   GetGainFluctuations() const { return fGainFluctuations; }
     90
    8591
    8692  void GetPath(Char_t *out);
Note: See TracChangeset for help on using the changeset viewer.