28 void fitCircle(
Int_t n=10000) {
45 auto chi2Function = [&](
const Double_t *par) {
52 for (
Int_t i=0;i<np;i++) {
67 double pStart[3] = {0,0,1};
68 fitter.
SetFCN(fcn, pStart);
76 Error(
"line3Dfit",
"Line3D Fit failed");
80 result.
Print(std::cout);
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Random number generator class based on M.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
Documentation for class Functor class.
TH1F * DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="")
Draw an empty pad frame with X and Y axis.
bool FitFCN(unsigned int npar, Function &fcn, const double *params=0, unsigned int dataSize=0, bool chi2fit=false)
Fit using the a generic FCN function as a C++ callable object implementing double () (const double *)...
double Parameter(unsigned int i) const
parameter value by index
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
const ParameterSettings & ParSettings(unsigned int i) const
get the parameter settings for the i-th parameter (const method)
const FitResult & Result() const
get fit result
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
void SetName(const std::string &name)
interaction
const FitConfig & Config() const
access to the fit configuration (const method)
void Error(const char *location, const char *msgfmt,...)
virtual void Draw(Option_t *option="")
Draw this ellipse with its current attributes.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Fitter class, entry point for performing all type of fits.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void Circle(Double_t &x, Double_t &y, Double_t r)
Generates random vectors, uniformly distributed over a circle of given radius.
class containg the result of the fit and all the related information (fitted parameter values...
bool SetFCN(unsigned int npar, Function &fcn, const double *params=0, unsigned int dataSize=0, bool chi2fit=false)
Set a generic FCN function as a C++ callable object implementing double () (const double *) Note that...
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
void Print(std::ostream &os, bool covmat=false) const
print the result and optionaly covariance matrix and correlations
A Graph is a graphics object made of two arrays X and Y with npoints each.