{ //=========Macro generated from canvas: c1/c1 //========= (Tue Jul 10 17:27:09 2012) by ROOT version5.34/00 TCanvas *c1 = new TCanvas("c1", "c1",10,32,700,500); gStyle->SetOptTitle(0); c1->Range(-56.21621,0.2613828,295.1351,0.3391656); 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 xAxis1[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, xAxis1); energyGraphBarrel->SetBinContent(5,0.300656); energyGraphBarrel->SetBinContent(6,0.299348); energyGraphBarrel->SetBinContent(7,0.2937401); energyGraphBarrel->SetBinContent(8,0.2989364); energyGraphBarrel->SetBinContent(9,0.3089998); energyGraphBarrel->SetBinContent(10,0.3079519); energyGraphBarrel->SetBinContent(11,0.304541); energyGraphBarrel->SetBinContent(12,0.3010921); energyGraphBarrel->SetBinContent(13,0.298966); energyGraphBarrel->SetBinContent(14,0.2919886); energyGraphBarrel->SetBinContent(15,0.2909382); energyGraphBarrel->SetBinContent(16,0.2925448); energyGraphBarrel->SetBinContent(17,0.2928447); energyGraphBarrel->SetBinContent(18,0.2921228); energyGraphBarrel->SetBinContent(19,0.2886629); energyGraphBarrel->SetBinContent(20,0.2878246); energyGraphBarrel->SetBinContent(21,0.2917176); energyGraphBarrel->SetBinContent(22,0.2887351); energyGraphBarrel->SetBinError(5,0.003004847); energyGraphBarrel->SetBinError(6,0.0009358748); energyGraphBarrel->SetBinError(7,0.001249406); energyGraphBarrel->SetBinError(8,0.001247175); energyGraphBarrel->SetBinError(9,0.000983253); energyGraphBarrel->SetBinError(10,0.001080984); energyGraphBarrel->SetBinError(11,0.001252563); energyGraphBarrel->SetBinError(12,0.001459784); energyGraphBarrel->SetBinError(13,0.001600222); energyGraphBarrel->SetBinError(14,0.001893417); energyGraphBarrel->SetBinError(15,0.002197098); energyGraphBarrel->SetBinError(16,0.002426726); energyGraphBarrel->SetBinError(17,0.00167002); energyGraphBarrel->SetBinError(18,0.002715209); energyGraphBarrel->SetBinError(19,0.004367602); energyGraphBarrel->SetBinError(20,0.006239798); energyGraphBarrel->SetBinError(21,0.007239399); energyGraphBarrel->SetBinError(22,0.0275224); energyGraphBarrel->SetMinimum(0.2738281); energyGraphBarrel->SetMaximum(0.3352764); energyGraphBarrel->SetEntries(18); energyGraphBarrel->SetDirectory(0); TPaveStats *ptstats = new TPaveStats(0.6537356,0.7266949,0.8692529,0.9004237,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetFillStyle(1); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("Entries = 18 "); text = ptstats->AddText("Mean = 82.52"); text = ptstats->AddText("RMS = 56.24"); text = ptstats->AddText("p0 = 3.665 #pm 0.194 "); text = ptstats->AddText("p1 = 0.2927 #pm 0.0010 "); ptstats->SetOptStat(1110); 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.7772); 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.665379); PrevFitTMP->SetParError(0,0.1944807); PrevFitTMP->SetParLimits(0,0,0); PrevFitTMP->SetParameter(1,0.2927377); PrevFitTMP->SetParError(1,0.001044491); 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); }