Ignore:
Timestamp:
06/19/07 12:17:36 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r8582 r8585  
    136136    : fResolutionPerPheHiGain(0), fResolutionPerPheLoGain(0),
    137137    fSignals(NULL), fRawEvt(NULL), fRunHeader(NULL), fSignal(NULL),
    138       /*fHiLoLast(0),*/ fNumHiGainSamples(0), fNumLoGainSamples(0)
     138    fNumHiGainSamples(0), fNumLoGainSamples(0)
    139139{
    140140    fName  = name  ? name  : "MExtractor";
     
    251251        fLoGainFirst=0;
    252252        fLoGainLast =0;
    253         if (fSaturationLimit>fRunHeader->GetMax())
    254         {
    255             *fLog << " and saturation limit to " << fRunHeader->GetMax();
    256             fSaturationLimit=fRunHeader->GetMax();
    257         }
    258253        *fLog << "." << endl;
    259254    }
    260255
    261 /*
    262   const Int_t logainsamples = fRunHeader->GetNumSamplesLoGain();
    263 
    264   Int_t lastdesired;
    265   Int_t lastavailable;
    266 
    267   if (logainsamples)
    268     {
    269 
    270       lastdesired   = (Int_t)(fLoGainLast);
    271       lastavailable = logainsamples-1;
    272      
    273       if (lastavailable < 0)
    274         *fLog << warn << GetDescriptor() << " - WARNING: Number of available Low-Gain Slices is smaller than or equal zero!" << endl;
    275      
    276     if (lastdesired > lastavailable)
    277       {
    278         const Int_t diff = lastdesired - lastavailable;
    279        
    280         *fLog << endl;
    281         *fLog << warn << GetDescriptor() << ": Selected Lo Gain FADC Window [";
    282         *fLog << Form("%2i,%2i", (int)fLoGainFirst, lastdesired);
    283         *fLog << "] ranges out of the available limits: [0," << Form("%2i", lastavailable) << "]" << endl;
    284         *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fLoGainLast - diff) << endl;
    285         SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff);
    286       }
    287     }
    288   else
    289     SetRange(fHiGainFirst, fHiGainLast, 0,0);     
    290  
    291   const Int_t higainsamples = fRunHeader->GetNumSamplesHiGain();
    292 
    293   if (higainsamples <= 0)
    294     {
    295       *fLog << err << GetDescriptor();
    296       *fLog << " - ERROR: Number of available High-Gain Slices is smaller than or equal zero!" << endl;
    297       return kFALSE;
    298     }
    299 
    300   lastdesired   = (Int_t)fHiGainLast;
    301   lastavailable = higainsamples-1;
    302  
    303   if (lastdesired > lastavailable)
    304     {
    305       const Int_t diff = lastdesired - lastavailable;
    306      
    307       *fLog << endl;
    308       *fLog << inf << GetDescriptor() << ": Selected Hi Gain FADC Window [";
    309       *fLog << Form("%2i,%2i", (int)fHiGainFirst,lastdesired);
    310       *fLog << "] ranges out of the available limits: [0," << Form("%2i", lastavailable) << "]" << endl;
    311       *fLog << inf << GetDescriptor() << ": Will use ";
    312       *fLog << Form("%2i", diff) << " samples from the Low-Gain for the High-Gain extraction";
    313       *fLog << endl;
    314      
    315       fHiGainLast -= diff;
    316       fHiLoLast    = diff;
    317     }
    318  
    319   */
    320256    return kTRUE;
    321257}
     
    329265{
    330266    return kERROR;
    331 /*
    332   MRawEvtPixelIter pixel(fRawEvt);
    333 
    334   while (pixel.Next())
    335     {
    336       Float_t sumhi = 0.;
    337       Byte_t sathi = 0;
    338 
    339       FindSignalHiGain(pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(), sumhi, sathi);
    340 
    341       Float_t sumlo  = 0.;
    342       Byte_t  satlo  = 0;
    343 
    344       if (pixel.HasLoGain())
    345         FindSignalLoGain(pixel.GetLoGainSamples()+fLoGainFirst, sumlo, satlo);
    346 
    347       const Int_t pixid = pixel.GetPixelId();
    348      
    349       const MPedestalPix  &ped = (*fPedestals)[pixid];
    350       MExtractedSignalPix &pix = (*fSignals)[pixid];
    351      
    352       const Float_t pedes  = ped.GetPedestal();
    353       const Float_t pedrms = ped.GetPedestalRms();
    354 
    355       pix.SetExtractedSignal(sumhi - pedes*fNumHiGainSamples, pedrms*fSqrtHiGainSamples,
    356                              sumlo - pedes*fNumLoGainSamples, pedrms*fSqrtLoGainSamples);
    357      
    358       pix.SetGainSaturation(sathi, satlo);
    359      
    360     }
    361 
    362     fSignals->SetReadyToSave();
    363 
    364     return kTRUE;
    365     */
    366267}
    367268
     
    461362
    462363    *fLog << " Hi Gain Range:      " << Form("%2d %2d", fHiGainFirst, fHiGainLast) << endl;
     364    *fLog << " Saturation Lim:     " << Form("%3d", fSaturationLimit) << endl;
    463365    if (HasLoGain())
    464366    {
    465367        *fLog << " Lo Gain Range:      " << Form("%2d %2d", fLoGainFirst, fLoGainLast) << endl;
    466         *fLog << " Saturation Lim:     " << Form("%3d", fSaturationLimit) << endl;
    467368        *fLog << " Num Samples Hi/Lo:  " << Form("%2.1f %2.1f", fNumHiGainSamples, fNumLoGainSamples) << endl;
    468369    }
Note: See TracChangeset for help on using the changeset viewer.