Ignore:
Timestamp:
02/23/04 22:17:10 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MExtractBlindPixel.cc

    r3201 r3268  
    4040#include "MRawEvtPixelIter.h"
    4141
     42#include "MPedestalCam.h"
     43#include "MPedestalPix.h"
     44
    4245#include "MExtractedSignalBlindPixel.h"
    4346
     
    4952const Byte_t MExtractBlindPixel::fgSaturationLimit = 254;
    5053const Byte_t MExtractBlindPixel::fgFirst =  3;
    51 const Byte_t MExtractBlindPixel::fgLast  = 14;
     54const Byte_t MExtractBlindPixel::fgLast  = 16;
    5255
    5356// --------------------------------------------------------------------------
     
    98101    }
    99102
     103    fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam"));
     104    if (!fPedestals)
     105    {
     106        *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting." << endl;
     107        return kFALSE;
     108    }
    100109
    101110    fBlindPixel = (MExtractedSignalBlindPixel*)pList->FindCreateObj(AddSerialNumber("MExtractedSignalBlindPixel"));
     
    177186      *fLog << warn << "WARNING - saturation occurred in the Blind Pixel " << endl;
    178187
     188    //
     189    // catch the pointer to the event, because MHCalibrationChargeBlindPix will need it later
     190    //
     191    fPixelIter = &pixel;
     192
    179193    fBlindPixel->SetReadyToSave();
    180194
    181195    return kTRUE;
     196}
     197
     198Int_t MExtractBlindPixel::PostProcess()
     199{
     200
     201    MPedestalPix &pedpix  = (*fPedestals)[fBlindPixelIdx];   
     202
     203    if (&pedpix)
     204    {
     205         fPed       = pedpix.GetPedestal()   * fNumSamples;
     206         fPedErr    = pedpix.GetPedestalRms()* fNumSamples / TMath::Sqrt((Float_t)fPedestals->GetTotalEntries());
     207         fPedRms    = pedpix.GetPedestalRms()* TMath::Sqrt((Float_t)fNumSamples);
     208         fPedRmsErr = fPedErr/2.;
     209    }
     210
     211    return kTRUE;
     212
    182213}
    183214
Note: See TracChangeset for help on using the changeset viewer.