Changeset 5604


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

Legend:

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

    r5149 r5604  
    267267      sum += (Float_t)*ptr/2.;
    268268      fHiGainSecondDeriv[++i] = 0.;     
    269 
    270269    }
    271270  else
     
    280279      i++;
    281280
    282       pp = fHiGainSecondDeriv[i-1] + 4.;
    283       fHiGainSecondDeriv[i] = -1.0/pp;
    284       fHiGainFirstDeriv [i] = *(logain) - 2.* *(ptr) + *(ptr-1);
    285       fHiGainFirstDeriv [i] = (6.0*fHiGainFirstDeriv[i]-fHiGainFirstDeriv[i-1])/pp;
    286      
     281      if (*logain >= fSaturationLimit)
     282        sat++;
     283
    287284      if (fHiLoLast == 1)
    288         {
    289           sum += (Float_t)*logain/2;
    290           fHiGainSecondDeriv[++i] = 0.;
    291           if (*logain >= fSaturationLimit)
    292             sat++;
    293         }
     285        sum += (Float_t)*logain/2;
    294286      else
    295287        {
     288          pp = fHiGainSecondDeriv[i-1] + 4.;
     289          fHiGainSecondDeriv[i] = -1.0/pp;
     290          fHiGainFirstDeriv [i] = *(logain) - 2.* *(ptr) + *(ptr-1);
     291          fHiGainFirstDeriv [i] = (6.0*fHiGainFirstDeriv[i]-fHiGainFirstDeriv[i-1])/pp;
     292     
    296293          //
    297294          // Second, the first low-gain slice as center
     
    325322             
    326323            }
    327           sum += (Float_t)*logain/2;
    328           fHiGainSecondDeriv[++i] = 0.;
    329324        }
    330325    }
    331326 
     327  fHiGainSecondDeriv[range-1] = 0.;
     328
    332329  for (Int_t k=range-2;k>0;k--)
    333330    {
Note: See TracChangeset for help on using the changeset viewer.