Changeset 4465 for trunk/MagicSoft


Ignore:
Timestamp:
08/04/04 14:13:50 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc

    r3829 r4465  
    1616!
    1717!
    18 !   Author(s): Oscar Blanch    12/2001 <mailto:blanch@ifae.es>
    19 !   Author(s): Thomas Bretz    08/2002 <mailto:tbretz@astro.uni.wuerzburg.de>
     18!   Author(s): Oscar Blanch 12/2001 <mailto:blanch@ifae.es>
     19!   Author(s): Thomas Bretz 08/2002 <mailto:tbretz@astro.uni.wuerzburg.de>
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2003
     21!   Copyright: MAGIC Software Development, 2000-2004
    2222!
    2323!
     
    9191// --------------------------------------------------------------------------
    9292//
     93// Returns the status of a pixel. If kSloppyTreatment is set a pixel must
     94// be unsuitable to be treated. If not it is enough if it is unreliable
     95// (IsBad() checks for any flag)
     96//
     97Bool_t MBadPixelsTreat::IsPixelBad(Int_t idx) const
     98{
     99    return TESTBIT(fFlags, kSloppyTreatment) ? (*fBadPixels)[idx].IsUnsuitable() : (*fBadPixels)[idx].IsBad();
     100}
     101
     102// --------------------------------------------------------------------------
     103//
    93104//  - Try to find or create MBlindPixels in parameter list.
    94105//  - get the MCerPhotEvt from the parlist (abort if missing)
     
    156167        // Check whether pixel with idx i is blind
    157168        //
    158         if (pix && (*fBadPixels)[i].IsOK())
     169        if (pix && !IsPixelBad(i))
    159170            continue;
    160171
     
    201212            // Do not use blind neighbors
    202213            //
    203             if ((*fBadPixels)[nidx].IsBad())
     214            if (IsPixelBad(nidx))
    204215                continue;
    205216
     
    263274        // Check whether pixel with idx i is blind
    264275        //
    265         if ((*fBadPixels)[i].IsOK())
     276        if (!IsPixelBad(i))
    266277            continue;
    267278
     
    299310            // Do not use blind neighbors
    300311            //
    301             if ((*fBadPixels)[nidx].IsBad())
     312            if (IsPixelBad(nidx))
    302313                continue;
    303314
     
    513524        MCerPhotPix &pix = (*fEvt)[i];
    514525
    515         if ((*fBadPixels)[pix.GetPixId()].IsBad())
     526        if (IsPixelBad(pix.GetPixId()))
    516527            pix.SetPixelUnmapped();
    517528    }
Note: See TracChangeset for help on using the changeset viewer.