void atlasClosure_Forward() { //=========Macro generated from canvas: atlasClosure/atlasClosure_Forward/atlasClosure/atlasClosure_Forward //========= (Fri Jun 10 17:41:39 2016) by ROOT version6.02/05 TCanvas *atlasClosure/atlasClosure_Forward = new TCanvas("atlasClosure/atlasClosure_Forward", "atlasClosure/atlasClosure_Forward",0,0,600,600); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); atlasClosure/atlasClosure_Forward->SetHighLightColor(2); atlasClosure/atlasClosure_Forward->Range(0,0,1,1); atlasClosure/atlasClosure_Forward->SetFillColor(0); atlasClosure/atlasClosure_Forward->SetBorderMode(0); atlasClosure/atlasClosure_Forward->SetBorderSize(2); atlasClosure/atlasClosure_Forward->SetTickx(1); atlasClosure/atlasClosure_Forward->SetTicky(1); atlasClosure/atlasClosure_Forward->SetLeftMargin(0.13); atlasClosure/atlasClosure_Forward->SetRightMargin(0.05); atlasClosure/atlasClosure_Forward->SetTopMargin(0.08); atlasClosure/atlasClosure_Forward->SetBottomMargin(0.13); atlasClosure/atlasClosure_Forward->SetFrameFillStyle(0); atlasClosure/atlasClosure_Forward->SetFrameBorderMode(0); // ------------>Primitives in pad: pad1 TPad *pad1 = new TPad("pad1", "pad1",0,0.25,1,1); pad1->Draw(); pad1->cd(); pad1->Range(-42.01219,-4.047295,281.1585,2.883295); 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); Double_t xAxis4[11] = {0, 15, 30, 45, 60, 75, 90, 135, 185, 225, 265}; TH1F *atlas_pos_sf4 = new TH1F("atlas_pos_sf4","",10, xAxis4); atlas_pos_sf4->SetBinContent(1,110.204); atlas_pos_sf4->SetBinContent(2,63.68468); atlas_pos_sf4->SetBinContent(3,29.15915); atlas_pos_sf4->SetBinContent(4,10.85254); atlas_pos_sf4->SetBinContent(5,2.862694); atlas_pos_sf4->SetBinContent(6,0.8873506); atlas_pos_sf4->SetBinContent(7,0.3797737); atlas_pos_sf4->SetBinContent(8,0.04286145); atlas_pos_sf4->SetBinContent(9,0.006211128); atlas_pos_sf4->SetBinError(1,2.333914); atlas_pos_sf4->SetBinError(2,1.684032); atlas_pos_sf4->SetBinError(3,1.098166); atlas_pos_sf4->SetBinError(4,0.831922); atlas_pos_sf4->SetBinError(5,0.2331928); atlas_pos_sf4->SetBinError(6,0.1504693); atlas_pos_sf4->SetBinError(7,0.08437418); atlas_pos_sf4->SetBinError(8,0.04728053); atlas_pos_sf4->SetBinError(9,0.005326432); atlas_pos_sf4->SetEntries(4631.914); atlas_pos_sf4->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ff0000"); atlas_pos_sf4->SetLineColor(ci); atlas_pos_sf4->SetLineWidth(2); ci = TColor::GetColor("#ff0000"); atlas_pos_sf4->SetMarkerColor(ci); atlas_pos_sf4->SetMarkerStyle(20); atlas_pos_sf4->GetXaxis()->SetTitle("JZB [GeV]"); atlas_pos_sf4->GetXaxis()->SetLabelFont(42); atlas_pos_sf4->GetXaxis()->SetLabelOffset(0.007); atlas_pos_sf4->GetXaxis()->SetTitleSize(0.05); atlas_pos_sf4->GetXaxis()->SetTitleFont(42); atlas_pos_sf4->GetYaxis()->SetTitle("# events"); atlas_pos_sf4->GetYaxis()->SetLabelFont(42); atlas_pos_sf4->GetYaxis()->SetLabelOffset(0.007); atlas_pos_sf4->GetYaxis()->SetTitleSize(0.05); atlas_pos_sf4->GetYaxis()->SetTitleOffset(1.1); atlas_pos_sf4->GetYaxis()->SetTitleFont(42); atlas_pos_sf4->GetZaxis()->SetLabelFont(42); atlas_pos_sf4->GetZaxis()->SetLabelOffset(0.007); atlas_pos_sf4->GetZaxis()->SetTitleSize(0.05); atlas_pos_sf4->GetZaxis()->SetTitleFont(42); atlas_pos_sf4->Draw("E,"); Double_t xAxis5[11] = {0, 15, 30, 45, 60, 75, 90, 135, 185, 225, 265}; TH1F *atlas_neg_sf5 = new TH1F("atlas_neg_sf5","",10, xAxis5); atlas_neg_sf5->SetBinContent(1,116.3865); atlas_neg_sf5->SetBinContent(2,65.50114); atlas_neg_sf5->SetBinContent(3,25.69734); atlas_neg_sf5->SetBinContent(4,8.744207); atlas_neg_sf5->SetBinContent(5,2.648349); atlas_neg_sf5->SetBinContent(6,0.7487254); atlas_neg_sf5->SetBinContent(7,0.5205603); atlas_neg_sf5->SetBinContent(8,0.03897258); atlas_neg_sf5->SetBinContent(9,0.0002390332); atlas_neg_sf5->SetBinError(1,2.662473); atlas_neg_sf5->SetBinError(2,1.873663); atlas_neg_sf5->SetBinError(3,1.007101); atlas_neg_sf5->SetBinError(4,0.6081149); atlas_neg_sf5->SetBinError(5,0.2422455); atlas_neg_sf5->SetBinError(6,0.132755); atlas_neg_sf5->SetBinError(7,0.09189034); atlas_neg_sf5->SetBinError(8,0.02365612); atlas_neg_sf5->SetBinError(9,0.0002390332); atlas_neg_sf5->SetEntries(4020.795); atlas_neg_sf5->SetStats(0); ci = TColor::GetColor("#0000ff"); atlas_neg_sf5->SetLineColor(ci); atlas_neg_sf5->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); atlas_neg_sf5->SetMarkerColor(ci); atlas_neg_sf5->SetMarkerStyle(20); atlas_neg_sf5->GetXaxis()->SetTitle("JZB [GeV]"); atlas_neg_sf5->GetXaxis()->SetLabelFont(42); atlas_neg_sf5->GetXaxis()->SetLabelOffset(0.007); atlas_neg_sf5->GetXaxis()->SetTitleSize(0.05); atlas_neg_sf5->GetXaxis()->SetTitleFont(42); atlas_neg_sf5->GetYaxis()->SetTitle("# events"); atlas_neg_sf5->GetYaxis()->SetLabelFont(42); atlas_neg_sf5->GetYaxis()->SetLabelOffset(0.007); atlas_neg_sf5->GetYaxis()->SetTitleSize(0.05); atlas_neg_sf5->GetYaxis()->SetTitleOffset(1.1); atlas_neg_sf5->GetYaxis()->SetTitleFont(42); atlas_neg_sf5->GetZaxis()->SetLabelFont(42); atlas_neg_sf5->GetZaxis()->SetLabelOffset(0.007); atlas_neg_sf5->GetZaxis()->SetTitleSize(0.05); atlas_neg_sf5->GetZaxis()->SetTitleFont(42); atlas_neg_sf5->Draw("HIST,SAME"); TLegend *leg = new TLegend(0.7,0.55,0.9,0.87,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("atlas_pos_sf","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("atlas_neg_sf","JZB < 0","L"); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(2); 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(); atlasClosure/atlasClosure_Forward->cd(); // ------------>Primitives in pad: pad2 TPad *pad2 = new TPad("pad2", "pad2",0,0.05,1,0.25); pad2->Draw(); pad2->cd(); pad2->Range(-42.01219,-1,281.1585,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); Double_t xAxis6[11] = {0, 15, 30, 45, 60, 75, 90, 135, 185, 225, 265}; TH1F *neg_sf_ratio_ratio6 = new TH1F("neg_sf_ratio_ratio6","",10, xAxis6); neg_sf_ratio_ratio6->SetBinContent(1,0.9468797); neg_sf_ratio_ratio6->SetBinContent(2,0.9722682); neg_sf_ratio_ratio6->SetBinContent(3,1.134715); neg_sf_ratio_ratio6->SetBinContent(4,1.241112); neg_sf_ratio_ratio6->SetBinContent(5,1.080935); neg_sf_ratio_ratio6->SetBinContent(6,1.185148); neg_sf_ratio_ratio6->SetBinContent(7,0.729548); neg_sf_ratio_ratio6->SetBinContent(8,1.099785); neg_sf_ratio_ratio6->SetBinContent(9,25.98438); neg_sf_ratio_ratio6->SetBinError(1,0.02951821); neg_sf_ratio_ratio6->SetBinError(2,0.03787476); neg_sf_ratio_ratio6->SetBinError(3,0.0616755); neg_sf_ratio_ratio6->SetBinError(4,0.1284582); neg_sf_ratio_ratio6->SetBinError(5,0.1323977); neg_sf_ratio_ratio6->SetBinError(6,0.2907664); neg_sf_ratio_ratio6->SetBinError(7,0.2070161); neg_sf_ratio_ratio6->SetBinError(8,1.384713); neg_sf_ratio_ratio6->SetBinError(9,34.23054); neg_sf_ratio_ratio6->SetMinimum(0); neg_sf_ratio_ratio6->SetMaximum(2); neg_sf_ratio_ratio6->SetEntries(1.006653); neg_sf_ratio_ratio6->SetStats(0); ci = TColor::GetColor("#cccccc"); neg_sf_ratio_ratio6->SetFillColor(ci); ci = TColor::GetColor("#0000ff"); neg_sf_ratio_ratio6->SetLineColor(ci); neg_sf_ratio_ratio6->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); neg_sf_ratio_ratio6->SetMarkerColor(ci); neg_sf_ratio_ratio6->SetMarkerStyle(20); neg_sf_ratio_ratio6->SetMarkerSize(0); neg_sf_ratio_ratio6->GetXaxis()->SetLabelFont(42); neg_sf_ratio_ratio6->GetXaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio6->GetXaxis()->SetLabelSize(0.12); neg_sf_ratio_ratio6->GetXaxis()->SetTitleSize(0.14); neg_sf_ratio_ratio6->GetXaxis()->SetTitleFont(42); neg_sf_ratio_ratio6->GetYaxis()->SetTitle("Ratio"); neg_sf_ratio_ratio6->GetYaxis()->CenterTitle(true); neg_sf_ratio_ratio6->GetYaxis()->SetNdivisions(4); neg_sf_ratio_ratio6->GetYaxis()->SetLabelFont(42); neg_sf_ratio_ratio6->GetYaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio6->GetYaxis()->SetLabelSize(0.12); neg_sf_ratio_ratio6->GetYaxis()->SetTitleSize(0.14); neg_sf_ratio_ratio6->GetYaxis()->SetTitleOffset(0.3); neg_sf_ratio_ratio6->GetYaxis()->SetTitleFont(42); neg_sf_ratio_ratio6->GetZaxis()->SetLabelFont(42); neg_sf_ratio_ratio6->GetZaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio6->GetZaxis()->SetTitleSize(0.05); neg_sf_ratio_ratio6->GetZaxis()->SetTitleFont(42); neg_sf_ratio_ratio6->Draw("E2"); TLine *line = new TLine(0,1,265,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); Double_t Graph0_fx2[4] = { 0, 265, 265, 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,291.5); Graph_Graph2->SetMinimum(0.64); Graph_Graph2->SetMaximum(1.36); Graph_Graph2->SetDirectory(0); Graph_Graph2->SetStats(0); Graph_Graph2->SetLineWidth(2); 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(); atlasClosure/atlasClosure_Forward->cd(); atlasClosure/atlasClosure_Forward->Modified(); atlasClosure/atlasClosure_Forward->cd(); atlasClosure/atlasClosure_Forward->SetSelected(atlasClosure/atlasClosure_Forward); }