single channel OF trigger engine
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, double binsize) |
fit QVector between minfit and max fits | |
QError | Fit (const QVector &data, double error, double minfit, double maxfit, double binsize) |
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 binsize) |
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 = NULL |
pointer to this fitting function |
QError QFitter::Fit | ( | const QVector & | data, | |
const QVector & | errors, | |||
double | minfit, | |||
double | maxfit, | |||
double | binsize | |||
) |
fit QVector between minfit and max fits assuming errors on points
errors | vector of the same size of data | |
binsize |
References QVector::Clear(), QMathFunction::Eval(), fFunctionP, QMathFunction::fLowBound, QMathFunction::fNParameters, QMathFunction::fParameters, QMathFunction::fUpBound, QMathFunction::fVerbose, QVector::Resize(), RootRoutine(), QError::SetDescription(), SetTF1(), and QVector::Size().