Ignore:
Timestamp:
10/12/04 13:27:39 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
6 edited

Legend:

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

    r5218 r5240  
    121121                              fLoGainFirst, fLoGainLast, fNumLoGainSamples);
    122122
    123   *fLog << endl;
     123  *fLog << dec << endl;
    124124  *fLog << inf << GetDescriptor() << ": Taking " << fNumHiGainSamples
    125125        << " HiGain samples from slice " << (Int_t)fHiGainFirst
     
    185185      Byte_t satlo=0;
    186186     
    187       const Bool_t logainabflag = (higainabflag + pixel.GetNumHiGainSamples()) & 0x1;
    188 
    189       FindTimeAndChargeLoGain(pixel.GetLoGainSamples()+fLoGainFirst,
    190                               sumlo, deltasumlo,
    191                               timelo, deltatimelo,
    192                               satlo, ped, logainabflag);
    193 
     187      //
     188      // Adapt the low-gain extraction range from the obtained high-gain time
     189      //
     190      if (pixel.HasLoGain())
     191        {
     192          fLoGainFirstSave = fLoGainFirst;
     193          fLoGainFirst     = (Int_t)(timehi+fOffsetLoGain-2.);
     194          fLoGainFirst     = fLoGainFirst < fLoGainFirstSave ? fLoGainFirstSave : fLoGainFirst;
     195         
     196          if ( fLoGainFirst < fLoGainLast )
     197            {
     198              const Bool_t logainabflag = (higainabflag + pixel.GetNumHiGainSamples()) & 0x1;
     199              FindTimeAndChargeLoGain(pixel.GetLoGainSamples()+fLoGainFirst,
     200                                      sumlo, deltasumlo,
     201                                      timelo, deltatimelo,
     202                                      satlo, ped, logainabflag);
     203            }
     204         
     205          fLoGainFirst     = fLoGainFirstSave;
     206        }
     207     
    194208      MExtractedSignalPix &pix = (*fSignals)[pixid];
    195209      MArrivalTimePix     &tix = (*fArrTime)[pixid];     
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h

    r5150 r5240  
    99class MExtractTimeAndCharge : public MExtractTime
    1010{
     11private:
     12
     13  Byte_t fLoGainFirstSave;            // First Low-Gain FADC slice obtained by position of high-gain signal
     14
    1115protected:
    1216
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSlidingWindow.cc

    r5232 r5240  
    3737//   fHiGainFirst =  fgHiGainFirst =  0
    3838//   fHiGainLast  =  fgHiGainLast  =  14
    39 //   fLoGainFirst =  fgLoGainFirst =  3
     39//   fLoGainFirst =  fgLoGainFirst =  2
    4040//   fLoGainLast  =  fgLoGainLast  =  14
    4141//
     
    6363const Byte_t  MExtractTimeAndChargeSlidingWindow::fgHiGainFirst  = 2;
    6464const Byte_t  MExtractTimeAndChargeSlidingWindow::fgHiGainLast   = 14;
    65 const Byte_t  MExtractTimeAndChargeSlidingWindow::fgLoGainFirst  = 3;
     65const Byte_t  MExtractTimeAndChargeSlidingWindow::fgLoGainFirst  = 2;
    6666const Byte_t  MExtractTimeAndChargeSlidingWindow::fgLoGainLast   = 14;
    6767const Byte_t  MExtractTimeAndChargeSlidingWindow::fgHiGainWindowSize = 6;
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSlidingWindow.h

    r5232 r5240  
    1414  static const Byte_t fgHiGainFirst;      //! Default for fHiGainFirst  (now set to: 2)
    1515  static const Byte_t fgHiGainLast;       //! Default for fHiGainLast   (now set to: 14)
    16   static const Byte_t fgLoGainFirst;      //! Default for fLOGainFirst  (now set to: 3)
     16  static const Byte_t fgLoGainFirst;      //! Default for fLOGainFirst  (now set to: 2)
    1717  static const Byte_t fgLoGainLast;       //! Default for fLoGainLast   (now set to: 14)
    1818  static const Byte_t fgHiGainWindowSize; //! The extraction window Hi-Gain
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc

    r5235 r5240  
    118118//        fHiGainFirst =  2
    119119//        fHiGainLast  =  14
    120 //        fLoGainFirst =  3
     120//        fLoGainFirst =  2
    121121//        fLoGainLast  =  14
    122122//
     
    157157const Byte_t  MExtractTimeAndChargeSpline::fgHiGainFirst  = 2;
    158158const Byte_t  MExtractTimeAndChargeSpline::fgHiGainLast   = 14;
    159 const Byte_t  MExtractTimeAndChargeSpline::fgLoGainFirst  = 3;
     159const Byte_t  MExtractTimeAndChargeSpline::fgLoGainFirst  = 2;
    160160const Byte_t  MExtractTimeAndChargeSpline::fgLoGainLast   = 14;
    161161const Float_t MExtractTimeAndChargeSpline::fgResolution   = 0.01;
     
    762762  // Don't start if the maxpos is too close to the left limit.
    763763  //
    764   if (sat || maxpos < 2)
     764  if (sat || maxpos < 1)
    765765    {
    766766      time =  IsExtractionType(kMaximum)
     
    770770    }
    771771     
     772  if (maxpos < 2 && IsExtractionType(kHalfMaximum))
     773    {
     774      time = (Float_t)(fLoGainFirst + maxpos - 1);
     775      return;
     776    }
     777
    772778  Float_t pp;
    773779
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h

    r5231 r5240  
    1414  static const Byte_t  fgHiGainFirst;    //! Default for fHiGainFirst  (now set to: 2)
    1515  static const Byte_t  fgHiGainLast;     //! Default for fHiGainLast   (now set to: 14)
    16   static const Byte_t  fgLoGainFirst;    //! Default for fLOGainFirst  (now set to: 3)
     16  static const Byte_t  fgLoGainFirst;    //! Default for fLoGainFirst  (now set to: 2)
    1717  static const Byte_t  fgLoGainLast;     //! Default for fLoGainLast   (now set to: 14)
    1818  static const Float_t fgResolution;     //! Default for fResolution   (now set to: 0.003)
Note: See TracChangeset for help on using the changeset viewer.