void closure_2jets_HT() { //=========Macro generated from canvas: finalPlots/closure_2jets_HT/finalPlots/closure_2jets_HT //========= (Fri Apr 15 17:56:21 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.743169,342.6951,5.423844); 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,30968.26); dy2jetsHTSFCentral_pos19->SetBinContent(2,7254.917); dy2jetsHTSFCentral_pos19->SetBinContent(3,736.131); dy2jetsHTSFCentral_pos19->SetBinContent(4,74.20914); dy2jetsHTSFCentral_pos19->SetBinContent(5,11.79834); dy2jetsHTSFCentral_pos19->SetBinContent(6,3.47717); dy2jetsHTSFCentral_pos19->SetBinContent(7,1.449373); dy2jetsHTSFCentral_pos19->SetBinContent(8,0.789606); dy2jetsHTSFCentral_pos19->SetBinContent(9,0.2595703); dy2jetsHTSFCentral_pos19->SetBinContent(10,0.1206881); dy2jetsHTSFCentral_pos19->SetBinContent(11,0.3407496); dy2jetsHTSFCentral_pos19->SetBinContent(12,0.05623788); dy2jetsHTSFCentral_pos19->SetBinContent(13,0.03315664); dy2jetsHTSFCentral_pos19->SetBinContent(14,0.5088636); dy2jetsHTSFCentral_pos19->SetBinError(1,144.1441); dy2jetsHTSFCentral_pos19->SetBinError(2,63.42941); dy2jetsHTSFCentral_pos19->SetBinError(3,15.48049); dy2jetsHTSFCentral_pos19->SetBinError(4,3.615709); dy2jetsHTSFCentral_pos19->SetBinError(5,1.017568); dy2jetsHTSFCentral_pos19->SetBinError(6,0.2945912); dy2jetsHTSFCentral_pos19->SetBinError(7,0.3123677); dy2jetsHTSFCentral_pos19->SetBinError(8,0.1374631); dy2jetsHTSFCentral_pos19->SetBinError(9,0.07665914); dy2jetsHTSFCentral_pos19->SetBinError(10,0.04463354); dy2jetsHTSFCentral_pos19->SetBinError(11,0.1891222); dy2jetsHTSFCentral_pos19->SetBinError(12,0.03254804); dy2jetsHTSFCentral_pos19->SetBinError(13,0.03315664); dy2jetsHTSFCentral_pos19->SetBinError(14,0.3504714); dy2jetsHTSFCentral_pos19->SetEntries(61031.29); 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,31469.4); dy2jetsHTSFCentral_neg20->SetBinContent(2,6678.635); dy2jetsHTSFCentral_neg20->SetBinContent(3,616.6212); dy2jetsHTSFCentral_neg20->SetBinContent(4,66.1389); dy2jetsHTSFCentral_neg20->SetBinContent(5,17.91785); dy2jetsHTSFCentral_neg20->SetBinContent(6,4.897364); dy2jetsHTSFCentral_neg20->SetBinContent(7,1.734197); dy2jetsHTSFCentral_neg20->SetBinContent(8,1.456977); dy2jetsHTSFCentral_neg20->SetBinContent(9,0.4864284); dy2jetsHTSFCentral_neg20->SetBinContent(10,0.382742); dy2jetsHTSFCentral_neg20->SetBinContent(11,0.1796044); dy2jetsHTSFCentral_neg20->SetBinContent(12,0.1241722); dy2jetsHTSFCentral_neg20->SetBinContent(13,0.06245884); dy2jetsHTSFCentral_neg20->SetBinContent(14,0.1021344); dy2jetsHTSFCentral_neg20->SetBinError(1,154.0232); dy2jetsHTSFCentral_neg20->SetBinError(2,62.59353); dy2jetsHTSFCentral_neg20->SetBinError(3,13.65513); dy2jetsHTSFCentral_neg20->SetBinError(4,3.785595); dy2jetsHTSFCentral_neg20->SetBinError(5,1.993545); dy2jetsHTSFCentral_neg20->SetBinError(6,0.7305139); dy2jetsHTSFCentral_neg20->SetBinError(7,0.4276774); dy2jetsHTSFCentral_neg20->SetBinError(8,0.4434905); dy2jetsHTSFCentral_neg20->SetBinError(9,0.2773209); dy2jetsHTSFCentral_neg20->SetBinError(10,0.1107098); dy2jetsHTSFCentral_neg20->SetBinError(11,0.07278431); dy2jetsHTSFCentral_neg20->SetBinError(12,0.06489051); dy2jetsHTSFCentral_neg20->SetBinError(13,0.02987199); dy2jetsHTSFCentral_neg20->SetBinError(14,0.04042811); dy2jetsHTSFCentral_neg20->SetEntries(54305.16); 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.9840755); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(2,1.086287); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(3,1.193814); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(4,1.12202); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(5,0.6584684); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(6,0.7100085); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(7,0.8357602); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(8,0.5419483); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(9,0.5336249); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(10,0.3153249); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(11,1.897223); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(12,0.4529023); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(13,0.5308559); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(14,4.982296); dy2jetsHTSFCentral_neg_ratio21->SetBinError(1,0.006646702); dy2jetsHTSFCentral_neg_ratio21->SetBinError(2,0.01392303); dy2jetsHTSFCentral_neg_ratio21->SetBinError(3,0.03645819); dy2jetsHTSFCentral_neg_ratio21->SetBinError(4,0.08433851); dy2jetsHTSFCentral_neg_ratio21->SetBinError(5,0.0926953); dy2jetsHTSFCentral_neg_ratio21->SetBinError(6,0.1217988); dy2jetsHTSFCentral_neg_ratio21->SetBinError(7,0.2737252); dy2jetsHTSFCentral_neg_ratio21->SetBinError(8,0.1900388); dy2jetsHTSFCentral_neg_ratio21->SetBinError(9,0.3426243); dy2jetsHTSFCentral_neg_ratio21->SetBinError(10,0.148048); dy2jetsHTSFCentral_neg_ratio21->SetBinError(11,1.303809); dy2jetsHTSFCentral_neg_ratio21->SetBinError(12,0.3531634); dy2jetsHTSFCentral_neg_ratio21->SetBinError(13,0.5884458); dy2jetsHTSFCentral_neg_ratio21->SetBinError(14,3.957829); dy2jetsHTSFCentral_neg_ratio21->SetMinimum(0); dy2jetsHTSFCentral_neg_ratio21->SetMaximum(2); dy2jetsHTSFCentral_neg_ratio21->SetEntries(13.85665); 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); }