24#include "TApplication.h"
31int main(
int argc,
char **argv)
33 TApplication theApp(
"Application",
nullptr,
nullptr);
47 TGraph *gr =
new TGraph(40);
48 for (Int_t i = 0; i < 40; i++) {
49 Double_t x = (i + 1.) / 40.;
50 Double_t y = 5 - 0.5 * x + x * x;
51 if ((x > 0.3) && (x < 0.7))
52 y += 10. * (1. - 25. * (x - .5) * (x - .5));
53 gr->SetPoint(i, x, y);
70 fitter.
AddPolynomX(
"data1",
"LinePol", 2, 123, 0.3, 0.7);
79 fitter.
Draw(
"#data1-, Background, Group123");
int main(int argc, char **argv)
void DoActions(Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr)
Executes actions list.
Central class of Go4Fit package.
void Print(Option_t *option="") const override
Print containment of 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.
TGo4FitDataGraph * AddGraph(const char *DataName, TGraph *gr, Bool_t Owned=kFALSE, Double_t lrange=0., Double_t rrange=0.)
Create TGo4FitDataGraph object and adds its to fitter.