Ignore:
Timestamp:
02/16/04 15:32:07 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r3196 r3198  
    4040#include "MRawEvtPixelIter.h"
    4141
    42 #include "MPedestalCam.h"
    43 #include "MPedestalPix.h"
    44 
    4542#include "MExtractedSignalBlindPixel.h"
    4643
     
    8683// The PreProcess searches for the following input containers:
    8784//  - MRawEvtData
    88 //  - MPedestalCam
    8985//
    9086// The following output containers are also searched and created if
     
    109105    fBlindPixel->SetUsedFADCSlices(fFirst, fLast);
    110106
    111     fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam"));
    112 
    113     if (!fPedestals)
    114     {
    115         *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting" << endl;
    116         return kFALSE;
    117     }
    118 
    119     const MPedestalPix &ped   = (*fPedestals)[fBlindPixelIdx];
    120 
    121     if (&ped)
    122       {
    123         fPedestal = ped.GetPedestal();
    124         fPedRms   = ped.GetPedestalRms();
    125       }
    126     else
    127       {
    128         *fLog << err << " Cannot find MPedestalPix of the Blind Pixel (idx="
    129               << fBlindPixelIdx << ")" << endl;
    130         return kFALSE;
    131       }
    132107
    133108    return kTRUE;
     
    149124 
    150125    UInt_t sat  = 0;
    151     UInt_t max  = 0;
    152126
    153127    Byte_t *ptr = pixel.GetHiGainSamples();
    154128   
    155     UInt_t sumhi = 0;
    156     UInt_t sumlo = 0;
    157129    //
    158130    // We need a dedicated signal extractor for the blind pixel
     
    179151      {
    180152        sum += *ptr;
    181 
    182         if (*ptr > max)
    183           max = *ptr;
    184153
    185154        if (*ptr++ >= fSaturationLimit)
     
    197166            sum += *ptr;
    198167
    199             if (*ptr > max)
    200               max = *ptr;
    201 
    202168            if (*ptr++ >= fSaturationLimit)
    203169              sat++;
     
    206172      }
    207173   
    208     sumhi = sum;
    209    
    210     ptr = pixel.GetLoGainSamples();
    211    
    212     start   = ptr + fFirst - 1;
    213     end     = ptr + fLast  - 1;
    214    
    215     ptr = start;
    216    
    217     sum = 0;
    218    
    219     while (ptr<=end)
    220       {
    221        
    222       sum += *ptr;
    223    
    224       if (*ptr > max)
    225         max = *ptr;
    226      
    227       if (*ptr++ >= fSaturationLimit)
    228         sat++;
    229       }
    230    
    231     sumlo = sum;
    232    
    233     fBlindPixel->SetExtractedSignal(sum - fPedestal*fNumSamples, fPedRms*fSqrtSamples);
    234     fBlindPixel->SetSaturation(sat);
     174    fBlindPixel->SetExtractedSignal(sum);
     175    fBlindPixel->SetNumSaturated(sat);
    235176
    236177    if (sat)
Note: See TracChangeset for help on using the changeset viewer.