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

Legend:

Unmodified
Added
Removed
  • 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:
Note: See TracChangeset for help on using the changeset viewer.