{ //=========Macro generated from canvas: c1/c1 //========= (Tue May 29 14:33:12 2012) by ROOT version5.32/03 TCanvas *c1 = new TCanvas("c1", "c1",66,52,700,500); gStyle->SetOptTitle(0); c1->Range(-2.378378,-23838.14,12.48649,125150.2); 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__4 = new TH1D("entriesPerChannel__4","Entries per channel",1000,0,1000); entriesPerChannel__4->SetBinContent(1,112096); entriesPerChannel__4->SetBinContent(2,10261); entriesPerChannel__4->SetBinContent(3,4496); entriesPerChannel__4->SetBinContent(4,2628); entriesPerChannel__4->SetBinContent(5,1672); entriesPerChannel__4->SetBinContent(6,1009); entriesPerChannel__4->SetBinContent(7,427); entriesPerChannel__4->SetBinContent(8,169); entriesPerChannel__4->SetBinContent(9,71); entriesPerChannel__4->SetBinContent(10,27); entriesPerChannel__4->SetBinContent(11,6); entriesPerChannel__4->SetBinContent(12,1); entriesPerChannel__4->SetBinContent(14,1); entriesPerChannel__4->SetEntries(132864); entriesPerChannel__4->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 = 0.8273"); text = ptstats->AddText("RMS = 0.9528"); ptstats->SetOptStat(1110); ptstats->SetOptFit(0); ptstats->Draw(); entriesPerChannel__4->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(entriesPerChannel__4); Int_t ci; // for color index setting ci = TColor::GetColor("#0000ff"); entriesPerChannel__4->SetLineColor(ci); entriesPerChannel__4->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); entriesPerChannel__4->SetMarkerColor(ci); entriesPerChannel__4->SetMarkerStyle(20); entriesPerChannel__4->SetMarkerSize(1.2); entriesPerChannel__4->GetXaxis()->SetTitle("Entries/channel"); entriesPerChannel__4->GetXaxis()->SetRange(1,11); entriesPerChannel__4->GetXaxis()->SetLabelFont(42); entriesPerChannel__4->GetXaxis()->SetLabelSize(0.05); entriesPerChannel__4->GetXaxis()->SetTitleSize(0.05); entriesPerChannel__4->GetXaxis()->SetTitleFont(42); entriesPerChannel__4->GetYaxis()->SetTitle("#"); entriesPerChannel__4->GetYaxis()->SetLabelFont(42); entriesPerChannel__4->GetYaxis()->SetLabelSize(0.05); entriesPerChannel__4->GetYaxis()->SetTitleSize(0.05); entriesPerChannel__4->GetYaxis()->SetTitleFont(42); entriesPerChannel__4->GetZaxis()->SetLabelFont(42); entriesPerChannel__4->GetZaxis()->SetLabelSize(0.05); entriesPerChannel__4->GetZaxis()->SetTitleSize(0.05); entriesPerChannel__4->GetZaxis()->SetTitleFont(42); entriesPerChannel__4->Draw(""); c1->Modified(); c1->cd(); c1->SetSelected(c1); }