Changeset 5917 for trunk/MagicSoft


Ignore:
Timestamp:
01/20/05 18:34:40 (20 years ago)
Author:
mazin
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5916 r5917  
    2828   * mcalib/MCalibrationPix.cc
    2929     - fixed small bug in High-gain mean error.
     30
     31   * msignal/MExtractTimeAndCharge.[h,cc]
     32     - introduced high-gain maximum limit before extracting the low-gain
    3033
    3134 2005/01/20 Thomas Bretz
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc

    r5829 r5917  
    8686
    8787const Float_t MExtractTimeAndCharge::fgLoGainStartShift = -2.8;
     88const Int_t   MExtractTimeAndCharge::fgMaxBinContentLimit = 100;
    8889// --------------------------------------------------------------------------
    8990//
     
    9495// - fWindowSizeHiGain and fWindowSizeLoGain to 0
    9596// - fLoGainStartShift to fgLoGainStartShift+fgOffsetLoGain
     97// - fMaxBinContentLimt to fgMaxBinContentLimit
    9698//
    9799MExtractTimeAndCharge::MExtractTimeAndCharge(const char *name, const char *title)
     
    102104
    103105    SetLoGainStartShift();
     106    SetMaxBinContentLimit();
    104107}
    105108
     
    182185      Float_t timehi=0., deltatimehi=0; // Set hi-gain of MArrivalTimePix valid
    183186      Byte_t sathi=0;
     187
     188      fMaxBinContent = 0;
    184189
    185190      const Int_t pixidx = pixel.GetPixelId();
     
    206211      // Adapt the low-gain extraction range from the obtained high-gain time
    207212      //
    208       if (pixel.HasLoGain())
     213      if (pixel.HasLoGain() && fMaxBinContent < fMaxBinContentLimit )
    209214      {
    210215          deltasumlo  = 0; // make logain of MExtractedSignalPix valid
     
    267272    }
    268273
     274    if (IsEnvDefined(env, prefix, "MaxBinContentLimit", print))
     275    {
     276        fMaxBinContentLimit = GetEnvValue(env, prefix, "MaxBinContentLimit", fMaxBinContentLimit);
     277        rc = kTRUE;
     278    }
    269279
    270280    return MExtractTime::ReadEnv(env, prefix, print) ? kTRUE : rc;
     
    284294        << " to " << (Int_t)fLoGainLast << " incl" << endl;
    285295 
    286   *fLog << " LoGainStartShift: " << fLoGainStartShift << endl;
     296  *fLog << " LoGainStartShift:   " << fLoGainStartShift << endl;
     297  *fLog << " MaxBinContentLimit: " << fMaxBinContentLimit << endl;
    287298  MExtractTime::Print(o);
    288299}
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h

    r5595 r5917  
    1111private:
    1212
    13   static const Float_t fgLoGainStartShift; // Default for fLoGainStartShift (now set to: -2.8)
     13  static const Float_t fgLoGainStartShift;   // Default for fLoGainStartShift (now set to: -2.8)
     14  static const Int_t   fgMaxBinContentLimit; // Default for fMaxBinContentLimit (now set to: 100)
    1415 
    1516  Byte_t  fLoGainFirstSave;       //! Temporary variable to store the original position of low-gain start slice
    1617  Float_t fLoGainStartShift;      // Shift to start searching the low-gain signal obtained from the high-gain times.
     18
     19  Int_t   fMaxBinContentLimit;    // Limit for max. bin content before the low-gain gets extracted
    1720
    1821protected:
     
    2023  Int_t  fWindowSizeHiGain;       //  Window Size High-Gain
    2124  Int_t  fWindowSizeLoGain;       //  Window Size Low-Gain
     25
     26  Int_t  fMaxBinContent;          //  Maximum bin content
    2227
    2328  Int_t  PreProcess(MParList *pList);
     
    3136  MExtractTimeAndCharge(const char *name=NULL, const char *title=NULL);
    3237 
    33   Int_t GetWindowSizeHiGain() const { return fWindowSizeHiGain; }
    34   Int_t GetWindowSizeLoGain() const { return fWindowSizeLoGain; }
     38  Int_t GetWindowSizeHiGain  () const { return fWindowSizeHiGain;   }
     39  Int_t GetWindowSizeLoGain  () const { return fWindowSizeLoGain;   }
     40  Int_t GetMaxBinContentLimit() const { return fMaxBinContentLimit; }
    3541
    3642  void Print(Option_t *o="") const;
    3743 
    3844  void SetLoGainStartShift( const Float_t f=fgLoGainStartShift )  { fLoGainStartShift = f + fOffsetLoGain;  }
     45  void SetMaxBinContentLimit( const Int_t i=fgMaxBinContentLimit ) { fMaxBinContentLimit = i; }
     46
    3947  virtual void SetWindowSize(Int_t windowh, Int_t windowl) { fWindowSizeHiGain = windowh;
    4048                                                           fWindowSizeLoGain = windowl;  }
     
    5058                                       Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag) { }
    5159
    52   ClassDef(MExtractTimeAndCharge, 1)   // Time And Charge Extractor Base Class
     60  ClassDef(MExtractTimeAndCharge, 2)   // Time And Charge Extractor Base Class
    5361};
    5462
Note: See TracChangeset for help on using the changeset viewer.