void closure_3jets_HT() { //=========Macro generated from canvas: finalPlots/closure_3jets_HT/finalPlots/closure_3jets_HT //========= (Mon Apr 18 11:11:18 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.460781,342.6951,4.849613); 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,9638.245); dy3jetsHTSFCentral_pos28->SetBinContent(2,2885.358); dy3jetsHTSFCentral_pos28->SetBinContent(3,456.8555); dy3jetsHTSFCentral_pos28->SetBinContent(4,74.35818); dy3jetsHTSFCentral_pos28->SetBinContent(5,16.18654); dy3jetsHTSFCentral_pos28->SetBinContent(6,5.840309); dy3jetsHTSFCentral_pos28->SetBinContent(7,2.352258); dy3jetsHTSFCentral_pos28->SetBinContent(8,1.017986); dy3jetsHTSFCentral_pos28->SetBinContent(9,1.172523); dy3jetsHTSFCentral_pos28->SetBinContent(10,0.2760171); dy3jetsHTSFCentral_pos28->SetBinContent(11,0.2072581); dy3jetsHTSFCentral_pos28->SetBinContent(12,0.08008423); dy3jetsHTSFCentral_pos28->SetBinContent(13,0.07103427); dy3jetsHTSFCentral_pos28->SetBinContent(14,0.4382244); dy3jetsHTSFCentral_pos28->SetBinError(1,72.05441); dy3jetsHTSFCentral_pos28->SetBinError(2,31.86488); dy3jetsHTSFCentral_pos28->SetBinError(3,8.814662); dy3jetsHTSFCentral_pos28->SetBinError(4,2.639844); dy3jetsHTSFCentral_pos28->SetBinError(5,0.8177375); dy3jetsHTSFCentral_pos28->SetBinError(6,0.3750213); dy3jetsHTSFCentral_pos28->SetBinError(7,0.216388); dy3jetsHTSFCentral_pos28->SetBinError(8,0.1280933); dy3jetsHTSFCentral_pos28->SetBinError(9,0.4399099); dy3jetsHTSFCentral_pos28->SetBinError(10,0.0650303); dy3jetsHTSFCentral_pos28->SetBinError(11,0.05499418); dy3jetsHTSFCentral_pos28->SetBinError(12,0.03334952); dy3jetsHTSFCentral_pos28->SetBinError(13,0.03377039); dy3jetsHTSFCentral_pos28->SetBinError(14,0.08569579); dy3jetsHTSFCentral_pos28->SetEntries(28); 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,9586.117); dy3jetsHTSFCentral_neg29->SetBinContent(2,2718.431); dy3jetsHTSFCentral_neg29->SetBinContent(3,386.0216); dy3jetsHTSFCentral_neg29->SetBinContent(4,58.60012); 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.36956); dy3jetsHTSFCentral_neg29->SetBinError(2,32.15539); dy3jetsHTSFCentral_neg29->SetBinError(3,12.01796); dy3jetsHTSFCentral_neg29->SetBinError(4,2.732736); 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(28); 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.005438); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(2,1.061406); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(3,1.183497); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(4,1.268908); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(5,1.129518); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(6,1.134032); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(7,1.151362); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(8,1.370676); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(9,2.04389); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(10,1.080775); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(11,1.24474); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(12,1.634932); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(13,0.7799902); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(14,2.714965); dy3jetsHTSFCentral_neg_ratio30->SetBinError(1,0.01010344); dy3jetsHTSFCentral_neg_ratio30->SetBinError(2,0.0171764); dy3jetsHTSFCentral_neg_ratio30->SetBinError(3,0.04334771); dy3jetsHTSFCentral_neg_ratio30->SetBinError(4,0.07437); dy3jetsHTSFCentral_neg_ratio30->SetBinError(5,0.08736539); dy3jetsHTSFCentral_neg_ratio30->SetBinError(6,0.1381985); dy3jetsHTSFCentral_neg_ratio30->SetBinError(7,0.250004); dy3jetsHTSFCentral_neg_ratio30->SetBinError(8,0.2754301); dy3jetsHTSFCentral_neg_ratio30->SetBinError(9,0.8554747); dy3jetsHTSFCentral_neg_ratio30->SetBinError(10,0.3972484); dy3jetsHTSFCentral_neg_ratio30->SetBinError(11,0.5017085); dy3jetsHTSFCentral_neg_ratio30->SetBinError(12,1.053095); 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(94.08308); 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); }