Ignore:
Timestamp:
08/12/04 21:43:15 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r4399 r4605  
    7474using namespace std;
    7575
     76const Int_t   MExtractBlindPixel::fgNumBlindPixels   = 2;
    7677const UInt_t  MExtractBlindPixel::fgBlindPixelIds[3] = { 559, 560, 561 };
    7778const UInt_t  MExtractBlindPixel::fgBlindPixelIdx    = 559;
    78 const Byte_t  MExtractBlindPixel::fgFirst            =   0;
    79 const Byte_t  MExtractBlindPixel::fgLast             =   7;
    8079const Byte_t  MExtractBlindPixel::fgHiGainFirst      =  10;
    8180const Byte_t  MExtractBlindPixel::fgHiGainLast       =  19;
     
    8483const Int_t   MExtractBlindPixel::fgNSBFilterLimit   =  70;
    8584const Float_t MExtractBlindPixel::fgResolution       = 0.003;
    86 const UInt_t  MExtractBlindPixel::gkModificationRun  = 31693;
    8785const Float_t MExtractBlindPixel::gkOverflow         = 300.;
    8886// --------------------------------------------------------------------------
     
    114112  SetRange(fgHiGainFirst, fgHiGainLast, fgLoGainFirst, fgLoGainLast);
    115113 
    116   SetFirst();
    117   SetLast();
     114  SetNumBlindPixels();
    118115
    119116  Clear();
     
    206203// - MExtractor::PreProcess(pList)
    207204//
    208 // Sets fModified to kTRUE if the current run number is greater or equal gkModificationRun
    209 //
    210205// The following output containers are also searched and created if
    211206// they were not found:
    212207//
    213208//  - MExtractedBlindPixel
    214 //
    215 //
    216209//
    217210Int_t MExtractBlindPixel::PreProcess(MParList *pList)
     
    255248    delete [] fHiGainSecondDeriv;
    256249
    257   if ( fRunHeader->GetRunNumber() >= gkModificationRun )
     250  if (fModified)
    258251  {
    259       fModified = kTRUE;
    260       SetExtractionType(kAmplitude);
    261       SetRange(fFirst,fLast);
    262       for (Int_t i=0;i<3;i++)
     252    for (Int_t i=0;i<fNumBlindPixels;i++)
    263253      {
    264           SetBlindPixelIdx(fgBlindPixelIds[i],i);
    265           fBlindPixel->SetBlindPixelIdx(fgBlindPixelIds[i],i);
     254        SetBlindPixelIdx(fgBlindPixelIds[i],i);
     255        fBlindPixel->SetBlindPixelIdx(fgBlindPixelIds[i],i);
    266256      }
    267257  }
    268258  else
    269   {
    270       fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0));
    271       SetExtractionType(kIntegral);
    272       SetExtractionType(kFilter);
    273   }
     259    fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0));
    274260
    275261  fBlindPixel->SetExtractionType(fExtractionType);
     
    351337                fHiLoLast ?  (Int_t)fHiLoLast-1 : (Int_t)fHiGainLast )
    352338        << endl;
     339
    353340  if (IsExtractionType(kFilter))
    354341    *fLog << inf << GetDescriptor() << ": Will use Filter using "
     
    377364
    378365  Int_t summ = 0;
    379   Byte_t *p     = ptr;
     366  Byte_t *p   = ptr;
    380367  Byte_t *end = ptr + fHiGainLast - fHiGainFirst + 1;
    381368
     
    694681      Byte_t sat  = 0;
    695682
    696       if (!fModified)
     683      if (IsExtractionType(kFilter))
    697684      {
    698685
     
    706693              continue;
    707694          }
     695
     696          sum = 0;
     697          FindSignalFilter(pixel.GetLoGainSamples(), sum, sat);         
     698
     699          /*
     700          if (fModified)
     701            {
     702              if (sum > fNSBFilterLimit)
     703                {
     704                  fBlindPixel->SetExtractedSignal(-1.,id);
     705                  fBlindPixel->SetNumSaturated(sat,id);
     706                  fBlindPixel->SetReadyToSave();
     707                  continue;
     708                }
     709            }
     710          */
    708711      }
    709 
     712     
    710713      Float_t newsum = 0.;
    711714      sat = 0;
     
    716719        FindIntegral    (pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(), newsum, sat);
    717720 
     721
    718722      fBlindPixel->SetExtractedSignal(newsum,id);
    719723      fBlindPixel->SetNumSaturated(sat,id);
Note: See TracChangeset for help on using the changeset viewer.