Ignore:
Timestamp:
01/18/02 17:43:08 (23 years ago)
Author:
blanch
Message:
Three new commands have been added: fadc_noise, trig_noise and
elec_noise_off.
A small bug in the SIGNATURE check has been solved.
File:
1 edited

Legend:

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

    r1068 r1196  
    1919//=
    2020//= $RCSfile: creadparam.cxx,v $
    21 //= $Revision: 1.12 $
     21//= $Revision: 1.13 $
    2222//= $Author: blanch $
    23 //= $Date: 2001-11-13 17:05:14 $
     23//= $Date: 2002-01-18 17:43:08 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
     
    7676static char Loop_filename[PATH_MAX_LENGTH];   //@< special data filename
    7777static char CT_filename[PATH_MAX_LENGTH];     //@< name of the CT def. file
    78 static char NSB_directory[PATH_MAX_LENGTH];  //@< database for NSB
     78static char NSB_directory[PATH_MAX_LENGTH];   //@< database for NSB
     79static int ElecNoise = TRUE;                  //@< Will we add ElecNoise?
     80static float FADC_Noise = 2.0;                //@< Value for FADC ElecNoise
     81static float Trig_Noise = 0.3;                //@< Factor for Trigger ElecNoise
    7982static int simulateNSB = TRUE;                //@< Will we simulate NSB?
    8083static int anaPixels = -1;      //@< number of pixels for the analysis
    8184static float meanNSB;           //@< NSB mean value (per pixel)
    82 static int nphe2NSB=0;            //@< Number of phe from shower to do NSB simulation
     85static int nphe2NSB=0;          //@< Number of phe from shower to do NSB simulation
    8386static float qThreshold[TRIGGER_PIXELS];     //@< Threshold values
    8487static int Individual_Thres = FALSE;
     
    167170    cin.getline(line, LINE_MAX_LENGTH);
    168171  line[strlen(SIGNATURE)] = '\0';
    169   strcpy(line, sign);
     172  strcpy(sign, line);
     173  cout<< '"' << sign << '"' << '\n';
     174  cout<< "should be: " << SIGNATURE << '\n';
    170175  if (strcmp(sign, SIGNATURE) != 0) {
    171176    cerr << "ERROR: Signature of parameters file is not correct\n";
     
    252257      break;
    253258
     259    case elec_noise_off:              //@< add ElecNoise?
     260         
     261      // we will not add electronic noise for FADC and Trigger channels.
     262      ElecNoise = FALSE;
     263      FADC_Noise = 0.0;
     264      Trig_Noise =0.0;
     265
     266      break;
     267
     268    case fadc_noise:              //@< FADC ElecNoise
     269         
     270      // value for FADC Elec Noise
     271      sscanf(line, "%s %f", token, &FADC_Noise);
     272      ElecNoise = TRUE;
     273         
     274      break;
     275
     276    case trig_noise:              //@< add ElecNoise?
     277         
     278      // factor for Trigger Elec Noise
     279      sscanf(line, "%s %f", token, &Trig_Noise);
     280      ElecNoise = TRUE;
     281         
     282      break;
     283
    254284    case nsb_on:              //@< simulate NSB?
    255285         
     
    696726
    697727//!-----------------------------------------------------------
     728// @name add_elec_noise
     729//                                               
     730// @desc are we going to add the ElecNoise?
     731//
     732// @date Mon Jan 14 19:27:56 MET DST 2002
     733//------------------------------------------------------------
     734// @function
     735
     736//!@{
     737int
     738add_elec_noise(float *fadc, float *trig)
     739{
     740  *fadc = FADC_Noise;
     741  *trig = Trig_Noise;
     742  return ( ElecNoise);
     743}
     744//!@}
     745
     746//!-----------------------------------------------------------
    698747// @name get_nsb
    699748//                                               
     
    12881337//
    12891338// $Log: not supported by cvs2svn $
     1339// Revision 1.12  2001/11/13 17:05:14  blanch
     1340// New input items int the input card parameter list have been included to fill
     1341// the MMcRunHeader.
     1342// There has been also some change to remove warnings in the compilation.
     1343//
    12901344// Revision 1.11  2001/07/25 11:38:00  magicsol
    12911345// Minnor changes
Note: See TracChangeset for help on using the changeset viewer.