Changeset 6366


Ignore:
Timestamp:
02/10/05 19:28:16 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
2 edited

Legend:

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

    r6257 r6366  
    174174//
    175175MExtractTimeAndChargeSpline::MExtractTimeAndChargeSpline(const char *name, const char *title)
    176     : fAbMax(0.), fAbMaxPos(0.), fHalfMax(0.), fRandomIter(0)
     176    : fAbMax(0.), fAbMaxPos(0.), fHalfMax(0.),
     177      fRiseTimeHiGain(fgRiseTimeHiGain), fFallTimeHiGain(fgFallTimeHiGain),
     178      fRandomIter(0)
    177179{
    178180
     
    181183
    182184  SetResolution();
    183 
    184   SetRiseTimeHiGain();
    185   SetFallTimeHiGain();
    186  
     185  SetLoGainStretch();
     186  SetOffsetLoGain(fgOffsetLoGain);
     187
    187188  SetChargeType();
    188   SetLoGainStretch();
    189 
    190   SetOffsetLoGain(fgOffsetLoGain);
    191 
    192189  SetRange(fgHiGainFirst, fgHiGainLast, fgLoGainFirst, fgLoGainLast);
    193190}
     
    229226  SETBIT(fFlags,typ);
    230227
     228  if (IsExtractionType(kAmplitude))
     229    {
     230      fNumHiGainSamples = 1.;
     231      fNumLoGainSamples = fLoGainLast ? 1. : 0.;
     232      fSqrtHiGainSamples = 1.;
     233      fSqrtLoGainSamples = 1.;
     234      fWindowSizeHiGain  = 1;
     235      fWindowSizeLoGain  = 1;
     236      fRiseTimeHiGain    = 0.5;
     237     
     238      return;
     239    }
     240
     241  if (IsExtractionType(kIntegral))
     242    {
     243
     244      fNumHiGainSamples  = fRiseTimeHiGain + fFallTimeHiGain;
     245      fNumLoGainSamples  = fLoGainLast ? fRiseTimeLoGain + fFallTimeLoGain : 0.;
     246      //      fNumLoGainSamples  *= 0.75;     
     247
     248      fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples);
     249      fSqrtLoGainSamples = TMath::Sqrt(fNumLoGainSamples);
     250      fWindowSizeHiGain  = (Int_t)(fRiseTimeHiGain + fFallTimeHiGain);
     251      fWindowSizeLoGain  = (Int_t)(fRiseTimeLoGain + fFallTimeLoGain);
     252      //      fNumLoGainSamples  *= 0.75;     
     253    }
    231254}
    232255
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h

    r5795 r6366  
    7676  void SetRange      ( Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0 ); 
    7777  void SetResolution ( const Float_t f=fgResolution  )  { fResolution  = f;  }
    78   void SetRiseTimeHiGain( const Float_t f=fgRiseTimeHiGain    )  { fRiseTimeHiGain = f;  }
    79   void SetFallTimeHiGain( const Float_t f=fgFallTimeHiGain    )  { fFallTimeHiGain = f;  }
     78  void SetRiseTimeHiGain( const Float_t f=fgRiseTimeHiGain    )
     79    {
     80      fRiseTimeHiGain    = f;
     81      fRiseTimeLoGain    = f*fLoGainStretch;
     82      fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples);
     83      fWindowSizeHiGain  = (Int_t)(fRiseTimeHiGain + fFallTimeHiGain);
     84    }
     85  void SetFallTimeHiGain( const Float_t f=fgFallTimeHiGain    )
     86    {
     87      fFallTimeHiGain    = f;
     88      fFallTimeLoGain    = f*fLoGainStretch;
     89      fNumHiGainSamples  = fRiseTimeHiGain + fFallTimeHiGain;
     90      fNumLoGainSamples  = fLoGainLast ? fRiseTimeLoGain + fFallTimeLoGain : 0.;
     91      fSqrtLoGainSamples = TMath::Sqrt(fNumLoGainSamples);
     92      fWindowSizeLoGain  = (Int_t)(fRiseTimeLoGain + fFallTimeLoGain);
     93    }
     94
    8095  void SetLoGainStretch ( const Float_t f=fgLoGainStretch    )  { fLoGainStretch = f;   }
    8196 
Note: See TracChangeset for help on using the changeset viewer.