{ //=========Macro generated from canvas: c1/c1 //========= (Fri Jul 29 09:37:20 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.33276,117788.9,98.7014,1301090); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TGraph *graph = new TGraph(8); graph->SetName("Graph"); graph->SetTitle("Luminosity #5 Rate vs Current"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(22); graph->SetPoint(0,10.25073,316886); graph->SetPoint(1,20.46799,428161); graph->SetPoint(2,30.83199,541459); graph->SetPoint(3,41.00092,652967); graph->SetPoint(4,51.23747,764882); graph->SetPoint(5,61.42084,876775); graph->SetPoint(6,71.2164,988455); graph->SetPoint(7,80.96556,1104500); TH1F *Graph48 = new TH1F("Graph48","Luminosity #5 Rate vs Current",100,3.179248,88.03705); Graph48->SetMinimum(238124.6); Graph48->SetMaximum(1183261); Graph48->SetDirectory(0); Graph48->SetStats(0); Graph48->GetXaxis()->SetTitle("Current (#muA)"); Graph48->GetYaxis()->SetTitle("Luminosity Scaler Rate (Hz)"); graph->SetHistogram(Graph48); TF1 *pol1 = new TF1("pol1","pol1",3.179248,88.03705); pol1->SetFillColor(19); pol1->SetFillStyle(0); pol1->SetLineWidth(3); pol1->SetChisquare(9.039541e+07); pol1->SetNDF(6); pol1->SetParameter(0,200144.8); pol1->SetParError(0,3042.669); pol1->SetParLimits(0,0,0); pol1->SetParameter(1,11086.05); pol1->SetParError(1,59.13295); pol1->SetParLimits(1,0,0); graph->GetListOfFunctions()->Add(pol1); TPaveStats *ptstats = new TPaveStats(0.6149425,0.2033898,0.9755747,0.3622881,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(2); ptstats->SetFillColor(19); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("#chi^{2} / ndf = 9.04e+07 / 6"); text = ptstats->AddText("p0 = 2.001e+05 #pm 3043 "); text = ptstats->AddText("p1 = 1.109e+04 #pm 59.13 "); 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 #5 Rate vs Current"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }