Do global fit
 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 p0           1.00000e+02  1.00000e-02     no limits
     2 p1           6.00000e+00  1.00000e-02     no limits
     3 p2           2.00000e+00  1.00000e-02     no limits
     4 p3           7.00000e+00  1.00000e-02     no limits
     5 p4           3.00000e+00  1.00000e-02     no limits
     6 p5           1.00000e+02  1.00000e-02     no limits
     7 p6           1.20000e+01  1.00000e-02     no limits
     8 p7           3.00000e+00  1.00000e-02     no limits
     9 p8           1.10000e+01  1.00000e-02     no limits
    10 p9           2.00000e+00  1.00000e-02     no limits
 **********
 **    1 **SET PRINT           0       16.85
 **********
 **********
 **    2 **MIGRAD        5000        0.01
 **********
 MIGRAD MINIMIZATION HAS CONVERGED.
 FCN=4015.63 FROM MIGRAD    STATUS=CONVERGED     525 CALLS         526 TOTAL
                     EDM=7.64858e-07    STRATEGY= 1  ERROR MATRIX UNCERTAINTY   4.8 per cent
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  p0           2.55114e+01   2.22488e-01   1.18177e-03   1.29669e-03
   2  p1           6.03551e+00   1.56999e-02   1.78147e-04   5.19787e-02
   3  p2           1.95953e+00   1.34972e-02   1.02338e-04  -2.33217e-02
   4  p3           7.09821e+00   3.32869e-02   2.39024e-04   2.42669e-02
   5  p4           2.94271e+00   2.42010e-02  -1.88552e-04   2.78529e-03
   6  p5           2.63145e+01   2.69272e-01  -2.31447e-03  -2.60063e-03
   7  p6           1.19850e+01   3.51596e-02   4.24094e-04  -3.93616e-02
   8  p7           2.90086e+00   2.64547e-02   8.06260e-05  -5.19624e-03
   9  p8           1.09762e+01   1.47334e-02  -6.74372e-05  -1.09627e-02
  10  p9           1.95760e+00   1.14466e-02   2.85422e-05  -1.15591e-01
Chi2 Fit = 4015.63 ndf = 3921  3921
(int) 0
   
 
#include <vector>
#include <map>
#include <iostream>
 
double gauss2D(
double *
x, 
double *par) {
 
}
}
 
 
 
 
std::vector<std::pair<double, double> > coords;
std::vector<double > values;
 
void myFcn(
int & , 
double *  , 
double &
fval, 
double *
p, 
int   )
 
{
  double x[2];
  for (
int i = 0; i <
n; ++i ) {
 
    errors[i];
    tmp;
  }
}
 
 
  
 
  for (
int i = 0; i < 
n; ++i) {
 
    
 
    }
    else {
    }
 
  }
}
 
 
 
 
 
  
 
 
  yup2);
 
  double iniParams[10] = { 100, 6., 2., 7., 3, 100, 12., 3., 11., 2. };
 
  
 
  
  
  
 
  
  
  h2->Sumw2();
  dy2 ) );
 
 
    
    std::cout << "Do global fit" << std::endl;
    
 
    
    h2->GetXaxis();
    h2->GetYaxis();
 
    int h2->GetNbinsX();
    int h2->GetNbinsY();
 
  coords = std::vector<std::pair<double,double> >();
  values = std::vector<double>();
  errors = std::vector<double>();
 
 
 
  for (
int ix = 1; ix <= 
nbinX1; ++ix) {
 
    for (
int iy = 1; iy <= 
nbinY1; ++iy) {
 
         coords.push_back( std::make_pair(
xaxis1->GetBinCenter(ix), 
yaxis1->GetBinCenter(iy) ) );
 
      }
    }
  }
  for (
int ix = 1; ix <= 
nbinX2; ++ix) {
 
    for (
int iy = 1; iy <= 
nbinY2; ++iy) {
 
      if ( h2->GetBinContent(ix,iy) > 0 ) {
         coords.push_back( std::make_pair(
xaxis2->GetBinCenter(ix), 
yaxis2->GetBinCenter(iy) ) );
 
         values.push_back( h2->GetBinContent(ix,iy) );
         h2->GetBinError(ix,iy) );
      }
    }
  }
 
  for (int i = 0; i < 10; ++i) {
  }
 
  
 
 
 
  
  for (int i = 0; i < 10; ++i) {
  }
 
 
  std::cout << 
"Chi2 Fit = " << 
chi2 << 
" ndf = " << 
ndf << 
"  " << func->
GetNDF() << std::endl;
 
 
  
  h2->GetListOfFunctions()->Add(func);
  }
  else {
    
    h2->Fit(func);
  }
 
 
 
  
 
  h2->Draw();
  h2->Draw("lego");
  func->
Draw(
"surf1 same");
 
 
  return 0;
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
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
 
R__EXTERN TStyle * gStyle
 
Class to manage histogram axis.
 
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
 
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
 
Random number generator class based on M.
 
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 ...
 
Abstract Base Class for Fitting.
 
static void SetDefaultFitter(const char *name="")
static: set name of default fitter
 
static TVirtualFitter * Fitter(TObject *obj, Int_t maxpar=25)
Static function returning a pointer to the current fitter.