Changeset 2889 for trunk/MagicSoft


Ignore:
Timestamp:
01/23/04 13:29:38 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2887 r2889  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6
     7 2004/01/23: Abelardo Moralejo
     8
     9   * manalysis/MMcCalibrationUpdate.[h,cc]
     10     - Added check to guarantee that the FADC simulation parameters of
     11       all read files (those used for calibration and those analyzed)
     12       are the same.
     13
     14   * mcalib/MMcCalibrationCalc.cc
     15     - Removed obsolete FIXME comment.
    616
    717 2004/01/23: Raquel de los Reyes
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc

    r2886 r2889  
    7474    fADC2PhOuter = 1.;
    7575
     76    fAmplitude = -1.;
     77    fAmplitudeOuter = -1.;
     78    fConversionHiLo = -1.;
     79
    7680    fFillCalibrationCam = kTRUE;
    7781
     
    178182
    179183    //
     184    // Initialize Fadc simulation parameters:
     185    //
     186    if ( fAmplitude < 0. )
     187      {
     188        fAmplitude = fHeaderFadc->GetAmplitud();
     189        fAmplitudeOuter = fHeaderFadc->GetAmplitudOuter();
     190        fConversionHiLo = fHeaderFadc->GetLow2HighGain();
     191      }
     192    else   // Check that following files have all the same FADC parameters
     193      {
     194        if ( fabs(fHeaderFadc->GetAmplitud()-fAmplitude) > 1.e-6  ||
     195             fabs(fHeaderFadc->GetAmplitudOuter()-fAmplitudeOuter) > 1.e-6  ||
     196             fabs(fConversionHiLo-fHeaderFadc->GetLow2HighGain()) > 1.e-6 )
     197          {
     198            *fLog << err << endl << endl << dbginf << "Parameters of MMcFadcHeader are not the same for all the read files. Aborting..." << endl << endl;
     199            return kFALSE;
     200          }
     201      }
     202
     203    //
    180204    // If MCalibrationCam already existed in the parameter list before
    181205    // MMcCalibrationUpdate::PreProcess was executed (from a
     
    189213    // Set the ADC to photons conversion factor for outer pixels:
    190214    //
    191     fADC2PhOuter = fADC2PhInner *
    192       (fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter());
    193 
    194     //
    195     // Set the conversion factor between high and low gain:
    196     //
    197     fConversionHiLo = fHeaderFadc->GetLow2HighGain();
     215    fADC2PhOuter = fADC2PhInner * (fAmplitude / fAmplitudeOuter);
    198216
    199217    const int num = fCalCam->GetSize();
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.h

    r2886 r2889  
    2828    Float_t fADC2PhInner; // Conversion factor from ADC counts to photons
    2929    Float_t fADC2PhOuter; // for inner and outer pixels.
    30     Float_t fConversionHiLo;
    3130
    3231    Bool_t  fFillCalibrationCam;
     32
     33    Float_t fAmplitude;      // FADC parameters from camera simulation (see camera manual)
     34    Float_t fAmplitudeOuter; // to be read from the MMcFadcHeader.
     35    Float_t fConversionHiLo; // Ratio of high to low gain.
     36
    3337
    3438public:
  • trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc

    r2886 r2889  
    176176    }
    177177
    178   //
    179   // FIXME: Check that the relevant parameters in the FADC header are the
    180   // same for all the analyzed data, both Calibration and Analyzed data!
    181   //
    182 
    183178  return kTRUE;
    184179}
Note: See TracChangeset for help on using the changeset viewer.