{ //=========Macro generated from canvas: c1/c1 //========= (Thu May 31 16:22:17 2012) by ROOT version5.32/03 TCanvas *c1 = new TCanvas("c1", "c1",66,52,700,500); gStyle->SetOptTitle(0); c1->Range(-5.621621,-1.077157,29.51351,5.655075); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetLogy(); 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__2 = new TH1D("entriesPerChannel__2","Entries per channel",1000,0,1000); entriesPerChannel__2->SetBinContent(1,109879); entriesPerChannel__2->SetBinContent(2,8407); entriesPerChannel__2->SetBinContent(3,2782); entriesPerChannel__2->SetBinContent(4,1677); entriesPerChannel__2->SetBinContent(5,1501); entriesPerChannel__2->SetBinContent(6,1642); entriesPerChannel__2->SetBinContent(7,1521); entriesPerChannel__2->SetBinContent(8,1411); entriesPerChannel__2->SetBinContent(9,1207); entriesPerChannel__2->SetBinContent(10,929); entriesPerChannel__2->SetBinContent(11,666); entriesPerChannel__2->SetBinContent(12,495); entriesPerChannel__2->SetBinContent(13,303); entriesPerChannel__2->SetBinContent(14,199); entriesPerChannel__2->SetBinContent(15,123); entriesPerChannel__2->SetBinContent(16,68); entriesPerChannel__2->SetBinContent(17,30); entriesPerChannel__2->SetBinContent(18,12); entriesPerChannel__2->SetBinContent(19,5); entriesPerChannel__2->SetBinContent(20,5); entriesPerChannel__2->SetBinContent(22,2); entriesPerChannel__2->SetEntries(132864); entriesPerChannel__2->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.194"); text = ptstats->AddText("RMS = 2.073"); ptstats->SetOptStat(1110); ptstats->SetOptFit(0); ptstats->Draw(); entriesPerChannel__2->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(entriesPerChannel__2); Int_t ci; // for color index setting ci = TColor::GetColor("#0000ff"); entriesPerChannel__2->SetLineColor(ci); entriesPerChannel__2->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); entriesPerChannel__2->SetMarkerColor(ci); entriesPerChannel__2->SetMarkerStyle(20); entriesPerChannel__2->SetMarkerSize(1.2); entriesPerChannel__2->GetXaxis()->SetTitle("Entries/channel"); entriesPerChannel__2->GetXaxis()->SetRange(1,26); entriesPerChannel__2->GetXaxis()->SetLabelFont(42); entriesPerChannel__2->GetXaxis()->SetLabelSize(0.05); entriesPerChannel__2->GetXaxis()->SetTitleSize(0.05); entriesPerChannel__2->GetXaxis()->SetTitleFont(42); entriesPerChannel__2->GetYaxis()->SetTitle("#"); entriesPerChannel__2->GetYaxis()->SetLabelFont(42); entriesPerChannel__2->GetYaxis()->SetLabelSize(0.05); entriesPerChannel__2->GetYaxis()->SetTitleSize(0.05); entriesPerChannel__2->GetYaxis()->SetTitleFont(42); entriesPerChannel__2->GetZaxis()->SetLabelFont(42); entriesPerChannel__2->GetZaxis()->SetLabelSize(0.05); entriesPerChannel__2->GetZaxis()->SetTitleSize(0.05); entriesPerChannel__2->GetZaxis()->SetTitleFont(42); entriesPerChannel__2->Draw(""); c1->Modified(); c1->cd(); c1->SetSelected(c1); }