{ //=========Macro generated from canvas: c1/c1 //========= (Fri Jul 29 09:38:43 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,89053.64,98.7014,1639292); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TGraph *graph = new TGraph(8); graph->SetName("Graph"); graph->SetTitle("Luminosity #7 Rate vs Current"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(22); graph->SetPoint(0,10.25073,349890); graph->SetPoint(1,20.46799,495281); graph->SetPoint(2,30.83199,643824); graph->SetPoint(3,41.00092,789800); graph->SetPoint(4,51.23747,936421); graph->SetPoint(5,61.42084,1083480); graph->SetPoint(6,71.2164,1230210); graph->SetPoint(7,80.96556,1381740); TH1F *Graph10 = new TH1F("Graph10","Luminosity #7 Rate vs Current",100,3.179248,88.03705); Graph10->SetMinimum(246705); Graph10->SetMaximum(1484925); Graph10->SetDirectory(0); Graph10->SetStats(0); Graph10->GetXaxis()->SetTitle("Current (#muA)"); Graph10->GetYaxis()->SetTitle("Luminosity Scaler Rate (Hz)"); graph->SetHistogram(Graph10); TF1 *pol1 = new TF1("pol1","pol1",3.179248,88.03705); pol1->SetFillColor(19); pol1->SetFillStyle(0); pol1->SetLineWidth(3); pol1->SetChisquare(1.574785e+08); pol1->SetNDF(6); pol1->SetParameter(0,196542.8); pol1->SetParError(0,4015.986); pol1->SetParLimits(0,0,0); pol1->SetParameter(1,14530.27); pol1->SetParError(1,78.04894); pol1->SetParLimits(1,0,0); graph->GetListOfFunctions()->Add(pol1); TPaveStats *ptstats = new TPaveStats(0.6106322,0.1927966,0.9712644,0.3516949,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(2); ptstats->SetFillColor(19); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("#chi^{2} / ndf = 1.575e+08 / 6"); text = ptstats->AddText("p0 = 1.965e+05 #pm 4016 "); text = ptstats->AddText("p1 = 1.453e+04 #pm 78.05 "); 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 #7 Rate vs Current"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }