19 #include "TApplication.h" 26 int main(
int argc,
char **argv)
28 TApplication theApp(
"Application",
nullptr,
nullptr);
42 TGraph *gr =
new TGraph(40);
43 for (Int_t i = 0; i < 40; i++) {
44 Double_t x = (i + 1.) / 40.;
45 Double_t y = 5 - 0.5 * x + x * x;
46 if ((x > 0.3) && (x < 0.7))
47 y += 10. * (1. - 25. * (x - .5) * (x - .5));
48 gr->SetPoint(i, x, y);
65 fitter.
AddPolynomX(
"data1",
"LinePol", 2, 123, 0.3, 0.7);
74 fitter.
Draw(
"#data1-, Background, Group123");
TGo4FitDataGraph * AddGraph(const char *DataName, TGraph *gr, Bool_t Owned=kFALSE, Double_t lrange=0., Double_t rrange=0.)
int main(int argc, char **argv)
void AddPolynomX(const char *DataName, const char *NamePrefix, Int_t MaxOrder=1, Int_t GroupIndex=0, Double_t lrange=0., Double_t rrange=0.)
void DoActions(Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr)
void Draw(Option_t *option) override
void Print(Option_t *option="") const override