25#include "TApplication.h"
26#include "TCollection.h"
38int main(
int argc,
char **argv)
40 TApplication theApp(
"Application",
nullptr,
nullptr);
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);
110 config->
SetParDepend(
"Gauss1_2.Width",
"Gauss1_1.Width");
112 config->
SetParDepend(
"Gauss2_2.Width",
"Gauss2_1.Width");
128 TFile *f = TFile::Open(
"Example6.root",
"recreate");
129 if (f) fitter->Write(
"Fitter");
136 TFile *f = TFile::Open(
"Example6.root");
137 if (!f)
return nullptr;
139 f->GetObject(
"Fitter", fitter);
172 fitter->
Draw(
"#data1,Gauss1_1,Gauss2_1");
173 fitter->
Draw(
"#data2,Gauss1_2,Gauss2_2,Gauss3_2,Gauss4_2");
int main(int argc, char **argv)
TGo4Fitter * RestoreFitter()
TGo4FitAxisTrans * ConstructTrans()
TH1D * GetHistogram(const char *HistogramName)
TGo4Fitter * BuildFitter()
void StoreFitter(TGo4Fitter *fitter)
Base class for axis transformation objects.
void SetRange(Int_t naxis, Double_t min, Double_t max)
Includes axis range in consideration.
Data objects, which provides access to generic TH1 ROOT histogram.
void SetUseBinScale(Bool_t iUseBinScale)
If kTRUE, binary numbers will be used as scale values.
void AddAxisTrans(TGo4FitAxisTrans *Trans, Bool_t TransOwned=kFALSE)
Add transformation object to data.
The linear transformation of selected data axis.
void SetCoefByRange(Int_t nbins, Double_t y1, Double_t y2)
One dimensional gaussian peak.
Model objects, which reproduce component of polynomial function.
void PrintPars() const
Print only value and error of all parameters in list.
TGo4FitSlot * SetObject(TObject *obj, Bool_t iOwned=kFALSE)
Set object to first suitable slot with defined ownership flag.
void DoActions(Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr)
Executes actions list.
void AddAction(TGo4FitterAction *Action)
Add action to action list.
Fitter configuration action.
void SetParInit(const char *FullName, Double_t iValue)
Set initial value for parameter.
void SetParDepend(const char *FullName, const char *iExpression)
Set dependency expression for parameter.
Central class of Go4Fit package.
TGo4FitData * AddData(TGo4FitData *d)
Add data object to fitter.
void SetMemoryUsage(Int_t iMemoryUsage)
Set value of memory usage.
void Draw(Option_t *option) override
Draw fitter on current canvas.
void AddStandardActions()
Add list of standard actions to fitter.
TGo4FitModel * AddModel(TGo4FitModel *m)
Add model component to fitter.
TGo4FitData * FindData(const char *DataName)
Return data object with given name.