{ //=========Macro generated from canvas: c1/c1 //========= (Wed Jul 18 13:17:31 2012) by ROOT version5.34/00 TCanvas *c1 = new TCanvas("c1", "c1",10,32,700,500); gStyle->SetOptTitle(0); c1->Range(-54.92248,0.232809,295.7752,0.3490568); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetTickx(1); c1->SetTicky(1); c1->SetLeftMargin(0.1566092); c1->SetTopMargin(0.05720339); c1->SetBottomMargin(0.1525424); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); Double_t xAxis52[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 *energyGraphBarrel = new TH1D("energyGraphBarrel","MEDIUM gain, All EMB",22, xAxis52); energyGraphBarrel->SetBinContent(5,0.3120985); energyGraphBarrel->SetBinContent(6,0.311624); energyGraphBarrel->SetBinContent(7,0.3060607); energyGraphBarrel->SetBinContent(8,0.3118594); energyGraphBarrel->SetBinContent(9,0.3175009); energyGraphBarrel->SetBinContent(10,0.3187253); energyGraphBarrel->SetBinContent(11,0.318125); energyGraphBarrel->SetBinContent(12,0.3160578); energyGraphBarrel->SetBinContent(13,0.3024203); energyGraphBarrel->SetBinContent(14,0.301699); energyGraphBarrel->SetBinContent(15,0.2991475); energyGraphBarrel->SetBinContent(16,0.2881515); energyGraphBarrel->SetBinContent(17,0.3221255); energyGraphBarrel->SetBinContent(18,0.3108211); energyGraphBarrel->SetBinError(5,0.005955776); energyGraphBarrel->SetBinError(6,0.001927475); energyGraphBarrel->SetBinError(7,0.003039529); energyGraphBarrel->SetBinError(8,0.003271844); energyGraphBarrel->SetBinError(9,0.002473108); energyGraphBarrel->SetBinError(10,0.002988257); energyGraphBarrel->SetBinError(11,0.004104135); energyGraphBarrel->SetBinError(12,0.004871823); energyGraphBarrel->SetBinError(13,0.005799591); energyGraphBarrel->SetBinError(14,0.006476764); energyGraphBarrel->SetBinError(15,0.008699687); energyGraphBarrel->SetBinError(16,0.01130133); energyGraphBarrel->SetBinError(17,0.007511362); energyGraphBarrel->SetBinError(18,0.011565); energyGraphBarrel->SetMinimum(0.2505417); energyGraphBarrel->SetMaximum(0.342407); energyGraphBarrel->SetEntries(14); energyGraphBarrel->SetDirectory(0); TPaveStats *ptstats = new TPaveStats(0.5905172,0.7224576,0.8232759,0.9025424,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetFillStyle(1); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("energyGraphBarrel"); text->SetTextSize(0.02761299); text = ptstats->AddText("Entries = 14 "); text = ptstats->AddText("Mean = 57.01"); text = ptstats->AddText("RMS = 24.04"); text = ptstats->AddText("p0 = 2.245e-07 #pm 8.367e-01 "); text = ptstats->AddText("p1 = 0.3127 #pm 0.0010 "); ptstats->SetOptStat(1111); ptstats->SetOptFit(11); ptstats->Draw(); energyGraphBarrel->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(energyGraphBarrel); 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(29.98717); PrevFitTMP->SetNDF(12); 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,2.245484e-07); PrevFitTMP->SetParError(0,0.8366669); PrevFitTMP->SetParLimits(0,0,0); PrevFitTMP->SetParameter(1,0.3127342); PrevFitTMP->SetParError(1,0.001012318); PrevFitTMP->SetParLimits(1,0,0); energyGraphBarrel->GetListOfFunctions()->Add(PrevFitTMP); energyGraphBarrel->SetLineWidth(2); energyGraphBarrel->SetMarkerStyle(20); energyGraphBarrel->SetMarkerSize(1.2); energyGraphBarrel->GetXaxis()->SetTitle("Cell Energy [GeV]"); energyGraphBarrel->GetXaxis()->SetLabelFont(42); energyGraphBarrel->GetXaxis()->SetLabelSize(0.05); energyGraphBarrel->GetXaxis()->SetTitleSize(0.05); energyGraphBarrel->GetXaxis()->SetTitleFont(42); energyGraphBarrel->GetYaxis()->SetTitle("Timing Resolution [ns]"); energyGraphBarrel->GetYaxis()->SetLabelFont(42); energyGraphBarrel->GetYaxis()->SetLabelSize(0.05); energyGraphBarrel->GetYaxis()->SetTitleSize(0.05); energyGraphBarrel->GetYaxis()->SetTitleFont(42); energyGraphBarrel->GetZaxis()->SetLabelFont(42); energyGraphBarrel->GetZaxis()->SetLabelSize(0.05); energyGraphBarrel->GetZaxis()->SetTitleSize(0.05); energyGraphBarrel->GetZaxis()->SetTitleFont(42); energyGraphBarrel->Draw(""); c1->Modified(); c1->cd(); c1->SetSelected(c1); }