Ignore:
Timestamp:
03/05/01 10:58:44 (24 years ago)
Author:
blanch
Message:
The properties of the FADC and trigger are read from the input card.
File:
1 edited

Legend:

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

    r631 r681  
    2222
    2323  MStarLight  data  ;    // create  instance of the MStarLight
     24
     25  //  Shall I write the root file???
     26
     27  int write_root;
     28
     29  write_root= get_write_root();
    2430 
    25   //  create a Standard Trigger !!!
    26 
    27   //MTrigger  trigger  ; 
    28 
    29  
     31  //  Get information from Trigger instance!!!
     32   
    3033  cout << sizeof (trigger) << endl ;
    3134
     
    3740  data.SetFwhmTrig ( trigger->GetFwhm() ) ;
    3841 
    39   //  create a Standard FADC !!!!!
     42  //  Get infroamtion from FADC instance !!!!!
    4043
    41   //MFadc     fadc ;
    4244  Float_t   fadcresp[45] ;
    4345  fadc->GetResponse (fadcresp ) ;   
     
    6163   
    6264  }
    63  
    64   //  data.ElecNoise() ;
    65 
    66    
    67 
    6865
    6966  sprintf(filename, "%sBrightness%.1f.slt", path, brightness) ;
     
    7269  data.Reset() ;
    7370
    74   data.ReadBinary( filename ) ;
     71  if(write_root){
     72    data.ReadBinary( filename ) ;
     73   
     74    sprintf(filename, "%sBrightness%.1f.root", path, brightness) ;
     75    cout << " the file will be written in " << filename
     76         << endl ;
    7577
    76   sprintf(filename, "%sBrightness%.1f.root", path, brightness) ;
    77   cout << " the file will be written in " << filename
    78        << endl ;
    79 
    80   data.StoreHisto( filename ) ;
     78    data.StoreHisto( filename ) ;
     79  }
    8180
    8281  return  (0) ;
     
    101100  float nphe_min=0.0, nphe_max=10.0, nphe_pre=0.1;
    102101
     102  float trig_fwhm,trig_ampl,trig_shape;
     103  float fadc_fwhm,fadc_ampl,fadc_shape;
     104
    103105  //
    104106  char path[256] ;
     
    117119  }
    118120
     121  //  Reading parameters from input card
     122
    119123  readparam(parfilename);
    120124
     125  //  Setting the parameters read from teh input card
    121126  strcpy( path,get_database_path());
    122127
    123128  get_simulated_phe(&nphe_min, &nphe_max, &nphe_pre);
     129
     130  get_trig_properties(&trig_shape, &trig_ampl, &trig_fwhm);
     131  trigger->SetAmpl(trig_ampl);
     132  trigger->SetFwhm(trig_fwhm);
     133
     134  get_fadc_properties(&fadc_shape, &fadc_ampl, &fadc_fwhm);
     135  fadc->SetAmpl(fadc_ampl);
     136  fadc->SetFwhm(fadc_fwhm);
    124137
    125138  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.