void looseLeps() { //=========Macro generated from canvas: discrminatingVariables/looseLeps/discrminatingVariables/looseLeps //========= (Fri Dec 2 11:40:37 2016) by ROOT version6.06/01 TCanvas *discrminatingVariables/looseLeps = new TCanvas("discrminatingVariables/looseLeps", "discrminatingVariables/looseLeps",0,0,600,600); gStyle->SetOptFit(1); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); discrminatingVariables/looseLeps->SetHighLightColor(2); discrminatingVariables/looseLeps->Range(0,0,1,1); discrminatingVariables/looseLeps->SetFillColor(0); discrminatingVariables/looseLeps->SetBorderMode(0); discrminatingVariables/looseLeps->SetBorderSize(2); discrminatingVariables/looseLeps->SetTickx(1); discrminatingVariables/looseLeps->SetTicky(1); discrminatingVariables/looseLeps->SetLeftMargin(0.13); discrminatingVariables/looseLeps->SetTopMargin(0.08); discrminatingVariables/looseLeps->SetBottomMargin(0.13); discrminatingVariables/looseLeps->SetFrameFillStyle(0); discrminatingVariables/looseLeps->SetFrameBorderMode(0); // ------------>Primitives in pad: pad1 TPad *pad1 = new TPad("pad1", "pad1",0,0.25,1,1); pad1->Draw(); pad1->cd(); pad1->Range(-1.451219,-0.1163216,5.865854,1.046895); pad1->SetFillColor(0); pad1->SetBorderMode(0); pad1->SetBorderSize(2); 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 *tt_sr_treeHisto__1 = new TH1F("tt_sr_treeHisto__1","TT+Jets",6,-0.5,5.5); tt_sr_treeHisto__1->SetBinContent(3,0.9084166); tt_sr_treeHisto__1->SetBinContent(4,0.09158339); tt_sr_treeHisto__1->SetBinError(3,0.07597323); tt_sr_treeHisto__1->SetBinError(4,0.02406643); tt_sr_treeHisto__1->SetEntries(6); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ff0000"); tt_sr_treeHisto__1->SetLineColor(ci); tt_sr_treeHisto__1->SetLineWidth(2); ci = TColor::GetColor("#ff0000"); tt_sr_treeHisto__1->SetMarkerColor(ci); tt_sr_treeHisto__1->SetMarkerStyle(20); tt_sr_treeHisto__1->GetXaxis()->SetTitle("n_{loose}"); tt_sr_treeHisto__1->GetXaxis()->SetLabelFont(42); tt_sr_treeHisto__1->GetXaxis()->SetLabelOffset(0.007); tt_sr_treeHisto__1->GetXaxis()->SetTitleSize(0.05); tt_sr_treeHisto__1->GetXaxis()->SetTitleFont(42); tt_sr_treeHisto__1->GetYaxis()->SetTitle("Events / 1 GeV"); tt_sr_treeHisto__1->GetYaxis()->SetLabelFont(42); tt_sr_treeHisto__1->GetYaxis()->SetLabelOffset(0.007); tt_sr_treeHisto__1->GetYaxis()->SetTitleSize(0.05); tt_sr_treeHisto__1->GetYaxis()->SetTitleOffset(1.1); tt_sr_treeHisto__1->GetYaxis()->SetTitleFont(42); tt_sr_treeHisto__1->GetZaxis()->SetLabelFont(42); tt_sr_treeHisto__1->GetZaxis()->SetLabelOffset(0.007); tt_sr_treeHisto__1->GetZaxis()->SetTitleSize(0.05); tt_sr_treeHisto__1->GetZaxis()->SetTitleFont(42); tt_sr_treeHisto__1->Draw("HIST"); TH1F *tt_sr_treeHisto__2 = new TH1F("tt_sr_treeHisto__2","localProduction3",6,-0.5,5.5); tt_sr_treeHisto__2->SetBinContent(3,0.9436603); tt_sr_treeHisto__2->SetBinContent(4,0.05633969); tt_sr_treeHisto__2->SetBinError(3,0.1377875); tt_sr_treeHisto__2->SetBinError(4,0.04068974); tt_sr_treeHisto__2->SetEntries(6); ci = TColor::GetColor("#0000ff"); tt_sr_treeHisto__2->SetLineColor(ci); tt_sr_treeHisto__2->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); tt_sr_treeHisto__2->SetMarkerColor(ci); tt_sr_treeHisto__2->SetMarkerStyle(20); tt_sr_treeHisto__2->GetXaxis()->SetTitle("n_{loose}"); tt_sr_treeHisto__2->GetXaxis()->SetLabelFont(42); tt_sr_treeHisto__2->GetXaxis()->SetLabelOffset(0.007); tt_sr_treeHisto__2->GetXaxis()->SetTitleSize(0.05); tt_sr_treeHisto__2->GetXaxis()->SetTitleFont(42); tt_sr_treeHisto__2->GetYaxis()->SetTitle("Events / 1 GeV"); tt_sr_treeHisto__2->GetYaxis()->SetLabelFont(42); tt_sr_treeHisto__2->GetYaxis()->SetLabelOffset(0.007); tt_sr_treeHisto__2->GetYaxis()->SetTitleSize(0.05); tt_sr_treeHisto__2->GetYaxis()->SetTitleOffset(1.1); tt_sr_treeHisto__2->GetYaxis()->SetTitleFont(42); tt_sr_treeHisto__2->GetZaxis()->SetLabelFont(42); tt_sr_treeHisto__2->GetZaxis()->SetLabelOffset(0.007); tt_sr_treeHisto__2->GetZaxis()->SetTitleSize(0.05); tt_sr_treeHisto__2->GetZaxis()->SetTitleFont(42); tt_sr_treeHisto__2->Draw("HIST,SAME"); TLegend *leg = new TLegend(0.6,0.6,0.8,0.8,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("tt_sr_treeHisto","t#bar{t}","L"); ci = TColor::GetColor("#ff0000"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(2); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("tt_sr_treeHisto","Signal","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(61); tex->SetTextSize(0.04); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(0.33,0.93,"Simulation"); tex->SetNDC(); tex->SetTextAlign(31); tex->SetTextFont(52); tex->SetTextSize(0.03); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(0.9,0.93,"12.9 fb^{-1} (13 TeV)"); tex->SetNDC(); tex->SetTextAlign(31); tex->SetTextFont(42); tex->SetTextSize(0.04); tex->SetLineWidth(2); tex->Draw(); pad1->Modified(); discrminatingVariables/looseLeps->cd(); // ------------>Primitives in pad: pad2 TPad *pad2 = new TPad("pad2", "pad2",0,0.05,1,0.25); pad2->Draw(); pad2->cd(); pad2->Range(-1.451219,-4.967054e-08,5.865854,1.666667); 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 *tt_sr_treeHisto_ratio__3 = new TH1F("tt_sr_treeHisto_ratio__3","",6,-0.5,5.5); tt_sr_treeHisto_ratio__3->SetBinContent(3,0.9626521); tt_sr_treeHisto_ratio__3->SetBinContent(4,1.625557); tt_sr_treeHisto_ratio__3->SetBinError(3,0.1619845); tt_sr_treeHisto_ratio__3->SetBinError(4,1.24931); tt_sr_treeHisto_ratio__3->SetMinimum(0.5); tt_sr_treeHisto_ratio__3->SetMaximum(1.5); tt_sr_treeHisto_ratio__3->SetEntries(4.221022); ci = TColor::GetColor("#666699"); tt_sr_treeHisto_ratio__3->SetFillColor(ci); ci = TColor::GetColor("#0000ff"); tt_sr_treeHisto_ratio__3->SetLineColor(ci); tt_sr_treeHisto_ratio__3->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); tt_sr_treeHisto_ratio__3->SetMarkerColor(ci); tt_sr_treeHisto_ratio__3->SetMarkerStyle(20); tt_sr_treeHisto_ratio__3->SetMarkerSize(0); tt_sr_treeHisto_ratio__3->GetXaxis()->SetLabelFont(42); tt_sr_treeHisto_ratio__3->GetXaxis()->SetLabelOffset(0.007); tt_sr_treeHisto_ratio__3->GetXaxis()->SetLabelSize(0.12); tt_sr_treeHisto_ratio__3->GetXaxis()->SetTitleSize(0.14); tt_sr_treeHisto_ratio__3->GetXaxis()->SetTitleFont(42); tt_sr_treeHisto_ratio__3->GetYaxis()->SetTitle("Data/Pred"); tt_sr_treeHisto_ratio__3->GetYaxis()->CenterTitle(true); tt_sr_treeHisto_ratio__3->GetYaxis()->SetNdivisions(4); tt_sr_treeHisto_ratio__3->GetYaxis()->SetLabelFont(42); tt_sr_treeHisto_ratio__3->GetYaxis()->SetLabelOffset(0.007); tt_sr_treeHisto_ratio__3->GetYaxis()->SetLabelSize(0.12); tt_sr_treeHisto_ratio__3->GetYaxis()->SetTitleSize(0.14); tt_sr_treeHisto_ratio__3->GetYaxis()->SetTitleOffset(0.3); tt_sr_treeHisto_ratio__3->GetYaxis()->SetTitleFont(42); tt_sr_treeHisto_ratio__3->GetZaxis()->SetLabelFont(42); tt_sr_treeHisto_ratio__3->GetZaxis()->SetLabelOffset(0.007); tt_sr_treeHisto_ratio__3->GetZaxis()->SetTitleSize(0.05); tt_sr_treeHisto_ratio__3->GetZaxis()->SetTitleFont(42); tt_sr_treeHisto_ratio__3->Draw("P,E2,"); TH1F *tt_sr_treeHisto_ratio__4 = new TH1F("tt_sr_treeHisto_ratio__4","",6,-0.5,5.5); tt_sr_treeHisto_ratio__4->SetBinContent(3,0.9626521); tt_sr_treeHisto_ratio__4->SetBinContent(4,1.625557); tt_sr_treeHisto_ratio__4->SetBinError(3,0.1619845); tt_sr_treeHisto_ratio__4->SetBinError(4,1.24931); tt_sr_treeHisto_ratio__4->SetMinimum(0.5); tt_sr_treeHisto_ratio__4->SetMaximum(1.5); tt_sr_treeHisto_ratio__4->SetEntries(4.221022); ci = TColor::GetColor("#666699"); tt_sr_treeHisto_ratio__4->SetFillColor(ci); ci = TColor::GetColor("#0000ff"); tt_sr_treeHisto_ratio__4->SetLineColor(ci); tt_sr_treeHisto_ratio__4->SetLineWidth(2); ci = TColor::GetColor("#0000ff"); tt_sr_treeHisto_ratio__4->SetMarkerColor(ci); tt_sr_treeHisto_ratio__4->SetMarkerStyle(20); tt_sr_treeHisto_ratio__4->SetMarkerSize(0); tt_sr_treeHisto_ratio__4->GetXaxis()->SetLabelFont(42); tt_sr_treeHisto_ratio__4->GetXaxis()->SetLabelOffset(0.007); tt_sr_treeHisto_ratio__4->GetXaxis()->SetLabelSize(0.12); tt_sr_treeHisto_ratio__4->GetXaxis()->SetTitleSize(0.14); tt_sr_treeHisto_ratio__4->GetXaxis()->SetTitleFont(42); tt_sr_treeHisto_ratio__4->GetYaxis()->SetTitle("Data/Pred"); tt_sr_treeHisto_ratio__4->GetYaxis()->CenterTitle(true); tt_sr_treeHisto_ratio__4->GetYaxis()->SetNdivisions(4); tt_sr_treeHisto_ratio__4->GetYaxis()->SetLabelFont(42); tt_sr_treeHisto_ratio__4->GetYaxis()->SetLabelOffset(0.007); tt_sr_treeHisto_ratio__4->GetYaxis()->SetLabelSize(0.12); tt_sr_treeHisto_ratio__4->GetYaxis()->SetTitleSize(0.14); tt_sr_treeHisto_ratio__4->GetYaxis()->SetTitleOffset(0.3); tt_sr_treeHisto_ratio__4->GetYaxis()->SetTitleFont(42); tt_sr_treeHisto_ratio__4->GetZaxis()->SetLabelFont(42); tt_sr_treeHisto_ratio__4->GetZaxis()->SetLabelOffset(0.007); tt_sr_treeHisto_ratio__4->GetZaxis()->SetTitleSize(0.05); tt_sr_treeHisto_ratio__4->GetZaxis()->SetTitleFont(42); tt_sr_treeHisto_ratio__4->Draw("P,same"); TLine *line = new TLine(-0.5,1,5.5,1); ci = TColor::GetColor("#666666"); line->SetLineColor(ci); line->Draw(); pad2->Modified(); discrminatingVariables/looseLeps->cd(); discrminatingVariables/looseLeps->Modified(); discrminatingVariables/looseLeps->cd(); discrminatingVariables/looseLeps->SetSelected(discrminatingVariables/looseLeps); }