29double gaus2D(
double *
x,
double *par) {
30 double t1 =
x[0] - par[1];
31 double t2 =
x[1] - par[2];
32 return par[0]* exp( - 0.5 * (
t1*
t1/( par[3]*par[3]) +
t2*
t2 /( par[4]*par[4] ) ) ) ;
43 for (
int i = 0; i <
n; ++i) {
54 fitFcn->SetParameters(100,0,0,2,7);
58 histo->
Fit(
"fitFcn",
"0");
80 histo =
new TH2D(
"h2",
"2D Gauss",100,-10,10,100,-10,10);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TStyle * gStyle
A 2-Dim function with parameters.
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
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.
void Draw(Option_t *option="") override
Draw this histogram with options.
2-D histogram with a double per channel (see TH1 documentation)
Int_t Fill(Double_t) override
Invalid Fill method.
A Pave (see TPave) with a text centered in the Pave.
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...
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 ...
static void SetDefaultFitter(const char *name="")
static: set name of default fitter
TVirtualPad is an abstract base class for the Pad and Canvas classes.