Ignore:
Timestamp:
05/19/05 10:50:38 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r6840 r7060  
    216216
    217217          fLoGainFirstSave = fLoGainFirst;
    218           const Byte_t logainstart = sathi
    219             ? (sathi > (Int_t)(-1*fLoGainStartShift) ? sathi + (Int_t)fLoGainStartShift : fLoGainFirst)
    220             : (timehi+fLoGainStartShift > 0. ? (Byte_t)(timehi + fLoGainStartShift) : fLoGainFirst);
    221           fLoGainFirst = logainstart > fLoGainFirstSave ? logainstart : fLoGainFirstSave;
    222 
    223           // *fLog << err << (Int_t)fLoGainFirst << endl;
     218
     219          const Float_t pos = sathi==0 ? timehi : sathi;
     220
     221          if (pos>-fLoGainStartShift)
     222              fLoGainFirst = (Byte_t)(pos + fLoGainStartShift);
     223
     224          if (fLoGainFirst<fLoGainFirstSave)
     225              fLoGainFirst = fLoGainFirstSave;
    224226
    225227          if ( fLoGainFirst <= fLoGainLast-fWindowSizeLoGain)
     
    227229              const Bool_t logainabflag = (higainabflag + pixel.GetNumHiGainSamples()) & 0x1;
    228230              FindTimeAndChargeLoGain(pixel.GetLoGainSamples()+fLoGainFirst,
    229                                       sumlo, deltasumlo,
    230                                       timelo, deltatimelo,
     231                                      sumlo, deltasumlo, timelo, deltatimelo,
    231232                                      satlo, ped, logainabflag);
    232233          }
Note: See TracChangeset for help on using the changeset viewer.