{ //=========Macro generated from canvas: c1/c1 //========= (Wed Jul 18 11:45:47 2012) by ROOT version5.34/00 TCanvas *c1 = new TCanvas("c1", "c1",10,32,700,500); gStyle->SetOptTitle(0); c1->Range(-56.21621,0.2435379,295.1351,0.3382299); 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 xAxis22[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, xAxis22); energyGraphBarrel->SetBinContent(5,0.300656); energyGraphBarrel->SetBinContent(6,0.2993463); energyGraphBarrel->SetBinContent(7,0.2937396); energyGraphBarrel->SetBinContent(8,0.2989373); energyGraphBarrel->SetBinContent(9,0.3089999); energyGraphBarrel->SetBinContent(10,0.3079497); energyGraphBarrel->SetBinContent(11,0.3045344); energyGraphBarrel->SetBinContent(12,0.3010921); energyGraphBarrel->SetBinContent(13,0.298966); energyGraphBarrel->SetBinContent(14,0.2919859); energyGraphBarrel->SetBinContent(15,0.2909422); energyGraphBarrel->SetBinContent(16,0.2925387); energyGraphBarrel->SetBinContent(17,0.2928485); energyGraphBarrel->SetBinContent(18,0.2921176); energyGraphBarrel->SetBinContent(19,0.2886434); energyGraphBarrel->SetBinContent(20,0.2878212); energyGraphBarrel->SetBinContent(21,0.2916957); energyGraphBarrel->SetBinContent(22,0.2887351); energyGraphBarrel->SetBinError(5,0.003004847); energyGraphBarrel->SetBinError(6,0.0009358887); energyGraphBarrel->SetBinError(7,0.001249423); energyGraphBarrel->SetBinError(8,0.001247172); energyGraphBarrel->SetBinError(9,0.0009832513); energyGraphBarrel->SetBinError(10,0.001081); energyGraphBarrel->SetBinError(11,0.001252544); energyGraphBarrel->SetBinError(12,0.001459784); energyGraphBarrel->SetBinError(13,0.001600219); energyGraphBarrel->SetBinError(14,0.001893473); energyGraphBarrel->SetBinError(15,0.00219702); energyGraphBarrel->SetBinError(16,0.002426704); energyGraphBarrel->SetBinError(17,0.001669932); energyGraphBarrel->SetBinError(18,0.002715113); energyGraphBarrel->SetBinError(19,0.004367007); energyGraphBarrel->SetBinError(20,0.006242708); energyGraphBarrel->SetBinError(21,0.007240521); energyGraphBarrel->SetBinError(22,0.0275224); energyGraphBarrel->SetMinimum(0.2586886); energyGraphBarrel->SetMaximum(0.3334953); energyGraphBarrel->SetEntries(18); energyGraphBarrel->SetDirectory(0); TPaveStats *ptstats = new TPaveStats(0.5632184,0.7415254,0.7744253,0.8961864,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetFillStyle(1); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("energyGraphBarrel"); text->SetTextSize(0.02371469); text = ptstats->AddText("Entries = 18 "); text = ptstats->AddText("Mean = 82.52"); text = ptstats->AddText("RMS = 56.24"); text = ptstats->AddText("p0 = 3.666 #pm 0.194 "); text = ptstats->AddText("p1 = 0.2927 #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]))",35,260); PrevFitTMP->SetFillColor(19); PrevFitTMP->SetFillStyle(0); PrevFitTMP->SetMarkerStyle(20); PrevFitTMP->SetMarkerSize(1.2); PrevFitTMP->SetLineColor(2); PrevFitTMP->SetLineWidth(3); PrevFitTMP->SetChisquare(133.7331); PrevFitTMP->SetNDF(13); 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,3.665738); PrevFitTMP->SetParError(0,0.1944596); PrevFitTMP->SetParLimits(0,0,0); PrevFitTMP->SetParameter(1,0.2927345); PrevFitTMP->SetParError(1,0.001044486); 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); }