27#include "TApplication.h"
38int main(
int argc,
char **argv)
40 TApplication theApp(
"Application",
nullptr,
nullptr);
38int main(
int argc,
char **argv) {
…}
54 TFile *f = TFile::Open(
"histograms.root");
55 if (!f)
return nullptr;
56 TH1D *histo =
nullptr;
57 f->GetObject(HistogramName, histo);
58 if (histo) histo->SetDirectory(
nullptr);
72 fitter.
AddH1(
"data2", histo2, kTRUE, 2200., 2900.);
81 fitter.
AddGauss1(
"data2",
"Gauss3", 2597., 14.);
82 fitter.
AddGauss1(
"data2",
"Gauss4", 2717., 14.);
88 fitter.
Draw(
"#data2,Model1,Gauss3,Gauss4");
int main(int argc, char **argv)
TH1D * GetHistogram(const char *HistogramName)
Model object, which is uses TGo4FitData object to produce model bins.
void DoActions(Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr)
Executes actions list.
Central class of Go4Fit package.
TGo4FitDataHistogram * AddH1(const char *DataName, TH1 *histo, Bool_t Owned=kFALSE, Double_t lrange=0., Double_t rrange=0.)
Create TGo4FitDataHistogram object and adds its to fitter.
void Print(Option_t *option="") const override
Print containment of fitter.
TGo4FitModelGauss1 * AddGauss1(const char *DataName, const char *ModelName, Double_t iPosition, Double_t iWidth, Double_t iAmpl=1., Int_t Axis=0)
Add 1-dim gaussian model to fitter.
void AddPolynomX(const char *DataName, const char *NamePrefix, Int_t MaxOrder=1, Int_t GroupIndex=0, Double_t lrange=0., Double_t rrange=0.)
Construct 1-dim polynom for specified data object for x scale.
void Draw(Option_t *option) override
Draw fitter on current canvas.
TGo4FitModel * AddModel(TGo4FitModel *m)
Add model component to fitter.