root > .x fitCircle.C (10000
points by
default)
root > .x fitCircle.C(100); (with only 100
points
root > .x fitCircle.C++(100000); with ACLIC
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
****************************************
Minimizer is Minuit / Migrad
MinFCN = 903.174
NDf = 0
Edm = 2.25062e-09
NCalls = 72
x0 = 0.00667777 +/- 0.0141774
y0 = 0.00536467 +/- 0.0141954
R = 3.995 +/- 0.0100048
void fitCircle(
int n=10000) {
r.Circle(
x,
y,
r.Gaus(4,0.3));
}
c1->DrawFrame(-5,-5,5,5);
auto chi2Function = [&](const double *par) {
double u =
x[i] - par[0];
double v =
y[i] - par[1];
double dr = par[2] - std::sqrt(u*u+
v*
v);
}
};
double pStart[3] = {0,0,1};
if (!ok) {
Error(
"line3Dfit",
"Line3D Fit failed");
}
}
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
const ParameterSettings & ParSettings(unsigned int i) const
get the parameter settings for the i-th parameter (const method)
class containing the result of the fit and all the related information (fitted parameter values,...
Fitter class, entry point for performing all type of fits.
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 *)...
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...
const FitResult & Result() const
get fit result
const FitConfig & Config() const
access to the fit configuration (const method)
void SetName(const std::string &name)
interaction
Documentation for class Functor class.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
void Draw(Option_t *option="") override
Draw this ellipse with its current attributes.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
Random number generator class based on M.