void closure_2jets_HT() { //=========Macro generated from canvas: finalPlots/closure_2jets_HT/finalPlots/closure_2jets_HT //========= (Mon Apr 18 10:17:45 2016) by ROOT version6.02/05 TCanvas *finalPlots/closure_2jets_HT = new TCanvas("finalPlots/closure_2jets_HT", "finalPlots/closure_2jets_HT",0,0,600,600); gStyle->SetOptFit(1); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); finalPlots/closure_2jets_HT->SetHighLightColor(2); finalPlots/closure_2jets_HT->Range(0,0,1,1); finalPlots/closure_2jets_HT->SetFillColor(0); finalPlots/closure_2jets_HT->SetBorderMode(0); finalPlots/closure_2jets_HT->SetBorderSize(2); finalPlots/closure_2jets_HT->SetTickx(1); finalPlots/closure_2jets_HT->SetTicky(1); finalPlots/closure_2jets_HT->SetLeftMargin(0.13); finalPlots/closure_2jets_HT->SetRightMargin(0.05); finalPlots/closure_2jets_HT->SetTopMargin(0.08); finalPlots/closure_2jets_HT->SetBottomMargin(0.13); finalPlots/closure_2jets_HT->SetFrameFillStyle(0); finalPlots/closure_2jets_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.233852,342.6951,5.280197); 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 *dy2jetsHTSFCentral_pos19 = new TH1F("dy2jetsHTSFCentral_pos19","",14,0,323); dy2jetsHTSFCentral_pos19->SetBinContent(1,25139.71); dy2jetsHTSFCentral_pos19->SetBinContent(2,5157); dy2jetsHTSFCentral_pos19->SetBinContent(3,445.5457); dy2jetsHTSFCentral_pos19->SetBinContent(4,37.59826); dy2jetsHTSFCentral_pos19->SetBinContent(5,4.411826); dy2jetsHTSFCentral_pos19->SetBinContent(6,1.520626); dy2jetsHTSFCentral_pos19->SetBinContent(7,0.196902); dy2jetsHTSFCentral_pos19->SetBinContent(9,0.2248689); dy2jetsHTSFCentral_pos19->SetBinContent(12,0.1135955); dy2jetsHTSFCentral_pos19->SetBinContent(14,-0.1162083); dy2jetsHTSFCentral_pos19->SetBinError(1,67.46564); dy2jetsHTSFCentral_pos19->SetBinError(2,26.0287); dy2jetsHTSFCentral_pos19->SetBinError(3,6.920838); dy2jetsHTSFCentral_pos19->SetBinError(4,2.184568); dy2jetsHTSFCentral_pos19->SetBinError(5,0.6815608); dy2jetsHTSFCentral_pos19->SetBinError(6,0.3857482); dy2jetsHTSFCentral_pos19->SetBinError(7,0.2158802); dy2jetsHTSFCentral_pos19->SetBinError(9,0.1590148); dy2jetsHTSFCentral_pos19->SetBinError(12,0.1135955); dy2jetsHTSFCentral_pos19->SetBinError(14,0.1162083); dy2jetsHTSFCentral_pos19->SetEntries(179421.9); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ff0000"); dy2jetsHTSFCentral_pos19->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); dy2jetsHTSFCentral_pos19->SetMarkerColor(ci); dy2jetsHTSFCentral_pos19->SetMarkerStyle(20); dy2jetsHTSFCentral_pos19->GetXaxis()->SetTitle("JZB [GeV]"); dy2jetsHTSFCentral_pos19->GetXaxis()->SetLabelFont(42); dy2jetsHTSFCentral_pos19->GetXaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_pos19->GetXaxis()->SetTitleSize(0.05); dy2jetsHTSFCentral_pos19->GetXaxis()->SetTitleFont(42); dy2jetsHTSFCentral_pos19->GetYaxis()->SetTitle("Events / 23 GeV"); dy2jetsHTSFCentral_pos19->GetYaxis()->SetLabelFont(42); dy2jetsHTSFCentral_pos19->GetYaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_pos19->GetYaxis()->SetTitleSize(0.05); dy2jetsHTSFCentral_pos19->GetYaxis()->SetTitleOffset(1.1); dy2jetsHTSFCentral_pos19->GetYaxis()->SetTitleFont(42); dy2jetsHTSFCentral_pos19->GetZaxis()->SetLabelFont(42); dy2jetsHTSFCentral_pos19->GetZaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_pos19->GetZaxis()->SetTitleSize(0.05); dy2jetsHTSFCentral_pos19->GetZaxis()->SetTitleFont(42); dy2jetsHTSFCentral_pos19->Draw("E,"); TH1F *dy2jetsHTSFCentral_neg20 = new TH1F("dy2jetsHTSFCentral_neg20","",14,0,323); dy2jetsHTSFCentral_neg20->SetBinContent(1,25525.8); dy2jetsHTSFCentral_neg20->SetBinContent(2,4654.438); dy2jetsHTSFCentral_neg20->SetBinContent(3,361.7042); dy2jetsHTSFCentral_neg20->SetBinContent(4,32.6913); dy2jetsHTSFCentral_neg20->SetBinContent(5,6.703367); dy2jetsHTSFCentral_neg20->SetBinContent(6,2.871553); dy2jetsHTSFCentral_neg20->SetBinContent(7,0.6139131); dy2jetsHTSFCentral_neg20->SetBinContent(8,0.6341615); dy2jetsHTSFCentral_neg20->SetBinContent(9,0.2225467); dy2jetsHTSFCentral_neg20->SetBinContent(10,0.263087); dy2jetsHTSFCentral_neg20->SetBinContent(12,0.1082821); dy2jetsHTSFCentral_neg20->SetBinContent(13,0.08865698); dy2jetsHTSFCentral_neg20->SetBinContent(14,0.1186218); dy2jetsHTSFCentral_neg20->SetBinError(1,70.77358); dy2jetsHTSFCentral_neg20->SetBinError(2,26.69184); dy2jetsHTSFCentral_neg20->SetBinError(3,6.833136); dy2jetsHTSFCentral_neg20->SetBinError(4,1.791912); dy2jetsHTSFCentral_neg20->SetBinError(5,0.7816569); dy2jetsHTSFCentral_neg20->SetBinError(6,0.5394005); dy2jetsHTSFCentral_neg20->SetBinError(7,0.2355768); dy2jetsHTSFCentral_neg20->SetBinError(8,0.2593101); dy2jetsHTSFCentral_neg20->SetBinError(9,0.1573643); dy2jetsHTSFCentral_neg20->SetBinError(10,0.1717917); dy2jetsHTSFCentral_neg20->SetBinError(12,0.1054337); dy2jetsHTSFCentral_neg20->SetBinError(13,0.0858176); dy2jetsHTSFCentral_neg20->SetBinError(14,0.1043792); dy2jetsHTSFCentral_neg20->SetEntries(162178.9); ci = TColor::GetColor("#0000ff"); dy2jetsHTSFCentral_neg20->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); dy2jetsHTSFCentral_neg20->SetMarkerColor(ci); dy2jetsHTSFCentral_neg20->SetMarkerStyle(20); dy2jetsHTSFCentral_neg20->GetXaxis()->SetTitle("JZB [GeV]"); dy2jetsHTSFCentral_neg20->GetXaxis()->SetLabelFont(42); dy2jetsHTSFCentral_neg20->GetXaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_neg20->GetXaxis()->SetTitleSize(0.05); dy2jetsHTSFCentral_neg20->GetXaxis()->SetTitleFont(42); dy2jetsHTSFCentral_neg20->GetYaxis()->SetTitle("Events / 23 GeV"); dy2jetsHTSFCentral_neg20->GetYaxis()->SetLabelFont(42); dy2jetsHTSFCentral_neg20->GetYaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_neg20->GetYaxis()->SetTitleSize(0.05); dy2jetsHTSFCentral_neg20->GetYaxis()->SetTitleOffset(1.1); dy2jetsHTSFCentral_neg20->GetYaxis()->SetTitleFont(42); dy2jetsHTSFCentral_neg20->GetZaxis()->SetLabelFont(42); dy2jetsHTSFCentral_neg20->GetZaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_neg20->GetZaxis()->SetTitleSize(0.05); dy2jetsHTSFCentral_neg20->GetZaxis()->SetTitleFont(42); dy2jetsHTSFCentral_neg20->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("dy2jetsHTSFCentral_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("dy2jetsHTSFCentral_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_2jets_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 *dy2jetsHTSFCentral_neg_ratio21 = new TH1F("dy2jetsHTSFCentral_neg_ratio21","",14,0,323); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(1,0.9848746); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(2,1.107975); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(3,1.231796); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(4,1.1501); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(5,0.6581507); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(6,0.5295483); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(7,0.3207327); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(9,1.010435); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(12,1.04907); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(14,-0.9796538); dy2jetsHTSFCentral_neg_ratio21->SetBinError(1,0.003800306); dy2jetsHTSFCentral_neg_ratio21->SetBinError(2,0.00846435); dy2jetsHTSFCentral_neg_ratio21->SetBinError(3,0.03012679); dy2jetsHTSFCentral_neg_ratio21->SetBinError(4,0.0918672); dy2jetsHTSFCentral_neg_ratio21->SetBinError(5,0.1273869); dy2jetsHTSFCentral_neg_ratio21->SetBinError(6,0.1671537); dy2jetsHTSFCentral_neg_ratio21->SetBinError(7,0.372562); dy2jetsHTSFCentral_neg_ratio21->SetBinError(9,1.010461); dy2jetsHTSFCentral_neg_ratio21->SetBinError(12,1.464226); dy2jetsHTSFCentral_neg_ratio21->SetBinError(14,1.30492); dy2jetsHTSFCentral_neg_ratio21->SetMinimum(0); dy2jetsHTSFCentral_neg_ratio21->SetMaximum(2); dy2jetsHTSFCentral_neg_ratio21->SetEntries(9.858554); ci = TColor::GetColor("#0000ff"); dy2jetsHTSFCentral_neg_ratio21->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); dy2jetsHTSFCentral_neg_ratio21->SetMarkerColor(ci); dy2jetsHTSFCentral_neg_ratio21->SetMarkerStyle(20); dy2jetsHTSFCentral_neg_ratio21->GetXaxis()->SetLabelFont(42); dy2jetsHTSFCentral_neg_ratio21->GetXaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_neg_ratio21->GetXaxis()->SetLabelSize(0.12); dy2jetsHTSFCentral_neg_ratio21->GetXaxis()->SetTitleSize(0.14); dy2jetsHTSFCentral_neg_ratio21->GetXaxis()->SetTitleFont(42); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->SetTitle("Ratio"); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->CenterTitle(true); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->SetNdivisions(4); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->SetLabelFont(42); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->SetLabelSize(0.12); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->SetTitleSize(0.14); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->SetTitleOffset(0.3); dy2jetsHTSFCentral_neg_ratio21->GetYaxis()->SetTitleFont(42); dy2jetsHTSFCentral_neg_ratio21->GetZaxis()->SetLabelFont(42); dy2jetsHTSFCentral_neg_ratio21->GetZaxis()->SetLabelOffset(0.007); dy2jetsHTSFCentral_neg_ratio21->GetZaxis()->SetTitleSize(0.05); dy2jetsHTSFCentral_neg_ratio21->GetZaxis()->SetTitleFont(42); dy2jetsHTSFCentral_neg_ratio21->Draw("l, "); TLine *line = new TLine(0,1,323,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); Double_t Graph0_fx3[4] = { 0, 250, 250, 0}; Double_t Graph0_fy3[4] = { 0.7, 0.7, 1.3, 1.3}; TGraph *graph = new TGraph(4,Graph0_fx3,Graph0_fy3); graph->SetName("Graph0"); graph->SetTitle("Graph"); ci = 1181; color = new TColor(ci, 1, 0, 0, " ", 0.4); graph->SetFillColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph3 = new TH1F("Graph_Graph3","Graph",100,0,275); Graph_Graph3->SetMinimum(0.64); Graph_Graph3->SetMaximum(1.36); Graph_Graph3->SetDirectory(0); Graph_Graph3->SetStats(0); Graph_Graph3->SetMarkerStyle(20); Graph_Graph3->GetXaxis()->SetLabelFont(42); Graph_Graph3->GetXaxis()->SetLabelOffset(0.007); Graph_Graph3->GetXaxis()->SetTitleSize(0.05); Graph_Graph3->GetXaxis()->SetTitleFont(42); Graph_Graph3->GetYaxis()->SetLabelFont(42); Graph_Graph3->GetYaxis()->SetLabelOffset(0.007); Graph_Graph3->GetYaxis()->SetTitleSize(0.05); Graph_Graph3->GetYaxis()->SetTitleOffset(1.1); Graph_Graph3->GetYaxis()->SetTitleFont(42); Graph_Graph3->GetZaxis()->SetLabelFont(42); Graph_Graph3->GetZaxis()->SetLabelOffset(0.007); Graph_Graph3->GetZaxis()->SetTitleSize(0.05); Graph_Graph3->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph3); graph->Draw("f"); pad2->Modified(); finalPlots/closure_2jets_HT->cd(); finalPlots/closure_2jets_HT->Modified(); finalPlots/closure_2jets_HT->cd(); finalPlots/closure_2jets_HT->SetSelected(finalPlots/closure_2jets_HT); }