QFitter Class Reference

Inheritance diagram for QFitter:

QMathFunction List of all members.

Detailed Description

fitter

Author:
Marco Vignati


Public Member Functions

 QFitter (QRoutinePointer funcpointer, unsigned int NParameters, double LowBound, double UpBound)
 constructor
 QFitter (const QMathFunction &func)
 copy constructor
 ~QFitter ()
 destructor
void SetParameter (unsigned int p, double val, double min, double max)
 set parameter and its range
void SetParameter (unsigned int p, const char *name, double val, double min, double max)
 set parameter, its range and name
void FixParameter (unsigned int p, double val)
 fix parameter
void FixParameter (unsigned int p, const char *name, double val)
 fix parameter and its name
void Print ()
 print parameters
void PrintResult ()
 print fitted parameters
QError Fit (const QVector &data, double minfit, double maxfit)
 fit QVector between minfit and max fits
QError Fit (const QVector &data, double error, double minfit, double maxfit)
 fit QVector between minfit and max fits assuming the same error for all points
QError Fit (const QVector &data, const QVector &errors, double minfit, double maxfit, double eqlenght=-1)
 fit QVector between minfit and max fits assuming errors on points
QMathFunction GetFittedFunction ()
 Get fitted function.
QVector & GetResiduals ()
 Get residuals.
double GetChiSquare ()
 Get chi square over NDOF.
void SetTF1 (TF1 &f1)
 set parameters and ranges from TF1

Static Private Member Functions

static double RootRoutine (double *x, double *params)
 function intercace used to fit with root

Private Attributes

double * fParMin
double * fParMax
double * fParErr
bool * fIsFixed
QVector fResiduals
QVector fErrors
double fChiSquare

Static Private Attributes

static const QMathFunction * fFunctionP
 pointer to this fitting function


Member Function Documentation

QError QFitter::Fit ( const QVector &  data,
const QVector &  errors,
double  minfit,
double  maxfit,
double  eqlenght = -1 
)

fit QVector between minfit and max fits assuming errors on points

Parameters:
errors vector of the same size of data
eqlenght scale the equivalent lenght of the qvector, by default it is assumed to be equal to the function range (fUpBound-fLowBound) that in general differs from maxfit-minfit.


The documentation for this class was generated from the following files:
Generated on Fri Mar 6 13:40:42 2009 for CUORE Software by  doxygen 1.5.1