Changeset 2965


Ignore:
Timestamp:
01/30/04 09:58:39 (21 years ago)
Author:
blanch
Message:
[Changes done mainly by A. Moralejo]

Two new commands of the input card have been added:

sigma_xy_cm_spot: to enlarge the point spread function.
trigger_delay: to center the FADC signal

There is also a check that the Pedestal is an integer, otherwise it
becames complex to get a reasonable rms for events without electronic noise.
File:
1 edited

Legend:

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

    r2428 r2965  
    1919//=
    2020//= $RCSfile: creadparam.cxx,v $
    21 //= $Revision: 1.25 $
     21//= $Revision: 1.26 $
    2222//= $Author: blanch $
    23 //= $Date: 2003-10-26 19:45:38 $
     23//= $Date: 2004-01-30 09:58:39 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
     
    122122static int Trigger_loop_ltop = 0;
    123123static int Trigger_loop_utop = 2;
    124 static float FADC_response_ampl = MFADC_RESPONSE_AMPLITUDE;
     124static float FADC_response_ampl = MFADC_RESPONSE_INTEGRAL;
    125125static float FADC_response_fwhm = MFADC_RESPONSE_FWHM;
    126 static float FADC_resp_ampl_out = MFADC_RESPONSE_AMPLITUDE;
     126static float FADC_resp_ampl_out = MFADC_RESPONSE_INTEGRAL;
    127127static float FADC_resp_fwhm_out = MFADC_RESPONSE_FWHM;
    128128static float High_to_Low = 10.0;      //@< Low gain channel respct to High
     
    131131static float Source_offset_ph=0.;     //@<  Displacement in Phi of the
    132132                                      //@< source from the center
     133
     134static float sigma_spot = -1.; // Sigma in x and y for additional
     135                               // gaussian spread of the mirror spot.
     136
     137static float trig_delay = 25.;  // Delay in ns between beginning of FADC
     138                                // time window and the trigger instant.
     139
    133140
    134141//!@}
     
    288295      sscanf(line, "%s %f", token, &FADC_pedestal);
    289296         
     297      //
     298      // A. Moralejo:
     299      // Require integer mean pedestal. Although it seems a silly
     300      // restriction, this saves lots of trouble (due to rounding
     301      // happening in the FADC), particularly when running the
     302      // simulation with no noise (NSB or electronic):
     303      //
     304
     305      if (fmod(FADC_pedestal, 1.) > 1.e-4)
     306      {
     307          printf("ERROR :  requested average FADC pedestal (%f) is not integer. Please use an integer value.\n", FADC_pedestal);
     308          exit(1);
     309      }
     310
    290311      break;
    291312
     
    301322      // value for FADC Elec Noise
    302323      sscanf(line, "%s %f %f", token, &FADC_Noise, &Digital_Noise);
     324
    303325      ElecNoise = TRUE;
    304326         
     
    541563      break;
    542564
     565    case sigma_xy_cm_spot:
     566
     567      sscanf(line, "%s %f", token, &sigma_spot);
     568      break;
     569
     570    case trigger_delay:
     571
     572      sscanf(line, "%s %f", token, &trig_delay);
     573      break;
     574
    543575    case end_file:            //@< end of the parameters file
    544576
     
    547579
    548580      break;
     581
    549582
    550583    } // switch ( i )
     
    12671300}
    12681301
     1302float get_sigma_xy_cm_spot(void){
     1303
     1304  return sigma_spot;
     1305
     1306}
     1307
     1308float get_trig_delay(void){
     1309
     1310  return trig_delay;
     1311
     1312}
     1313
    12691314//!@}
    12701315//=------------------------------------------------------------
     
    12741319//
    12751320// $Log: not supported by cvs2svn $
     1321// Revision 1.25  2003/10/26 19:45:38  blanch
     1322// The write_all_data input card command has been removed.
     1323//
    12761324// Revision 1.24  2003/10/17 19:40:24  blanch
    12771325// The gain ratio between the high and low FADC gain is controlled from the
Note: See TracChangeset for help on using the changeset viewer.