Ignore:
Timestamp:
01/30/04 10:36:03 (21 years ago)
Author:
blanch
Message:
Change in variables name to clarify the meaning.
Small change to write brightness1.00.slt instead on brightness1.0.slt
File:
1 edited

Legend:

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

    r2374 r2978  
    4040  data.SetFwhmTrig ( trigger->GetFwhm() ) ;
    4141 
    42   //  Get infroamtion from FADC instance !!!!!
     42  //  Get information from FADC instance !!!!!
    4343
    4444  Float_t   fadcresp[45] ;
    4545  fadc->GetResponse (fadcresp ) ;   
    4646  data.SetFadcResponse( fadcresp ) ;
    47  
    48   data.SetAmplFadc ( fadc->GetAmplitude() ) ;
     47
     48  data.SetIntegFadc ( fadc->GetIntegral() ) ;
    4949  data.SetFwhmFadc ( fadc->GetFwhm() ) ;
    5050 
     
    5858   
    5959    a = trigger->FillStar( 500, 10.) ;   // random the amplitude
    60     time=Zufall.Rndm() * TIMERANGE ;    // random the time
     60    time=Zufall.Rndm() * TIMERANGE ;     // random the time
    6161
    62     data.FillResponse(a, time ) ;       // fill the response function
     62    data.FillResponse(a, time ) ;        // fill the response function
    6363   
    6464  }
    6565
    66   if(brightness<1.0)
     66  if(brightness<=1.0)
    6767    sprintf(filename, "%sBrightness%.2f.slt", path, brightness) ;
    6868  else
     
    7575    data.ReadBinary( filename ) ;
    7676   
    77     sprintf(filename, "%sBrightness%.1f.root", path, brightness) ;
     77    if(brightness<1.0)
     78      sprintf(filename, "%sBrightness%.2f.root", path, brightness) ;
     79    else
     80      sprintf(filename, "%sBrightness%.1f.root", path, brightness) ;
     81    sprintf(filename, "%sBrightness%.2f.root", path, brightness) ;
    7882    cout << " the file will be written in " << filename
    7983         << endl ;
     
    104108
    105109  float trig_fwhm,trig_ampl,trig_shape;
    106   float fadc_fwhm,fadc_ampl,fadc_shape;
     110  float fadc_fwhm,fadc_integral,fadc_shape;
    107111
    108112  //
     
    112116
    113117  //  Instance of MFadc and MTrigger needed inside BuildStarLight
    114   MTrigger *trigger= new MTrigger(1);
    115   MFadc *fadc= new MFadc;
     118  MTrigger *trigger;//= new MTrigger(1);
     119  MFadc *fadc;//= new MFadc;
    116120
    117121  if(argc == 1){
     
    132136
    133137  get_trig_properties(&trig_shape, &trig_ampl, &trig_fwhm);
    134   trigger->SetAmpl(trig_ampl);
    135   trigger->SetFwhm(trig_fwhm);
     138  trigger = new MTrigger(1,0.,0.,trig_ampl,trig_fwhm);
    136139
    137   get_fadc_properties(&fadc_shape, &fadc_ampl, &fadc_fwhm);
    138   fadc->SetAmpl(fadc_ampl);
    139   fadc->SetFwhm(fadc_fwhm);
     140  get_fadc_properties(&fadc_shape, &fadc_integral, &fadc_fwhm);
     141  fadc = new MFadc(1,fadc_integral,fadc_fwhm,fadc_integral,fadc_fwhm);
    140142
    141143  for (Float_t b=nphe_min; b<=nphe_max; b=b+nphe_pre )  //  loop over Brightness
Note: See TracChangeset for help on using the changeset viewer.