//рис.1d нижний левый 4EvalPar(x,par); } else if (x[0] < 95) { return fun2->EvalPar(x,&par[3]); } else { return fun3->EvalPar(x,&par[6]); } } Double_t myFunc(Double_t *x, Double_t *par) { Double_t xx = x[0]; Double_t f = exp(-xx*par[0]); return f; } const Int_t n = 200; Double_t y[n] = { 500.0, 965.0, 2407.0, 3888.0, 5395.0, 6815.0, 7247.0, 5544.0, 3907.0, 2928.0, 3130.0, 4063.0, 4652.0, 4602.0, 4062.0, 3531.0, 2958.0, 2601.0, 2429.0, 2416.0, 2079.0, 1937.0, 1772.0, 1626.0, 1540.0, 1495.0, 1325.0, 1220.0, 1172.0, 1001.0, 953.0, 951.0, 840.0, 762.0, 756.0, 668.0, 656.0, 575.0, 533.0, 500.0, 433.0, 430.0, 405.0, 329.0, 293.0, 262.0, 239.0, 200.0, 178.0, 137.0, 133.0, 116.0, 98.0, 63.0, 66.0, 48.0, 44.0, 31.0, 17.0, 18.0, 15.0, 12.0, 3.0, 13.0, 5.0, 5.0, 1.0, 0.0, 2.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, }; Double_t ey[n] = { 0 }; Double_t x[n] = { 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, 384, 390, 396, 402, 408, 414, 420, 426, 432, 438, 444, 450, 456, 462, 468, 474, 480, 486, 492, 498, 504, 510, 516, 522, 528, 534, 540, 546, 552, 558, 564, 570, 576, 582, 588, 594, }; for(int i = 0 ; i < n ; i++){ y[i] = y[i]/7247.0 ; }; TCanvas *c1 = new TCanvas(); c1->SetBorderMode(0); c1->SetBorderSize(0); c1->SetFillColor(10); c1->SetGrid(); c1->GetFrame()->SetBorderSize(10); TGraphErrors *histo = new TGraphErrors(n,x,y,0,0); histo->SetMarkerStyle(23); histo->SetMarkerSize(1.0); histo->GetXaxis()->SetRangeUser(0,600); histo->SetTitle(""); histo->GetYaxis()->SetTitle(""); histo->GetXaxis()->SetTitle(""); histo->GetYaxis()->SetTitleOffset(1.5); histo->GetXaxis()->SetTitleOffset(0.55); histo->GetYaxis()->SetTitleSize(0.03); histo->GetYaxis()->SetLabelSize(0.03); histo->GetXaxis()->SetLabelSize(0.03); histo->Draw("AP"); Double_t par[7]; TF1 *fun1 = new TF1("fun1","gaus",0,57); TF1 *fun2 = new TF1("fun2","gaus",57,95); TF1 *fun3 = new TF1("fun3",myFunc,95,400,1); TF1 *total = new TF1("total",funtot,0,400,7); total->SetLineColor(623); histo->Fit(fun1,"R"); histo->Fit(fun2,"R+"); histo->Fit(fun3,"R+"); fun1->GetParameters(&par[0]); fun2->GetParameters(&par[3]); fun3->GetParameters(&par[6]); total->SetParameters(par); histo->Fit(total,"R+"); }