17   TF1 f1(
"f1",
"pol1",0,10);
 
   19   TH1F h(
"background",
"linear background",100,0,10);
 
   20   h.FillRandom(
"f1",10000);
 
   21   TFile f(
"background.root",
"recreate");
 
   25   TF1 f2(
"f2",
"gaus",0,10);
 
   26   f2.SetParameters(1,6,0.5);
 
   27   h.FillRandom(
"f2",2000);
 
   46   background = (
TH1F*)
f->Get(
"background"); 
 
   49   TF1 *ftot = 
new TF1(
"ftot",ftotal,0,10,4);
 
   54   result->
Fit(
"ftot",
"b");
 
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
virtual void SetParameters(const Double_t *params)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
1-D histogram with a float per channel (see TH1 documentation)}
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
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 Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
static constexpr double sr