void closure_3jets_HT() { //=========Macro generated from canvas: finalPlots/closure_3jets_HT/finalPlots/closure_3jets_HT //========= (Fri Apr 15 17:56:22 2016) by ROOT version6.02/05 TCanvas *finalPlots/closure_3jets_HT = new TCanvas("finalPlots/closure_3jets_HT", "finalPlots/closure_3jets_HT",0,0,600,600); gStyle->SetOptFit(1); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); finalPlots/closure_3jets_HT->SetHighLightColor(2); finalPlots/closure_3jets_HT->Range(0,0,1,1); finalPlots/closure_3jets_HT->SetFillColor(0); finalPlots/closure_3jets_HT->SetBorderMode(0); finalPlots/closure_3jets_HT->SetBorderSize(2); finalPlots/closure_3jets_HT->SetTickx(1); finalPlots/closure_3jets_HT->SetTicky(1); finalPlots/closure_3jets_HT->SetLeftMargin(0.13); finalPlots/closure_3jets_HT->SetRightMargin(0.05); finalPlots/closure_3jets_HT->SetTopMargin(0.08); finalPlots/closure_3jets_HT->SetBottomMargin(0.13); finalPlots/closure_3jets_HT->SetFrameFillStyle(0); finalPlots/closure_3jets_HT->SetFrameBorderMode(0); // ------------>Primitives in pad: pad1 TPad *pad1 = new TPad("pad1", "pad1",0,0.25,1,1); pad1->Draw(); pad1->cd(); pad1->Range(-51.20732,-2.478586,342.6951,4.851148); pad1->SetFillColor(0); pad1->SetBorderMode(0); pad1->SetBorderSize(2); pad1->SetLogy(); pad1->SetTickx(1); pad1->SetTicky(1); pad1->SetLeftMargin(0.13); pad1->SetRightMargin(0.05); pad1->SetTopMargin(0.08); pad1->SetFrameFillStyle(0); pad1->SetFrameBorderMode(0); pad1->SetFrameFillStyle(0); pad1->SetFrameBorderMode(0); TH1F *dy3jetsHTSFCentral_pos28 = new TH1F("dy3jetsHTSFCentral_pos28","",14,0,323); dy3jetsHTSFCentral_pos28->SetBinContent(1,9637.973); dy3jetsHTSFCentral_pos28->SetBinContent(2,2884.544); dy3jetsHTSFCentral_pos28->SetBinContent(3,455.8978); dy3jetsHTSFCentral_pos28->SetBinContent(4,74.27092); dy3jetsHTSFCentral_pos28->SetBinContent(5,16.11544); dy3jetsHTSFCentral_pos28->SetBinContent(6,5.834667); dy3jetsHTSFCentral_pos28->SetBinContent(7,1.854846); dy3jetsHTSFCentral_pos28->SetBinContent(8,1.003585); dy3jetsHTSFCentral_pos28->SetBinContent(9,1.147815); dy3jetsHTSFCentral_pos28->SetBinContent(10,0.2156216); dy3jetsHTSFCentral_pos28->SetBinContent(11,0.2072581); dy3jetsHTSFCentral_pos28->SetBinContent(12,0.07059891); dy3jetsHTSFCentral_pos28->SetBinContent(13,0.07103427); dy3jetsHTSFCentral_pos28->SetBinContent(14,0.4382244); dy3jetsHTSFCentral_pos28->SetBinError(1,72.05448); dy3jetsHTSFCentral_pos28->SetBinError(2,31.86911); dy3jetsHTSFCentral_pos28->SetBinError(3,8.835516); dy3jetsHTSFCentral_pos28->SetBinError(4,2.640409); dy3jetsHTSFCentral_pos28->SetBinError(5,0.8187849); dy3jetsHTSFCentral_pos28->SetBinError(6,0.3750617); dy3jetsHTSFCentral_pos28->SetBinError(7,0.4834741); dy3jetsHTSFCentral_pos28->SetBinError(8,0.1289004); dy3jetsHTSFCentral_pos28->SetBinError(9,0.4405456); dy3jetsHTSFCentral_pos28->SetBinError(10,0.08536829); dy3jetsHTSFCentral_pos28->SetBinError(11,0.05499418); dy3jetsHTSFCentral_pos28->SetBinError(12,0.0346722); dy3jetsHTSFCentral_pos28->SetBinError(13,0.03377039); dy3jetsHTSFCentral_pos28->SetBinError(14,0.08569579); dy3jetsHTSFCentral_pos28->SetEntries(27946.94); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ff0000"); dy3jetsHTSFCentral_pos28->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); dy3jetsHTSFCentral_pos28->SetMarkerColor(ci); dy3jetsHTSFCentral_pos28->SetMarkerStyle(20); dy3jetsHTSFCentral_pos28->GetXaxis()->SetTitle("JZB [GeV]"); dy3jetsHTSFCentral_pos28->GetXaxis()->SetLabelFont(42); dy3jetsHTSFCentral_pos28->GetXaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_pos28->GetXaxis()->SetTitleSize(0.05); dy3jetsHTSFCentral_pos28->GetXaxis()->SetTitleFont(42); dy3jetsHTSFCentral_pos28->GetYaxis()->SetTitle("Events / 23 GeV"); dy3jetsHTSFCentral_pos28->GetYaxis()->SetLabelFont(42); dy3jetsHTSFCentral_pos28->GetYaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_pos28->GetYaxis()->SetTitleSize(0.05); dy3jetsHTSFCentral_pos28->GetYaxis()->SetTitleOffset(1.1); dy3jetsHTSFCentral_pos28->GetYaxis()->SetTitleFont(42); dy3jetsHTSFCentral_pos28->GetZaxis()->SetLabelFont(42); dy3jetsHTSFCentral_pos28->GetZaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_pos28->GetZaxis()->SetTitleSize(0.05); dy3jetsHTSFCentral_pos28->GetZaxis()->SetTitleFont(42); dy3jetsHTSFCentral_pos28->Draw("E,"); TH1F *dy3jetsHTSFCentral_neg29 = new TH1F("dy3jetsHTSFCentral_neg29","",14,0,323); dy3jetsHTSFCentral_neg29->SetBinContent(1,9585.324); dy3jetsHTSFCentral_neg29->SetBinContent(2,2718.328); dy3jetsHTSFCentral_neg29->SetBinContent(3,386.0012); dy3jetsHTSFCentral_neg29->SetBinContent(4,58.59462); dy3jetsHTSFCentral_neg29->SetBinContent(5,14.33048); dy3jetsHTSFCentral_neg29->SetBinContent(6,5.15004); dy3jetsHTSFCentral_neg29->SetBinContent(7,2.043022); dy3jetsHTSFCentral_neg29->SetBinContent(8,0.7426891); dy3jetsHTSFCentral_neg29->SetBinContent(9,0.5736722); dy3jetsHTSFCentral_neg29->SetBinContent(10,0.2553881); dy3jetsHTSFCentral_neg29->SetBinContent(11,0.1665071); dy3jetsHTSFCentral_neg29->SetBinContent(12,0.04898321); dy3jetsHTSFCentral_neg29->SetBinContent(13,0.09107073); dy3jetsHTSFCentral_neg29->SetBinContent(14,0.1614107); dy3jetsHTSFCentral_neg29->SetBinError(1,64.37125); dy3jetsHTSFCentral_neg29->SetBinError(2,32.15544); dy3jetsHTSFCentral_neg29->SetBinError(3,12.01798); dy3jetsHTSFCentral_neg29->SetBinError(4,2.732741); dy3jetsHTSFCentral_neg29->SetBinError(5,0.8393315); dy3jetsHTSFCentral_neg29->SetBinError(6,0.5334149); dy3jetsHTSFCentral_neg29->SetBinError(7,0.4018386); dy3jetsHTSFCentral_neg29->SetBinError(8,0.1163572); dy3jetsHTSFCentral_neg29->SetBinError(9,0.1064377); dy3jetsHTSFCentral_neg29->SetBinError(10,0.07204974); dy3jetsHTSFCentral_neg29->SetBinError(11,0.05051877); dy3jetsHTSFCentral_neg29->SetBinError(12,0.02407057); dy3jetsHTSFCentral_neg29->SetBinError(13,0.05005378); dy3jetsHTSFCentral_neg29->SetBinError(14,0.05086236); dy3jetsHTSFCentral_neg29->SetEntries(30601.71); ci = TColor::GetColor("#0000ff"); dy3jetsHTSFCentral_neg29->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); dy3jetsHTSFCentral_neg29->SetMarkerColor(ci); dy3jetsHTSFCentral_neg29->SetMarkerStyle(20); dy3jetsHTSFCentral_neg29->GetXaxis()->SetTitle("JZB [GeV]"); dy3jetsHTSFCentral_neg29->GetXaxis()->SetLabelFont(42); dy3jetsHTSFCentral_neg29->GetXaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_neg29->GetXaxis()->SetTitleSize(0.05); dy3jetsHTSFCentral_neg29->GetXaxis()->SetTitleFont(42); dy3jetsHTSFCentral_neg29->GetYaxis()->SetTitle("Events / 23 GeV"); dy3jetsHTSFCentral_neg29->GetYaxis()->SetLabelFont(42); dy3jetsHTSFCentral_neg29->GetYaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_neg29->GetYaxis()->SetTitleSize(0.05); dy3jetsHTSFCentral_neg29->GetYaxis()->SetTitleOffset(1.1); dy3jetsHTSFCentral_neg29->GetYaxis()->SetTitleFont(42); dy3jetsHTSFCentral_neg29->GetZaxis()->SetLabelFont(42); dy3jetsHTSFCentral_neg29->GetZaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_neg29->GetZaxis()->SetTitleSize(0.05); dy3jetsHTSFCentral_neg29->GetZaxis()->SetTitleFont(42); dy3jetsHTSFCentral_neg29->Draw("HIST,SAME"); TLegend *leg = new TLegend(0.65,0.5,0.9,0.72,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextSize(0.04); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(0); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("dy3jetsHTSFCentral_pos","JZB > 0","P"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ff0000"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("dy3jetsHTSFCentral_neg","JZB < 0","L"); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); leg->Draw(); TLatex * tex = new TLatex(0.21,0.93,"CMS"); tex->SetNDC(); tex->SetTextAlign(31); tex->SetTextFont(42); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(0.33,0.93,"Simulation"); tex->SetNDC(); tex->SetTextAlign(31); tex->SetTextFont(42); tex->SetTextSize(0.03); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(0.9,0.93,"2.3 fb^{-1} (13 TeV)"); tex->SetNDC(); tex->SetTextAlign(31); tex->SetTextFont(42); tex->SetLineWidth(2); tex->Draw(); pad1->Modified(); finalPlots/closure_3jets_HT->cd(); // ------------>Primitives in pad: pad2 TPad *pad2 = new TPad("pad2", "pad2",0,0.05,1,0.25); pad2->Draw(); pad2->cd(); pad2->Range(-51.20732,-1,342.6951,2.333333); pad2->SetFillColor(0); pad2->SetBorderMode(0); pad2->SetBorderSize(2); pad2->SetTickx(1); pad2->SetTicky(1); pad2->SetLeftMargin(0.13); pad2->SetRightMargin(0.05); pad2->SetBottomMargin(0.3); pad2->SetFrameFillStyle(0); pad2->SetFrameBorderMode(0); pad2->SetFrameFillStyle(0); pad2->SetFrameBorderMode(0); TH1F *dy3jetsHTSFCentral_neg_ratio30 = new TH1F("dy3jetsHTSFCentral_neg_ratio30","",14,0,323); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(1,1.005493); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(2,1.061147); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(3,1.181079); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(4,1.267538); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(5,1.124556); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(6,1.132936); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(7,0.9078932); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(8,1.351285); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(9,2.000821); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(10,0.84429); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(11,1.24474); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(12,1.441288); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(13,0.7799902); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(14,2.714965); dy3jetsHTSFCentral_neg_ratio30->SetBinError(1,0.01010465); dy3jetsHTSFCentral_neg_ratio30->SetBinError(2,0.01717588); dy3jetsHTSFCentral_neg_ratio30->SetBinError(3,0.04331458); dy3jetsHTSFCentral_neg_ratio30->SetBinError(4,0.0743321); dy3jetsHTSFCentral_neg_ratio30->SetBinError(5,0.08719341); dy3jetsHTSFCentral_neg_ratio30->SetBinError(6,0.1381062); dy3jetsHTSFCentral_neg_ratio30->SetBinError(7,0.2964617); dy3jetsHTSFCentral_neg_ratio30->SetBinError(8,0.2737557); dy3jetsHTSFCentral_neg_ratio30->SetBinError(9,0.8529601); dy3jetsHTSFCentral_neg_ratio30->SetBinError(10,0.4104511); dy3jetsHTSFCentral_neg_ratio30->SetBinError(11,0.5017085); dy3jetsHTSFCentral_neg_ratio30->SetBinError(12,1.00133); dy3jetsHTSFCentral_neg_ratio30->SetBinError(13,0.5668175); dy3jetsHTSFCentral_neg_ratio30->SetBinError(14,1.006867); dy3jetsHTSFCentral_neg_ratio30->SetMinimum(0); dy3jetsHTSFCentral_neg_ratio30->SetMaximum(2); dy3jetsHTSFCentral_neg_ratio30->SetEntries(88.54573); ci = TColor::GetColor("#0000ff"); dy3jetsHTSFCentral_neg_ratio30->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); dy3jetsHTSFCentral_neg_ratio30->SetMarkerColor(ci); dy3jetsHTSFCentral_neg_ratio30->SetMarkerStyle(20); dy3jetsHTSFCentral_neg_ratio30->GetXaxis()->SetLabelFont(42); dy3jetsHTSFCentral_neg_ratio30->GetXaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_neg_ratio30->GetXaxis()->SetLabelSize(0.12); dy3jetsHTSFCentral_neg_ratio30->GetXaxis()->SetTitleSize(0.14); dy3jetsHTSFCentral_neg_ratio30->GetXaxis()->SetTitleFont(42); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->SetTitle("Ratio"); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->CenterTitle(true); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->SetNdivisions(4); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->SetLabelFont(42); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->SetLabelSize(0.12); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->SetTitleSize(0.14); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->SetTitleOffset(0.3); dy3jetsHTSFCentral_neg_ratio30->GetYaxis()->SetTitleFont(42); dy3jetsHTSFCentral_neg_ratio30->GetZaxis()->SetLabelFont(42); dy3jetsHTSFCentral_neg_ratio30->GetZaxis()->SetLabelOffset(0.007); dy3jetsHTSFCentral_neg_ratio30->GetZaxis()->SetTitleSize(0.05); dy3jetsHTSFCentral_neg_ratio30->GetZaxis()->SetTitleFont(42); dy3jetsHTSFCentral_neg_ratio30->Draw("l, "); TLine *line = new TLine(0,1,323,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); Double_t Graph0_fx6[4] = { 0, 250, 250, 0}; Double_t Graph0_fy6[4] = { 0.7, 0.7, 1.3, 1.3}; TGraph *graph = new TGraph(4,Graph0_fx6,Graph0_fy6); graph->SetName("Graph0"); graph->SetTitle("Graph"); ci = 1184; color = new TColor(ci, 1, 0, 0, " ", 0.4); graph->SetFillColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph6 = new TH1F("Graph_Graph6","Graph",100,0,275); Graph_Graph6->SetMinimum(0.64); Graph_Graph6->SetMaximum(1.36); Graph_Graph6->SetDirectory(0); Graph_Graph6->SetStats(0); Graph_Graph6->SetMarkerStyle(20); Graph_Graph6->GetXaxis()->SetLabelFont(42); Graph_Graph6->GetXaxis()->SetLabelOffset(0.007); Graph_Graph6->GetXaxis()->SetTitleSize(0.05); Graph_Graph6->GetXaxis()->SetTitleFont(42); Graph_Graph6->GetYaxis()->SetLabelFont(42); Graph_Graph6->GetYaxis()->SetLabelOffset(0.007); Graph_Graph6->GetYaxis()->SetTitleSize(0.05); Graph_Graph6->GetYaxis()->SetTitleOffset(1.1); Graph_Graph6->GetYaxis()->SetTitleFont(42); Graph_Graph6->GetZaxis()->SetLabelFont(42); Graph_Graph6->GetZaxis()->SetLabelOffset(0.007); Graph_Graph6->GetZaxis()->SetTitleSize(0.05); Graph_Graph6->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph6); graph->Draw("f"); pad2->Modified(); finalPlots/closure_3jets_HT->cd(); finalPlots/closure_3jets_HT->Modified(); finalPlots/closure_3jets_HT->cd(); finalPlots/closure_3jets_HT->SetSelected(finalPlots/closure_3jets_HT); }