Ignore:
Timestamp:
04/03/04 17:27:50 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MHGausEvents.h

    r3625 r3636  
    2020private:
    2121
    22   const static Float_t  fgProbLimit;            // Default for fProbLimit (now 0.001)
    23   const static Int_t    fgNDFLimit;             // Default for fNDFLimit  (now 2)
    24   const static Int_t    fgPowerProbabilityBins; // Default for fPowerProbabilityBins (now 20)
    25   const static Int_t    fgBinsAfterStripping;   // Default for fBinsAfterStripping (now 40)
    26 
     22  const static Float_t  fgProbLimit;            //! Default for fProbLimit (now set to: 0.001)
     23  const static Int_t    fgNDFLimit;             //! Default for fNDFLimit  (now set to: 2)
     24  const static Float_t  fgPickupLimit;          //! Default for fPickupLimit (now set to: 5. )
     25  const static Int_t    fgPowerProbabilityBins; //! Default for fPowerProbabilityBins (now set to: 20)
     26  const static Int_t    fgBinsAfterStripping;   //! Default for fBinsAfterStripping (now set to: 40)
     27 
    2728  Int_t    fPowerProbabilityBins;      // Bins for the projected power spectrum
    2829  Int_t    fBinsAfterStripping;        // Bins for the Gauss Histogram after stripping off the zeros at both ends
     
    4142  Double_t fProb;                      //  Probability of the Gauss fit (derived from Chi-Square and NDF
    4243
    43   enum { kGausFitOK, kExpFitOK, kFourierSpectrumOK }; // Bits to hold information about fit results
     44  enum { kGausFitOK, kExpFitOK, kFourierSpectrumOK,
     45         kExcluded };                  //  Bits to hold information about fit results
    4446 
    45   Byte_t fFlags;                       //   Byte to hold the bits fit result bits
     47  Byte_t fFlags;                       //  Byte to hold the bits fit result bits
    4648 
    47   Int_t fCurrentSize;                  //   Current size of the array fEvents
    48  
     49  Int_t fCurrentSize;                  //  Current size of the array fEvents
     50
    4951protected:
    5052
     53  Int_t   fNbins;                      // Number histogram bins for fHGausHist (used by Init())
     54  Axis_t  fFirst;                      // Lower histogram edge  for fHGausHist (used by Init())
     55  Axis_t  fLast;                       // Upper histogram edge  for fHGausHist (used by Init())
     56  Int_t   fPixId;                      //  Pixel ID
     57 
    5158  TH1F    fHGausHist;                  // Histogram which should hold the Gaussian distribution
    5259  TArrayF fEvents;                     // Array which holds the entries of GausHist
     
    5764  Float_t  fProbLimit;                 // Probability limit for judgement if fit is OK
    5865  Int_t    fNDFLimit;                  // NDF limit for judgement if fit is OK
     66  Float_t  fPickupLimit;               // Upper number of sigmas from the mean until events are considered as pickup
    5967
    6068  Float_t *CreateEventXaxis(Int_t n);  //   Create an x-axis for the Event TGraphs
     
    7583  virtual void Clear(Option_t *o="");
    7684  virtual void Reset(); 
    77 
     85  virtual void InitBins();
     86 
    7887  // Setters
    7988  void  SetEventFrequency(const Float_t f)   { fEventFrequency = f; }
     
    8493  void  SetSigmaErr( const Double_t d )   { fSigmaErr = d;   }
    8594  void  SetProb    ( const Double_t d )   { fProb     = d;   }
     95  void  SetPixId    ( const Int_t i    )   { fPixId    = i;   }
     96
     97  void  SetNbins    ( const Int_t i    )   { fNbins    = i;   } 
     98  void  SetFirst   ( const Double_t d )   { fFirst    = d;   }
     99  void  SetLast    ( const Double_t d )   { fLast     = d;   }
    86100 
     101  void  SetNDFLimit(  const Int_t   lim=fgNDFLimit  ) {  fNDFLimit = lim;  } 
     102  void  SetPickupLimit( const Float_t  lim =fgPickupLimit)  { fPickupLimit  = lim;   }
    87103  void  SetProbLimit( const Float_t lim=fgProbLimit ) {  fProbLimit = lim; }
    88   void  SetNDFLimit(  const Int_t   lim=fgNDFLimit  ) {  fNDFLimit = lim;  } 
    89104
    90105  // Setters ONLY for MC:
    91   void  SetGausFitOK(         const Bool_t b );
    92   void  SetExpFitOK(          const Bool_t b );
    93   void  SetFourierSpectrumOK( const Bool_t b );
     106  void  SetGausFitOK(         const Bool_t b=kTRUE );
     107  void  SetExpFitOK(          const Bool_t b=kTRUE );
     108  void  SetFourierSpectrumOK( const Bool_t b=kTRUE );
     109  void  SetExcluded         ( const Bool_t b=kTRUE ); 
    94110
    95111  // Getters
     
    101117  const Double_t GetProb()          const { return fProb;      }
    102118  const Int_t    GetNdf()           const;
     119  const Double_t GetPickup()        const;
     120  const Int_t    GetPixId()         const { return fPixId;     }
    103121
    104122  const Double_t GetSlope()        const;
     
    136154  const Bool_t IsEmpty()              const;
    137155  const Bool_t IsFourierSpectrumOK()  const;
     156  const Bool_t IsExcluded         ()  const;
    138157
    139158  // Fill
     
    145164  Bool_t FitGaus(Option_t *option="RQ0",
    146165                 const Double_t xmin=0., const Double_t xmax=0.); // Fit the histogram HGausHist with a Gaussian
    147   void BypassFit();   // Take mean and RMS from the histogram
    148  
     166  Bool_t RepeatFit(const Option_t *option="RQ0");      // Repeat fit within limits defined by fPickupLimit
     167  void BypassFit();                                    // Take mean and RMS from the histogram
    149168 
    150169  // Draws
     
    155174 
    156175  // Miscelleaneous
     176  virtual void ChangeHistId(Int_t id);   // Changes names and titles of the histogram
    157177  void CreateFourierSpectrum();             // Create the fourier spectrum out of fEvents
    158178  void CreateGraphEvents();                 // Create the TGraph fGraphEvents of fEvents
Note: See TracChangeset for help on using the changeset viewer.