Ignore:
Timestamp:
11/10/04 18:08:04 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r5292 r5374  
    246246  Int_t count = 0;  // counter to recognize the AB-flag
    247247
    248   Float_t pedes        = ped.GetPedestal();
     248  const Float_t pedes  = ped.GetPedestal();
    249249  const Float_t ABoffs = ped.GetPedestalABoffset();
    250250
     
    276276      sat++;
    277277 
     278  if (IsNoiseCalculation())
     279    return;
     280   
    278281  //
    279282  // Calculate the i-th sum as
     
    287290  for (p=first; p+fWindowSizeHiGain<end; p++)
    288291    {
    289 
     292     
    290293      const Int_t ids      = fHiGainFirst + count + fWindowSizeHiGain;
    291294      const Float_t signal = (Float_t)*(p+fWindowSizeHiGain) - PedMean[(ids+abflag) & 0x1];     
    292295      sum                 += signal - fHiGainSignal[count];
    293296      fHiGainSignal[count + fWindowSizeHiGain] = signal;
    294 
     297     
    295298      if (sum>max)
    296         {
    297           max   = sum;
     299        {
     300          max   = sum;
    298301          idx   = count+1;
    299         }
     302        }
    300303      count++;
    301304    }
     
    303306  if (fHiLoLast != 0)
    304307    {
    305 
     308     
    306309      //
    307310      // overlap bins
     
    311314      while (p < end && l < logain+fHiLoLast)
    312315        {
    313 
     316         
    314317          const Int_t   ids    = fHiGainFirst + count + fWindowSizeHiGain;
    315318          const Float_t signal = (Float_t)*l - PedMean[(ids+abflag) & 0x1];         
     
    319322          if (*l++ >= fSaturationLimit)
    320323            sat++;
    321 
     324         
    322325          if (sum>max)
    323326            {
     
    327330          p++;
    328331        }
    329 
     332     
    330333      if (fHiLoLast > fWindowSizeHiGain)
    331334        {
     
    339342              if (*(l+fWindowSizeHiGain) >= fSaturationLimit)
    340343                sat++;
    341 
     344             
    342345              if (sum>max)
    343346                {
     
    346349                }
    347350              l++;
    348             }
    349         }
    350     }
     351            } /* while (l < logain + fHiLoLast) */
     352        } /* if (fHiLoLast > fWindowSizeHiGain) */
     353    } /* if (fHiLoLast != 0) */
    351354
    352355  //
     
    416419      sat++;
    417420 
     421  if (IsNoiseCalculation())
     422    return;
     423
    418424  //
    419425  // Calculate the i-th sum as
Note: See TracChangeset for help on using the changeset viewer.