****************************************
Minimizer is Minuit2 / Migrad
Chi2 = 2613.61
NDf = 2478
Edm = 2.04928e-05
NCalls = 1133
p0 = 534.106 +/- 2.22027
p1 = 6.00013 +/- 0.00562856
p2 = 1.98723 +/- 0.00361514
p3 = 7.02975 +/- 0.0260609
p4 = 2.9968 +/- 0.0137019
p5 = 519.282 +/- 50.0512
p6 = 11.5486 +/- 0.456627
p7 = 2.72866 +/- 0.245596
p8 = 11.1983 +/- 0.233757
p9 = 2.08449 +/- 0.0982633
****************************************
Minimizer is Minuit2 / Migrad
Chi2 = 2220.46
NDf = 2231
Edm = 2.08188e-06
NCalls = 311
p0 = 530.876 +/- 1.55657
p1 = 6.0121 +/- 0.00596885
p2 = 1.99427 +/- 0.0055483
p3 = 6.98634 +/- 0.0177191
p4 = 2.98763 +/- 0.0113697
p5 = 532.75 +/- 1.15393
p6 = 11.9894 +/- 0.00876067
p7 = 2.99537 +/- 0.00613849
p8 = 10.9975 +/- 0.00338646
p9 = 1.98879 +/- 0.00240993
(int) 0
#include <iostream>
double gauss2D(
double *
x,
double *par) {
}
}
public:
double tmp;
for (
int ix = 1; ix <=
nbinX1; ++ix) {
for (
int iy = 1; iy <=
nbinY1; ++iy) {
}
}
}
for (
int ix = 1; ix <=
nbinX2; ++ix) {
for (
int iy = 1; iy <=
nbinY2; ++iy) {
if ( h2->GetBinError(ix,iy) > 0 ) {
}
}
}
}
};
for (
int i = 0; i <
n; ++i) {
}
else {
}
}
}
double iniParams[10] = { 100, 6., 2., 7., 3, 100, 12., 3., 11., 2. };
h2->Sumw2();
std::cout << "Do global fit" << std::endl;
if (
option%10 == 2) fitter.
Config().SetMinimizer(
"Minuit2");
for (int i = 0; i < 10; ++i) {
}
Error(
"fit2DHist",
"Fit Failed to converge");
return -1;
}
for (int i = 0; i < 10; ++i) {
}
double edm = fitter.
Result().Edm();
h2->GetListOfFunctions()->Add(func);
}
else {
h2->Fit(func, "0");
}
h2->Draw();
h2->Draw("lego");
func->
Draw(
"surf1 same");
return 0;
}
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
winID h TVirtualViewer3D TVirtualGLPainter p
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
TRObject operator()(const T1 &t1) const
R__EXTERN TRandom * gRandom
R__EXTERN TStyle * gStyle
Fitter class, entry point for performing all type of fits.
const FitResult & Result() const
get fit result
bool FitFCN(unsigned int npar, Function &fcn, const double *params=nullptr, unsigned int dataSize=0, int fitType=0)
Fit using the a generic FCN function as a C++ callable object implementing double () (const double *)...
const FitConfig & Config() const
access to the fit configuration (const method)
bool SetFCN(unsigned int npar, Function &fcn, const double *params=nullptr, unsigned int dataSize=0, int fitType=0)
Set a generic FCN function as a C++ callable object implementing double () (const double *) Note that...
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
Class to manage histogram axis.
virtual void SetNDF(Int_t ndf)
Set the number of degrees of freedom ndf should be the number of points used in a fit - the number of...
virtual void SetChisquare(Double_t chi2)
virtual void SetParErrors(const Double_t *errors)
Set errors for all active parameters when calling this function, the array errors must have at least ...
virtual const char * GetParName(Int_t ipar) const
virtual void SetParameters(const Double_t *params)
virtual Double_t GetParameter(Int_t ipar) const
A 2-Dim function with parameters.
TF1 * DrawCopy(Option_t *option="") const override
Draw a copy of this function with its current attributes-*.
void Draw(Option_t *option="") override
Draw this function with its current attributes.
void SetRange(Double_t xmin, Double_t xmax) override
Initialize the upper and lower bounds to draw the function.
virtual Int_t GetNbinsY() const
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
virtual Int_t GetNbinsX() const
void Draw(Option_t *option="") override
Draw this histogram with options.
TList * GetListOfFunctions() const
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
2-D histogram with a double per channel (see TH1 documentation)
void Add(TObject *obj) override
Double_t Rndm() override
Machine independent random number generator.
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
void SetStatY(Float_t y=0)
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...