void closure_2jets_HT() { //=========Macro generated from canvas: finalPlots/closure_2jets_HT/finalPlots/closure_2jets_HT //========= (Mon Apr 18 10:53:11 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,-3.05334,342.6951,5.447658); 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,30760.88); dy2jetsHTSFCentral_pos19->SetBinContent(2,7139.388); dy2jetsHTSFCentral_pos19->SetBinContent(3,687.7001); dy2jetsHTSFCentral_pos19->SetBinContent(4,56.9701); dy2jetsHTSFCentral_pos19->SetBinContent(5,6.451158); dy2jetsHTSFCentral_pos19->SetBinContent(6,1.212485); dy2jetsHTSFCentral_pos19->SetBinContent(7,0.4255812); dy2jetsHTSFCentral_pos19->SetBinContent(8,0.2099793); dy2jetsHTSFCentral_pos19->SetBinContent(9,0.05122856); dy2jetsHTSFCentral_pos19->SetBinContent(11,0.1815104); dy2jetsHTSFCentral_pos19->SetBinContent(13,0.03315664); dy2jetsHTSFCentral_pos19->SetBinContent(14,0.3592907); dy2jetsHTSFCentral_pos19->SetBinError(1,144.1348); dy2jetsHTSFCentral_pos19->SetBinError(2,63.41846); dy2jetsHTSFCentral_pos19->SetBinError(3,15.43524); dy2jetsHTSFCentral_pos19->SetBinError(4,3.53937); dy2jetsHTSFCentral_pos19->SetBinError(5,0.9753154); dy2jetsHTSFCentral_pos19->SetBinError(6,0.2258022); dy2jetsHTSFCentral_pos19->SetBinError(7,0.2845033); dy2jetsHTSFCentral_pos19->SetBinError(8,0.09791553); dy2jetsHTSFCentral_pos19->SetBinError(9,0.05122856); dy2jetsHTSFCentral_pos19->SetBinError(11,0.1815104); dy2jetsHTSFCentral_pos19->SetBinError(13,0.03315664); dy2jetsHTSFCentral_pos19->SetBinError(14,0.3467653); dy2jetsHTSFCentral_pos19->SetEntries(59798.5); 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,31264.59); dy2jetsHTSFCentral_neg20->SetBinContent(2,6579.251); dy2jetsHTSFCentral_neg20->SetBinContent(3,583.3585); dy2jetsHTSFCentral_neg20->SetBinContent(4,55.39306); dy2jetsHTSFCentral_neg20->SetBinContent(5,14.30967); dy2jetsHTSFCentral_neg20->SetBinContent(6,3.4323); dy2jetsHTSFCentral_neg20->SetBinContent(7,0.6584762); dy2jetsHTSFCentral_neg20->SetBinContent(8,0.9184304); dy2jetsHTSFCentral_neg20->SetBinContent(9,0.4057671); dy2jetsHTSFCentral_neg20->SetBinContent(10,0.2195812); dy2jetsHTSFCentral_neg20->SetBinContent(11,0.1133481); dy2jetsHTSFCentral_neg20->SetBinContent(12,0.08782768); dy2jetsHTSFCentral_neg20->SetBinContent(13,0.002560451); dy2jetsHTSFCentral_neg20->SetBinContent(14,0.006070554); dy2jetsHTSFCentral_neg20->SetBinError(1,153.9937); dy2jetsHTSFCentral_neg20->SetBinError(2,62.55564); dy2jetsHTSFCentral_neg20->SetBinError(3,13.61717); dy2jetsHTSFCentral_neg20->SetBinError(4,3.762163); dy2jetsHTSFCentral_neg20->SetBinError(5,1.979666); dy2jetsHTSFCentral_neg20->SetBinError(6,0.7148591); dy2jetsHTSFCentral_neg20->SetBinError(7,0.1562769); dy2jetsHTSFCentral_neg20->SetBinError(8,0.4338221); dy2jetsHTSFCentral_neg20->SetBinError(9,0.2750603); dy2jetsHTSFCentral_neg20->SetBinError(10,0.09803819); dy2jetsHTSFCentral_neg20->SetBinError(11,0.06467222); dy2jetsHTSFCentral_neg20->SetBinError(12,0.06210355); dy2jetsHTSFCentral_neg20->SetBinError(13,0.002560451); dy2jetsHTSFCentral_neg20->SetBinError(14,0.006070554); dy2jetsHTSFCentral_neg20->SetEntries(53341.46); 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.9838888); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(2,1.085137); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(3,1.178864); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(4,1.02847); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(5,0.4508251); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(6,0.3532574); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(7,0.6463122); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(8,0.2286284); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(9,0.1262511); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(11,1.601355); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(13,12.94953); dy2jetsHTSFCentral_neg_ratio21->SetBinContent(14,59.18581); dy2jetsHTSFCentral_neg_ratio21->SetBinError(1,0.006688699); dy2jetsHTSFCentral_neg_ratio21->SetBinError(2,0.01411964); dy2jetsHTSFCentral_neg_ratio21->SetBinError(3,0.03817494); dy2jetsHTSFCentral_neg_ratio21->SetBinError(4,0.09466695); dy2jetsHTSFCentral_neg_ratio21->SetBinError(5,0.09238727); dy2jetsHTSFCentral_neg_ratio21->SetBinError(6,0.09869738); dy2jetsHTSFCentral_neg_ratio21->SetBinError(7,0.4584834); dy2jetsHTSFCentral_neg_ratio21->SetBinError(8,0.1517516); dy2jetsHTSFCentral_neg_ratio21->SetBinError(9,0.1525247); dy2jetsHTSFCentral_neg_ratio21->SetBinError(11,1.843675); dy2jetsHTSFCentral_neg_ratio21->SetBinError(13,18.3134); dy2jetsHTSFCentral_neg_ratio21->SetBinError(14,82.25535); dy2jetsHTSFCentral_neg_ratio21->SetMinimum(0); dy2jetsHTSFCentral_neg_ratio21->SetMaximum(2); dy2jetsHTSFCentral_neg_ratio21->SetEntries(0.8966868); 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); }