Ignore:
Timestamp:
10/24/06 09:26:10 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7900 r8154  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.55 2006-10-24 08:24:52 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    1719!
    1820!   Author(s): Markus Gaug, 05/2004 <mailto:markus@ifae.es>
     21!   Author(s): Thomas Bretz, 05/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
    1922!
    20 !   Copyright: MAGIC Software Development, 2000-2004
     23!   Copyright: MAGIC Software Development, 2000-2006
    2124!
    2225!
     
    6063//   MExtractedSignalCam
    6164//
     65// For weired events check: Run 94127 Event 672, 1028
     66//
    6267//////////////////////////////////////////////////////////////////////////////
    6368#include "MExtractTimeAndCharge.h"
     
    7075#include "MParList.h"
    7176
    72 #include "MRawEvtData.h"
     77//#include "MArrayB.h"
     78//#include "MArrayF.h"
     79
     80//#include "MRawEvtData.h"
    7381#include "MRawEvtPixelIter.h"
    74 #include "MRawRunHeader.h"
    75 
    76 #include "MPedestalCam.h"
    77 #include "MPedestalPix.h"
     82//#include "MRawRunHeader.h"
     83
     84//#include "MPedestalCam.h"
     85//#include "MPedestalPix.h"
     86#include "MPedestalSubtractedEvt.h"
    7887
    7988#include "MArrivalTimeCam.h"
     
    8796using namespace std;
    8897
    89 const Float_t MExtractTimeAndCharge::fgLoGainStartShift = -3.5;
    90 const Byte_t  MExtractTimeAndCharge::fgLoGainSwitch = 120;
     98const Float_t MExtractTimeAndCharge::fgLoGainStartShift = -6.0;
     99const Byte_t  MExtractTimeAndCharge::fgLoGainSwitch     =  120;
    91100
    92101// --------------------------------------------------------------------------
     
    95104//
    96105// Sets:
    97 // - fLoGainFirstSave to 0
    98106// - fWindowSizeHiGain and fWindowSizeLoGain to 0
    99107// - fLoGainStartShift to fgLoGainStartShift+fgOffsetLoGain
     
    101109//
    102110MExtractTimeAndCharge::MExtractTimeAndCharge(const char *name, const char *title)
    103     : fLoGainFirstSave(0), fWindowSizeHiGain(0), fWindowSizeLoGain(0)
     111    : /*fLoGainFirstSave(0),*/ fWindowSizeHiGain(0), fWindowSizeLoGain(0)
    104112{
    105113    fName  = name  ? name  : "MExtractTimeAndCharge";
     
    157165 
    158166  if (fSignals)
    159     fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
     167    fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast/*+fHiLoLast*/, fNumHiGainSamples,
    160168                                fLoGainFirst, fLoGainLast, fNumLoGainSamples);
    161 
    162169
    163170  return kTRUE;
     
    175182Int_t MExtractTimeAndCharge::Process()
    176183{
    177 
    178   MRawEvtPixelIter pixel(fRawEvt);
    179 
    180   while (pixel.Next())
    181   {
    182       // COPY HERE PRODUCING ARRAY WITH SAMPLES
    183 
    184       /*
    185        const MPedestalPix  &ped = (*fPedestals)[pixidx];
    186 
    187        const Float_t pedes  = ped.GetPedestal();
    188        const Float_t ABoffs = ped.GetPedestalABoffset();
    189 
    190        const Float_t pedmean[2] = { pedes + ABoffs, pedes - ABoffs };
    191 
    192        const Int_t num = pixel.GetNumHiGainSamples()+pixel.GetNumLoGainSamples();
    193 
    194        MArrayF sample(num);
    195 
    196        const Int_t abflag = pixel.HasABFlag() ? 1 : 0;
    197        const Int_t ids0 = fHiGainFirst + abflag;
    198 
    199        Int_t ids  = ids0;
    200 
    201        Float_t  null   = 0;      // Starting value for maxpos
    202        Float_t *maxpos = &null;  // Position of maximum
    203        Float_t *sat1   = 0;      // First saturating slice
    204        Float_t *sat2   = 0;      // Last saturating slice
    205 
    206        const Float_t *beg = sample.GetArray();
    207        const Float_t *end = beg + num;
    208 
    209        Float_t *ptr = beg;
    210        while (ptr<end)
    211        {
    212           *sample++ = (Float_t)*ptr - pedmean[ids++&0x1];
    213 
    214           // This extraction must be done independant for lo- and hi-gain
    215           // if (*ptr > *maxpos)
    216           //     maxpos = ptr;
    217           //
    218           // if (*ptr >= fSaturationLimit)
    219           // {
    220           //    sat2 = ptr;
    221           //    if (!sat1)
    222           //       sat1 = ptr;
    223           // }
    224           //
    225           // ptr++;
     184    MRawEvtPixelIter pixel(fRawEvt);
     185
     186    while (pixel.Next())
     187    {
     188        const Int_t pixidx = pixel.GetPixelId();
     189
     190        //
     191        // Preparations for the pedestal subtraction (with AB-noise correction)
     192        //
     193        Float_t *sig = fSignal->GetSamples(pixidx);
     194
     195        // ====================================================================
     196        //    MOVE THIS TO MExtractTimeAndCharge
     197        // ====================================================================
     198        // number of hi- and lo-gains
     199        const Int_t numh = pixel.GetNumHiGainSamples();
     200        const Int_t numl = pixel.GetNumLoGainSamples();
     201/*
     202        // COPY HERE PRODUCING ARRAY WITH SAMPLES
     203        static MArrayB sample;
     204        sample.Set(numh+numl);
     205
     206        if (numl>0)
     207        {
     208            memcpy(sample.GetArray(),      pixel.GetHiGainSamples(), numh);
     209            memcpy(sample.GetArray()+numh, pixel.GetLoGainSamples(), numl);
    226210        }
    227        */
    228 
    229       //
    230       // Find signal in hi- and lo-gain
    231       //
    232       Float_t sumhi =0., deltasumhi =0; // Set hi-gain of MExtractedSignalPix valid
    233       Float_t timehi=0., deltatimehi=0; // Set hi-gain of MArrivalTimePix valid
    234       Byte_t sathi=0;
    235 
    236       // Initialize fMaxBinContent for the case, it gets not set by the derived class
    237       fMaxBinContent = fLoGainSwitch + 1;
    238 
    239       const Int_t pixidx = pixel.GetPixelId();
    240       const MPedestalPix  &ped = (*fPedestals)[pixidx];
    241       const Bool_t higainabflag = pixel.HasABFlag();
    242 
    243       FindTimeAndChargeHiGain(pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(),
    244                               sumhi, deltasumhi, timehi, deltatimehi,
    245                               sathi, ped, higainabflag);
    246 
    247       // Make sure that in cases the time couldn't be correctly determined
    248       // more meaningfull default values are assigned
    249       if (timehi<=0 || timehi>pixel.GetNumHiGainSamples())
    250           timehi = gRandom->Uniform(pixel.GetNumHiGainSamples());
    251      
    252       Float_t sumlo =0., deltasumlo =-1.; // invalidate logain of MExtractedSignalPix
    253       Float_t timelo=0., deltatimelo=-1;  // invalidate logain of MArrivalTimePix
    254       Byte_t satlo=0;
    255      
    256       //
    257       // Adapt the low-gain extraction range from the obtained high-gain time
    258       //
    259 
    260       // IN THIS CASE THE PIXEL SHOULD BE MARKED BAD!!!!
    261       // MEANS: Hi gain has saturated, but it is too early to extract
    262       // the lo-gain properly
    263       // THIS produces pulse positions ~= -1
    264       // The signal might be handled in MCalibrateData, but hwat's about
    265       // the arrival times in MCalibrateRelTime
    266       if (sathi && fMaxBinContent<=fLoGainSwitch)
    267           deltasumlo=deltasumhi=deltatimelo=deltatimehi=-1;
    268 
    269       // FIXME: What to do with the pixel if it saturates too early???
    270       if (pixel.HasLoGain() && (fMaxBinContent > fLoGainSwitch /*|| sathi>0*/) )
    271       {
    272           fLoGainFirstSave = fLoGainFirst;
    273 
    274           // sathi is the number (not index!) of the first saturating slice
    275           // 0 indicates that no saturation was found
    276           // FIMXME: Is 3 an accurate value?
    277 
    278           const Float_t pos = sathi==0 ? timehi : (int)(sathi)-3;
    279 
    280           if (pos+fLoGainStartShift>0)
    281               fLoGainFirst = (Byte_t)(pos + fLoGainStartShift);
    282 
    283           if (fLoGainFirst<fLoGainFirstSave)
    284               fLoGainFirst = fLoGainFirstSave;
    285 
    286           if (fLoGainLast-fLoGainFirst >= fWindowSizeLoGain)
    287           {
    288               deltasumlo  = 0; // make logain of MExtractedSignalPix valid
    289               deltatimelo = 0; // make logain of MArrivalTimePix valid
    290 
    291               const Bool_t logainabflag = (higainabflag + pixel.GetNumHiGainSamples()) & 0x1;
    292               FindTimeAndChargeLoGain(pixel.GetLoGainSamples()+fLoGainFirst,
    293                                       sumlo, deltasumlo, timelo, deltatimelo,
    294                                       satlo, ped, logainabflag);
    295 
    296               if (satlo>6)
    297                   deltasumlo=deltatimelo=-1;
    298           }
    299           fLoGainFirst = fLoGainFirstSave;
    300 
    301           // Make sure that in cases the time couldn't be correctly determined
    302           // more meaningfull default values are assigned
    303           if (timelo<=0 || timelo>pixel.GetNumLoGainSamples())
    304               timelo = gRandom->Uniform(pixel.GetNumLoGainSamples());
    305       }
    306 
    307       MExtractedSignalPix &pix = (*fSignals)[pixidx];
    308       MArrivalTimePix     &tix = (*fArrTime)[pixidx];
    309       pix.SetExtractedSignal(sumhi, deltasumhi, sumlo, deltasumlo);
    310       pix.SetGainSaturation(sathi, satlo);
    311 
    312       tix.SetArrivalTime(timehi, deltatimehi, timelo-fOffsetLoGain, deltatimelo);
    313       tix.SetGainSaturation(sathi, satlo);
    314  
     211
     212        // get pedestal information
     213        const MPedestalPix &pedpix = (*fPedestals)[pixidx];
     214
     215        // pedestal information
     216        const Int_t   ab  = pixel.HasABFlag() ? 1 : 0;
     217        const Float_t ped = pedpix.GetPedestal();
     218
     219        // destination array
     220        static MArrayF sig;
     221        sig.Set(numh+numl);
     222
     223        // start of destination array, end of hi-gain destination array
     224        // and start of hi-gain samples
     225        Float_t *beg = sig.GetArray();
     226        Float_t *end = beg + sig.GetSize();
     227
     228        // determine with which pedestal (+/- AB offset) to start
     229        const Bool_t  noswap  = (ab&1)==((beg-beg)&1);
     230        const Float_t offh    = noswap ? pedpix.GetPedestalABoffset() : -pedpix.GetPedestalABoffset();
     231        const Float_t mean[2] = { ped + offh, ped - offh };
     232
     233        //const Int_t rangeh = fHiGainLast - fHiGainFirst + 1  + fHiLoLast;
     234        //const Int_t rangel = fLoGainLast - fLoGainFirst + 1;
     235
     236        const Byte_t *src = numl>0 ? sample.GetArray() : pixel.GetHiGainSamples();
     237        //const Byte_t *src = sample.GetArray();
     238
     239        // Copy hi-gains into array and substract pedestal
     240        // FIXME: Shell we really subtract the pedestal from saturating slices???
     241        for (Float_t *ptr=beg; ptr<end; ptr++)
     242            *ptr = (Float_t)*src++ - mean[(ptr-beg)&1];
     243
     244        // Determin saturation of hi-gains
     245        Byte_t *p0 = fSignal->GetSamplesRaw(pixidx); //numl>0 ? sample.GetArray() : pixel.GetHiGainSamples();
     246//        Byte_t *p0 = sample.GetArray();
     247
     248        Byte_t maxcont  =  0;
     249        Int_t  maxposhi = -1;
     250
     251        Byte_t *sathi0 = 0; // first saturating hi-gain slice
     252        Byte_t *sathi1 = 0; // last saturating hi-gain slice
     253        for (Byte_t *ptr=p0+fHiGainFirst; ptr<p0+fHiGainLast+fHiLoLast+1; ptr++)
     254        {
     255            // Get hi-gain maxbincontent
     256            // Put this into its own function and loop?
     257            if (*ptr>maxcont)
     258            {
     259                // ORGINAL:
     260                //Int_t range = (fHiGainLast - fHiGainFirst + 1 + fHiLoLast) - fWindowSizeHiGain + 1;
     261                // maxpos>1 && maxpos<=range
     262
     263                // This is a strange workaround to fit the previous
     264                // Spline setup: TO BE CHECKED!
     265                const Int_t pos = ptr-p0;
     266                if (pos<fHiGainLast+1)
     267                {
     268                    maxposhi = pos-fHiGainFirst;
     269
     270                    if (maxposhi>1 && maxposhi<fHiGainLast-fHiGainFirst*//*+1 -fWindowSizeHiGain+1*//*+fHiLoLast*//*)
     271                        maxcont = *ptr;
     272                }
     273            }
     274
     275            // FIXME: Do we also have to really COUNT the number
     276            // of saturating slices, eg. for crosschecks?
     277            if (*ptr>=fSaturationLimit)
     278            {
     279                sathi1 = ptr;
     280                if (!sathi0)
     281                    sathi0 = ptr;
     282            }
     283        }
     284*/
     285        Int_t sathi0 = fHiGainFirst;          // First slice to extract and first saturating slice
     286        Int_t sathi1 = fHiGainLast/*+fHiLoLast*/; // Last  slice to extract and last saturating slice
     287
     288        Int_t maxcont;
     289        Int_t maxposhi = fSignal->GetMax(pixidx, sathi0, sathi1, maxcont);
     290        // Would it be better to take lastsat-firstsat?
     291        Int_t numsathi = fSignal->GetSaturation(pixidx, fSaturationLimit, sathi0, sathi1);
     292/*
     293        // sathi2 is the number (not the index) of first saturating slice
     294//        const Byte_t sathi2   = sathi0<0 ? 0 : sathi0+1;
     295
     296        // Number (not index) of first saturating slice
     297 //       const Byte_t sathi2 = sathi0==0 ? 0 : sathi0-p0+1;
     298//        const Byte_t numsathi = sathi0==0 ? 0 : sathi1-sathi0+1;
     299
     300//        Int_t maxb = maxcont;
     301
     302        // ====================================================================
     303        // FIXME: Move range out of the extractors...
     304
     305        // Initialize maxcont for the case, it gets not set by the derived class
     306        Float_t sumhi2 =0., deltasumhi2 =-1; // Set hi-gain of MExtractedSignalPix valid
     307        Float_t timehi2=0., deltatimehi2=-1; // Set hi-gain of MArrivalTimePix valid
     308*/
     309        Float_t sumhi =0., deltasumhi =-1; // Set hi-gain of MExtractedSignalPix valid
     310        Float_t timehi=0., deltatimehi=-1; // Set hi-gain of MArrivalTimePix valid
     311        if (numsathi<1)
     312        {
     313
     314        const Int_t rangehi = fHiGainLast - fHiGainFirst + 1/* + fHiLoLast*/;
     315        FindTimeAndChargeHiGain2(sig/*.GetArray()*/+fHiGainFirst, rangehi,
     316                                 sumhi, deltasumhi, timehi, deltatimehi,
     317                                 numsathi, maxposhi);
     318
     319        timehi += fHiGainFirst;
     320        }
     321/*
     322        Float_t sumhi = sumhi2;
     323        Float_t deltasumhi = deltasumhi2;
     324        Float_t timehi = timehi2;
     325        Float_t deltatimehi=deltatimehi2;
     326//        Byte_t sathi = sathi2;
     327
     328
     329        //
     330        // Find signal in hi- and lo-gain
     331        //
     332        Float_t sumhi =0., deltasumhi =-1; // Set hi-gain of MExtractedSignalPix valid
     333        Float_t timehi=0., deltatimehi=-1; // Set hi-gain of MArrivalTimePix valid
     334        Byte_t sathi=0;
     335
     336        // Initialize maxcont for the case, it gets not set by the derived class
     337        maxcont = fLoGainSwitch + 1;
     338
     339        //const Int_t pixidx = pixel.GetPixelId();
     340        //const MPedestalPix  &ped = (*fPedestals)[pixidx];
     341        const Bool_t higainabflag = pixel.HasABFlag();
     342        FindTimeAndChargeHiGain(pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(),
     343                                sumhi, deltasumhi, timehi, deltatimehi,
     344                                sathi, pedpix, higainabflag);
     345        timehi += fHiGainFirst;
     346
     347  */
     348        // Make sure that in cases the time couldn't be correctly determined
     349        // more meaningfull default values are assigned
     350        if (timehi<=fHiGainFirst || timehi>=fHiGainLast)
     351            timehi = gRandom->Uniform(fHiGainLast-fHiGainFirst)+fHiGainFirst;
     352
     353        Float_t sumlo =0., deltasumlo =-1.; // invalidate logain of MExtractedSignalPix
     354        Float_t timelo=0., deltatimelo=-1;  // invalidate logain of MArrivalTimePix
     355        Byte_t satlo=0;
     356        Int_t numsatlo=0;
     357
     358        //
     359        // Adapt the low-gain extraction range from the obtained high-gain time
     360        //
     361
     362        // IN THIS CASE THE PIXEL SHOULD BE MARKED BAD!!!!
     363        // MEANS: Hi gain has saturated, but the signal is to dim
     364        // to extract the lo-gain properly
     365        // THIS produces pulse positions ~= -1
     366        // The signal might be handled in MCalibrateData, but hwat's about
     367        // the arrival times in MCalibrateRelTime
     368        if (numsathi>0 && maxcont<=fLoGainSwitch)
     369            deltasumlo=deltasumhi=deltatimelo=deltatimehi=-1;
     370
     371        // If more than 8 hi-gain slices have saturated this is
     372        // no physical event. We just assume that something with
     373        // the extraction is wrong
     374        if (numsathi>8) // FIXME: Should be something like 2?
     375            deltasumhi=deltatimehi=-1;
     376
     377        // FIXME: What to do with the pixel if it saturates too early???
     378        if (pixel.HasLoGain() && (maxcont > fLoGainSwitch /*|| sathi>0*/) )
     379        {
     380            // To determin the window in which the lo-gain is extracted
     381            // clearly more information about the relation between the
     382            // extraction window and the reslting time is necessary.
     383            //fLoGainStartShift = -6.0;
     384
     385            const Byte_t fLoGainFirstSave = fLoGainFirst;
     386
     387            // sathi is the number (not index!) of the first saturating slice
     388            // 0 indicates that no saturation was found
     389            // FIXME: Is 0.5 should be expressed by the rise time of
     390            //        the hi-gain signal!
     391            const Float_t pos = numsathi==0 ? timehi : sathi0-0.5;
     392
     393            const Int_t lostart = TMath::FloorNint(pos+6);
     394
     395            const Int_t newfirst = TMath::FloorNint(pos+fLoGainStartShift);
     396            fLoGainFirst = newfirst>fLoGainFirstSave ? newfirst : fLoGainFirstSave;
     397
     398//            if (fLoGainLast-fLoGainFirst >= fWindowSizeLoGain)
     399            {
     400/*
     401                Float_t sumlo2 =0., deltasumlo2 =-1.; // invalidate logain of MExtractedSignalPix
     402                Float_t timelo2=0., deltatimelo2=-1.;  // invalidate logain of MArrivalTimePix
     403
     404                // Determin saturation in lo-gains
     405                Byte_t *satlo0 = 0; // first saturating hi-gain slice
     406                Byte_t *satlo1 = 0; // last saturating hi-gain slice
     407                Int_t maxposlo = -1;
     408                Byte_t maxlo = 0;
     409
     410                Byte_t *p0 = fSignal->GetSamplesRaw(pixidx);
     411                for (Byte_t *ptr=p0+numh+fLoGainFirst; ptr<p0+numh+fLoGainLast+1; ptr++)
     412                {
     413                    if (*ptr>maxlo)
     414                    {
     415                        // This is a strange workaround to fit the previous
     416                        // Spline setup: TO BE CHECKED!
     417                        const Int_t ipos = ptr-p0-numh;
     418                        if (ipos>=fLoGainFirst && ipos<=fLoGainLast)
     419                        {
     420                            maxposlo = ipos-fLoGainFirst;
     421                            maxlo = *ptr;
     422                        }
     423                    }
     424                    if (*ptr>=fSaturationLimit)
     425                    {
     426                        satlo1 = ptr;
     427                        if (!satlo0)
     428                            satlo0 = ptr;
     429                    }
     430                    // FIXME: Do we also have to really COUNT the number
     431                    // of saturating slices, eg. for crosschecks?
     432                }
     433
     434                // Number of saturating lo-gain slices (this is not necessary
     435                // identical to a counter counting the number of saturating
     436                // slices!)
     437                const Byte_t numsatlo = satlo0==0 ? 0 : satlo1-satlo0+1;
     438*/
     439
     440                Int_t satlo0 = numh+fLoGainFirst;   // First slice to extract and first saturating slice
     441                Int_t satlo1 = numh+fLoGainLast;    // Last  slice to extract and last saturating slice
     442
     443                // Would it be better to take lastsat-firstsat?
     444                Int_t maxlo;
     445                Int_t maxposlo = fSignal->GetMax(pixidx, satlo0, satlo1, maxlo);
     446                numsatlo = fSignal->GetSaturation(pixidx, fSaturationLimit, satlo0, satlo1);
     447
     448                //                const Byte_t satlo2 = numsatlo;
     449
     450                const Int_t rangelo = fLoGainLast - fLoGainFirst + 1;
     451                FindTimeAndChargeLoGain2(sig/*.GetArray()*/+numh+fLoGainFirst, rangelo,
     452                                         sumlo, deltasumlo, timelo, deltatimelo,
     453                                         numsatlo, maxposlo);
     454                timelo += fLoGainFirst;
     455
     456//                sumlo =sumlo2, deltasumlo=deltasumlo2; // invalidate logain of MExtractedSignalPix
     457//                timelo=timelo2, deltatimelo=deltatimelo2;  // invalidate logain of MArrivalTimePix
     458//                satlo = satlo2;
     459
     460                /*
     461                // THIS IS NOW THE JOB OF THE EXTRACTOR!
     462                //deltasumlo  = 0; // make logain of MExtractedSignalPix valid
     463                //deltatimelo = 0; // make logain of MArrivalTimePix valid
     464
     465                const Bool_t logainabflag = (higainabflag + pixel.GetNumHiGainSamples()) & 0x1;
     466                FindTimeAndChargeLoGain(pixel.GetLoGainSamples()+fLoGainFirst,
     467                                        sumlo, deltasumlo, timelo, deltatimelo,
     468                                        satlo, pedpix, logainabflag);
     469                timelo += fLoGainFirst;
     470                */
     471
     472
     473                // If more than 6 lo-gain slices have saturated this is
     474                // no physical event. We just assume that something with
     475                // the extraction is wrong
     476                if (numsatlo>6)
     477                    deltasumlo=deltatimelo=-1;
     478            }
     479            fLoGainFirst = fLoGainFirstSave;
     480
     481            // Make sure that in cases the time couldn't be correctly determined
     482            // more meaningfull default values are assigned
     483            if (timelo<=fLoGainFirst || timelo>=fLoGainLast)
     484                timelo = gRandom->Uniform(fLoGainLast-fLoGainFirst)+fLoGainFirst;
     485       }
     486
     487        MExtractedSignalPix &pix = (*fSignals)[pixidx];
     488        MArrivalTimePix     &tix = (*fArrTime)[pixidx];
     489        pix.SetExtractedSignal(sumhi, deltasumhi, sumlo, deltasumlo);
     490        pix.SetGainSaturation(numsathi, numsatlo);
     491//        pix.SetGainSaturation(sathi, satlo);
     492
     493        tix.SetArrivalTime(timehi, deltatimehi, timelo-fOffsetLoGain, deltatimelo);
     494        tix.SetGainSaturation(numsathi, numsatlo);
     495//        tix.SetGainSaturation(sathi, satlo);
    315496    } /* while (pixel.Next()) */
    316497
    317   fArrTime->SetReadyToSave();
    318   fSignals->SetReadyToSave();
    319 
    320   return kTRUE;
     498    fArrTime->SetReadyToSave();
     499    fSignals->SetReadyToSave();
     500
     501    return kTRUE;
    321502}
    322503
     
    352533void MExtractTimeAndCharge::Print(Option_t *o) const
    353534{
    354   if (IsA()==Class())
    355     *fLog << GetDescriptor() << ":" << endl;
     535  MExtractTime::Print(o);
     536//  if (IsA()==Class())
     537//    *fLog << GetDescriptor() << ":" << endl;
    356538
    357539  *fLog << dec;
    358   *fLog << " Taking " << fWindowSizeHiGain
    359         << " HiGain samples from slice " << (Int_t)fHiGainFirst
    360         << " to " << (Int_t)(fHiGainLast+fHiLoLast) << " incl" << endl;
    361   *fLog << " Taking " << fWindowSizeLoGain
    362         << " LoGain samples from slice " << (Int_t)fLoGainFirst
    363         << " to " << (Int_t)fLoGainLast << " incl" << endl;
    364  
     540  //*fLog << " Taking " << fWindowSizeHiGain
     541  //      << " HiGain samples from slice " << (Int_t)fHiGainFirst
     542  //      << " to " << (Int_t)(fHiGainLast/*+fHiLoLast*/) << " incl" << endl;
     543  //*fLog << " Taking " << fWindowSizeLoGain
     544  //      << " LoGain samples from slice " << (Int_t)fLoGainFirst
     545  //      << " to " << (Int_t)fLoGainLast << " incl" << endl;
     546  //
    365547  *fLog << " LoGainStartShift:   " << fLoGainStartShift << endl;
    366548  *fLog << " LoGainSwitch:       " << (Int_t)fLoGainSwitch << endl;
    367   MExtractTime::Print(o);
    368549}
Note: See TracChangeset for help on using the changeset viewer.