void atlasClosure_Central() { //=========Macro generated from canvas: atlasClosure/atlasClosure_Central/atlasClosure/atlasClosure_Central //========= (Fri Jun 17 18:58:28 2016) by ROOT version6.02/05 TCanvas *atlasClosure/atlasClosure_Central = new TCanvas("atlasClosure/atlasClosure_Central", "atlasClosure/atlasClosure_Central",0,0,600,600); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); atlasClosure/atlasClosure_Central->SetHighLightColor(2); atlasClosure/atlasClosure_Central->Range(0,0,1,1); atlasClosure/atlasClosure_Central->SetFillColor(0); atlasClosure/atlasClosure_Central->SetBorderMode(0); atlasClosure/atlasClosure_Central->SetBorderSize(2); atlasClosure/atlasClosure_Central->SetTickx(1); atlasClosure/atlasClosure_Central->SetTicky(1); atlasClosure/atlasClosure_Central->SetLeftMargin(0.13); atlasClosure/atlasClosure_Central->SetRightMargin(0.05); atlasClosure/atlasClosure_Central->SetTopMargin(0.08); atlasClosure/atlasClosure_Central->SetBottomMargin(0.13); atlasClosure/atlasClosure_Central->SetFrameFillStyle(0); atlasClosure/atlasClosure_Central->SetFrameBorderMode(0); // ------------>Primitives in pad: pad1 TPad *pad1 = new TPad("pad1", "pad1",0,0.25,1,1); pad1->Draw(); pad1->cd(); pad1->Range(-30.12195,-2.311459,201.5854,3.976996); 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 *atlas_pos_sf1 = new TH1F("atlas_pos_sf1","",19,0,190); atlas_pos_sf1->SetBinContent(1,1551.341); atlas_pos_sf1->SetBinContent(2,1204.901); atlas_pos_sf1->SetBinContent(3,752.041); atlas_pos_sf1->SetBinContent(4,386.2664); atlas_pos_sf1->SetBinContent(5,193.3759); atlas_pos_sf1->SetBinContent(6,83.10075); atlas_pos_sf1->SetBinContent(7,42.9095); atlas_pos_sf1->SetBinContent(8,20.38); atlas_pos_sf1->SetBinContent(9,6.67863); atlas_pos_sf1->SetBinContent(10,4.747277); atlas_pos_sf1->SetBinContent(11,2.681594); atlas_pos_sf1->SetBinContent(12,1.169512); atlas_pos_sf1->SetBinContent(13,0.5273238); atlas_pos_sf1->SetBinContent(14,-0.7008419); atlas_pos_sf1->SetBinContent(15,0.107851); atlas_pos_sf1->SetBinContent(16,0.7460707); atlas_pos_sf1->SetBinContent(17,0.04153526); atlas_pos_sf1->SetBinContent(18,0.5243064); atlas_pos_sf1->SetBinContent(19,0.8597198); atlas_pos_sf1->SetBinError(1,20.36353); atlas_pos_sf1->SetBinError(2,17.82488); atlas_pos_sf1->SetBinError(3,13.34472); atlas_pos_sf1->SetBinError(4,9.078882); atlas_pos_sf1->SetBinError(5,6.371601); atlas_pos_sf1->SetBinError(6,3.842205); atlas_pos_sf1->SetBinError(7,2.637098); atlas_pos_sf1->SetBinError(8,1.892802); atlas_pos_sf1->SetBinError(9,1.218407); atlas_pos_sf1->SetBinError(10,1.032286); atlas_pos_sf1->SetBinError(11,0.9320334); atlas_pos_sf1->SetBinError(12,0.7633137); atlas_pos_sf1->SetBinError(13,0.5478391); atlas_pos_sf1->SetBinError(14,0.7701956); atlas_pos_sf1->SetBinError(15,0.5559871); atlas_pos_sf1->SetBinError(16,0.5811212); atlas_pos_sf1->SetBinError(17,0.4050401); atlas_pos_sf1->SetBinError(18,0.3818282); atlas_pos_sf1->SetBinError(19,0.9756843); atlas_pos_sf1->SetEntries(16963.97); atlas_pos_sf1->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ff0000"); atlas_pos_sf1->SetLineColor(ci); atlas_pos_sf1->SetLineWidth(2); ci = TColor::GetColor("#ff0000"); atlas_pos_sf1->SetMarkerColor(ci); atlas_pos_sf1->SetMarkerStyle(20); atlas_pos_sf1->GetXaxis()->SetTitle("JZB [GeV]"); atlas_pos_sf1->GetXaxis()->SetLabelFont(42); atlas_pos_sf1->GetXaxis()->SetLabelOffset(0.007); atlas_pos_sf1->GetXaxis()->SetTitleSize(0.05); atlas_pos_sf1->GetXaxis()->SetTitleFont(42); atlas_pos_sf1->GetYaxis()->SetTitle("Events / 10 GeV"); atlas_pos_sf1->GetYaxis()->SetLabelFont(42); atlas_pos_sf1->GetYaxis()->SetLabelOffset(0.007); atlas_pos_sf1->GetYaxis()->SetTitleSize(0.05); atlas_pos_sf1->GetYaxis()->SetTitleOffset(1.1); atlas_pos_sf1->GetYaxis()->SetTitleFont(42); atlas_pos_sf1->GetZaxis()->SetLabelFont(42); atlas_pos_sf1->GetZaxis()->SetLabelOffset(0.007); atlas_pos_sf1->GetZaxis()->SetTitleSize(0.05); atlas_pos_sf1->GetZaxis()->SetTitleFont(42); atlas_pos_sf1->Draw("E,"); TH1F *atlas_neg_sf2 = new TH1F("atlas_neg_sf2","",19,0,190); atlas_neg_sf2->SetBinContent(1,1558.365); atlas_neg_sf2->SetBinContent(2,1182.959); atlas_neg_sf2->SetBinContent(3,730.7527); atlas_neg_sf2->SetBinContent(4,379.0907); atlas_neg_sf2->SetBinContent(5,171.0745); atlas_neg_sf2->SetBinContent(6,77.44558); atlas_neg_sf2->SetBinContent(7,36.05332); atlas_neg_sf2->SetBinContent(8,17.0777); atlas_neg_sf2->SetBinContent(9,8.368813); atlas_neg_sf2->SetBinContent(10,4.813073); atlas_neg_sf2->SetBinContent(11,3.872449); atlas_neg_sf2->SetBinContent(12,1.704317); atlas_neg_sf2->SetBinContent(13,1.288489); atlas_neg_sf2->SetBinContent(14,0.7789826); atlas_neg_sf2->SetBinContent(15,0.7679979); atlas_neg_sf2->SetBinContent(16,0.3238299); atlas_neg_sf2->SetBinContent(17,0.3195632); atlas_neg_sf2->SetBinContent(18,0.2998736); atlas_neg_sf2->SetBinContent(19,0.9294412); atlas_neg_sf2->SetBinError(1,20.32215); atlas_neg_sf2->SetBinError(2,17.03565); atlas_neg_sf2->SetBinError(3,12.89794); atlas_neg_sf2->SetBinError(4,8.848197); atlas_neg_sf2->SetBinError(5,5.514299); atlas_neg_sf2->SetBinError(6,3.285245); atlas_neg_sf2->SetBinError(7,2.121648); atlas_neg_sf2->SetBinError(8,1.204743); atlas_neg_sf2->SetBinError(9,0.7699125); atlas_neg_sf2->SetBinError(10,0.5553486); atlas_neg_sf2->SetBinError(11,0.7096441); atlas_neg_sf2->SetBinError(12,0.3630033); atlas_neg_sf2->SetBinError(13,0.1551268); atlas_neg_sf2->SetBinError(14,0.1181324); atlas_neg_sf2->SetBinError(15,0.1207989); atlas_neg_sf2->SetBinError(16,0.07013974); atlas_neg_sf2->SetBinError(17,0.08897293); atlas_neg_sf2->SetBinError(18,0.06832958); atlas_neg_sf2->SetBinError(19,0.1179955); atlas_neg_sf2->SetEntries(17500.44); atlas_neg_sf2->SetStats(0); ci = TColor::GetColor("#0000ff"); atlas_neg_sf2->SetLineColor(ci); atlas_neg_sf2->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); atlas_neg_sf2->SetMarkerColor(ci); atlas_neg_sf2->SetMarkerStyle(20); atlas_neg_sf2->GetXaxis()->SetTitle("JZB [GeV]"); atlas_neg_sf2->GetXaxis()->SetLabelFont(42); atlas_neg_sf2->GetXaxis()->SetLabelOffset(0.007); atlas_neg_sf2->GetXaxis()->SetTitleSize(0.05); atlas_neg_sf2->GetXaxis()->SetTitleFont(42); atlas_neg_sf2->GetYaxis()->SetTitle("Events / 10 GeV"); atlas_neg_sf2->GetYaxis()->SetLabelFont(42); atlas_neg_sf2->GetYaxis()->SetLabelOffset(0.007); atlas_neg_sf2->GetYaxis()->SetTitleSize(0.05); atlas_neg_sf2->GetYaxis()->SetTitleOffset(1.1); atlas_neg_sf2->GetYaxis()->SetTitleFont(42); atlas_neg_sf2->GetZaxis()->SetLabelFont(42); atlas_neg_sf2->GetZaxis()->SetLabelOffset(0.007); atlas_neg_sf2->GetZaxis()->SetTitleSize(0.05); atlas_neg_sf2->GetZaxis()->SetTitleFont(42); atlas_neg_sf2->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_Central->cd(); // ------------>Primitives in pad: pad2 TPad *pad2 = new TPad("pad2", "pad2",0,0.05,1,0.25); pad2->Draw(); pad2->cd(); pad2->Range(-30.12195,-1,201.5854,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 *neg_sf_ratio_ratio3 = new TH1F("neg_sf_ratio_ratio3","",19,0,190); neg_sf_ratio_ratio3->SetBinContent(1,0.9954922); neg_sf_ratio_ratio3->SetBinContent(2,1.018548); neg_sf_ratio_ratio3->SetBinContent(3,1.029132); neg_sf_ratio_ratio3->SetBinContent(4,1.018929); neg_sf_ratio_ratio3->SetBinContent(5,1.13036); neg_sf_ratio_ratio3->SetBinContent(6,1.073021); neg_sf_ratio_ratio3->SetBinContent(7,1.190168); neg_sf_ratio_ratio3->SetBinContent(8,1.193369); neg_sf_ratio_ratio3->SetBinContent(9,0.798038); neg_sf_ratio_ratio3->SetBinContent(10,0.9863297); neg_sf_ratio_ratio3->SetBinContent(11,0.6924801); neg_sf_ratio_ratio3->SetBinContent(12,0.6862054); neg_sf_ratio_ratio3->SetBinContent(13,0.4092575); neg_sf_ratio_ratio3->SetBinContent(14,-0.8996887); neg_sf_ratio_ratio3->SetBinContent(15,0.1404314); neg_sf_ratio_ratio3->SetBinContent(16,2.303897); neg_sf_ratio_ratio3->SetBinContent(17,0.1299751); neg_sf_ratio_ratio3->SetBinContent(18,1.748424); neg_sf_ratio_ratio3->SetBinContent(19,0.9249856); neg_sf_ratio_ratio3->SetBinError(1,0.01841961); neg_sf_ratio_ratio3->SetBinError(2,0.02102845); neg_sf_ratio_ratio3->SetBinError(3,0.02575717); neg_sf_ratio_ratio3->SetBinError(4,0.03375146); neg_sf_ratio_ratio3->SetBinError(5,0.05210267); neg_sf_ratio_ratio3->SetBinError(6,0.06732883); neg_sf_ratio_ratio3->SetBinError(7,0.1012694); neg_sf_ratio_ratio3->SetBinError(8,0.139182); neg_sf_ratio_ratio3->SetBinError(9,0.1630531); neg_sf_ratio_ratio3->SetBinError(10,0.2427994); neg_sf_ratio_ratio3->SetBinError(11,0.2720883); neg_sf_ratio_ratio3->SetBinError(12,0.4711151); neg_sf_ratio_ratio3->SetBinError(13,0.4280249); neg_sf_ratio_ratio3->SetBinError(14,0.9980893); neg_sf_ratio_ratio3->SetBinError(15,0.7242803); neg_sf_ratio_ratio3->SetBinError(16,1.862616); neg_sf_ratio_ratio3->SetBinError(17,1.267997); neg_sf_ratio_ratio3->SetBinError(18,1.334169); neg_sf_ratio_ratio3->SetBinError(19,1.056301); neg_sf_ratio_ratio3->SetMinimum(0); neg_sf_ratio_ratio3->SetMaximum(2); neg_sf_ratio_ratio3->SetEntries(27.18824); neg_sf_ratio_ratio3->SetStats(0); ci = TColor::GetColor("#cccccc"); neg_sf_ratio_ratio3->SetFillColor(ci); ci = TColor::GetColor("#0000ff"); neg_sf_ratio_ratio3->SetLineColor(ci); neg_sf_ratio_ratio3->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); neg_sf_ratio_ratio3->SetMarkerColor(ci); neg_sf_ratio_ratio3->SetMarkerStyle(20); neg_sf_ratio_ratio3->SetMarkerSize(0); neg_sf_ratio_ratio3->GetXaxis()->SetLabelFont(42); neg_sf_ratio_ratio3->GetXaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio3->GetXaxis()->SetLabelSize(0.12); neg_sf_ratio_ratio3->GetXaxis()->SetTitleSize(0.14); neg_sf_ratio_ratio3->GetXaxis()->SetTitleFont(42); neg_sf_ratio_ratio3->GetYaxis()->SetTitle("Ratio"); neg_sf_ratio_ratio3->GetYaxis()->CenterTitle(true); neg_sf_ratio_ratio3->GetYaxis()->SetNdivisions(4); neg_sf_ratio_ratio3->GetYaxis()->SetLabelFont(42); neg_sf_ratio_ratio3->GetYaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio3->GetYaxis()->SetLabelSize(0.12); neg_sf_ratio_ratio3->GetYaxis()->SetTitleSize(0.14); neg_sf_ratio_ratio3->GetYaxis()->SetTitleOffset(0.3); neg_sf_ratio_ratio3->GetYaxis()->SetTitleFont(42); neg_sf_ratio_ratio3->GetZaxis()->SetLabelFont(42); neg_sf_ratio_ratio3->GetZaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio3->GetZaxis()->SetTitleSize(0.05); neg_sf_ratio_ratio3->GetZaxis()->SetTitleFont(42); neg_sf_ratio_ratio3->Draw("E2"); TLine *line = new TLine(0,1,190,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); Double_t Graph0_fx1[4] = { 0, 190, 190, 0}; Double_t Graph0_fy1[4] = { 0.7, 0.7, 1.3, 1.3}; TGraph *graph = new TGraph(4,Graph0_fx1,Graph0_fy1); graph->SetName("Graph0"); graph->SetTitle("Graph"); ci = 1179; color = new TColor(ci, 1, 0, 0, " ", 0.4); graph->SetFillColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","Graph",100,0,209); Graph_Graph1->SetMinimum(0.64); Graph_Graph1->SetMaximum(1.36); Graph_Graph1->SetDirectory(0); Graph_Graph1->SetStats(0); Graph_Graph1->SetLineWidth(2); Graph_Graph1->SetMarkerStyle(20); Graph_Graph1->GetXaxis()->SetLabelFont(42); Graph_Graph1->GetXaxis()->SetLabelOffset(0.007); Graph_Graph1->GetXaxis()->SetTitleSize(0.05); Graph_Graph1->GetXaxis()->SetTitleFont(42); Graph_Graph1->GetYaxis()->SetLabelFont(42); Graph_Graph1->GetYaxis()->SetLabelOffset(0.007); Graph_Graph1->GetYaxis()->SetTitleSize(0.05); Graph_Graph1->GetYaxis()->SetTitleOffset(1.1); Graph_Graph1->GetYaxis()->SetTitleFont(42); Graph_Graph1->GetZaxis()->SetLabelFont(42); Graph_Graph1->GetZaxis()->SetLabelOffset(0.007); Graph_Graph1->GetZaxis()->SetTitleSize(0.05); Graph_Graph1->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph1); graph->Draw("f"); pad2->Modified(); atlasClosure/atlasClosure_Central->cd(); atlasClosure/atlasClosure_Central->Modified(); atlasClosure/atlasClosure_Central->cd(); atlasClosure/atlasClosure_Central->SetSelected(atlasClosure/atlasClosure_Central); }