Changeset 7060


Ignore:
Timestamp:
05/19/05 10:50:38 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7059 r7060  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23 2005/05/19 Thomas Bretz
     24
     25   * msignal/MExtractTimeAndCharge.cc:
     26     - simplified a really cryptical use of the ?:-operator when
     27       the fLoGainFirst is calculated
     28
     29
     30
    2331 2005/05/18 Thomas Bretz
    2432
  • 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.