Ignore:
Timestamp:
01/15/02 11:48:08 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r1145 r1180  
    124124    while (pixel.Next())
    125125    {
    126 
    127         UInt_t pixid = pixel.GetPixelId();
     126        const UInt_t pixid = pixel.GetPixelId();
    128127
    129128        const MPedestalPix &ped = (*fPedestals)[pixid];
    130129
    131130        //
    132         // sanity check
     131        // sanity check (old MC files sometimes have pixids>577)
    133132        //
    134         if (!fPedestals->CheckBounds(pixid)){
    135             *fLog<<inf<<"Pixel ID larger than camera ... Skip the event"<<endl;
     133        if (!fPedestals->CheckBounds(pixid))
     134        {
     135            *fLog << inf << "Pixel ID larger than camera... skipping event." << endl;
    136136            return kCONTINUE;
    137137        }
     
    139139        Float_t nphot = (Float_t)pixel.GetSumHiGainSamples();
    140140
     141        //
    141142        // We check that the pixel is not empty, if it is empty
    142143        // we won't substract the pedestal. Empty means that it has
    143144        // 0 signal in all the slices.
    144 
    145         if(nphot!=0) nphot -= fRunHeader->GetNumSamplesHiGain()*ped.GetMean();
     145        //
     146        if (nphot!=0)
     147            nphot -= fRunHeader->GetNumSamplesHiGain()*ped.GetMean();
    146148
    147149        fCerPhotEvt->AddPixel(pixid, nphot, sqrt(fRunHeader->GetNumSamplesHiGain())*ped.GetSigma());
Note: See TracChangeset for help on using the changeset viewer.