void closure_2jets__Forward() { //=========Macro generated from canvas: finalPlots/closure_2jets__Forward/finalPlots/closure_2jets__Forward //========= (Wed Mar 30 12:26:51 2016) by ROOT version6.02/05 TCanvas *finalPlots/closure_2jets__Forward = new TCanvas("finalPlots/closure_2jets__Forward", "finalPlots/closure_2jets__Forward",0,0,600,600); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); finalPlots/closure_2jets__Forward->SetHighLightColor(2); finalPlots/closure_2jets__Forward->Range(0,0,1,1); finalPlots/closure_2jets__Forward->SetFillColor(0); finalPlots/closure_2jets__Forward->SetBorderMode(0); finalPlots/closure_2jets__Forward->SetBorderSize(2); finalPlots/closure_2jets__Forward->SetTickx(1); finalPlots/closure_2jets__Forward->SetTicky(1); finalPlots/closure_2jets__Forward->SetLeftMargin(0.13); finalPlots/closure_2jets__Forward->SetRightMargin(0.05); finalPlots/closure_2jets__Forward->SetTopMargin(0.08); finalPlots/closure_2jets__Forward->SetBottomMargin(0.13); finalPlots/closure_2jets__Forward->SetFrameFillStyle(0); finalPlots/closure_2jets__Forward->SetFrameBorderMode(0); // ------------>Primitives in pad: pad1 TPad *pad1 = new TPad("pad1", "pad1",0,0.25,1,1); pad1->Draw(); pad1->cd(); pad1->Range(-32.97561,-4.254104,220.6829,4.578885); 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 *dy2jetsSFForward_pos28 = new TH1F("dy2jetsSFForward_pos28","",26,0,208); dy2jetsSFForward_pos28->SetBinContent(1,3795.287); dy2jetsSFForward_pos28->SetBinContent(2,2984.625); dy2jetsSFForward_pos28->SetBinContent(3,1933.948); dy2jetsSFForward_pos28->SetBinContent(4,1113.755); dy2jetsSFForward_pos28->SetBinContent(5,531.854); dy2jetsSFForward_pos28->SetBinContent(6,279.4873); dy2jetsSFForward_pos28->SetBinContent(7,92.03693); dy2jetsSFForward_pos28->SetBinContent(8,52.60142); dy2jetsSFForward_pos28->SetBinContent(9,13.50736); dy2jetsSFForward_pos28->SetBinContent(10,11.94725); dy2jetsSFForward_pos28->SetBinContent(11,-0.5507085); dy2jetsSFForward_pos28->SetBinContent(12,8.333865); dy2jetsSFForward_pos28->SetBinContent(13,0.2753903); dy2jetsSFForward_pos28->SetBinContent(14,0.01676226); dy2jetsSFForward_pos28->SetBinContent(15,0.00834516); dy2jetsSFForward_pos28->SetBinContent(16,-1.164271); dy2jetsSFForward_pos28->SetBinContent(17,0.2906418); dy2jetsSFForward_pos28->SetBinContent(21,-0.02981129); dy2jetsSFForward_pos28->SetBinContent(23,0.2907137); dy2jetsSFForward_pos28->SetBinContent(25,0.003668993); dy2jetsSFForward_pos28->SetBinError(1,137.4679); dy2jetsSFForward_pos28->SetBinError(2,120.4675); dy2jetsSFForward_pos28->SetBinError(3,99.08596); dy2jetsSFForward_pos28->SetBinError(4,70.9148); dy2jetsSFForward_pos28->SetBinError(5,51.10021); dy2jetsSFForward_pos28->SetBinError(6,35.12894); dy2jetsSFForward_pos28->SetBinError(7,21.81373); dy2jetsSFForward_pos28->SetBinError(8,14.22219); dy2jetsSFForward_pos28->SetBinError(9,9.303631); dy2jetsSFForward_pos28->SetBinError(10,5.602516); dy2jetsSFForward_pos28->SetBinError(11,4.06509); dy2jetsSFForward_pos28->SetBinError(12,4.097986); dy2jetsSFForward_pos28->SetBinError(13,0.3188808); dy2jetsSFForward_pos28->SetBinError(14,0.01591068); dy2jetsSFForward_pos28->SetBinError(15,0.008345159); dy2jetsSFForward_pos28->SetBinError(16,1.164271); dy2jetsSFForward_pos28->SetBinError(17,0.2906418); dy2jetsSFForward_pos28->SetBinError(21,0.06373483); dy2jetsSFForward_pos28->SetBinError(23,0.2906418); dy2jetsSFForward_pos28->SetBinError(25,0.003668993); dy2jetsSFForward_pos28->SetEntries(2210.286); dy2jetsSFForward_pos28->SetDirectory(0); dy2jetsSFForward_pos28->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ff0000"); dy2jetsSFForward_pos28->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); dy2jetsSFForward_pos28->SetMarkerColor(ci); dy2jetsSFForward_pos28->SetMarkerStyle(20); dy2jetsSFForward_pos28->GetXaxis()->SetTitle("JZB [GeV]"); dy2jetsSFForward_pos28->GetXaxis()->SetLabelFont(42); dy2jetsSFForward_pos28->GetXaxis()->SetLabelOffset(0.007); dy2jetsSFForward_pos28->GetXaxis()->SetTitleSize(0.05); dy2jetsSFForward_pos28->GetXaxis()->SetTitleFont(42); dy2jetsSFForward_pos28->GetYaxis()->SetTitle("Events / 8 GeV"); dy2jetsSFForward_pos28->GetYaxis()->SetLabelFont(42); dy2jetsSFForward_pos28->GetYaxis()->SetLabelOffset(0.007); dy2jetsSFForward_pos28->GetYaxis()->SetTitleSize(0.05); dy2jetsSFForward_pos28->GetYaxis()->SetTitleOffset(1.1); dy2jetsSFForward_pos28->GetYaxis()->SetTitleFont(42); dy2jetsSFForward_pos28->GetZaxis()->SetLabelFont(42); dy2jetsSFForward_pos28->GetZaxis()->SetLabelOffset(0.007); dy2jetsSFForward_pos28->GetZaxis()->SetTitleSize(0.05); dy2jetsSFForward_pos28->GetZaxis()->SetTitleFont(42); dy2jetsSFForward_pos28->Draw("E,"); TH1F *dy2jetsSFForward_neg29 = new TH1F("dy2jetsSFForward_neg29","",26,0,208); dy2jetsSFForward_neg29->SetBinContent(1,3735.729); dy2jetsSFForward_neg29->SetBinContent(2,2879.85); dy2jetsSFForward_neg29->SetBinContent(3,2088.663); dy2jetsSFForward_neg29->SetBinContent(4,1037.057); dy2jetsSFForward_neg29->SetBinContent(5,576.303); dy2jetsSFForward_neg29->SetBinContent(6,226.9481); dy2jetsSFForward_neg29->SetBinContent(7,91.60858); dy2jetsSFForward_neg29->SetBinContent(8,25.9059); dy2jetsSFForward_neg29->SetBinContent(9,36.94979); dy2jetsSFForward_neg29->SetBinContent(10,11.19748); dy2jetsSFForward_neg29->SetBinContent(11,14.20699); dy2jetsSFForward_neg29->SetBinContent(12,8.311851); dy2jetsSFForward_neg29->SetBinContent(13,-0.9822829); dy2jetsSFForward_neg29->SetBinContent(14,3.004042); dy2jetsSFForward_neg29->SetBinContent(15,0.02762536); dy2jetsSFForward_neg29->SetBinContent(16,2.103843); dy2jetsSFForward_neg29->SetBinContent(17,0.6109232); dy2jetsSFForward_neg29->SetBinContent(18,-0.007553807); dy2jetsSFForward_neg29->SetBinContent(19,0.6109232); dy2jetsSFForward_neg29->SetBinContent(24,0.0004316462); dy2jetsSFForward_neg29->SetBinError(1,140.6533); dy2jetsSFForward_neg29->SetBinError(2,127.8665); dy2jetsSFForward_neg29->SetBinError(3,104.2701); dy2jetsSFForward_neg29->SetBinError(4,77.22552); dy2jetsSFForward_neg29->SetBinError(5,53.5217); dy2jetsSFForward_neg29->SetBinError(6,35.65292); dy2jetsSFForward_neg29->SetBinError(7,21.07198); dy2jetsSFForward_neg29->SetBinError(8,12.24987); dy2jetsSFForward_neg29->SetBinError(9,11.20696); dy2jetsSFForward_neg29->SetBinError(10,6.015774); dy2jetsSFForward_neg29->SetBinError(11,6.778973); dy2jetsSFForward_neg29->SetBinError(12,5.891174); dy2jetsSFForward_neg29->SetBinError(13,1.104605); dy2jetsSFForward_neg29->SetBinError(14,2.208644); dy2jetsSFForward_neg29->SetBinError(15,0.02762536); dy2jetsSFForward_neg29->SetBinError(16,2.102477); dy2jetsSFForward_neg29->SetBinError(17,0.6109232); dy2jetsSFForward_neg29->SetBinError(18,0.01795603); dy2jetsSFForward_neg29->SetBinError(19,0.6109232); dy2jetsSFForward_neg29->SetBinError(24,0.0004316462); dy2jetsSFForward_neg29->SetEntries(1989.67); dy2jetsSFForward_neg29->SetDirectory(0); dy2jetsSFForward_neg29->SetStats(0); ci = TColor::GetColor("#0000ff"); dy2jetsSFForward_neg29->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); dy2jetsSFForward_neg29->SetMarkerColor(ci); dy2jetsSFForward_neg29->SetMarkerStyle(20); dy2jetsSFForward_neg29->GetXaxis()->SetTitle("JZB [GeV]"); dy2jetsSFForward_neg29->GetXaxis()->SetLabelFont(42); dy2jetsSFForward_neg29->GetXaxis()->SetLabelOffset(0.007); dy2jetsSFForward_neg29->GetXaxis()->SetTitleSize(0.05); dy2jetsSFForward_neg29->GetXaxis()->SetTitleFont(42); dy2jetsSFForward_neg29->GetYaxis()->SetTitle("Events / 8 GeV"); dy2jetsSFForward_neg29->GetYaxis()->SetLabelFont(42); dy2jetsSFForward_neg29->GetYaxis()->SetLabelOffset(0.007); dy2jetsSFForward_neg29->GetYaxis()->SetTitleSize(0.05); dy2jetsSFForward_neg29->GetYaxis()->SetTitleOffset(1.1); dy2jetsSFForward_neg29->GetYaxis()->SetTitleFont(42); dy2jetsSFForward_neg29->GetZaxis()->SetLabelFont(42); dy2jetsSFForward_neg29->GetZaxis()->SetLabelOffset(0.007); dy2jetsSFForward_neg29->GetZaxis()->SetTitleSize(0.05); dy2jetsSFForward_neg29->GetZaxis()->SetTitleFont(42); dy2jetsSFForward_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("dy2jetsSFForward_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("dy2jetsSFForward_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__Forward->cd(); // ------------>Primitives in pad: pad2 TPad *pad2 = new TPad("pad2", "pad2",0,0.05,1,0.25); pad2->Draw(); pad2->cd(); pad2->Range(-32.97561,-1,220.6829,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 *dy2jetsSFForward_neg_ratio30 = new TH1F("dy2jetsSFForward_neg_ratio30","",26,0,208); dy2jetsSFForward_neg_ratio30->SetBinContent(1,1.015943); dy2jetsSFForward_neg_ratio30->SetBinContent(2,1.036382); dy2jetsSFForward_neg_ratio30->SetBinContent(3,0.9259265); dy2jetsSFForward_neg_ratio30->SetBinContent(4,1.073957); dy2jetsSFForward_neg_ratio30->SetBinContent(5,0.9228721); dy2jetsSFForward_neg_ratio30->SetBinContent(6,1.231503); dy2jetsSFForward_neg_ratio30->SetBinContent(7,1.004676); dy2jetsSFForward_neg_ratio30->SetBinContent(8,2.03048); dy2jetsSFForward_neg_ratio30->SetBinContent(9,0.3655599); dy2jetsSFForward_neg_ratio30->SetBinContent(10,1.066959); dy2jetsSFForward_neg_ratio30->SetBinContent(11,-0.03876322); dy2jetsSFForward_neg_ratio30->SetBinContent(12,1.002649); dy2jetsSFForward_neg_ratio30->SetBinContent(13,-0.2803574); dy2jetsSFForward_neg_ratio30->SetBinContent(14,0.005579903); dy2jetsSFForward_neg_ratio30->SetBinContent(15,0.3020833); dy2jetsSFForward_neg_ratio30->SetBinContent(16,-0.5534019); dy2jetsSFForward_neg_ratio30->SetBinContent(17,0.4757419); dy2jetsSFForward_neg_ratio30->SetBinError(1,0.05307775); dy2jetsSFForward_neg_ratio30->SetBinError(2,0.06218761); dy2jetsSFForward_neg_ratio30->SetBinError(3,0.06623601); dy2jetsSFForward_neg_ratio30->SetBinError(4,0.105222); dy2jetsSFForward_neg_ratio30->SetBinError(5,0.1233208); dy2jetsSFForward_neg_ratio30->SetBinError(6,0.247767); dy2jetsSFForward_neg_ratio30->SetBinError(7,0.3318232); dy2jetsSFForward_neg_ratio30->SetBinError(8,1.106006); dy2jetsSFForward_neg_ratio30->SetBinError(9,0.275122); dy2jetsSFForward_neg_ratio30->SetBinError(10,0.7608646); dy2jetsSFForward_neg_ratio30->SetBinError(11,0.2867304); dy2jetsSFForward_neg_ratio30->SetBinError(12,0.8649246); dy2jetsSFForward_neg_ratio30->SetBinError(13,0.4525276); dy2jetsSFForward_neg_ratio30->SetBinError(14,0.006699437); dy2jetsSFForward_neg_ratio30->SetBinError(15,0.4272104); dy2jetsSFForward_neg_ratio30->SetBinError(16,0.7823743); dy2jetsSFForward_neg_ratio30->SetBinError(17,0.6728006); dy2jetsSFForward_neg_ratio30->SetMinimum(0); dy2jetsSFForward_neg_ratio30->SetMaximum(2); dy2jetsSFForward_neg_ratio30->SetEntries(30.73318); dy2jetsSFForward_neg_ratio30->SetStats(0); ci = TColor::GetColor("#0000ff"); dy2jetsSFForward_neg_ratio30->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); dy2jetsSFForward_neg_ratio30->SetMarkerColor(ci); dy2jetsSFForward_neg_ratio30->SetMarkerStyle(20); dy2jetsSFForward_neg_ratio30->GetXaxis()->SetLabelFont(42); dy2jetsSFForward_neg_ratio30->GetXaxis()->SetLabelOffset(0.007); dy2jetsSFForward_neg_ratio30->GetXaxis()->SetLabelSize(0.12); dy2jetsSFForward_neg_ratio30->GetXaxis()->SetTitleSize(0.14); dy2jetsSFForward_neg_ratio30->GetXaxis()->SetTitleFont(42); dy2jetsSFForward_neg_ratio30->GetYaxis()->SetTitle("Ratio"); dy2jetsSFForward_neg_ratio30->GetYaxis()->CenterTitle(true); dy2jetsSFForward_neg_ratio30->GetYaxis()->SetNdivisions(4); dy2jetsSFForward_neg_ratio30->GetYaxis()->SetLabelFont(42); dy2jetsSFForward_neg_ratio30->GetYaxis()->SetLabelOffset(0.007); dy2jetsSFForward_neg_ratio30->GetYaxis()->SetLabelSize(0.12); dy2jetsSFForward_neg_ratio30->GetYaxis()->SetTitleSize(0.14); dy2jetsSFForward_neg_ratio30->GetYaxis()->SetTitleOffset(0.3); dy2jetsSFForward_neg_ratio30->GetYaxis()->SetTitleFont(42); dy2jetsSFForward_neg_ratio30->GetZaxis()->SetLabelFont(42); dy2jetsSFForward_neg_ratio30->GetZaxis()->SetLabelOffset(0.007); dy2jetsSFForward_neg_ratio30->GetZaxis()->SetTitleSize(0.05); dy2jetsSFForward_neg_ratio30->GetZaxis()->SetTitleFont(42); dy2jetsSFForward_neg_ratio30->Draw("l, "); TLine *line = new TLine(0,1,208,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); Double_t Graph0_fx2[4] = { 0, 250, 250, 0}; Double_t Graph0_fy2[4] = { 0.7, 0.7, 1.3, 1.3}; TGraph *graph = new TGraph(4,Graph0_fx2,Graph0_fy2); graph->SetName("Graph0"); graph->SetTitle("Graph"); ci = 1180; color = new TColor(ci, 1, 0, 0, " ", 0.4); graph->SetFillColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph2 = new TH1F("Graph_Graph2","Graph",100,0,275); Graph_Graph2->SetMinimum(0.64); Graph_Graph2->SetMaximum(1.36); Graph_Graph2->SetDirectory(0); Graph_Graph2->SetStats(0); Graph_Graph2->SetMarkerStyle(20); Graph_Graph2->GetXaxis()->SetLabelFont(42); Graph_Graph2->GetXaxis()->SetLabelOffset(0.007); Graph_Graph2->GetXaxis()->SetTitleSize(0.05); Graph_Graph2->GetXaxis()->SetTitleFont(42); Graph_Graph2->GetYaxis()->SetLabelFont(42); Graph_Graph2->GetYaxis()->SetLabelOffset(0.007); Graph_Graph2->GetYaxis()->SetTitleSize(0.05); Graph_Graph2->GetYaxis()->SetTitleOffset(1.1); Graph_Graph2->GetYaxis()->SetTitleFont(42); Graph_Graph2->GetZaxis()->SetLabelFont(42); Graph_Graph2->GetZaxis()->SetLabelOffset(0.007); Graph_Graph2->GetZaxis()->SetTitleSize(0.05); Graph_Graph2->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph2); graph->Draw("f"); pad2->Modified(); finalPlots/closure_2jets__Forward->cd(); finalPlots/closure_2jets__Forward->Modified(); finalPlots/closure_2jets__Forward->cd(); finalPlots/closure_2jets__Forward->SetSelected(finalPlots/closure_2jets__Forward); }