Changeset 672


Ignore:
Timestamp:
03/05/01 10:43:18 (24 years ago)
Author:
blanch
Message:
New input commands have been added:

	- write_McFadc: to write the FADC simulation information.
	- fadc_prop: gives the shape of the single phe response of the FADC

And new value has been added in the mean_NSB command that tells how many phes
have to come from the shower to do the NSB simulation in that shower (it speeds
up the simulation).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx

    r641 r672  
    1919//=
    2020//= $RCSfile: creadparam.cxx,v $
    21 //= $Revision: 1.8 $
    22 //= $Author: magicsol $
    23 //= $Date: 2001-02-23 10:55:43 $
     21//= $Revision: 1.9 $
     22//= $Author: blanch $
     23//= $Date: 2001-03-05 10:43:18 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
     
    7777static int anaPixels = -1;      //@< number of pixels for the analysis
    7878static float meanNSB;           //@< NSB mean value (per pixel)
     79static int nphe2NSB=0;            //@< Number of phe from shower to do NSB simulation
    7980static float qThreshold;        //@< Threshold value
    8081static char NSB_directory[PATH_MAX_LENGTH];  //@< database for NSB
     
    9192static int Write_McEvt  = TRUE;
    9293static int Write_McTrig = FALSE;
     94static int Write_McFadc = FALSE;
    9395static int Write_RawEvt = FALSE;
    9496static int Write_All_Data = FALSE;
     
    116118static int Trigger_loop_ltop = 0;
    117119static int Trigger_loop_utop = 2;
     120static float FADC_response_ampl = MFADC_RESPONSE_AMPLITUDE;
     121static float FADC_response_fwhm = MFADC_RESPONSE_FWHM;
    118122//!@}
    119123
     
    246250         
    247251      // get value of <NSB> (in photons)
    248       sscanf(line, "%s %f", token, &meanNSB);
     252      sscanf(line, "%s %f %d", token, &meanNSB, &nphe2NSB);
    249253
    250254      break;
     
    361365      break;
    362366
     367    case write_McFadc:    //@< to write the McFadc info
     368         
     369      // change boolean value
     370      Write_McFadc = TRUE;
     371
     372      break;
     373
    363374    case write_all_data:      //@< to write single pixel data
    364375         
     
    399410      break;
    400411
     412    case fadc_prop:
     413
     414      //  Get parameters for the fadc  response for one phe
     415      sscanf(line, "%s %f %f", token, &FADC_response_ampl,&FADC_response_fwhm);
     416
     417      break;
     418
    401419    case trigger_scan:
    402420
     
    614632//!@{
    615633int
    616 get_nsb(float *n)
     634get_nsb(float *n, int *m)
    617635{
    618636  *n = meanNSB;
     637  *m = nphe2NSB;
    619638  return ( simulateNSB );
    620639}
     
    903922
    904923//!-----------------------------------------------------------
     924// @name write_McFadc
     925//                                               
     926// @desc write the McFadc class for each event to the .root file
     927//
     928// @return  TRUE: we'll write it;  FALSE: we won't
     929//
     930//------------------------------------------------------------
     931// @function
     932 
     933//!@{
     934int
     935get_write_McFadc(void)
     936{
     937  return ( Write_McFadc );
     938}
     939//!@}
     940
     941//!-----------------------------------------------------------
    905942// @name write_RawEvt
    906943//                                               
     
    10181055{
    10191056  return ( Trigger_Scan );
     1057}
     1058//!@}
     1059
     1060//!-----------------------------------------------------------
     1061// @name Fadc_Propeties
     1062//                                               
     1063// @desc fix properties of the FADC response
     1064//
     1065//------------------------------------------------------------
     1066// @function
     1067
     1068//!@{
     1069void
     1070get_FADC_properties(float *ra, float *rf)
     1071{
     1072  *ra=FADC_response_ampl;
     1073  *rf=FADC_response_fwhm;
     1074
    10201075}
    10211076//!@}
     
    10901145//
    10911146// $Log: not supported by cvs2svn $
     1147// Revision 1.8  2001/02/23 10:55:43  magicsol
     1148// An input commmand that talls the path for the NSB database has been added.
     1149//
    10921150// Revision 1.7  2001/01/15 12:37:48  magicsol
    10931151// It has been introduced the option to read from the input card the overlaping
Note: See TracChangeset for help on using the changeset viewer.