Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Acclaim::RayleighHist Class Reference

#include <RayleighHist.h>

Public Types

enum  FitMethod {
  kTF1, kMinuit, kScan, kJustEvalGuess,
  kAdaptive, kDefault = kAdaptive
}
 
enum  ChiSquareErrorMethod { kPoisson, kPearson }
 

Public Member Functions

 RayleighHist (FourierBuffer *fb=NULL, const char *name="", const char *title="")
 
virtual void Draw (Option_t *opt="")
 
virtual bool add (double newAmp)
 Input amplitudes events.
 
void getRayleighFitParams (double &rayAmp, double &chiSquare, int &ndf)
 Output Rayleigh distribution parameters.
 
void fitRayleigh (bool forGuiUpdateTF1=true)
 
void fitRayleighAdaptive (bool forGuiUpdateTF1=true)
 
void fitRayleighScan (bool forGuiUpdateTF1=true)
 
void fitRayleighJustEvalGuess (bool forGuiUpdateTF1=true)
 
void fitRayleighTF1 ()
 
void fitRayleighMinuit (bool forGuiUpdateTF1=true)
 
double getOneMinusCDF (double amp, double distAmp=-1) const
 
double getCDF (double amp, double distAmp=-1) const
 
double getAmplitude () const
 

Static Public Member Functions

static void guessMaxBinLimitAndSigmaFromMean (double meanAmp, double &maxAmp, double &sigmaGuess, double fracOfEventsInsideMaxAmp)
 

Protected Member Functions

virtual int Fill (double amp, double sign=1)
 Fill the histogram, this is called by add(double)
 
bool axisRangeOK () const
 Checks current axis range is reasonable.
 
void rebinAndRefill (double meanAmp)
 Dynamically rebin and refill histogram with contents of RingBuffer of amplitudes.
 
double getRayleighChiSquare (const double *params)
 
void updateParamsOfTF1 ()
 
 ClassDef (RayleighHist, 0)
 

Protected Attributes

RingBuffer amplitudes
 Tracks all the amplitudes.
 
Int_t fNumNonEmptyBins
 Cache number of non empty bins.
 
Int_t fNx
 The number of bins (faster than GetNbinsX())
 
Int_t fNumEvents
 Tracks the number of events in the RingBuffer/histogram (faster than integral)
 
std::vector< double > binCentres
 
std::vector< double > squaredBinCentres
 
std::vector< int > binValues
 
std::vector< double > squaredBinErrors
 
FourierBufferfParent
 Daddy.
 
TF1 * fRay
 Pointer to the Rayeligh TF1 cloned from parent FourierBuffer.
 
Int_t fNumFitParams
 Will be equal to one as we only try and fit the amplitude (normalization is fixed by fNumEvents and bin width)
 
ROOT::Math::Minimizer * fMinimizer
 The minuit minimizer object.
 
ROOT::Math::Functor fChiSquaredFunc
 For minuit interface, will point to getRayelighChiSquare(const double*)
 
std::vector< double > theFitParams
 
std::vector< double > theFitParamsSteps
 
double fracOfEventsWanted
 Fraction of events to be in the histogram bin limits using the guessed amplitude (don't set to 1 as this requires an infinite axis range)
 
Int_t risingEdgeBins
 Number of bins between 0 and where we guess the histogram peak is, for dynamic rebinning.
 
double freqMHz
 The frequency (MHz) of this Rayleigh distribution.
 
TGraph * grLastAddedAmp
 A pretty visual representation of the last added amplitude.
 
Int_t fNDF
 
Double_t fChiSquare
 
Double_t fRayleighAmplitude
 
std::vector< Double_t > fParamsTF1
 
FitMethod fitMethod
 
ChiSquareErrorMethod chiSquareErrorMethod
 
const Int_t fFitEveryNAdds
 
Int_t fNumAddsMod10
 
double fBinWidth
 
double fRayleighAmpGuess
 
double fRayleighNorm
 

Friends

class FourierBuffer
 

Detailed Description

A class to histogram frequency amplitudes on the fly and "fit" a Rayleigh distribution to the result

Definition at line 20 of file RayleighHist.h.

Inheritance diagram for Acclaim::RayleighHist:
Inheritance graph
[legend]
Collaboration diagram for Acclaim::RayleighHist:
Collaboration graph
[legend]

Member Function Documentation

double Acclaim::RayleighHist::getOneMinusCDF ( double  amp,
double  distAmp = -1 
) const
inline

< This is the probability of getting this amplitude (amp) or higher

Definition at line 60 of file RayleighHist.h.


The documentation for this class was generated from the following files: