23 #include "TApplication.h" 34 int main(
int argc,
char **argv)
36 TApplication theApp(
"Application",
nullptr,
nullptr);
50 TFile *f = TFile::Open(
"histograms.root");
51 if (!f)
return nullptr;
52 TH1D *histo =
nullptr;
53 f->GetObject(HistogramName, histo);
54 if (histo) histo->SetDirectory(
nullptr);
68 fitter.
AddH1(
"data2", histo2, kTRUE, 2200., 2900.);
77 fitter.
AddGauss1(
"data2",
"Gauss3", 2597., 14.);
78 fitter.
AddGauss1(
"data2",
"Gauss4", 2717., 14.);
84 fitter.
Draw(
"#data2,Model1,Gauss3,Gauss4");
void AddPolynomX(const char *DataName, const char *NamePrefix, Int_t MaxOrder=1, Int_t GroupIndex=0, Double_t lrange=0., Double_t rrange=0.)
int main(int argc, char **argv)
TGo4FitModelGauss1 * AddGauss1(const char *DataName, const char *ModelName, Double_t iPosition, Double_t iWidth, Double_t iAmpl=1., Int_t Axis=0)
TGo4FitModel * AddModel(TGo4FitModel *m)
TH1D * GetHistogram(const char *HistogramName)
void DoActions(Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr)
void Draw(Option_t *option) override
TGo4FitDataHistogram * AddH1(const char *DataName, TH1 *histo, Bool_t Owned=kFALSE, Double_t lrange=0., Double_t rrange=0.)
void Print(Option_t *option="") const override