Ignore:
Timestamp:
01/22/04 20:54:16 (22 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

    r2876 r2886  
    3737//   MMcFadcHeader
    3838//   MRawRunHeader
     39//  [MCalibrationCam] (if it existed previously)
    3940//
    4041//  Output Containers:
    41 //   MCalibrationCam
    4242//   MPedPhotCam
     43//  [MCalibrationCam] (if it did not exist previously)
    4344//
    4445/////////////////////////////////////////////////////////////////////////////
     
    9596}
    9697
    97 
    98 //---------------------------------------------------------------------------
    99 //
    100 // Set ADC to photon conversion factors.
    101 //
    102 void MMcCalibrationUpdate::SetADC2PhInner(Float_t x)
    103 {
    104   fADC2PhInner = x;
    105 
    106   return;
    107 }
    108 
    10998// --------------------------------------------------------------------------
    11099//
     
    123112  if ( !fCalCam )
    124113    {
    125       *fLog << warn << dbginf << AddSerialNumber("MCalibrationCam") << " does not exist... Creating." << endl;
     114      *fLog << inf << dbginf << AddSerialNumber("MCalibrationCam") << " does not exist... Creating." << endl;
    126115
    127116      fCalCam = (MCalibrationCam*) pList->FindCreateObj(AddSerialNumber("MCalibrationCam"));
     
    135124    {
    136125      fFillCalibrationCam = kFALSE;
    137       *fLog << warn << dbginf << AddSerialNumber("MCalibrationCam") << " already exists... " << endl;
     126      *fLog << inf << AddSerialNumber("MCalibrationCam") << " already exists... " << endl;
    138127    }
    139128
     
    189178
    190179    //
    191     // Set the ADC to photons conversion factor for outer pixels:
    192     //
    193     fADC2PhOuter = fADC2PhInner *
    194       (fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter());
    195 
    196     //
    197     // Set the conversion factor between high and low gain:
    198     //
    199     fConversionHiLo = fHeaderFadc->GetLow2HighGain();
    200 
    201     //
    202180    // If MCalibrationCam already existed in the parameter list before
    203181    // MMcCalibrationUpdate::PreProcess was executed (from a
     
    208186      return kTRUE;
    209187
     188    //
     189    // Set the ADC to photons conversion factor for outer pixels:
     190    //
     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();
    210198
    211199    const int num = fCalCam->GetSize();
     
    264252        // counts for the RMS per slice:
    265253        //
    266 
    267254
    268255        const Float_t pedestrms  = sigpix.IsLoGainUsed()?
     
    279266        MPedPhotPix &pedpix = (*fPedPhotCam)[i];
    280267
    281         Float_t adc2phot = (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))?
    282           fADC2PhOuter : fADC2PhInner;
     268        MCalibrationPix &calpix = (*fCalCam)[i];
     269        Float_t adc2phot = calpix.GetMeanConversionBlindPixelMethod();
     270        Float_t hi2lo    = calpix.GetConversionHiLo();
    283271
    284272        if (sigpix.IsLoGainUsed())
    285           pedpix.Set(adc2phot*fConversionHiLo*pedestmean,
    286                      adc2phot*fConversionHiLo*pedestrms);
     273          pedpix.Set(adc2phot*hi2lo*pedestmean,
     274                     adc2phot*hi2lo*pedestrms);
    287275        else
    288276          pedpix.Set(adc2phot*pedestmean, adc2phot*pedestrms);
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.h

    r2876 r2886  
    3535    MMcCalibrationUpdate(const char *name=NULL, const char *title=NULL);
    3636
    37     void SetADC2PhInner(Float_t x);
    38 
    3937    ClassDef(MMcCalibrationUpdate, 0)   // Task which obtains, for MC files, the pedestal mean and rms, and the calibration factor from ADC counts to photons.
    4038};
Note: See TracChangeset for help on using the changeset viewer.