Changeset 5408


Ignore:
Timestamp:
11/16/04 11:41:22 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Simulation/Detector/StarResponse
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/StarResponse/MStarLight.cxx

    r5326 r5408  
    2929  fFwhmFadc    = 0.;
    3030
     31  fGainFluctuations = 1;
    3132
    3233  fTrig     = new Float_t[fBinsTrig];
     
    6061  fFwhmFadc    = 0.;
    6162
     63  fGainFluctuations = 1;
    6264 
    6365  for (Int_t i= 0; i < fBinsTrig ; i++)
     
    347349  fwrite ( &fIntegFadc , sizeof(Float_t), 1, datei );
    348350  fwrite ( &fFwhmFadc  , sizeof(Float_t), 1, datei );
     351
     352  fwrite ( &fGainFluctuations, sizeof(Int_t), 1, datei );
    349353
    350354  fwrite (fTrig, sizeof(Float_t), fBinsTrig, datei);
     
    425429  fread ( &fFwhmFadc  , sizeof(Float_t), 1, datei );
    426430
     431  fread ( &fGainFluctuations, sizeof(Int_t), 1, datei );
     432
    427433  if (fTrig)
    428434    delete [] fTrig;
  • trunk/MagicSoft/Simulation/Detector/StarResponse/MStarLight.hxx

    r5248 r5408  
    1616#include "TRandom2.h"
    1717
    18 #define VERSIONSR   1003.0
     18//
     19// Version 1004:
     20//   Added data member fGainFluctuations, which indicates whether PMT
     21//   gain fluctuations have been simulated or not in producing the noise
     22//   database. A.M. 16/11/2004
     23
     24#define VERSIONSR   1004.0
     25
    1926#define TIMERANGE   10000  // ns
    2027
     
    5259  Int_t    fResponseSlicesFadc;
    5360
     61  Int_t    fGainFluctuations; // Is 0 if PMT gain fluctuations have been
     62                              // disabled in the input card. By default it is 1
     63
    5464 public:
    5565
     
    6676  void SetFwhmFadc(Float_t in);
    6777  void SetFadcSlicesPerNanosec(Float_t in);
    68 
     78  void SetGainFluctuations(Int_t in) { fGainFluctuations = in; }
    6979
    7080  Float_t GetBrightness();
     
    7888  Float_t GetTimeRange()            {return fTimeRange;}
    7989  Float_t GetFadcSlicesPerNanosec() {return fFadcSlicesPerNanosec;}
     90  Int_t   GetGainFluctuations()   const {return fGainFluctuations;}
    8091
    8192  void SetTrigResponse(Float_t *in);
  • trunk/MagicSoft/Simulation/Detector/StarResponse/starresponse.cxx

    r5254 r5408  
    133133  readparam(parfilename);
    134134
    135   //  Setting the parameters read from teh input card
     135  //  Setting the parameters read from the input card
    136136  strcpy( path,get_database_path());
    137137
     
    140140  get_trig_properties(&trig_shape, &trig_ampl, &trig_fwhm);
    141141  trigger = new MTrigger(1,0.,0.,trig_ampl,trig_fwhm);
     142
     143  if ( ! apply_gain_fluctuations())
     144    trigger->SetGainFluctuations(kFALSE);
    142145
    143146  get_fadc_properties(&fadc_shape, &fadc_integral, &fadc_fwhm, &fadc_slices_per_ns);
Note: See TracChangeset for help on using the changeset viewer.