{ //=========Macro generated from canvas: c1/c1 //========= (Tue May 29 14:30:54 2012) by ROOT version5.32/03 TCanvas *c1 = new TCanvas("c1", "c1",66,52,700,500); gStyle->SetOptTitle(0); c1->Range(-3.243243,-19556.9,17.02703,102673.7); 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); TH1D *entriesPerChannel__3 = new TH1D("entriesPerChannel__3","Entries per channel",1000,0,1000); entriesPerChannel__3->SetBinContent(1,91964); entriesPerChannel__3->SetBinContent(2,6619); entriesPerChannel__3->SetBinContent(3,7657); entriesPerChannel__3->SetBinContent(4,7995); entriesPerChannel__3->SetBinContent(5,6990); entriesPerChannel__3->SetBinContent(6,5123); entriesPerChannel__3->SetBinContent(7,3211); entriesPerChannel__3->SetBinContent(8,1806); entriesPerChannel__3->SetBinContent(9,834); entriesPerChannel__3->SetBinContent(10,432); entriesPerChannel__3->SetBinContent(11,145); entriesPerChannel__3->SetBinContent(12,65); entriesPerChannel__3->SetBinContent(13,16); entriesPerChannel__3->SetBinContent(14,3); entriesPerChannel__3->SetBinContent(15,3); entriesPerChannel__3->SetBinContent(16,1); entriesPerChannel__3->SetEntries(132864); entriesPerChannel__3->SetDirectory(0); TPaveStats *ptstats = new TPaveStats(0.78,0.875,0.98,0.995,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetFillStyle(1); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("Entries = 132864 "); text = ptstats->AddText("Mean = 1.587"); text = ptstats->AddText("RMS = 1.96"); ptstats->SetOptStat(1110); ptstats->SetOptFit(0); ptstats->Draw(); entriesPerChannel__3->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(entriesPerChannel__3); Int_t ci; // for color index setting ci = TColor::GetColor("#0000ff"); entriesPerChannel__3->SetLineColor(ci); entriesPerChannel__3->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); entriesPerChannel__3->SetMarkerColor(ci); entriesPerChannel__3->SetMarkerStyle(20); entriesPerChannel__3->SetMarkerSize(1.2); entriesPerChannel__3->GetXaxis()->SetTitle("Entries/channel"); entriesPerChannel__3->GetXaxis()->SetRange(1,15); entriesPerChannel__3->GetXaxis()->SetLabelFont(42); entriesPerChannel__3->GetXaxis()->SetLabelSize(0.05); entriesPerChannel__3->GetXaxis()->SetTitleSize(0.05); entriesPerChannel__3->GetXaxis()->SetTitleFont(42); entriesPerChannel__3->GetYaxis()->SetTitle("#"); entriesPerChannel__3->GetYaxis()->SetLabelFont(42); entriesPerChannel__3->GetYaxis()->SetLabelSize(0.05); entriesPerChannel__3->GetYaxis()->SetTitleSize(0.05); entriesPerChannel__3->GetYaxis()->SetTitleFont(42); entriesPerChannel__3->GetZaxis()->SetLabelFont(42); entriesPerChannel__3->GetZaxis()->SetLabelSize(0.05); entriesPerChannel__3->GetZaxis()->SetTitleSize(0.05); entriesPerChannel__3->GetZaxis()->SetTitleFont(42); entriesPerChannel__3->Draw(""); c1->Modified(); c1->cd(); c1->SetSelected(c1); }