Logo ROOT   6.16/01
Reference Guide
TFitResult.h
Go to the documentation of this file.
1// @(#)root/mathcore:$Id$
2// Author: David Gonzalez Maline Tue Nov 10 15:01:24 2009
3
4/*************************************************************************
5 * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TFitResult
13#define ROOT_TFitResult
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TFitResult //
18// //
19// Provides a way to view the fit result and to store them. //
20// //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TNamed.h"
25
26#include "Fit/FitResult.h"
27
28#include "TMatrixDSym.h"
29
31
32public:
33
34 // Default constructor for I/O
35 TFitResult(int status = 0): TNamed("TFitResult","TFitResult"),
36 ROOT::Fit::FitResult() {
37 fStatus = status;
38 };
39
40 // constructor from name and title
41 TFitResult(const char * name, const char * title) :
42 TNamed(name,title),
44 {}
45
46 // constructor from an FitResult
48
49 virtual ~TFitResult() {}
50
51
52 virtual void Print(Option_t *option="") const;
53
55
57
58
59 using TObject::Error;
60
61 // need to re-implement to solve conflict with TObject::Error
62 double Error(unsigned int i) const {
63 return ParError(i);
64 }
65
66private:
67 ClassDef(TFitResult, 0); // Class holding the result of the fit
68};
69
70namespace cling {
71 std::string printValue(const TFitResult* val);
72}
73#endif
#define f(i)
Definition: RSha256.hxx:104
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
class containg the result of the fit and all the related information (fitted parameter values,...
Definition: FitResult.h:48
double ParError(unsigned int i) const
parameter error by index
Definition: FitResult.h:191
FitResult()
Default constructor for an empty (non valid) fit result.
Definition: FitResult.cxx:45
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O.
Definition: TFitResult.h:30
TFitResult(int status=0)
Definition: TFitResult.h:35
double Error(unsigned int i) const
Definition: TFitResult.h:62
TMatrixDSym GetCorrelationMatrix() const
Return the correlation matrix from fit.
Definition: TFitResult.cxx:75
virtual ~TFitResult()
Definition: TFitResult.h:49
TMatrixDSym GetCovarianceMatrix() const
Return the covariance matrix from fit.
Definition: TFitResult.cxx:57
TFitResult(const char *name, const char *title)
Definition: TFitResult.h:41
virtual void Print(Option_t *option="") const
Print result of the fit, by default chi2, parameter values and errors.
Definition: TFitResult.cxx:42
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:880
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Definition: HFitImpl.cxx:134
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
Print a TSeq at the prompt:
Definition: TDatime.h:115
std::string printValue(const TDatime *val)
Print a TDatime at the prompt.
Definition: TDatime.cxx:514