void atlasClosure_inc() { //=========Macro generated from canvas: atlasClosure/atlasClosure_inc/atlasClosure/atlasClosure_inc //========= (Fri Jun 17 18:58:38 2016) by ROOT version6.02/05 TCanvas *atlasClosure/atlasClosure_inc = new TCanvas("atlasClosure/atlasClosure_inc", "atlasClosure/atlasClosure_inc",0,0,600,600); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); atlasClosure/atlasClosure_inc->SetHighLightColor(2); atlasClosure/atlasClosure_inc->Range(0,0,1,1); atlasClosure/atlasClosure_inc->SetFillColor(0); atlasClosure/atlasClosure_inc->SetBorderMode(0); atlasClosure/atlasClosure_inc->SetBorderSize(2); atlasClosure/atlasClosure_inc->SetTickx(1); atlasClosure/atlasClosure_inc->SetTicky(1); atlasClosure/atlasClosure_inc->SetLeftMargin(0.13); atlasClosure/atlasClosure_inc->SetRightMargin(0.05); atlasClosure/atlasClosure_inc->SetTopMargin(0.08); atlasClosure/atlasClosure_inc->SetBottomMargin(0.13); atlasClosure/atlasClosure_inc->SetFrameFillStyle(0); atlasClosure/atlasClosure_inc->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,-1.509361,201.5854,4.134724); 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_sf7 = new TH1F("atlas_pos_sf7","",19,0,190); atlas_pos_sf7->SetBinContent(1,2519.059); atlas_pos_sf7->SetBinContent(2,1937.755); atlas_pos_sf7->SetBinContent(3,1217.714); atlas_pos_sf7->SetBinContent(4,618.449); atlas_pos_sf7->SetBinContent(5,303.7389); atlas_pos_sf7->SetBinContent(6,130.0786); atlas_pos_sf7->SetBinContent(7,62.82922); atlas_pos_sf7->SetBinContent(8,30.2255); atlas_pos_sf7->SetBinContent(9,11.5112); atlas_pos_sf7->SetBinContent(10,6.071922); atlas_pos_sf7->SetBinContent(11,3.294601); atlas_pos_sf7->SetBinContent(12,2.029472); atlas_pos_sf7->SetBinContent(13,1.847189); atlas_pos_sf7->SetBinContent(14,-0.3772163); atlas_pos_sf7->SetBinContent(15,0.2959411); atlas_pos_sf7->SetBinContent(16,0.5330011); atlas_pos_sf7->SetBinContent(17,0.2270268); atlas_pos_sf7->SetBinContent(18,0.807078); atlas_pos_sf7->SetBinContent(19,1.575655); atlas_pos_sf7->SetBinError(1,25.70935); atlas_pos_sf7->SetBinError(2,22.48446); atlas_pos_sf7->SetBinError(3,17.02042); atlas_pos_sf7->SetBinError(4,11.50686); atlas_pos_sf7->SetBinError(5,7.875607); atlas_pos_sf7->SetBinError(6,4.86957); atlas_pos_sf7->SetBinError(7,3.247281); atlas_pos_sf7->SetBinError(8,2.393573); atlas_pos_sf7->SetBinError(9,1.703984); atlas_pos_sf7->SetBinError(10,1.366831); atlas_pos_sf7->SetBinError(11,1.02048); atlas_pos_sf7->SetBinError(12,0.8946382); atlas_pos_sf7->SetBinError(13,0.8787429); atlas_pos_sf7->SetBinError(14,0.8887149); atlas_pos_sf7->SetBinError(15,0.5849873); atlas_pos_sf7->SetBinError(16,0.6502857); atlas_pos_sf7->SetBinError(17,0.4216444); atlas_pos_sf7->SetBinError(18,0.4045804); atlas_pos_sf7->SetBinError(19,1.073121); atlas_pos_sf7->SetEntries(27568.92); atlas_pos_sf7->SetDirectory(0); atlas_pos_sf7->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ff0000"); atlas_pos_sf7->SetLineColor(ci); atlas_pos_sf7->SetLineWidth(2); ci = TColor::GetColor("#ff0000"); atlas_pos_sf7->SetMarkerColor(ci); atlas_pos_sf7->SetMarkerStyle(20); atlas_pos_sf7->GetXaxis()->SetTitle("JZB [GeV]"); atlas_pos_sf7->GetXaxis()->SetLabelFont(42); atlas_pos_sf7->GetXaxis()->SetLabelOffset(0.007); atlas_pos_sf7->GetXaxis()->SetTitleSize(0.05); atlas_pos_sf7->GetXaxis()->SetTitleFont(42); atlas_pos_sf7->GetYaxis()->SetTitle("Events / 10 GeV"); atlas_pos_sf7->GetYaxis()->SetLabelFont(42); atlas_pos_sf7->GetYaxis()->SetLabelOffset(0.007); atlas_pos_sf7->GetYaxis()->SetTitleSize(0.05); atlas_pos_sf7->GetYaxis()->SetTitleOffset(1.1); atlas_pos_sf7->GetYaxis()->SetTitleFont(42); atlas_pos_sf7->GetZaxis()->SetLabelFont(42); atlas_pos_sf7->GetZaxis()->SetLabelOffset(0.007); atlas_pos_sf7->GetZaxis()->SetTitleSize(0.05); atlas_pos_sf7->GetZaxis()->SetTitleFont(42); atlas_pos_sf7->Draw("E,"); TH1F *atlas_neg_sf8 = new TH1F("atlas_neg_sf8","",19,0,190); atlas_neg_sf8->SetBinContent(1,2525.059); atlas_neg_sf8->SetBinContent(2,1930.257); atlas_neg_sf8->SetBinContent(3,1174.486); atlas_neg_sf8->SetBinContent(4,603.2012); atlas_neg_sf8->SetBinContent(5,275.0477); atlas_neg_sf8->SetBinContent(6,127.0414); atlas_neg_sf8->SetBinContent(7,59.03796); atlas_neg_sf8->SetBinContent(8,25.20078); atlas_neg_sf8->SetBinContent(9,13.75438); atlas_neg_sf8->SetBinContent(10,7.266607); atlas_neg_sf8->SetBinContent(11,4.87732); atlas_neg_sf8->SetBinContent(12,2.656645); atlas_neg_sf8->SetBinContent(13,1.735031); atlas_neg_sf8->SetBinContent(14,1.153028); atlas_neg_sf8->SetBinContent(15,0.9572361); atlas_neg_sf8->SetBinContent(16,0.3960602); atlas_neg_sf8->SetBinContent(17,0.3699382); atlas_neg_sf8->SetBinContent(18,0.3543303); atlas_neg_sf8->SetBinContent(19,1.161694); atlas_neg_sf8->SetBinError(1,25.73645); atlas_neg_sf8->SetBinError(2,21.87725); atlas_neg_sf8->SetBinError(3,16.44813); atlas_neg_sf8->SetBinError(4,11.68107); atlas_neg_sf8->SetBinError(5,7.116104); atlas_neg_sf8->SetBinError(6,4.38332); atlas_neg_sf8->SetBinError(7,2.912698); atlas_neg_sf8->SetBinError(8,1.41699); atlas_neg_sf8->SetBinError(9,1.130639); atlas_neg_sf8->SetBinError(10,0.7359647); atlas_neg_sf8->SetBinError(11,0.7228157); atlas_neg_sf8->SetBinError(12,0.4209321); atlas_neg_sf8->SetBinError(13,0.1797813); atlas_neg_sf8->SetBinError(14,0.1726103); atlas_neg_sf8->SetBinError(15,0.1367768); atlas_neg_sf8->SetBinError(16,0.07827802); atlas_neg_sf8->SetBinError(17,0.09275349); atlas_neg_sf8->SetBinError(18,0.07417205); atlas_neg_sf8->SetBinError(19,0.1320564); atlas_neg_sf8->SetEntries(27975.63); atlas_neg_sf8->SetDirectory(0); atlas_neg_sf8->SetStats(0); ci = TColor::GetColor("#0000ff"); atlas_neg_sf8->SetLineColor(ci); atlas_neg_sf8->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); atlas_neg_sf8->SetMarkerColor(ci); atlas_neg_sf8->SetMarkerStyle(20); atlas_neg_sf8->GetXaxis()->SetTitle("JZB [GeV]"); atlas_neg_sf8->GetXaxis()->SetLabelFont(42); atlas_neg_sf8->GetXaxis()->SetLabelOffset(0.007); atlas_neg_sf8->GetXaxis()->SetTitleSize(0.05); atlas_neg_sf8->GetXaxis()->SetTitleFont(42); atlas_neg_sf8->GetYaxis()->SetTitle("Events / 10 GeV"); atlas_neg_sf8->GetYaxis()->SetLabelFont(42); atlas_neg_sf8->GetYaxis()->SetLabelOffset(0.007); atlas_neg_sf8->GetYaxis()->SetTitleSize(0.05); atlas_neg_sf8->GetYaxis()->SetTitleOffset(1.1); atlas_neg_sf8->GetYaxis()->SetTitleFont(42); atlas_neg_sf8->GetZaxis()->SetLabelFont(42); atlas_neg_sf8->GetZaxis()->SetLabelOffset(0.007); atlas_neg_sf8->GetZaxis()->SetTitleSize(0.05); atlas_neg_sf8->GetZaxis()->SetTitleFont(42); atlas_neg_sf8->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_inc->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_ratio9 = new TH1F("neg_sf_ratio_ratio9","",19,0,190); neg_sf_ratio_ratio9->SetBinContent(1,0.9976237); neg_sf_ratio_ratio9->SetBinContent(2,1.003884); neg_sf_ratio_ratio9->SetBinContent(3,1.036806); neg_sf_ratio_ratio9->SetBinContent(4,1.025278); neg_sf_ratio_ratio9->SetBinContent(5,1.104314); neg_sf_ratio_ratio9->SetBinContent(6,1.023907); neg_sf_ratio_ratio9->SetBinContent(7,1.064217); neg_sf_ratio_ratio9->SetBinContent(8,1.199388); neg_sf_ratio_ratio9->SetBinContent(9,0.8369117); neg_sf_ratio_ratio9->SetBinContent(10,0.8355924); neg_sf_ratio_ratio9->SetBinContent(11,0.6754941); neg_sf_ratio_ratio9->SetBinContent(12,0.763923); neg_sf_ratio_ratio9->SetBinContent(13,1.064643); neg_sf_ratio_ratio9->SetBinContent(14,-0.3271528); neg_sf_ratio_ratio9->SetBinContent(15,0.3091621); neg_sf_ratio_ratio9->SetBinContent(16,1.345758); neg_sf_ratio_ratio9->SetBinContent(17,0.6136884); neg_sf_ratio_ratio9->SetBinContent(18,2.277756); neg_sf_ratio_ratio9->SetBinContent(19,1.356342); neg_sf_ratio_ratio9->SetBinError(1,0.01438954); neg_sf_ratio_ratio9->SetBinError(2,0.01628318); neg_sf_ratio_ratio9->SetBinError(3,0.02051445); neg_sf_ratio_ratio9->SetBinError(4,0.02753386); neg_sf_ratio_ratio9->SetBinError(5,0.04044985); neg_sf_ratio_ratio9->SetBinError(6,0.05212771); neg_sf_ratio_ratio9->SetBinError(7,0.07603982); neg_sf_ratio_ratio9->SetBinError(8,0.1164872); neg_sf_ratio_ratio9->SetBinError(9,0.1417066); neg_sf_ratio_ratio9->SetBinError(10,0.206259); neg_sf_ratio_ratio9->SetBinError(11,0.2319454); neg_sf_ratio_ratio9->SetBinError(12,0.357847); neg_sf_ratio_ratio9->SetBinError(13,0.5183461); neg_sf_ratio_ratio9->SetBinError(14,0.7723204); neg_sf_ratio_ratio9->SetBinError(15,0.6127158); neg_sf_ratio_ratio9->SetBinError(16,1.66329); neg_sf_ratio_ratio9->SetBinError(17,1.150109); neg_sf_ratio_ratio9->SetBinError(18,1.237371); neg_sf_ratio_ratio9->SetBinError(19,0.9365341); neg_sf_ratio_ratio9->SetMinimum(0); neg_sf_ratio_ratio9->SetMaximum(2); neg_sf_ratio_ratio9->SetEntries(41.3985); neg_sf_ratio_ratio9->SetStats(0); ci = TColor::GetColor("#cccccc"); neg_sf_ratio_ratio9->SetFillColor(ci); ci = TColor::GetColor("#0000ff"); neg_sf_ratio_ratio9->SetLineColor(ci); neg_sf_ratio_ratio9->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); neg_sf_ratio_ratio9->SetMarkerColor(ci); neg_sf_ratio_ratio9->SetMarkerStyle(20); neg_sf_ratio_ratio9->SetMarkerSize(0); neg_sf_ratio_ratio9->GetXaxis()->SetLabelFont(42); neg_sf_ratio_ratio9->GetXaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio9->GetXaxis()->SetLabelSize(0.12); neg_sf_ratio_ratio9->GetXaxis()->SetTitleSize(0.14); neg_sf_ratio_ratio9->GetXaxis()->SetTitleFont(42); neg_sf_ratio_ratio9->GetYaxis()->SetTitle("Ratio"); neg_sf_ratio_ratio9->GetYaxis()->CenterTitle(true); neg_sf_ratio_ratio9->GetYaxis()->SetNdivisions(4); neg_sf_ratio_ratio9->GetYaxis()->SetLabelFont(42); neg_sf_ratio_ratio9->GetYaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio9->GetYaxis()->SetLabelSize(0.12); neg_sf_ratio_ratio9->GetYaxis()->SetTitleSize(0.14); neg_sf_ratio_ratio9->GetYaxis()->SetTitleOffset(0.3); neg_sf_ratio_ratio9->GetYaxis()->SetTitleFont(42); neg_sf_ratio_ratio9->GetZaxis()->SetLabelFont(42); neg_sf_ratio_ratio9->GetZaxis()->SetLabelOffset(0.007); neg_sf_ratio_ratio9->GetZaxis()->SetTitleSize(0.05); neg_sf_ratio_ratio9->GetZaxis()->SetTitleFont(42); neg_sf_ratio_ratio9->Draw("E2"); TLine *line = new TLine(0,1,190,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); Double_t Graph0_fx3[4] = { 0, 190, 190, 0}; Double_t Graph0_fy3[4] = { 0.7, 0.7, 1.3, 1.3}; TGraph *graph = new TGraph(4,Graph0_fx3,Graph0_fy3); graph->SetName("Graph0"); graph->SetTitle("Graph"); ci = 1181; color = new TColor(ci, 1, 0, 0, " ", 0.4); graph->SetFillColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph3 = new TH1F("Graph_Graph3","Graph",100,0,209); Graph_Graph3->SetMinimum(0.64); Graph_Graph3->SetMaximum(1.36); Graph_Graph3->SetDirectory(0); Graph_Graph3->SetStats(0); Graph_Graph3->SetLineWidth(2); Graph_Graph3->SetMarkerStyle(20); Graph_Graph3->GetXaxis()->SetLabelFont(42); Graph_Graph3->GetXaxis()->SetLabelOffset(0.007); Graph_Graph3->GetXaxis()->SetTitleSize(0.05); Graph_Graph3->GetXaxis()->SetTitleFont(42); Graph_Graph3->GetYaxis()->SetLabelFont(42); Graph_Graph3->GetYaxis()->SetLabelOffset(0.007); Graph_Graph3->GetYaxis()->SetTitleSize(0.05); Graph_Graph3->GetYaxis()->SetTitleOffset(1.1); Graph_Graph3->GetYaxis()->SetTitleFont(42); Graph_Graph3->GetZaxis()->SetLabelFont(42); Graph_Graph3->GetZaxis()->SetLabelOffset(0.007); Graph_Graph3->GetZaxis()->SetTitleSize(0.05); Graph_Graph3->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph3); graph->Draw("f"); pad2->Modified(); atlasClosure/atlasClosure_inc->cd(); atlasClosure/atlasClosure_inc->Modified(); atlasClosure/atlasClosure_inc->cd(); atlasClosure/atlasClosure_inc->SetSelected(atlasClosure/atlasClosure_inc); }