{ //=========Macro generated from canvas: c1/c1 //========= (Fri Jul 29 09:35:54 2011) by ROOT version5.26/00 TCanvas *c1 = new TCanvas("c1", "c1",14,34,700,500); gStyle->SetOptFit(1); c1->SetHighLightColor(2); c1->Range(-7.427978,54373.73,98.64427,2130741); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TGraph *graph = new TGraph(8); graph->SetName("Graph"); graph->SetTitle("Luminosity #1 Rate vs Current"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(22); graph->SetPoint(0,10.25073,400435); graph->SetPoint(1,20.46799,593712); graph->SetPoint(2,30.83199,790919); graph->SetPoint(3,41.00092,984200); graph->SetPoint(4,51.23747,1183210); graph->SetPoint(5,61.42084,1382080); graph->SetPoint(6,71.2164,1580550); graph->SetPoint(7,80.96556,1784680); TH1F *Graph15 = new TH1F("Graph15","Luminosity #1 Rate vs Current",100,3.179248,88.03705); Graph15->SetMinimum(262010.5); Graph15->SetMaximum(1923104); Graph15->SetDirectory(0); Graph15->SetStats(0); Graph15->GetXaxis()->SetTitle("Current (#muA)"); Graph15->GetYaxis()->SetTitle("Luminosity Scaler Rate (Hz)"); graph->SetHistogram(Graph15); TF1 *pol1 = new TF1("pol1","pol1",3.179248,88.03705); pol1->SetFillColor(19); pol1->SetFillStyle(0); pol1->SetLineWidth(3); pol1->SetChisquare(4.512601e+08); pol1->SetNDF(6); pol1->SetParameter(0,191732.3); pol1->SetParError(0,6798.217); pol1->SetParLimits(0,0,0); pol1->SetParameter(1,19504.86); pol1->SetParError(1,132.1204); pol1->SetParLimits(1,0,0); graph->GetListOfFunctions()->Add(pol1); TPaveStats *ptstats = new TPaveStats(0.5818966,0.1822034,0.9425287,0.3411017,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(2); ptstats->SetFillColor(19); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("#chi^{2} / ndf = 4.513e+08 / 6"); text = ptstats->AddText("p0 = 1.917e+05 #pm 6798 "); text = ptstats->AddText("p1 = 1.95e+04 #pm 132.1 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); graph->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(graph->GetListOfFunctions()); graph->Draw("ap"); TPaveText *pt = new TPaveText(0.01,0.9390678,0.4868966,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(2); pt->SetFillColor(19); text = pt->AddText("Luminosity #1 Rate vs Current"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }