{ //=========Macro generated from canvas: c1/c1 //========= (Fri Jul 29 10:17:36 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,86358.74,98.64427,1671440); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TGraph *graph = new TGraph(8); graph->SetName("Graph"); graph->SetTitle("Luminosity #8 Rate vs Current"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(22); graph->SetPoint(0,10.25073,350539); graph->SetPoint(1,20.46799,499555); graph->SetPoint(2,30.83199,651581); graph->SetPoint(3,41.00092,800573); graph->SetPoint(4,51.23747,951500); graph->SetPoint(5,61.42084,1102480); graph->SetPoint(6,71.2164,1252640); graph->SetPoint(7,80.96556,1407260); TH1F *Graph1 = new TH1F("Graph1","Luminosity #8 Rate vs Current",100,3.179248,88.03705); Graph1->SetMinimum(244866.9); Graph1->SetMaximum(1512932); Graph1->SetDirectory(0); Graph1->SetStats(0); Graph1->GetXaxis()->SetTitle("Current (#muA)"); Graph1->GetYaxis()->SetTitle("Luminosity Scaler Rate (Hz)"); graph->SetHistogram(Graph1); TF1 *pol1 = new TF1("pol1","pol1",3.179248,88.03705); pol1->SetFillColor(19); pol1->SetFillStyle(0); pol1->SetLineWidth(3); pol1->SetChisquare(1.570453e+08); pol1->SetNDF(6); pol1->SetParameter(0,193376.8); pol1->SetParError(0,4010.458); pol1->SetParLimits(0,0,0); pol1->SetParameter(1,14886.32); pol1->SetParError(1,77.94152); pol1->SetParLimits(1,0,0); graph->GetListOfFunctions()->Add(pol1); TPaveStats *ptstats = new TPaveStats(0.62,0.835,0.98,0.995,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(2); ptstats->SetFillColor(19); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("#chi^{2} / ndf = 1.57e+08 / 6"); text = ptstats->AddText("p0 = 1.934e+05 #pm 4010 "); text = ptstats->AddText("p1 = 1.489e+04 #pm 77.94 "); 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 #8 Rate vs Current"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }