void Rates2D_Background_Run6673() { //=========Macro generated from canvas: c/c //========= (Sun Jan 13 15:40:48 2019) by ROOT version6.02/13 TCanvas *c = new TCanvas("c", "c",0,0,800,600); gStyle->SetOptStat(0); c->Range(-7.5,-1,72.5,14); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetRightMargin(0.15); c->SetFrameBorderMode(0); c->SetFrameBorderMode(0); TH2D *hRateBkgPerCell = new TH2D("hRateBkgPerCell","Background (digi time < 1000), run = 6673",60,0.5,60.5,12,0.5,12.5); hRateBkgPerCell->SetBinContent(253,1); hRateBkgPerCell->SetBinContent(328,1); hRateBkgPerCell->SetBinContent(374,1); hRateBkgPerCell->SetBinContent(702,1); hRateBkgPerCell->SetEntries(724); hRateBkgPerCell->SetDirectory(0); hRateBkgPerCell->SetStats(0); hRateBkgPerCell->SetContour(20); hRateBkgPerCell->SetContourLevel(0,0); hRateBkgPerCell->SetContourLevel(1,0.05); hRateBkgPerCell->SetContourLevel(2,0.1); hRateBkgPerCell->SetContourLevel(3,0.15); hRateBkgPerCell->SetContourLevel(4,0.2); hRateBkgPerCell->SetContourLevel(5,0.25); hRateBkgPerCell->SetContourLevel(6,0.3); hRateBkgPerCell->SetContourLevel(7,0.35); hRateBkgPerCell->SetContourLevel(8,0.4); hRateBkgPerCell->SetContourLevel(9,0.45); hRateBkgPerCell->SetContourLevel(10,0.5); hRateBkgPerCell->SetContourLevel(11,0.55); hRateBkgPerCell->SetContourLevel(12,0.6); hRateBkgPerCell->SetContourLevel(13,0.65); hRateBkgPerCell->SetContourLevel(14,0.7); hRateBkgPerCell->SetContourLevel(15,0.75); hRateBkgPerCell->SetContourLevel(16,0.8); hRateBkgPerCell->SetContourLevel(17,0.85); hRateBkgPerCell->SetContourLevel(18,0.9); hRateBkgPerCell->SetContourLevel(19,0.95); TPaletteAxis *palette = new TPaletteAxis(60.9,0.5,64.5,12.5,hRateBkgPerCell); palette->SetLabelColor(1); palette->SetLabelFont(42); palette->SetLabelOffset(0.005); palette->SetLabelSize(0.035); palette->SetTitleOffset(1); palette->SetTitleSize(0.035); palette->SetFillColor(100); palette->SetFillStyle(1001); hRateBkgPerCell->GetListOfFunctions()->Add(palette,"br"); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); hRateBkgPerCell->SetLineColor(ci); hRateBkgPerCell->GetXaxis()->SetTitle("Wire"); hRateBkgPerCell->GetXaxis()->SetLabelFont(42); hRateBkgPerCell->GetXaxis()->SetLabelSize(0.035); hRateBkgPerCell->GetXaxis()->SetTitleSize(0.035); hRateBkgPerCell->GetXaxis()->SetTitleFont(42); hRateBkgPerCell->GetYaxis()->SetBinLabel(1,"SL1L1"); hRateBkgPerCell->GetYaxis()->SetBinLabel(2,"SL1L2"); hRateBkgPerCell->GetYaxis()->SetBinLabel(3,"SL1L3"); hRateBkgPerCell->GetYaxis()->SetBinLabel(4,"SL1L4"); hRateBkgPerCell->GetYaxis()->SetBinLabel(5,"SL2L1"); hRateBkgPerCell->GetYaxis()->SetBinLabel(6,"SL2L2"); hRateBkgPerCell->GetYaxis()->SetBinLabel(7,"SL2L3"); hRateBkgPerCell->GetYaxis()->SetBinLabel(8,"SL2L4"); hRateBkgPerCell->GetYaxis()->SetBinLabel(9,"SL3L1"); hRateBkgPerCell->GetYaxis()->SetBinLabel(10,"SL3L2"); hRateBkgPerCell->GetYaxis()->SetBinLabel(11,"SL3L3"); hRateBkgPerCell->GetYaxis()->SetBinLabel(12,"SL3L4"); hRateBkgPerCell->GetYaxis()->SetLabelFont(42); hRateBkgPerCell->GetYaxis()->SetLabelSize(0.035); hRateBkgPerCell->GetYaxis()->SetTitleSize(0.035); hRateBkgPerCell->GetYaxis()->SetTitleFont(42); hRateBkgPerCell->GetZaxis()->SetLabelFont(42); hRateBkgPerCell->GetZaxis()->SetLabelSize(0.035); hRateBkgPerCell->GetZaxis()->SetTitleSize(0.035); hRateBkgPerCell->GetZaxis()->SetTitleFont(42); hRateBkgPerCell->Draw("colz, png, pdf, root, cpp"); TPaveText *pt = new TPaveText(0.15,0.9341608,0.85,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); TText *AText = pt->AddText("Background (digi time < 1000), run = 6673"); pt->Draw(); c->Modified(); c->cd(); c->SetSelected(c); }