#ifndef ROOT_Fit_FitResult
#define ROOT_Fit_FitResult
#ifndef ROOT_Fit_IFunctionfwd
#include "Math/IFunctionfwd.h"
#endif
#ifndef ROOT_Fit_IParamFunctionfwd
#include "Math/IParamFunctionfwd.h"
#endif
#include <vector>
#include <string>
namespace ROOT {
namespace Math {
class Minimizer;
}
namespace Fit {
class FitConfig;
class FitResult {
public:
typedef ROOT::Math::IParamMultiFunction IModelFunction;
FitResult ();
FitResult(ROOT::Math::Minimizer & min, const FitConfig & fconfig, const IModelFunction & f, bool isValid, unsigned int sizeOfData = 0, const ROOT::Math::IMultiGenFunction * chi2func = 0, bool minosErr = false, unsigned int ncalls = 0);
~FitResult () {}
public:
void NormalizeErrors();
bool NormalizedErrors() { return fNormalized; }
bool IsValid() const { return fValid; }
const IModelFunction * FittedFunction() const { return fFitFunc; }
double MinFcnValue() const { return fVal; }
double Chi2() const { return fChi2; }
unsigned int Ndf() const { return fNdf; }
double Prob() const;
double CovMatrix (unsigned int i, unsigned int j) const {
if ( i >= fErrors.size() || j >= fErrors.size() ) return 0;
if (fCovMatrix.size() == 0) return 0;
if ( j < i )
return fCovMatrix[j + i* (i+1) / 2];
else
return fCovMatrix[i + j* (j+1) / 2];
}
const std::vector<double> & Errors() const { return fErrors; }
const std::vector<double> & Parameters() const { return fParams; }
double Value(unsigned int i) const { return fParams[i]; }
double Error(unsigned int i) const { return fErrors[i]; }
double LowerError(unsigned int i) const { return fMinosErrors[i].first; }
double UpperError(unsigned int i) const { return fMinosErrors[i].second; }
int Index(const std::string & name) const;
void Print(std::ostream & os) const;
protected:
private:
bool fValid;
bool fNormalized;
double fVal;
double fEdm;
double fChi2;
std::vector<double> fCov;
unsigned int fNdf;
unsigned int fNCalls;
std::vector<double> fParams;
std::vector<double> fErrors;
std::vector<double> fCovMatrix;
std::vector<std::pair<double,double> > fMinosErrors;
unsigned int fDataSize;
const IModelFunction * fFitFunc;
std::string fMinimType;
};
}
}
#endif /* ROOT_Fit_FitResult */
Last change: Tue May 13 17:00:56 2008
Last generated: 2008-05-13 17:00
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.