Changeset 5541 for trunk/MagicSoft


Ignore:
Timestamp:
12/01/04 18:32:07 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r5529 r5541  
    166166        }
    167167    }
    168  
     168}
     169
     170// --------------------------------------------------------------------------
     171//
     172// InitArrays
     173//
     174// Gets called in the ReInit() and initialized the arrays
     175//
     176Bool_t MExtractTimeAndChargeDigitalFilter::InitArrays()
     177{
     178
     179  Int_t range = (Int_t)(fHiGainLast - fHiGainFirst + 1 + fHiLoLast);
     180
     181  fHiGainSignal.Set(range);
     182
     183  range = (Int_t)(fLoGainLast - fLoGainFirst + 1);
     184
     185  fLoGainSignal.Set(range);
     186
     187  if (!fWeightsSet)
     188    if (!ReadWeightsFile(fNameWeightsFile))
     189      return kFALSE;
     190
     191  fTimeShiftHiGain = (Float_t)fHiGainFirst + 0.5 + 1./fBinningResolutionHiGain;
     192  fTimeShiftLoGain = (Float_t)fLoGainFirst + 0.5 + 1./fBinningResolutionLoGain;
    169193  //
    170194  // We need here the effective number of samples which is about 2.5 in the case of a window
     
    175199  fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples);
    176200  fSqrtLoGainSamples = TMath::Sqrt(fNumLoGainSamples);
    177  
    178 }
    179 
    180 // --------------------------------------------------------------------------
    181 //
    182 // InitArrays
    183 //
    184 // Gets called in the ReInit() and initialized the arrays
    185 //
    186 Bool_t MExtractTimeAndChargeDigitalFilter::InitArrays()
    187 {
    188 
    189   Int_t range = (Int_t)(fHiGainLast - fHiGainFirst + 1 + fHiLoLast);
    190 
    191   fHiGainSignal.Set(range);
    192 
    193   range = (Int_t)(fLoGainLast - fLoGainFirst + 1);
    194 
    195   fLoGainSignal.Set(range);
    196 
    197   if (!fWeightsSet)
    198     if (!ReadWeightsFile(fNameWeightsFile))
    199       return kFALSE;
    200 
    201   fTimeShiftHiGain = (Float_t)fHiGainFirst + 0.5 + 1./fBinningResolutionHiGain;
    202   fTimeShiftLoGain = (Float_t)fLoGainFirst + 0.5 + 1./fBinningResolutionLoGain;
    203201 
    204202  return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.