31 TFitResult::TFitResult(
const ROOT::Fit::FitResult& f) :
32 TNamed(
"TFitResult",
"TFitResult"),
33 ROOT::Fit::FitResult(f)
35 ROOT::Math::WrappedMultiTF1 * wfunc =
dynamic_cast<ROOT::Math::WrappedMultiTF1 *
>(ModelFunction().get() );
36 if (wfunc) wfunc->SetAndCopyFunction();
44 void TFitResult::Print(Option_t *option)
const
48 bool doCovMat = opt.Contains(
"V");
49 ROOT::Fit::FitResult::Print( std::cout, doCovMat);
59 TMatrixDSym TFitResult::GetCovarianceMatrix()
const
61 if (CovMatrixStatus() == 0) {
62 Warning(
"GetCovarianceMatrix",
"covariance matrix is not available");
65 TMatrixDSym mat(NPar());
66 ROOT::Fit::FitResult::GetCovarianceMatrix<TMatrixDSym>(mat);
77 TMatrixDSym TFitResult::GetCorrelationMatrix()
const
79 if (CovMatrixStatus() == 0) {
80 Warning(
"GetCorrelationMatrix",
"correlation matrix is not available");
83 TMatrixDSym mat(NPar());
84 ROOT::Fit::FitResult::GetCorrelationMatrix<TMatrixDSym>(mat);
93 bool TFitResult::Scan(
unsigned int ipar, TGraph *gr,
double xmin,
double xmax)
98 unsigned int npoints = gr->GetN();
103 bool ret = ROOT::Fit::FitResult::Scan(ipar, npoints, gr->GetX(), gr->GetY(), xmin, xmax);
104 if ((
int)npoints < gr->GetN())
119 bool TFitResult::Contour(
unsigned int ipar,
unsigned int jpar, TGraph *gr,
double confLevel)
124 unsigned int npoints = gr->GetN();
129 bool ret = ROOT::Fit::FitResult::Contour(ipar, jpar, npoints, gr->GetX(), gr->GetY(), confLevel);
130 if ((
int)npoints < gr->GetN())
139 std::string cling::printValue(
const TFitResult* val)
141 std::stringstream outs;
142 val->ROOT::Fit::FitResult::Print(outs,
false );