{ //=========Macro generated from canvas: c1/c1 //========= (Wed Jul 18 11:40:57 2012) by ROOT version5.34/00 TCanvas *c1 = new TCanvas("c1", "c1",10,32,700,500); gStyle->SetOptTitle(0); c1->Range(-12.97297,-0.1776305,68.10811,0.93256); 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 xAxis20[57] = {0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60}; TH1D *energyGraphBarrel = new TH1D("energyGraphBarrel","HIGH gain, All EMB",56, xAxis20); energyGraphBarrel->SetBinContent(2,0.4649865); energyGraphBarrel->SetBinContent(3,0.4295463); energyGraphBarrel->SetBinContent(4,0.4055307); energyGraphBarrel->SetBinContent(5,0.3886716); energyGraphBarrel->SetBinContent(6,0.3741878); energyGraphBarrel->SetBinContent(7,0.3648702); energyGraphBarrel->SetBinContent(8,0.3567421); energyGraphBarrel->SetBinContent(9,0.3496975); energyGraphBarrel->SetBinContent(10,0.3446451); energyGraphBarrel->SetBinContent(11,0.3400571); energyGraphBarrel->SetBinContent(12,0.3359083); energyGraphBarrel->SetBinContent(13,0.3321566); energyGraphBarrel->SetBinContent(14,0.3295896); energyGraphBarrel->SetBinContent(15,0.3274318); energyGraphBarrel->SetBinContent(16,0.3245533); energyGraphBarrel->SetBinContent(17,0.3228619); energyGraphBarrel->SetBinContent(18,0.3221317); energyGraphBarrel->SetBinContent(19,0.3208214); energyGraphBarrel->SetBinContent(20,0.320845); energyGraphBarrel->SetBinContent(21,0.319742); energyGraphBarrel->SetBinContent(22,0.3191325); energyGraphBarrel->SetBinContent(23,0.3202465); energyGraphBarrel->SetBinContent(24,0.3178498); energyGraphBarrel->SetBinContent(25,0.3189488); energyGraphBarrel->SetBinContent(26,0.3191489); energyGraphBarrel->SetBinContent(27,0.3159525); energyGraphBarrel->SetBinContent(28,0.3186797); energyGraphBarrel->SetBinContent(29,0.3153187); energyGraphBarrel->SetBinContent(30,0.3160669); energyGraphBarrel->SetBinContent(31,0.3203314); energyGraphBarrel->SetBinContent(32,0.3158877); energyGraphBarrel->SetBinContent(33,0.3179693); energyGraphBarrel->SetBinContent(34,0.31843); energyGraphBarrel->SetBinContent(35,0.3193767); energyGraphBarrel->SetBinContent(36,0.3271984); energyGraphBarrel->SetBinContent(37,0.3220997); energyGraphBarrel->SetBinContent(38,0.3310528); energyGraphBarrel->SetBinContent(39,0.329886); energyGraphBarrel->SetBinContent(40,0.3375149); energyGraphBarrel->SetBinContent(41,0.3211523); energyGraphBarrel->SetBinContent(42,0.3383997); energyGraphBarrel->SetBinContent(43,0.3327704); energyGraphBarrel->SetBinError(2,0.0004126499); energyGraphBarrel->SetBinError(3,0.0003272681); energyGraphBarrel->SetBinError(4,0.0002824759); energyGraphBarrel->SetBinError(5,0.0002569903); energyGraphBarrel->SetBinError(6,0.0002451368); energyGraphBarrel->SetBinError(7,0.0002406809); energyGraphBarrel->SetBinError(8,0.0002438128); energyGraphBarrel->SetBinError(9,0.0002496388); energyGraphBarrel->SetBinError(10,0.0002598024); energyGraphBarrel->SetBinError(11,0.0002780744); energyGraphBarrel->SetBinError(12,0.0002953974); energyGraphBarrel->SetBinError(13,0.0003202973); energyGraphBarrel->SetBinError(14,0.0003470421); energyGraphBarrel->SetBinError(15,0.0003751467); energyGraphBarrel->SetBinError(16,0.0004129545); energyGraphBarrel->SetBinError(17,0.000449629); energyGraphBarrel->SetBinError(18,0.0004952657); energyGraphBarrel->SetBinError(19,0.0005369126); energyGraphBarrel->SetBinError(20,0.0006007062); energyGraphBarrel->SetBinError(21,0.0006699938); energyGraphBarrel->SetBinError(22,0.0007761917); energyGraphBarrel->SetBinError(23,0.0009087654); energyGraphBarrel->SetBinError(24,0.001007988); energyGraphBarrel->SetBinError(25,0.001099558); energyGraphBarrel->SetBinError(26,0.001204919); energyGraphBarrel->SetBinError(27,0.00126653); energyGraphBarrel->SetBinError(28,0.001385538); energyGraphBarrel->SetBinError(29,0.00145021); energyGraphBarrel->SetBinError(30,0.00153809); energyGraphBarrel->SetBinError(31,0.001705646); energyGraphBarrel->SetBinError(32,0.001787257); energyGraphBarrel->SetBinError(33,0.001849104); energyGraphBarrel->SetBinError(34,0.002019915); energyGraphBarrel->SetBinError(35,0.002079569); energyGraphBarrel->SetBinError(36,0.002314917); energyGraphBarrel->SetBinError(37,0.002743067); energyGraphBarrel->SetBinError(38,0.003495647); energyGraphBarrel->SetBinError(39,0.005160136); energyGraphBarrel->SetBinError(40,0.008733621); energyGraphBarrel->SetBinError(41,0.01245725); energyGraphBarrel->SetBinError(42,0.02067066); energyGraphBarrel->SetBinError(43,0.03885067); energyGraphBarrel->SetEntries(42); energyGraphBarrel->SetDirectory(0); TPaveStats *ptstats = new TPaveStats(0.6408046,0.7245763,0.8692529,0.904661,"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 = 42 "); text = ptstats->AddText("Mean = 25.28"); text = ptstats->AddText("RMS = 12.44"); text = ptstats->AddText("p0 = 1.937 #pm 0.002 "); text = ptstats->AddText("p1 = 0.3122 #pm 0.0001 "); 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,60); PrevFitTMP->SetFillColor(19); PrevFitTMP->SetFillStyle(0); PrevFitTMP->SetMarkerStyle(20); PrevFitTMP->SetMarkerSize(1.2); PrevFitTMP->SetLineColor(2); PrevFitTMP->SetLineWidth(3); PrevFitTMP->SetChisquare(879.078); PrevFitTMP->SetNDF(40); 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,1.936846); PrevFitTMP->SetParError(0,0.002096543); PrevFitTMP->SetParLimits(0,0,0); PrevFitTMP->SetParameter(1,0.3122235); PrevFitTMP->SetParError(1,0.0001243099); 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); }