void closure_3jets_HT() { //=========Macro generated from canvas: finalPlots/closure_3jets_HT/finalPlots/closure_3jets_HT //========= (Mon Apr 18 10:53:11 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,-3.790385,342.6951,4.934256); 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,9021.628); dy3jetsHTSFCentral_pos28->SetBinContent(2,2555.505); dy3jetsHTSFCentral_pos28->SetBinContent(3,337.9081); dy3jetsHTSFCentral_pos28->SetBinContent(4,35.48017); dy3jetsHTSFCentral_pos28->SetBinContent(5,3.319402); dy3jetsHTSFCentral_pos28->SetBinContent(6,1.105572); dy3jetsHTSFCentral_pos28->SetBinContent(7,-0.1283523); dy3jetsHTSFCentral_pos28->SetBinContent(8,0.0251913); dy3jetsHTSFCentral_pos28->SetBinContent(9,0.4643141); dy3jetsHTSFCentral_pos28->SetBinContent(10,-0.05504727); dy3jetsHTSFCentral_pos28->SetBinError(1,71.97113); dy3jetsHTSFCentral_pos28->SetBinError(2,31.7788); dy3jetsHTSFCentral_pos28->SetBinError(3,8.685317); dy3jetsHTSFCentral_pos28->SetBinError(4,2.44099); dy3jetsHTSFCentral_pos28->SetBinError(5,0.4328462); dy3jetsHTSFCentral_pos28->SetBinError(6,0.2605324); dy3jetsHTSFCentral_pos28->SetBinError(7,0.4494857); dy3jetsHTSFCentral_pos28->SetBinError(8,0.02277523); dy3jetsHTSFCentral_pos28->SetBinError(9,0.4152195); dy3jetsHTSFCentral_pos28->SetBinError(10,0.05504726); dy3jetsHTSFCentral_pos28->SetEntries(23475.01); 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,8975.734); dy3jetsHTSFCentral_neg29->SetBinContent(2,2420.43); dy3jetsHTSFCentral_neg29->SetBinContent(3,292.3506); dy3jetsHTSFCentral_neg29->SetBinContent(4,32.98617); dy3jetsHTSFCentral_neg29->SetBinContent(5,5.438767); dy3jetsHTSFCentral_neg29->SetBinContent(6,1.73948); dy3jetsHTSFCentral_neg29->SetBinContent(7,0.8448118); dy3jetsHTSFCentral_neg29->SetBinContent(8,0.08043333); dy3jetsHTSFCentral_neg29->SetBinContent(9,0.08650389); dy3jetsHTSFCentral_neg29->SetBinContent(10,0.06654468); dy3jetsHTSFCentral_neg29->SetBinContent(13,0.04074333); dy3jetsHTSFCentral_neg29->SetBinError(1,64.20058); dy3jetsHTSFCentral_neg29->SetBinError(2,31.98383); dy3jetsHTSFCentral_neg29->SetBinError(3,11.92089); dy3jetsHTSFCentral_neg29->SetBinError(4,2.656652); dy3jetsHTSFCentral_neg29->SetBinError(5,0.7441873); dy3jetsHTSFCentral_neg29->SetBinError(6,0.4684739); dy3jetsHTSFCentral_neg29->SetBinError(7,0.3787986); dy3jetsHTSFCentral_neg29->SetBinError(8,0.05774468); dy3jetsHTSFCentral_neg29->SetBinError(9,0.0580629); dy3jetsHTSFCentral_neg29->SetBinError(10,0.04940223); dy3jetsHTSFCentral_neg29->SetBinError(13,0.04074333); dy3jetsHTSFCentral_neg29->SetEntries(25986.01); 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.005113); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(2,1.055806); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(3,1.155831); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(4,1.075607); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(5,0.6103224); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(6,0.6355761); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(7,-0.15193); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(8,0.3131947); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(9,5.367552); dy3jetsHTSFCentral_neg_ratio30->SetBinContent(10,-0.8272226); dy3jetsHTSFCentral_neg_ratio30->SetBinError(1,0.01076942); dy3jetsHTSFCentral_neg_ratio30->SetBinError(2,0.01915794); dy3jetsHTSFCentral_neg_ratio30->SetBinError(3,0.05571223); dy3jetsHTSFCentral_neg_ratio30->SetBinError(4,0.1139316); dy3jetsHTSFCentral_neg_ratio30->SetBinError(5,0.1153596); dy3jetsHTSFCentral_neg_ratio30->SetBinError(6,0.2274485); dy3jetsHTSFCentral_neg_ratio30->SetBinError(7,0.5363976); dy3jetsHTSFCentral_neg_ratio30->SetBinError(8,0.3615724); dy3jetsHTSFCentral_neg_ratio30->SetBinError(9,6.001684); dy3jetsHTSFCentral_neg_ratio30->SetBinError(10,1.030264); dy3jetsHTSFCentral_neg_ratio30->SetMinimum(0); dy3jetsHTSFCentral_neg_ratio30->SetMaximum(2); dy3jetsHTSFCentral_neg_ratio30->SetEntries(2.790041); 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); }