Ignore:
Timestamp:
07/30/02 14:29:49 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1455 r1456  
    8989//  (std: 3 sigma, clean level 1)
    9090//
    91 void MImgCleanStd::CleanStep1()
     91//  Returns the maximum Pixel Id (used for ispixused in CleanStep2)
     92//
     93Int_t MImgCleanStd::CleanStep1()
    9294{
    9395    const Int_t entries = fEvt->GetNumPixels();
     96
     97    Int_t max = entries;
    9498
    9599    //
     
    107111        if (entry <= fCleanLvl1 * noise)
    108112            pix.SetPixelUnused();
    109     }
     113
     114        if (pix.GetPixId()>max)
     115            max = pix.GetPixId();
     116    }
     117    return max;
    110118}
    111119
     
    115123//  survived
    116124//
    117 void MImgCleanStd::CleanStep2()
     125//  takes the maximum pixel id from CleanStep1 as an argument
     126//
     127void MImgCleanStd::CleanStep2(Int_t max)
    118128{
    119129    const Int_t entries = fEvt->GetNumPixels();
     
    125135    // (MCerPhotEvt::IsPixelUsed) all the time.
    126136    //
    127     // FIXME: The dynamic allocation may still be a problem if we
    128     //        don't store all pixels in the array... but this music
    129     //        of the future ;-)
    130     Byte_t *ispixused = new Byte_t[fEvt->GetNumPixels()];
     137    Byte_t *ispixused = new Byte_t[max];
    131138
    132139    for (Int_t i=0; i<entries; i++)
Note: See TracChangeset for help on using the changeset viewer.