void atlasClosure_Central() { //=========Macro generated from canvas: atlasClosure/atlasClosure_Central/atlasClosure/atlasClosure_Central //========= (Thu Jun 23 08:37:21 2016) by ROOT version6.06/01 TCanvas *atlasClosure/atlasClosure_Central = new TCanvas("atlasClosure/atlasClosure_Central", "atlasClosure/atlasClosure_Central",0,0,600,600); gStyle->SetOptFit(1); 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->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,0.8649637,201.5854,5.71673); 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_sf__1 = new TH1F("atlas_pos_sf__1","",19,0,190); atlas_pos_sf__1->SetBinContent(1,112136); atlas_pos_sf__1->SetBinContent(2,94923); atlas_pos_sf__1->SetBinContent(3,69564); atlas_pos_sf__1->SetBinContent(4,45593); atlas_pos_sf__1->SetBinContent(5,27488); atlas_pos_sf__1->SetBinContent(6,15092); atlas_pos_sf__1->SetBinContent(7,8375); atlas_pos_sf__1->SetBinContent(8,4574); atlas_pos_sf__1->SetBinContent(9,2482); atlas_pos_sf__1->SetBinContent(10,1411); atlas_pos_sf__1->SetBinContent(11,784); atlas_pos_sf__1->SetBinContent(12,482); atlas_pos_sf__1->SetBinContent(13,348); atlas_pos_sf__1->SetBinContent(14,203); atlas_pos_sf__1->SetBinContent(15,155); atlas_pos_sf__1->SetBinContent(16,127); atlas_pos_sf__1->SetBinContent(17,83); atlas_pos_sf__1->SetBinContent(18,52); atlas_pos_sf__1->SetBinContent(19,231); atlas_pos_sf__1->SetBinError(1,334.8671); atlas_pos_sf__1->SetBinError(2,308.0958); atlas_pos_sf__1->SetBinError(3,263.7499); atlas_pos_sf__1->SetBinError(4,213.5252); atlas_pos_sf__1->SetBinError(5,165.7951); atlas_pos_sf__1->SetBinError(6,122.8495); atlas_pos_sf__1->SetBinError(7,91.51503); atlas_pos_sf__1->SetBinError(8,67.63135); atlas_pos_sf__1->SetBinError(9,49.81967); atlas_pos_sf__1->SetBinError(10,37.56328); atlas_pos_sf__1->SetBinError(11,28); atlas_pos_sf__1->SetBinError(12,21.9545); atlas_pos_sf__1->SetBinError(13,18.65476); atlas_pos_sf__1->SetBinError(14,14.24781); atlas_pos_sf__1->SetBinError(15,12.4499); atlas_pos_sf__1->SetBinError(16,11.26943); atlas_pos_sf__1->SetBinError(17,9.110434); atlas_pos_sf__1->SetBinError(18,7.211103); atlas_pos_sf__1->SetBinError(19,15.19868); atlas_pos_sf__1->SetEntries(384103); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ff0000"); atlas_pos_sf__1->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); atlas_pos_sf__1->SetMarkerColor(ci); atlas_pos_sf__1->SetMarkerStyle(20); atlas_pos_sf__1->GetXaxis()->SetTitle("JZB [GeV]"); atlas_pos_sf__1->GetXaxis()->SetLabelFont(42); atlas_pos_sf__1->GetXaxis()->SetLabelOffset(0.007); atlas_pos_sf__1->GetXaxis()->SetTitleSize(0.05); atlas_pos_sf__1->GetXaxis()->SetTitleFont(42); atlas_pos_sf__1->GetYaxis()->SetTitle("Events / 10 GeV"); atlas_pos_sf__1->GetYaxis()->SetLabelFont(42); atlas_pos_sf__1->GetYaxis()->SetLabelOffset(0.007); atlas_pos_sf__1->GetYaxis()->SetTitleSize(0.05); atlas_pos_sf__1->GetYaxis()->SetTitleOffset(1.1); atlas_pos_sf__1->GetYaxis()->SetTitleFont(42); atlas_pos_sf__1->GetZaxis()->SetLabelFont(42); atlas_pos_sf__1->GetZaxis()->SetLabelOffset(0.007); atlas_pos_sf__1->GetZaxis()->SetTitleSize(0.05); atlas_pos_sf__1->GetZaxis()->SetTitleFont(42); atlas_pos_sf__1->Draw("E,"); TH1F *atlas_neg_sf__2 = new TH1F("atlas_neg_sf__2","",19,0,190); atlas_neg_sf__2->SetBinContent(1,112035); atlas_neg_sf__2->SetBinContent(2,93196); atlas_neg_sf__2->SetBinContent(3,67753); atlas_neg_sf__2->SetBinContent(4,43696); atlas_neg_sf__2->SetBinContent(5,25778); atlas_neg_sf__2->SetBinContent(6,14634); atlas_neg_sf__2->SetBinContent(7,8065); atlas_neg_sf__2->SetBinContent(8,4451); atlas_neg_sf__2->SetBinContent(9,2469); atlas_neg_sf__2->SetBinContent(10,1378); atlas_neg_sf__2->SetBinContent(11,883); atlas_neg_sf__2->SetBinContent(12,618); atlas_neg_sf__2->SetBinContent(13,345); atlas_neg_sf__2->SetBinContent(14,235); atlas_neg_sf__2->SetBinContent(15,185); atlas_neg_sf__2->SetBinContent(16,129); atlas_neg_sf__2->SetBinContent(17,83); atlas_neg_sf__2->SetBinContent(18,71); atlas_neg_sf__2->SetBinContent(19,298); atlas_neg_sf__2->SetBinError(1,334.7163); atlas_neg_sf__2->SetBinError(2,305.2802); atlas_neg_sf__2->SetBinError(3,260.2941); atlas_neg_sf__2->SetBinError(4,209.0359); atlas_neg_sf__2->SetBinError(5,160.5553); atlas_neg_sf__2->SetBinError(6,120.9711); atlas_neg_sf__2->SetBinError(7,89.80535); atlas_neg_sf__2->SetBinError(8,66.71582); atlas_neg_sf__2->SetBinError(9,49.68903); atlas_neg_sf__2->SetBinError(10,37.12142); atlas_neg_sf__2->SetBinError(11,29.71532); atlas_neg_sf__2->SetBinError(12,24.85961); atlas_neg_sf__2->SetBinError(13,18.57418); atlas_neg_sf__2->SetBinError(14,15.32971); atlas_neg_sf__2->SetBinError(15,13.60147); atlas_neg_sf__2->SetBinError(16,11.35782); atlas_neg_sf__2->SetBinError(17,9.110434); atlas_neg_sf__2->SetBinError(18,8.42615); atlas_neg_sf__2->SetBinError(19,17.26268); atlas_neg_sf__2->SetEntries(376302); ci = TColor::GetColor("#0000ff"); atlas_neg_sf__2->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); atlas_neg_sf__2->SetMarkerColor(ci); atlas_neg_sf__2->SetMarkerStyle(20); atlas_neg_sf__2->GetXaxis()->SetTitle("JZB [GeV]"); atlas_neg_sf__2->GetXaxis()->SetLabelFont(42); atlas_neg_sf__2->GetXaxis()->SetLabelOffset(0.007); atlas_neg_sf__2->GetXaxis()->SetTitleSize(0.05); atlas_neg_sf__2->GetXaxis()->SetTitleFont(42); atlas_neg_sf__2->GetYaxis()->SetTitle("Events / 10 GeV"); atlas_neg_sf__2->GetYaxis()->SetLabelFont(42); atlas_neg_sf__2->GetYaxis()->SetLabelOffset(0.007); atlas_neg_sf__2->GetYaxis()->SetTitleSize(0.05); atlas_neg_sf__2->GetYaxis()->SetTitleOffset(1.1); atlas_neg_sf__2->GetYaxis()->SetTitleFont(42); atlas_neg_sf__2->GetZaxis()->SetLabelFont(42); atlas_neg_sf__2->GetZaxis()->SetLabelOffset(0.007); atlas_neg_sf__2->GetZaxis()->SetTitleSize(0.05); atlas_neg_sf__2->GetZaxis()->SetTitleFont(42); atlas_neg_sf__2->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(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(); 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_ratio__3 = new TH1F("neg_sf_ratio_ratio__3","",19,0,190); neg_sf_ratio_ratio__3->SetBinContent(1,1.000901); neg_sf_ratio_ratio__3->SetBinContent(2,1.018531); neg_sf_ratio_ratio__3->SetBinContent(3,1.026729); neg_sf_ratio_ratio__3->SetBinContent(4,1.043414); neg_sf_ratio_ratio__3->SetBinContent(5,1.066336); neg_sf_ratio_ratio__3->SetBinContent(6,1.031297); neg_sf_ratio_ratio__3->SetBinContent(7,1.038438); neg_sf_ratio_ratio__3->SetBinContent(8,1.027634); neg_sf_ratio_ratio__3->SetBinContent(9,1.005265); neg_sf_ratio_ratio__3->SetBinContent(10,1.023948); neg_sf_ratio_ratio__3->SetBinContent(11,0.8878822); neg_sf_ratio_ratio__3->SetBinContent(12,0.7799353); neg_sf_ratio_ratio__3->SetBinContent(13,1.008696); neg_sf_ratio_ratio__3->SetBinContent(14,0.8638298); neg_sf_ratio_ratio__3->SetBinContent(15,0.8378378); neg_sf_ratio_ratio__3->SetBinContent(16,0.9844961); neg_sf_ratio_ratio__3->SetBinContent(17,1); neg_sf_ratio_ratio__3->SetBinContent(18,0.7323943); neg_sf_ratio_ratio__3->SetBinContent(19,0.7751678); neg_sf_ratio_ratio__3->SetBinError(1,0.004227968); neg_sf_ratio_ratio__3->SetBinError(2,0.004696844); neg_sf_ratio_ratio__3->SetBinError(3,0.005541938); neg_sf_ratio_ratio__3->SetBinError(4,0.006985308); neg_sf_ratio_ratio__3->SetBinError(5,0.009245338); neg_sf_ratio_ratio__3->SetBinError(6,0.01196457); neg_sf_ratio_ratio__3->SetBinError(7,0.01620081); neg_sf_ratio_ratio__3->SetBinError(8,0.02163641); neg_sf_ratio_ratio__3->SetBinError(9,0.02857365); neg_sf_ratio_ratio__3->SetBinError(10,0.03878055); neg_sf_ratio_ratio__3->SetBinError(11,0.04356972); neg_sf_ratio_ratio__3->SetBinError(12,0.0473955); neg_sf_ratio_ratio__3->SetBinError(13,0.07663508); neg_sf_ratio_ratio__3->SetBinError(14,0.08277197); neg_sf_ratio_ratio__3->SetBinError(15,0.09123211); neg_sf_ratio_ratio__3->SetBinError(16,0.1230658); neg_sf_ratio_ratio__3->SetBinError(17,0.1552301); neg_sf_ratio_ratio__3->SetBinError(18,0.1336801); neg_sf_ratio_ratio__3->SetBinError(19,0.06795312); neg_sf_ratio_ratio__3->SetMinimum(0); neg_sf_ratio_ratio__3->SetMaximum(2); neg_sf_ratio_ratio__3->SetEntries(3648.352); ci = TColor::GetColor("#666699"); neg_sf_ratio_ratio__3->SetFillColor(ci); ci = TColor::GetColor("#0000ff"); neg_sf_ratio_ratio__3->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); neg_sf_ratio_ratio__3->SetMarkerColor(ci); neg_sf_ratio_ratio__3->SetMarkerStyle(20); neg_sf_ratio_ratio__3->SetMarkerSize(0); neg_sf_ratio_ratio__3->GetXaxis()->SetLabelFont(42); neg_sf_ratio_ratio__3->GetXaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio__3->GetXaxis()->SetLabelSize(0.12); neg_sf_ratio_ratio__3->GetXaxis()->SetTitleSize(0.14); neg_sf_ratio_ratio__3->GetXaxis()->SetTitleFont(42); neg_sf_ratio_ratio__3->GetYaxis()->SetTitle("Ratio"); neg_sf_ratio_ratio__3->GetYaxis()->CenterTitle(true); neg_sf_ratio_ratio__3->GetYaxis()->SetNdivisions(4); neg_sf_ratio_ratio__3->GetYaxis()->SetLabelFont(42); neg_sf_ratio_ratio__3->GetYaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio__3->GetYaxis()->SetLabelSize(0.12); neg_sf_ratio_ratio__3->GetYaxis()->SetTitleSize(0.14); neg_sf_ratio_ratio__3->GetYaxis()->SetTitleOffset(0.3); neg_sf_ratio_ratio__3->GetYaxis()->SetTitleFont(42); neg_sf_ratio_ratio__3->GetZaxis()->SetLabelFont(42); neg_sf_ratio_ratio__3->GetZaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio__3->GetZaxis()->SetTitleSize(0.05); neg_sf_ratio_ratio__3->GetZaxis()->SetTitleFont(42); neg_sf_ratio_ratio__3->Draw("E2,"); 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 = 1435; 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->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"); TLine *line = new TLine(0,1,190,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); pad2->Modified(); atlasClosure/atlasClosure_Central->cd(); atlasClosure/atlasClosure_Central->Modified(); atlasClosure/atlasClosure_Central->cd(); atlasClosure/atlasClosure_Central->SetSelected(atlasClosure/atlasClosure_Central); }