source: trunk/MagicSoft/GC-Proposal/cangaroo_fit.C@ 9360

Last change on this file since 9360 was 6672, checked in by hbartko, 20 years ago
*** empty log message ***
File size: 685 bytes
Line 
1void cangaroo_fit(void)
2{
3 float x[6] ={0.258.,0.299., 0.367., 0.540., 0.962., 2.454.};
4 float ex[6]={0.064., 0.066., 0.080., 0.102., 0.356., 0.653.};
5 float y[6] = {0.14e-8, 0.82e-9, 0.2e-9, 0.54e-10, 0.3e-11, 0.73e-13};
6 float ey[6]= {0.06e-8, 0.22e-9, 0.08e-9, 0.19e-10, 0.28e-11, 1.19e-13};
7
8
9 TGraphErrors * gr = new TGraphErrors(6,x,y,ex,ey);
10 gr->SetMinimum(1e-15);
11
12 TF1 * f =new TF1("f","[0]*pow(x,[1])",0.200,3.000);
13 f->SetParameter(0,1e-11);
14 f->SetParameter(1,-4.);
15
16 // f->SetParameter(1,-4.4);
17
18 TCanvas * cc = new TCanvas("cc","cc",600,400);
19 cc->SetGridx();
20 cc->SetGridy();
21 cc->SetLogx();
22 cc->SetLogy();
23
24
25 gr->Draw("AP");
26 gr->Fit(f,"RLM","");
27
28}
Note: See TracBrowser for help on using the repository browser.