Ignore:
Timestamp:
03/05/01 11:01:44 (24 years ago)
Author:
blanch
Message:
Commads to enter the FADC and trigger properties have been added.
There is also a new command that allows to writte the root files or not
File:
1 edited

Legend:

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

    r628 r682  
    1919//=
    2020//= $RCSfile: srreadparam.cxx,v $
    21 //= $Revision: 1.1 $
    22 //= $Author: magicsol $
    23 //= $Date: 2001-02-23 10:13:44 $
     21//= $Revision: 1.2 $
     22//= $Author: blanch $
     23//= $Date: 2001-03-05 11:01:44 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
     
    7272static float Simulated_Phe_u = 50.0;         //@< higher limit for phe loop
    7373static float Simulated_Phe_p = 0.1;          //@< precision for phe loop
     74static float FADC_Shape=0.0;
     75static float FADC_Ampl=MFADC_RESPONSE_AMPLITUDE;
     76static float FADC_FWHM=MFADC_RESPONSE_FWHM;
     77static float Trig_Shape=0.0;
     78static float Trig_Ampl=1.0;
     79static float Trig_FWHM=2.0;
     80static int   Write_Root=0;
    7481//!@}
    7582
     
    141148    case simulated_phe:       //@< limits for the phe loop
    142149         
    143       // get energy range
    144150      sscanf(line, "%s %f %f %f", token, &Simulated_Phe_l, &Simulated_Phe_u,
    145151             &Simulated_Phe_p);
    146152
    147153      break;
     154
     155    case trig_properties:       //@< shape of trigger response
     156         
     157      sscanf(line, "%s %f %f %f", token, &Trig_Shape, &Trig_Ampl,
     158             &Trig_FWHM);
     159
     160      break;
     161
     162    case fadc_properties:       //@< shape of fadc response
     163         
     164      sscanf(line, "%s %f %f %f", token, &FADC_Shape, &FADC_Ampl,
     165             &FADC_FWHM);
     166
     167      break;
     168
     169    case write_root:          //@< Write histogram
     170
     171      Write_Root = 1;
    148172
    149173    case end_file:            //@< end of the parameters file
     
    207231//!@}
    208232
     233//!-----------------------------------------------------------
     234// @name get_trig_properties
     235//
     236// @desc return shape of the single phe trigger response
     237//
     238// @var *shape number to indentify the shape (0 ->gaussian)
     239// @var *ampl  Amplitud of the gaussian response
     240// @var *fwhm  FWHM of the gaussian response
     241// @return  void
     242//
     243// @date Wed Feb 21 18:04:03 CET 2001
     244//------------------------------------------------------------
     245// @function
     246
     247//!@{
     248void
     249get_trig_properties(float *shape, float *ampl, float *fwhm)
     250{
     251  *shape =  Trig_Shape;
     252  *ampl =  Trig_Ampl;
     253  *fwhm =  Trig_FWHM;
     254}
     255//!@}
     256
     257//!-----------------------------------------------------------
     258// @name get_fadc_properties
     259//
     260// @desc return shape of the single phe FADC response
     261//
     262// @var *shape number to indentify the shape (0 ->gaussian)
     263// @var *ampl  Amplitud of the gaussian response
     264// @var *fwhm  FWHM of the gaussian response
     265// @return  void
     266//
     267// @date Wed Feb 21 18:04:03 CET 2001
     268//------------------------------------------------------------
     269// @function
     270
     271//!@{
     272void
     273get_fadc_properties(float *shape, float *ampl, float *fwhm)
     274{
     275  *shape =  FADC_Shape;
     276  *ampl =  FADC_Ampl;
     277  *fwhm =  FADC_FWHM;
     278}
     279//!@}
     280
     281//!-----------------------------------------------------------
     282// @name get_write_root
     283//                                               
     284// @desc get boolean to write root files
     285//
     286// @return   0 (false) or 1 (true)
     287//
     288// @date Fri Mar  2 16:17:26 CET 2001
     289//------------------------------------------------------------
     290// @function
     291
     292//!@{
     293int
     294get_write_root(void)
     295{
     296  return (Write_Root);
     297}
     298//!@}
    209299
    210300//=------------------------------------------------------------
     
    214304//
    215305// $Log: not supported by cvs2svn $
     306// Revision 1.1  2001/02/23 10:13:44  magicsol
     307// It read form an input card (defeult=starresponse.par) the parameters that
     308// are needed for the starresponse program.
     309//
    216310//!@}
    217311
Note: See TracChangeset for help on using the changeset viewer.