void atlasClosure_Central() { //=========Macro generated from canvas: atlasClosure/atlasClosure_Central/atlasClosure/atlasClosure_Central //========= (Thu Jun 9 15:55:24 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(-55.4878,-0.8820319,371.3415,4.927987); 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 xAxis1[28] = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 300, 350}; TH1F *atlas_pos_sf1 = new TH1F("atlas_pos_sf1","",27, xAxis1); atlas_pos_sf1->SetBinContent(1,15210); atlas_pos_sf1->SetBinContent(2,12371); atlas_pos_sf1->SetBinContent(3,8859); atlas_pos_sf1->SetBinContent(4,5363); atlas_pos_sf1->SetBinContent(5,3032); atlas_pos_sf1->SetBinContent(6,1596); atlas_pos_sf1->SetBinContent(7,816); atlas_pos_sf1->SetBinContent(8,378); atlas_pos_sf1->SetBinContent(9,182); atlas_pos_sf1->SetBinContent(10,78); atlas_pos_sf1->SetBinContent(11,30); atlas_pos_sf1->SetBinContent(12,17); atlas_pos_sf1->SetBinContent(13,14); atlas_pos_sf1->SetBinContent(14,5); atlas_pos_sf1->SetBinContent(15,3); atlas_pos_sf1->SetBinContent(19,1); atlas_pos_sf1->SetBinContent(20,1); atlas_pos_sf1->SetBinContent(26,1); atlas_pos_sf1->SetBinError(1,123.345); atlas_pos_sf1->SetBinError(2,111.234); atlas_pos_sf1->SetBinError(3,94.12226); atlas_pos_sf1->SetBinError(4,73.24616); atlas_pos_sf1->SetBinError(5,55.0636); atlas_pos_sf1->SetBinError(6,39.97499); atlas_pos_sf1->SetBinError(7,28.6007); atlas_pos_sf1->SetBinError(8,19.49359); atlas_pos_sf1->SetBinError(9,13.49074); atlas_pos_sf1->SetBinError(10,8.831761); atlas_pos_sf1->SetBinError(11,5.656854); atlas_pos_sf1->SetBinError(12,4.123106); atlas_pos_sf1->SetBinError(13,3.741657); atlas_pos_sf1->SetBinError(14,2.236068); atlas_pos_sf1->SetBinError(15,1.732051); atlas_pos_sf1->SetBinError(17,1.414214); atlas_pos_sf1->SetBinError(19,1); atlas_pos_sf1->SetBinError(20,1); atlas_pos_sf1->SetBinError(26,1); atlas_pos_sf1->SetEntries(47939.01); 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"); 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,"); Double_t xAxis2[28] = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 300, 350}; TH1F *atlas_neg_sf2 = new TH1F("atlas_neg_sf2","",27, xAxis2); atlas_neg_sf2->SetBinContent(1,15826); atlas_neg_sf2->SetBinContent(2,12465); atlas_neg_sf2->SetBinContent(3,8370); atlas_neg_sf2->SetBinContent(4,4885); atlas_neg_sf2->SetBinContent(5,2635); atlas_neg_sf2->SetBinContent(6,1396); atlas_neg_sf2->SetBinContent(7,664); atlas_neg_sf2->SetBinContent(8,331); atlas_neg_sf2->SetBinContent(9,147); atlas_neg_sf2->SetBinContent(10,86); atlas_neg_sf2->SetBinContent(11,42); atlas_neg_sf2->SetBinContent(12,29); atlas_neg_sf2->SetBinContent(13,14); atlas_neg_sf2->SetBinContent(14,2); atlas_neg_sf2->SetBinContent(15,7); atlas_neg_sf2->SetBinContent(16,1); atlas_neg_sf2->SetBinContent(17,1); atlas_neg_sf2->SetBinContent(20,1); atlas_neg_sf2->SetBinContent(23,1); atlas_neg_sf2->SetBinContent(25,1); atlas_neg_sf2->SetBinContent(26,1); atlas_neg_sf2->SetBinContent(27,1); atlas_neg_sf2->SetBinError(1,125.8173); atlas_neg_sf2->SetBinError(2,111.6557); atlas_neg_sf2->SetBinError(3,91.49863); atlas_neg_sf2->SetBinError(4,69.89278); atlas_neg_sf2->SetBinError(5,51.33225); atlas_neg_sf2->SetBinError(6,37.36308); atlas_neg_sf2->SetBinError(7,25.7682); atlas_neg_sf2->SetBinError(8,18.19341); atlas_neg_sf2->SetBinError(9,12.12436); atlas_neg_sf2->SetBinError(10,9.273618); atlas_neg_sf2->SetBinError(11,6.480741); atlas_neg_sf2->SetBinError(12,5.385165); atlas_neg_sf2->SetBinError(13,3.741657); atlas_neg_sf2->SetBinError(14,1.414214); atlas_neg_sf2->SetBinError(15,2.645751); atlas_neg_sf2->SetBinError(16,1); atlas_neg_sf2->SetBinError(17,1); atlas_neg_sf2->SetBinError(20,1); atlas_neg_sf2->SetBinError(23,1); atlas_neg_sf2->SetBinError(25,1); atlas_neg_sf2->SetBinError(26,1); atlas_neg_sf2->SetBinError(27,1); atlas_neg_sf2->SetEntries(46898); 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"); 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.15,0.4,0.35,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("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(-55.4878,-1,371.3415,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 xAxis3[28] = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 300, 350}; TH1F *neg_sf_ratio_ratio3 = new TH1F("neg_sf_ratio_ratio3","",27, xAxis3); neg_sf_ratio_ratio3->SetBinContent(1,0.9610767); neg_sf_ratio_ratio3->SetBinContent(2,0.9924589); neg_sf_ratio_ratio3->SetBinContent(3,1.058423); neg_sf_ratio_ratio3->SetBinContent(4,1.097851); neg_sf_ratio_ratio3->SetBinContent(5,1.150664); neg_sf_ratio_ratio3->SetBinContent(6,1.143266); neg_sf_ratio_ratio3->SetBinContent(7,1.228916); neg_sf_ratio_ratio3->SetBinContent(8,1.141994); neg_sf_ratio_ratio3->SetBinContent(9,1.238095); neg_sf_ratio_ratio3->SetBinContent(10,0.9069768); neg_sf_ratio_ratio3->SetBinContent(11,0.7142857); neg_sf_ratio_ratio3->SetBinContent(12,0.5862069); neg_sf_ratio_ratio3->SetBinContent(13,1); neg_sf_ratio_ratio3->SetBinContent(14,2.5); neg_sf_ratio_ratio3->SetBinContent(15,0.4285714); neg_sf_ratio_ratio3->SetBinContent(20,1); neg_sf_ratio_ratio3->SetBinContent(26,1); neg_sf_ratio_ratio3->SetBinError(1,0.01091432); neg_sf_ratio_ratio3->SetBinError(2,0.01259621); neg_sf_ratio_ratio3->SetBinError(3,0.0161347); neg_sf_ratio_ratio3->SetBinError(4,0.02171527); neg_sf_ratio_ratio3->SetBinError(5,0.03064575); neg_sf_ratio_ratio3->SetBinError(6,0.04190791); neg_sf_ratio_ratio3->SetBinError(7,0.06426322); neg_sf_ratio_ratio3->SetBinError(8,0.08607217); neg_sf_ratio_ratio3->SetBinError(9,0.1372959); neg_sf_ratio_ratio3->SetBinError(10,0.1418148); neg_sf_ratio_ratio3->SetBinError(11,0.1740354); neg_sf_ratio_ratio3->SetBinError(12,0.1790632); neg_sf_ratio_ratio3->SetBinError(13,0.3779645); neg_sf_ratio_ratio3->SetBinError(14,2.09165); neg_sf_ratio_ratio3->SetBinError(15,0.2957424); neg_sf_ratio_ratio3->SetBinError(17,1.414214); neg_sf_ratio_ratio3->SetBinError(20,1.414214); neg_sf_ratio_ratio3->SetBinError(26,1.414214); neg_sf_ratio_ratio3->SetMinimum(0); neg_sf_ratio_ratio3->SetMaximum(2); neg_sf_ratio_ratio3->SetEntries(30.72022); 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,350,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); Double_t Graph0_fx1[4] = { 0, 350, 350, 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,385); 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); }