{ //=========Macro generated from canvas: c1/c1 //========= (Wed Jul 18 11:47:29 2012) by ROOT version5.34/00 TCanvas *c1 = new TCanvas("c1", "c1",10,32,700,500); gStyle->SetOptTitle(0); c1->Range(-56.21621,0.2216646,295.1351,0.3809452); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetTickx(1); c1->SetTicky(1); c1->SetLeftMargin(0.16); c1->SetTopMargin(0.05); c1->SetBottomMargin(0.16); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); Double_t xAxis23[23] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 100, 120, 140, 160, 210, 260}; TH1D *energyGraphEmec = new TH1D("energyGraphEmec","MEDIUM gain, All EMEC",22, xAxis23); energyGraphEmec->SetBinContent(6,0.3178237); energyGraphEmec->SetBinContent(7,0.331001); energyGraphEmec->SetBinContent(8,0.3541691); energyGraphEmec->SetBinContent(9,0.3414085); energyGraphEmec->SetBinContent(10,0.3272723); energyGraphEmec->SetBinContent(11,0.316121); energyGraphEmec->SetBinContent(12,0.3075812); energyGraphEmec->SetBinContent(13,0.3060707); energyGraphEmec->SetBinContent(14,0.3022433); energyGraphEmec->SetBinContent(15,0.3036739); energyGraphEmec->SetBinContent(16,0.3010513); energyGraphEmec->SetBinContent(17,0.2993102); energyGraphEmec->SetBinContent(18,0.3018378); energyGraphEmec->SetBinContent(19,0.3029104); energyGraphEmec->SetBinContent(20,0.3059575); energyGraphEmec->SetBinContent(21,0.3015943); energyGraphEmec->SetBinContent(22,0.2860706); energyGraphEmec->SetBinContent(23,0.2987317); energyGraphEmec->SetBinError(6,0.00359468); energyGraphEmec->SetBinError(7,0.0005257888); energyGraphEmec->SetBinError(8,0.0004804566); energyGraphEmec->SetBinError(9,0.0004790521); energyGraphEmec->SetBinError(10,0.0005029885); energyGraphEmec->SetBinError(11,0.0005361067); energyGraphEmec->SetBinError(12,0.0006046654); energyGraphEmec->SetBinError(13,0.0006935316); energyGraphEmec->SetBinError(14,0.0008042074); energyGraphEmec->SetBinError(15,0.0009730856); energyGraphEmec->SetBinError(16,0.001089959); energyGraphEmec->SetBinError(17,0.0007425239); energyGraphEmec->SetBinError(18,0.001150683); energyGraphEmec->SetBinError(19,0.001643549); energyGraphEmec->SetBinError(20,0.002291876); energyGraphEmec->SetBinError(21,0.002191371); energyGraphEmec->SetBinError(22,0.003997066); energyGraphEmec->SetBinError(23,0.01054157); energyGraphEmec->SetMinimum(0.2471495); energyGraphEmec->SetMaximum(0.3729812); energyGraphEmec->SetEntries(18); energyGraphEmec->SetDirectory(0); TPaveStats *ptstats = new TPaveStats(0.6293103,0.7351695,0.8505747,0.8961864,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetFillStyle(1); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("energyGraphEmec"); text->SetTextSize(0.02468927); text = ptstats->AddText("Entries = 18 "); text = ptstats->AddText("Mean = 84.89"); text = ptstats->AddText("RMS = 55.38"); text = ptstats->AddText("p0 = 6.107 #pm 0.038 "); text = ptstats->AddText("p1 = 0.2962 #pm 0.0004 "); ptstats->SetOptStat(1111); ptstats->SetOptFit(11); ptstats->Draw(); energyGraphEmec->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(energyGraphEmec); TF1 *PrevFitTMP = new TF1("PrevFitTMP","sqrt(sq([0]/x)+sq([1]))",0,260); PrevFitTMP->SetFillColor(19); PrevFitTMP->SetFillStyle(0); PrevFitTMP->SetMarkerStyle(20); PrevFitTMP->SetMarkerSize(1.2); PrevFitTMP->SetLineColor(2); PrevFitTMP->SetLineWidth(3); PrevFitTMP->SetChisquare(3895.355); PrevFitTMP->SetNDF(15); PrevFitTMP->GetXaxis()->SetLabelFont(42); PrevFitTMP->GetXaxis()->SetLabelSize(0.05); PrevFitTMP->GetXaxis()->SetTitleSize(0.05); PrevFitTMP->GetXaxis()->SetTitleFont(42); PrevFitTMP->GetYaxis()->SetLabelFont(42); PrevFitTMP->GetYaxis()->SetLabelSize(0.05); PrevFitTMP->GetYaxis()->SetTitleSize(0.05); PrevFitTMP->GetYaxis()->SetTitleFont(42); PrevFitTMP->SetParameter(0,6.106972); PrevFitTMP->SetParError(0,0.03761217); PrevFitTMP->SetParLimits(0,0,0); PrevFitTMP->SetParameter(1,0.2961888); PrevFitTMP->SetParError(1,0.0003891571); PrevFitTMP->SetParLimits(1,0,0); energyGraphEmec->GetListOfFunctions()->Add(PrevFitTMP); energyGraphEmec->SetLineWidth(2); energyGraphEmec->SetMarkerStyle(20); energyGraphEmec->SetMarkerSize(1.2); energyGraphEmec->GetXaxis()->SetTitle("Cell Energy [GeV]"); energyGraphEmec->GetXaxis()->SetLabelFont(42); energyGraphEmec->GetXaxis()->SetLabelSize(0.05); energyGraphEmec->GetXaxis()->SetTitleSize(0.05); energyGraphEmec->GetXaxis()->SetTitleFont(42); energyGraphEmec->GetYaxis()->SetTitle("Timing Resolution [ns]"); energyGraphEmec->GetYaxis()->SetLabelFont(42); energyGraphEmec->GetYaxis()->SetLabelSize(0.05); energyGraphEmec->GetYaxis()->SetTitleSize(0.05); energyGraphEmec->GetYaxis()->SetTitleFont(42); energyGraphEmec->GetZaxis()->SetLabelFont(42); energyGraphEmec->GetZaxis()->SetLabelSize(0.05); energyGraphEmec->GetZaxis()->SetTitleSize(0.05); energyGraphEmec->GetZaxis()->SetTitleFont(42); energyGraphEmec->Draw(""); c1->Modified(); c1->cd(); c1->SetSelected(c1); }