Beispiel #1
0
void hmt()
{
//=========Macro generated from canvas: hmt/hmt
//=========  (Mon Nov 23 11:05:05 2015) by ROOT version6.02/05
   TCanvas *hmt = new TCanvas("hmt", "hmt",220,242,700,700);
   hmt->Range(-25,-7.557249,225,5.510816);
   hmt->SetFillColor(0);
   hmt->SetBorderMode(0);
   hmt->SetBorderSize(2);
   hmt->SetLogy();
   hmt->SetFrameBorderMode(0);
   hmt->SetFrameBorderMode(0);
   
   THStack *hmt = new THStack();
   hmt->SetName("hmt");
   hmt->SetTitle("hmt");
   
   TH1F *hmt_stack_12 = new TH1F("hmt_stack_12","hmt",8,0,200);
   hmt_stack_12->SetMinimum(5.617689e-07);
   hmt_stack_12->SetMaximum(15995.94);
   hmt_stack_12->SetDirectory(0);
   hmt_stack_12->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   hmt_stack_12->SetLineColor(ci);
   hmt_stack_12->GetXaxis()->SetTitle("hmt");
   hmt_stack_12->GetXaxis()->SetLabelFont(42);
   hmt_stack_12->GetXaxis()->SetLabelSize(0.035);
   hmt_stack_12->GetXaxis()->SetTitleSize(0.035);
   hmt_stack_12->GetXaxis()->SetTitleFont(42);
   hmt_stack_12->GetYaxis()->SetTitle("Events/pb");
   hmt_stack_12->GetYaxis()->SetLabelFont(42);
   hmt_stack_12->GetYaxis()->SetLabelSize(0.035);
   hmt_stack_12->GetYaxis()->SetTitleSize(0.035);
   hmt_stack_12->GetYaxis()->SetTitleFont(42);
   hmt_stack_12->GetZaxis()->SetLabelFont(42);
   hmt_stack_12->GetZaxis()->SetLabelSize(0.035);
   hmt_stack_12->GetZaxis()->SetTitleSize(0.035);
   hmt_stack_12->GetZaxis()->SetTitleFont(42);
   hmt->SetHistogram(hmt_stack_12);
   
   
   TH1D *hmt56 = new TH1D("hmt56"," Transverse mass",8,0,200);
   hmt56->SetBinContent(1,5612.801);
   hmt56->SetBinContent(2,96.67354);
   hmt56->SetBinContent(3,1.843083);
   hmt56->SetBinContent(4,0.00068069);
   hmt56->SetBinError(1,42.85727);
   hmt56->SetBinError(2,5.590091);
   hmt56->SetBinError(3,0.7489465);
   hmt56->SetBinError(4,0.00068069);
   hmt56->SetEntries(35032);

   ci = TColor::GetColor("#00cc00");
   hmt56->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   hmt56->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   hmt56->SetMarkerColor(ci);
   hmt56->SetMarkerStyle(22);
   hmt56->GetXaxis()->SetTitle("hmt");
   hmt56->GetXaxis()->SetLabelFont(42);
   hmt56->GetXaxis()->SetLabelSize(0.035);
   hmt56->GetXaxis()->SetTitleSize(0.035);
   hmt56->GetXaxis()->SetTitleFont(42);
   hmt56->GetYaxis()->SetTitle("Events/pb");
   hmt56->GetYaxis()->SetLabelFont(42);
   hmt56->GetYaxis()->SetLabelSize(0.035);
   hmt56->GetYaxis()->SetTitleSize(0.035);
   hmt56->GetYaxis()->SetTitleFont(42);
   hmt56->GetZaxis()->SetLabelFont(42);
   hmt56->GetZaxis()->SetLabelSize(0.035);
   hmt56->GetZaxis()->SetTitleSize(0.035);
   hmt56->GetZaxis()->SetTitleFont(42);
   hmt->Add(hmt,"");
   
   TH1D *hmt57 = new TH1D("hmt57"," Transverse mass",8,0,200);
   hmt57->SetBinContent(1,20.71688);
   hmt57->SetBinContent(2,9.067683);
   hmt57->SetBinContent(3,5.102584);
   hmt57->SetBinContent(4,1.066239);
   hmt57->SetBinContent(5,0.004897312);
   hmt57->SetBinContent(6,8.681582e-05);
   hmt57->SetBinContent(7,2.866842e-05);
   hmt57->SetBinError(1,0.1278328);
   hmt57->SetBinError(2,0.08350833);
   hmt57->SetBinError(3,0.06062541);
   hmt57->SetBinError(4,0.025646);
   hmt57->SetBinError(5,0.001471335);
   hmt57->SetBinError(6,3.545477e-05);
   hmt57->SetBinError(7,2.027973e-05);
   hmt57->SetEntries(136801);

   ci = TColor::GetColor("#00ffff");
   hmt57->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   hmt57->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   hmt57->SetMarkerColor(ci);
   hmt57->SetMarkerStyle(20);
   hmt57->GetXaxis()->SetTitle("hmt");
   hmt57->GetXaxis()->SetLabelFont(42);
   hmt57->GetXaxis()->SetLabelSize(0.035);
   hmt57->GetXaxis()->SetTitleSize(0.035);
   hmt57->GetXaxis()->SetTitleFont(42);
   hmt57->GetYaxis()->SetTitle("Events/pb");
   hmt57->GetYaxis()->SetLabelFont(42);
   hmt57->GetYaxis()->SetLabelSize(0.035);
   hmt57->GetYaxis()->SetTitleSize(0.035);
   hmt57->GetYaxis()->SetTitleFont(42);
   hmt57->GetZaxis()->SetLabelFont(42);
   hmt57->GetZaxis()->SetLabelSize(0.035);
   hmt57->GetZaxis()->SetTitleSize(0.035);
   hmt57->GetZaxis()->SetTitleFont(42);
   hmt->Add(hmt,"");
   
   TH1D *hmt58 = new TH1D("hmt58"," Transverse mass",8,0,200);
   hmt58->SetBinContent(1,4.450283);
   hmt58->SetBinContent(2,0.4423873);
   hmt58->SetBinContent(3,0.0414851);
   hmt58->SetBinContent(4,0.005226811);
   hmt58->SetBinContent(5,0.0005983346);
   hmt58->SetBinContent(6,4.854534e-05);
   hmt58->SetBinContent(7,4.681207e-06);
   hmt58->SetBinContent(8,3.510905e-06);
   hmt58->SetBinContent(9,2.340604e-06);
   hmt58->SetBinError(1,0.01852365);
   hmt58->SetBinError(2,0.005347213);
   hmt58->SetBinError(3,0.001581388);
   hmt58->SetBinError(4,0.000472027);
   hmt58->SetBinError(5,0.000107885);
   hmt58->SetBinError(6,1.091083e-05);
   hmt58->SetBinError(7,2.340604e-06);
   hmt58->SetBinError(8,2.027022e-06);
   hmt58->SetBinError(9,1.655057e-06);
   hmt58->SetEntries(131338);

   ci = TColor::GetColor("#ffcc00");
   hmt58->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   hmt58->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   hmt58->SetMarkerColor(ci);
   hmt58->SetMarkerStyle(21);
   hmt58->GetXaxis()->SetTitle("hmt");
   hmt58->GetXaxis()->SetLabelFont(42);
   hmt58->GetXaxis()->SetLabelSize(0.035);
   hmt58->GetXaxis()->SetTitleSize(0.035);
   hmt58->GetXaxis()->SetTitleFont(42);
   hmt58->GetYaxis()->SetTitle("Events/pb");
   hmt58->GetYaxis()->SetLabelFont(42);
   hmt58->GetYaxis()->SetLabelSize(0.035);
   hmt58->GetYaxis()->SetTitleSize(0.035);
   hmt58->GetYaxis()->SetTitleFont(42);
   hmt58->GetZaxis()->SetLabelFont(42);
   hmt58->GetZaxis()->SetLabelSize(0.035);
   hmt58->GetZaxis()->SetTitleSize(0.035);
   hmt58->GetZaxis()->SetTitleFont(42);
   hmt->Add(hmt,"");
   
   TH1D *hmt59 = new TH1D("hmt59"," Transverse mass",8,0,200);
   hmt59->SetBinContent(1,0.03415001);
   hmt59->SetBinContent(2,0.02037586);
   hmt59->SetBinContent(3,0.007434646);
   hmt59->SetBinContent(4,0.001881798);
   hmt59->SetBinContent(5,0.0003547652);
   hmt59->SetBinContent(6,3.084915e-05);
   hmt59->SetBinError(1,0.0007257751);
   hmt59->SetBinError(2,0.0005606149);
   hmt59->SetBinError(3,0.0003386388);
   hmt59->SetBinError(4,0.00017037);
   hmt59->SetBinError(5,7.397367e-05);
   hmt59->SetBinError(6,2.181364e-05);
   hmt59->SetEntries(4164);

   ci = TColor::GetColor("#ff0000");
   hmt59->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   hmt59->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   hmt59->SetMarkerColor(ci);
   hmt59->SetMarkerStyle(20);
   hmt59->GetXaxis()->SetTitle("hmt");
   hmt59->GetXaxis()->SetLabelFont(42);
   hmt59->GetXaxis()->SetLabelSize(0.035);
   hmt59->GetXaxis()->SetTitleSize(0.035);
   hmt59->GetXaxis()->SetTitleFont(42);
   hmt59->GetYaxis()->SetTitle("Events/pb");
   hmt59->GetYaxis()->SetLabelFont(42);
   hmt59->GetYaxis()->SetLabelSize(0.035);
   hmt59->GetYaxis()->SetTitleSize(0.035);
   hmt59->GetYaxis()->SetTitleFont(42);
   hmt59->GetZaxis()->SetLabelFont(42);
   hmt59->GetZaxis()->SetLabelSize(0.035);
   hmt59->GetZaxis()->SetTitleSize(0.035);
   hmt59->GetZaxis()->SetTitleFont(42);
   hmt->Add(hmt,"");
   
   TH1D *hmt60 = new TH1D("hmt60"," Transverse mass",8,0,200);
   hmt60->SetBinContent(1,0.0006037793);
   hmt60->SetBinContent(2,0.0002683464);
   hmt60->SetBinContent(3,0.0001341732);
   hmt60->SetBinContent(4,1.677165e-05);
   hmt60->SetBinError(1,0.0001006299);
   hmt60->SetBinError(2,6.708659e-05);
   hmt60->SetBinError(3,4.743738e-05);
   hmt60->SetBinError(4,1.677165e-05);
   hmt60->SetEntries(61);

   ci = TColor::GetColor("#0000ff");
   hmt60->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   hmt60->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   hmt60->SetMarkerColor(ci);
   hmt60->SetMarkerStyle(21);
   hmt60->GetXaxis()->SetTitle("hmt");
   hmt60->GetXaxis()->SetLabelFont(42);
   hmt60->GetXaxis()->SetLabelSize(0.035);
   hmt60->GetXaxis()->SetTitleSize(0.035);
   hmt60->GetXaxis()->SetTitleFont(42);
   hmt60->GetYaxis()->SetTitle("Events/pb");
   hmt60->GetYaxis()->SetLabelFont(42);
   hmt60->GetYaxis()->SetLabelSize(0.035);
   hmt60->GetYaxis()->SetTitleSize(0.035);
   hmt60->GetYaxis()->SetTitleFont(42);
   hmt60->GetZaxis()->SetLabelFont(42);
   hmt60->GetZaxis()->SetLabelSize(0.035);
   hmt60->GetZaxis()->SetTitleSize(0.035);
   hmt60->GetZaxis()->SetTitleFont(42);
   hmt->Add(hmt,"");
   hmt->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.444023,0.94,0.555977,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("hmt");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("hmt","hmt_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("hmt","hmt_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("hmt","hmt_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("hmt","hmt_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("hmt","hmt_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   hmt->Modified();
   hmt->cd();
   hmt->SetSelected(hmt);
}
void phimuphimet()
{
//=========Macro generated from canvas: phimuphimet/phimuphimet
//=========  (Fri Nov 13 11:38:57 2015) by ROOT version6.02/05
   TCanvas *phimuphimet = new TCanvas("phimuphimet", "phimuphimet",340,362,700,700);
   phimuphimet->Range(-0.3926991,-3.745915,3.534292,3.369465);
   phimuphimet->SetFillColor(0);
   phimuphimet->SetBorderMode(0);
   phimuphimet->SetBorderSize(2);
   phimuphimet->SetLogy();
   phimuphimet->SetFrameBorderMode(0);
   phimuphimet->SetFrameBorderMode(0);
   
   THStack *phimuphimet = new THStack();
   phimuphimet->SetName("phimuphimet");
   phimuphimet->SetTitle("phimuphimet");
   
   TH1F *phimuphimet_stack_18 = new TH1F("phimuphimet_stack_18","phimuphimet",10,0,3.141593);
   phimuphimet_stack_18->SetMinimum(0.0009238963);
   phimuphimet_stack_18->SetMaximum(454.9117);
   phimuphimet_stack_18->SetDirectory(0);
   phimuphimet_stack_18->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   phimuphimet_stack_18->SetLineColor(ci);
   phimuphimet_stack_18->GetXaxis()->SetTitle("phimuphimet");
   phimuphimet_stack_18->GetXaxis()->SetLabelFont(42);
   phimuphimet_stack_18->GetXaxis()->SetLabelSize(0.035);
   phimuphimet_stack_18->GetXaxis()->SetTitleSize(0.035);
   phimuphimet_stack_18->GetXaxis()->SetTitleFont(42);
   phimuphimet_stack_18->GetYaxis()->SetTitle("Events/pb");
   phimuphimet_stack_18->GetYaxis()->SetLabelFont(42);
   phimuphimet_stack_18->GetYaxis()->SetLabelSize(0.035);
   phimuphimet_stack_18->GetYaxis()->SetTitleSize(0.035);
   phimuphimet_stack_18->GetYaxis()->SetTitleFont(42);
   phimuphimet_stack_18->GetZaxis()->SetLabelFont(42);
   phimuphimet_stack_18->GetZaxis()->SetLabelSize(0.035);
   phimuphimet_stack_18->GetZaxis()->SetTitleSize(0.035);
   phimuphimet_stack_18->GetZaxis()->SetTitleFont(42);
   phimuphimet->SetHistogram(phimuphimet_stack_18);
   
   
   TH1D *phimuphimet86 = new TH1D("phimuphimet86"," #Delta_{#phi}[#mu,MET]",10,0,3.141593);
   phimuphimet86->SetBinContent(1,230.641);
   phimuphimet86->SetBinContent(2,216.3046);
   phimuphimet86->SetBinContent(3,223.2529);
   phimuphimet86->SetBinContent(4,205.0752);
   phimuphimet86->SetBinContent(5,177.4887);
   phimuphimet86->SetBinContent(6,185.6797);
   phimuphimet86->SetBinContent(7,165.8596);
   phimuphimet86->SetBinContent(8,166.2099);
   phimuphimet86->SetBinContent(9,159.2644);
   phimuphimet86->SetBinContent(10,174.5095);
   phimuphimet86->SetBinError(1,8.61142);
   phimuphimet86->SetBinError(2,8.327371);
   phimuphimet86->SetBinError(3,8.486581);
   phimuphimet86->SetBinError(4,8.129407);
   phimuphimet86->SetBinError(5,7.536633);
   phimuphimet86->SetBinError(6,7.726982);
   phimuphimet86->SetBinError(7,7.294678);
   phimuphimet86->SetBinError(8,7.302349);
   phimuphimet86->SetBinError(9,7.154931);
   phimuphimet86->SetBinError(10,7.4987);
   phimuphimet86->SetEntries(17572);

   ci = TColor::GetColor("#00cc00");
   phimuphimet86->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   phimuphimet86->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   phimuphimet86->SetMarkerColor(ci);
   phimuphimet86->SetMarkerStyle(22);
   phimuphimet86->GetXaxis()->SetTitle("phimuphimet");
   phimuphimet86->GetXaxis()->SetLabelFont(42);
   phimuphimet86->GetXaxis()->SetLabelSize(0.035);
   phimuphimet86->GetXaxis()->SetTitleSize(0.035);
   phimuphimet86->GetXaxis()->SetTitleFont(42);
   phimuphimet86->GetYaxis()->SetTitle("Events/pb");
   phimuphimet86->GetYaxis()->SetLabelFont(42);
   phimuphimet86->GetYaxis()->SetLabelSize(0.035);
   phimuphimet86->GetYaxis()->SetTitleSize(0.035);
   phimuphimet86->GetYaxis()->SetTitleFont(42);
   phimuphimet86->GetZaxis()->SetLabelFont(42);
   phimuphimet86->GetZaxis()->SetLabelSize(0.035);
   phimuphimet86->GetZaxis()->SetTitleSize(0.035);
   phimuphimet86->GetZaxis()->SetTitleFont(42);
   phimuphimet->Add(phimuphimet,"");
   
   TH1D *phimuphimet87 = new TH1D("phimuphimet87"," #Delta_{#phi}[#mu,MET]",10,0,3.141593);
   phimuphimet87->SetBinContent(1,6.11516);
   phimuphimet87->SetBinContent(2,5.535954);
   phimuphimet87->SetBinContent(3,5.331195);
   phimuphimet87->SetBinContent(4,5.298494);
   phimuphimet87->SetBinContent(5,5.612855);
   phimuphimet87->SetBinContent(6,5.975299);
   phimuphimet87->SetBinContent(7,6.323196);
   phimuphimet87->SetBinContent(8,6.999136);
   phimuphimet87->SetBinContent(9,7.03292);
   phimuphimet87->SetBinContent(10,7.011011);
   phimuphimet87->SetBinError(1,0.06763086);
   phimuphimet87->SetBinError(2,0.06433893);
   phimuphimet87->SetBinError(3,0.06348647);
   phimuphimet87->SetBinError(4,0.06307663);
   phimuphimet87->SetBinError(5,0.06520844);
   phimuphimet87->SetBinError(6,0.06748244);
   phimuphimet87->SetBinError(7,0.06973671);
   phimuphimet87->SetBinError(8,0.07416886);
   phimuphimet87->SetBinError(9,0.07436969);
   phimuphimet87->SetBinError(10,0.07420837);
   phimuphimet87->SetEntries(277262);

   ci = TColor::GetColor("#00ffff");
   phimuphimet87->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   phimuphimet87->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   phimuphimet87->SetMarkerColor(ci);
   phimuphimet87->SetMarkerStyle(20);
   phimuphimet87->GetXaxis()->SetTitle("phimuphimet");
   phimuphimet87->GetXaxis()->SetLabelFont(42);
   phimuphimet87->GetXaxis()->SetLabelSize(0.035);
   phimuphimet87->GetXaxis()->SetTitleSize(0.035);
   phimuphimet87->GetXaxis()->SetTitleFont(42);
   phimuphimet87->GetYaxis()->SetTitle("Events/pb");
   phimuphimet87->GetYaxis()->SetLabelFont(42);
   phimuphimet87->GetYaxis()->SetLabelSize(0.035);
   phimuphimet87->GetYaxis()->SetTitleSize(0.035);
   phimuphimet87->GetYaxis()->SetTitleFont(42);
   phimuphimet87->GetZaxis()->SetLabelFont(42);
   phimuphimet87->GetZaxis()->SetLabelSize(0.035);
   phimuphimet87->GetZaxis()->SetTitleSize(0.035);
   phimuphimet87->GetZaxis()->SetTitleFont(42);
   phimuphimet->Add(phimuphimet,"");
   
   TH1D *phimuphimet88 = new TH1D("phimuphimet88"," #Delta_{#phi}[#mu,MET]",10,0,3.141593);
   phimuphimet88->SetBinContent(1,0.1344125);
   phimuphimet88->SetBinContent(2,0.132705);
   phimuphimet88->SetBinContent(3,0.1303004);
   phimuphimet88->SetBinContent(4,0.1480002);
   phimuphimet88->SetBinContent(5,0.1484594);
   phimuphimet88->SetBinContent(6,0.1440116);
   phimuphimet88->SetBinContent(7,0.1488838);
   phimuphimet88->SetBinContent(8,0.1551468);
   phimuphimet88->SetBinContent(9,0.1613277);
   phimuphimet88->SetBinContent(10,0.1643883);
   phimuphimet88->SetBinError(1,0.003182629);
   phimuphimet88->SetBinError(2,0.003158543);
   phimuphimet88->SetBinError(3,0.003130767);
   phimuphimet88->SetBinError(4,0.003374797);
   phimuphimet88->SetBinError(5,0.003387715);
   phimuphimet88->SetBinError(6,0.003328977);
   phimuphimet88->SetBinError(7,0.003366558);
   phimuphimet88->SetBinError(8,0.003466203);
   phimuphimet88->SetBinError(9,0.003519969);
   phimuphimet88->SetBinError(10,0.003565516);
   phimuphimet88->SetEntries(46443);

   ci = TColor::GetColor("#ffcc00");
   phimuphimet88->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   phimuphimet88->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   phimuphimet88->SetMarkerColor(ci);
   phimuphimet88->SetMarkerStyle(21);
   phimuphimet88->GetXaxis()->SetTitle("phimuphimet");
   phimuphimet88->GetXaxis()->SetLabelFont(42);
   phimuphimet88->GetXaxis()->SetLabelSize(0.035);
   phimuphimet88->GetXaxis()->SetTitleSize(0.035);
   phimuphimet88->GetXaxis()->SetTitleFont(42);
   phimuphimet88->GetYaxis()->SetTitle("Events/pb");
   phimuphimet88->GetYaxis()->SetLabelFont(42);
   phimuphimet88->GetYaxis()->SetLabelSize(0.035);
   phimuphimet88->GetYaxis()->SetTitleSize(0.035);
   phimuphimet88->GetYaxis()->SetTitleFont(42);
   phimuphimet88->GetZaxis()->SetLabelFont(42);
   phimuphimet88->GetZaxis()->SetLabelSize(0.035);
   phimuphimet88->GetZaxis()->SetTitleSize(0.035);
   phimuphimet88->GetZaxis()->SetTitleFont(42);
   phimuphimet->Add(phimuphimet,"");
   
   TH1D *phimuphimet89 = new TH1D("phimuphimet89"," #Delta_{#phi}[#mu,MET]",10,0,3.141593);
   phimuphimet89->SetBinContent(1,0.02346078);
   phimuphimet89->SetBinContent(2,0.02244276);
   phimuphimet89->SetBinContent(3,0.02157898);
   phimuphimet89->SetBinContent(4,0.01833982);
   phimuphimet89->SetBinContent(5,0.01554797);
   phimuphimet89->SetBinContent(6,0.01431401);
   phimuphimet89->SetBinContent(7,0.01304919);
   phimuphimet89->SetBinContent(8,0.0118615);
   phimuphimet89->SetBinContent(9,0.01159928);
   phimuphimet89->SetBinContent(10,0.01039616);
   phimuphimet89->SetBinError(1,0.0006015585);
   phimuphimet89->SetBinError(2,0.0005883622);
   phimuphimet89->SetBinError(3,0.0005769286);
   phimuphimet89->SetBinError(4,0.0005318684);
   phimuphimet89->SetBinError(5,0.0004897151);
   phimuphimet89->SetBinError(6,0.0004698803);
   phimuphimet89->SetBinError(7,0.0004486404);
   phimuphimet89->SetBinError(8,0.0004277366);
   phimuphimet89->SetBinError(9,0.0004229823);
   phimuphimet89->SetBinError(10,0.0004004453);
   phimuphimet89->SetEntries(10541);

   ci = TColor::GetColor("#ff0000");
   phimuphimet89->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   phimuphimet89->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   phimuphimet89->SetMarkerColor(ci);
   phimuphimet89->SetMarkerStyle(20);
   phimuphimet89->GetXaxis()->SetTitle("phimuphimet");
   phimuphimet89->GetXaxis()->SetLabelFont(42);
   phimuphimet89->GetXaxis()->SetLabelSize(0.035);
   phimuphimet89->GetXaxis()->SetTitleSize(0.035);
   phimuphimet89->GetXaxis()->SetTitleFont(42);
   phimuphimet89->GetYaxis()->SetTitle("Events/pb");
   phimuphimet89->GetYaxis()->SetLabelFont(42);
   phimuphimet89->GetYaxis()->SetLabelSize(0.035);
   phimuphimet89->GetYaxis()->SetTitleSize(0.035);
   phimuphimet89->GetYaxis()->SetTitleFont(42);
   phimuphimet89->GetZaxis()->SetLabelFont(42);
   phimuphimet89->GetZaxis()->SetLabelSize(0.035);
   phimuphimet89->GetZaxis()->SetTitleSize(0.035);
   phimuphimet89->GetZaxis()->SetTitleFont(42);
   phimuphimet->Add(phimuphimet,"");
   
   TH1D *phimuphimet90 = new TH1D("phimuphimet90"," #Delta_{#phi}[#mu,MET]",10,0,3.141593);
   phimuphimet90->SetBinContent(1,0.005199211);
   phimuphimet90->SetBinContent(2,0.004561888);
   phimuphimet90->SetBinContent(3,0.004595431);
   phimuphimet90->SetBinContent(4,0.00447803);
   phimuphimet90->SetBinContent(5,0.004159369);
   phimuphimet90->SetBinContent(6,0.003891022);
   phimuphimet90->SetBinContent(7,0.004394172);
   phimuphimet90->SetBinContent(8,0.003907794);
   phimuphimet90->SetBinContent(9,0.00407551);
   phimuphimet90->SetBinContent(10,0.003522046);
   phimuphimet90->SetBinError(1,0.0002952953);
   phimuphimet90->SetBinError(2,0.0002766051);
   phimuphimet90->SetBinError(3,0.0002776202);
   phimuphimet90->SetBinError(4,0.000274051);
   phimuphimet90->SetBinError(5,0.0002641202);
   phimuphimet90->SetBinError(6,0.0002554581);
   phimuphimet90->SetBinError(7,0.0002714728);
   phimuphimet90->SetBinError(8,0.0002560081);
   phimuphimet90->SetBinError(9,0.0002614441);
   phimuphimet90->SetBinError(10,0.0002430443);
   phimuphimet90->SetEntries(2551);

   ci = TColor::GetColor("#0000ff");
   phimuphimet90->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   phimuphimet90->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   phimuphimet90->SetMarkerColor(ci);
   phimuphimet90->SetMarkerStyle(21);
   phimuphimet90->GetXaxis()->SetTitle("phimuphimet");
   phimuphimet90->GetXaxis()->SetLabelFont(42);
   phimuphimet90->GetXaxis()->SetLabelSize(0.035);
   phimuphimet90->GetXaxis()->SetTitleSize(0.035);
   phimuphimet90->GetXaxis()->SetTitleFont(42);
   phimuphimet90->GetYaxis()->SetTitle("Events/pb");
   phimuphimet90->GetYaxis()->SetLabelFont(42);
   phimuphimet90->GetYaxis()->SetLabelSize(0.035);
   phimuphimet90->GetYaxis()->SetTitleSize(0.035);
   phimuphimet90->GetYaxis()->SetTitleFont(42);
   phimuphimet90->GetZaxis()->SetLabelFont(42);
   phimuphimet90->GetZaxis()->SetLabelSize(0.035);
   phimuphimet90->GetZaxis()->SetTitleSize(0.035);
   phimuphimet90->GetZaxis()->SetTitleFont(42);
   phimuphimet->Add(phimuphimet,"");
   phimuphimet->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3326724,0.9342857,0.6673276,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("phimuphimet");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("phimuphimet","phimuphimet_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phimuphimet","phimuphimet_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phimuphimet","phimuphimet_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phimuphimet","phimuphimet_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("phimuphimet","phimuphimet_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   phimuphimet->Modified();
   phimuphimet->cd();
   phimuphimet->SetSelected(phimuphimet);
}
void phielphileadj()
{
//=========Macro generated from canvas: phielphileadj/phielphileadj
//=========  (Sun Nov  8 21:56:11 2015) by ROOT version6.02/05
   TCanvas *phielphileadj = new TCanvas("phielphileadj", "phielphileadj",0,23,700,700);
   phielphileadj->Range(-0.3926991,-4.787882,3.534292,1.179054);
   phielphileadj->SetFillColor(0);
   phielphileadj->SetBorderMode(0);
   phielphileadj->SetBorderSize(2);
   phielphileadj->SetLogy();
   phielphileadj->SetFrameBorderMode(0);
   phielphileadj->SetFrameBorderMode(0);
   
   THStack *phielphileadj = new THStack();
   phielphileadj->SetName("phielphileadj");
   phielphileadj->SetTitle("phielphileadj");
   
   TH1F *phielphileadj_stack_22 = new TH1F("phielphileadj_stack_22","phielphileadj",10,0,3.141593);
   phielphileadj_stack_22->SetMinimum(6.4389e-05);
   phielphileadj_stack_22->SetMaximum(3.822615);
   phielphileadj_stack_22->SetDirectory(0);
   phielphileadj_stack_22->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   phielphileadj_stack_22->SetLineColor(ci);
   phielphileadj_stack_22->GetXaxis()->SetTitle("phielphileadj");
   phielphileadj_stack_22->GetXaxis()->SetLabelFont(42);
   phielphileadj_stack_22->GetXaxis()->SetLabelSize(0.035);
   phielphileadj_stack_22->GetXaxis()->SetTitleSize(0.035);
   phielphileadj_stack_22->GetXaxis()->SetTitleFont(42);
   phielphileadj_stack_22->GetYaxis()->SetTitle("Events/pb");
   phielphileadj_stack_22->GetYaxis()->SetLabelFont(42);
   phielphileadj_stack_22->GetYaxis()->SetLabelSize(0.035);
   phielphileadj_stack_22->GetYaxis()->SetTitleSize(0.035);
   phielphileadj_stack_22->GetYaxis()->SetTitleFont(42);
   phielphileadj_stack_22->GetZaxis()->SetLabelFont(42);
   phielphileadj_stack_22->GetZaxis()->SetLabelSize(0.035);
   phielphileadj_stack_22->GetZaxis()->SetTitleSize(0.035);
   phielphileadj_stack_22->GetZaxis()->SetTitleFont(42);
   phielphileadj->SetHistogram(phielphileadj_stack_22);
   
   
   TH1D *phielphileadj106 = new TH1D("phielphileadj106"," #Delta_{#phi}[e_{-},jet_{1}]",10,0,3.141593);
   phielphileadj106->SetBinContent(1,0.04383576);
   phielphileadj106->SetBinContent(2,0.001250901);
   phielphileadj106->SetBinContent(6,0.001250901);
   phielphileadj106->SetBinContent(8,0.001250901);
   phielphileadj106->SetBinContent(9,0.002501802);
   phielphileadj106->SetBinContent(10,0.01000721);
   phielphileadj106->SetBinError(1,0.02673601);
   phielphileadj106->SetBinError(2,0.001250901);
   phielphileadj106->SetBinError(6,0.001250901);
   phielphileadj106->SetBinError(8,0.001250901);
   phielphileadj106->SetBinError(9,0.001769041);
   phielphileadj106->SetBinError(10,0.003538083);
   phielphileadj106->SetEntries(28);

   ci = TColor::GetColor("#00cc00");
   phielphileadj106->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   phielphileadj106->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   phielphileadj106->SetMarkerColor(ci);
   phielphileadj106->SetMarkerStyle(22);
   phielphileadj106->GetXaxis()->SetTitle("phielphileadj");
   phielphileadj106->GetXaxis()->SetLabelFont(42);
   phielphileadj106->GetXaxis()->SetLabelSize(0.035);
   phielphileadj106->GetXaxis()->SetTitleSize(0.035);
   phielphileadj106->GetXaxis()->SetTitleFont(42);
   phielphileadj106->GetYaxis()->SetTitle("Events/pb");
   phielphileadj106->GetYaxis()->SetLabelFont(42);
   phielphileadj106->GetYaxis()->SetLabelSize(0.035);
   phielphileadj106->GetYaxis()->SetTitleSize(0.035);
   phielphileadj106->GetYaxis()->SetTitleFont(42);
   phielphileadj106->GetZaxis()->SetLabelFont(42);
   phielphileadj106->GetZaxis()->SetLabelSize(0.035);
   phielphileadj106->GetZaxis()->SetTitleSize(0.035);
   phielphileadj106->GetZaxis()->SetTitleFont(42);
   phielphileadj->Add(phielphileadj,"");
   
   TH1D *phielphileadj107 = new TH1D("phielphileadj107"," #Delta_{#phi}[e_{-},jet_{1}]",10,0,3.141593);
   phielphileadj107->SetBinContent(1,0.2179961);
   phielphileadj107->SetBinContent(2,0.01962548);
   phielphileadj107->SetBinContent(3,0.02590187);
   phielphileadj107->SetBinContent(4,0.04624029);
   phielphileadj107->SetBinContent(5,0.09403783);
   phielphileadj107->SetBinContent(6,0.1831221);
   phielphileadj107->SetBinContent(7,0.3913257);
   phielphileadj107->SetBinContent(8,0.7765426);
   phielphileadj107->SetBinContent(9,1.404146);
   phielphileadj107->SetBinContent(10,2.115042);
   phielphileadj107->SetBinError(1,0.008912504);
   phielphileadj107->SetBinError(2,0.002766324);
   phielphileadj107->SetBinError(3,0.0025562);
   phielphileadj107->SetBinError(4,0.003795699);
   phielphileadj107->SetBinError(5,0.00538164);
   phielphileadj107->SetBinError(6,0.007316189);
   phielphileadj107->SetBinError(7,0.01018447);
   phielphileadj107->SetBinError(8,0.01359639);
   phielphileadj107->SetBinError(9,0.01731972);
   phielphileadj107->SetBinError(10,0.01901507);
   phielphileadj107->SetEntries(120946);

   ci = TColor::GetColor("#00ffff");
   phielphileadj107->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   phielphileadj107->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   phielphileadj107->SetMarkerColor(ci);
   phielphileadj107->SetMarkerStyle(20);
   phielphileadj107->GetXaxis()->SetTitle("phielphileadj");
   phielphileadj107->GetXaxis()->SetLabelFont(42);
   phielphileadj107->GetXaxis()->SetLabelSize(0.035);
   phielphileadj107->GetXaxis()->SetTitleSize(0.035);
   phielphileadj107->GetXaxis()->SetTitleFont(42);
   phielphileadj107->GetYaxis()->SetTitle("Events/pb");
   phielphileadj107->GetYaxis()->SetLabelFont(42);
   phielphileadj107->GetYaxis()->SetLabelSize(0.035);
   phielphileadj107->GetYaxis()->SetTitleSize(0.035);
   phielphileadj107->GetYaxis()->SetTitleFont(42);
   phielphileadj107->GetZaxis()->SetLabelFont(42);
   phielphileadj107->GetZaxis()->SetLabelSize(0.035);
   phielphileadj107->GetZaxis()->SetTitleSize(0.035);
   phielphileadj107->GetZaxis()->SetTitleFont(42);
   phielphileadj->Add(phielphileadj,"");
   
   TH1D *phielphileadj108 = new TH1D("phielphileadj108"," #Delta_{#phi}[e_{-},jet_{1}]",10,0,3.141593);
   phielphileadj108->SetBinContent(1,0.05941227);
   phielphileadj108->SetBinContent(2,0.00156904);
   phielphileadj108->SetBinContent(3,0.002351593);
   phielphileadj108->SetBinContent(4,0.001584431);
   phielphileadj108->SetBinContent(5,0.001808185);
   phielphileadj108->SetBinContent(6,0.001742163);
   phielphileadj108->SetBinContent(7,0.001625272);
   phielphileadj108->SetBinContent(8,0.001809533);
   phielphileadj108->SetBinContent(9,0.002412292);
   phielphileadj108->SetBinContent(10,0.002300997);
   phielphileadj108->SetBinError(1,0.001774682);
   phielphileadj108->SetBinError(2,0.0002329711);
   phielphileadj108->SetBinError(3,0.0003550724);
   phielphileadj108->SetBinError(4,0.0002277697);
   phielphileadj108->SetBinError(5,0.0002417215);
   phielphileadj108->SetBinError(6,0.0002105135);
   phielphileadj108->SetBinError(7,0.0001661239);
   phielphileadj108->SetBinError(8,0.0001667856);
   phielphileadj108->SetBinError(9,0.0002762658);
   phielphileadj108->SetBinError(10,0.0001771848);
   phielphileadj108->SetEntries(6831);

   ci = TColor::GetColor("#ffcc00");
   phielphileadj108->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   phielphileadj108->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   phielphileadj108->SetMarkerColor(ci);
   phielphileadj108->SetMarkerStyle(21);
   phielphileadj108->GetXaxis()->SetTitle("phielphileadj");
   phielphileadj108->GetXaxis()->SetLabelFont(42);
   phielphileadj108->GetXaxis()->SetLabelSize(0.035);
   phielphileadj108->GetXaxis()->SetTitleSize(0.035);
   phielphileadj108->GetXaxis()->SetTitleFont(42);
   phielphileadj108->GetYaxis()->SetTitle("Events/pb");
   phielphileadj108->GetYaxis()->SetLabelFont(42);
   phielphileadj108->GetYaxis()->SetLabelSize(0.035);
   phielphileadj108->GetYaxis()->SetTitleSize(0.035);
   phielphileadj108->GetYaxis()->SetTitleFont(42);
   phielphileadj108->GetZaxis()->SetLabelFont(42);
   phielphileadj108->GetZaxis()->SetLabelSize(0.035);
   phielphileadj108->GetZaxis()->SetTitleSize(0.035);
   phielphileadj108->GetZaxis()->SetTitleFont(42);
   phielphileadj->Add(phielphileadj,"");
   
   TH1D *phielphileadj109 = new TH1D("phielphileadj109"," #Delta_{#phi}[e_{-},jet_{1}]",10,0,3.141593);
   phielphileadj109->SetBinContent(1,0.001388212);
   phielphileadj109->SetBinContent(2,0.0002313686);
   phielphileadj109->SetBinContent(3,0.0002159441);
   phielphileadj109->SetBinContent(4,0.0002313686);
   phielphileadj109->SetBinContent(5,0.0005707093);
   phielphileadj109->SetBinContent(6,0.0008946254);
   phielphileadj109->SetBinContent(7,0.0008946254);
   phielphileadj109->SetBinContent(8,0.001588731);
   phielphileadj109->SetBinContent(9,0.001789251);
   phielphileadj109->SetBinContent(10,0.002113167);
   phielphileadj109->SetBinError(1,0.0001463304);
   phielphileadj109->SetBinError(2,5.973913e-05);
   phielphileadj109->SetBinError(3,5.771348e-05);
   phielphileadj109->SetBinError(4,5.973913e-05);
   phielphileadj109->SetBinError(5,9.382403e-05);
   phielphileadj109->SetBinError(6,0.0001174701);
   phielphileadj109->SetBinError(7,0.0001174701);
   phielphileadj109->SetBinError(8,0.0001565423);
   phielphileadj109->SetBinError(9,0.0001661278);
   phielphileadj109->SetBinError(10,0.00018054);
   phielphileadj109->SetEntries(643);

   ci = TColor::GetColor("#ff0000");
   phielphileadj109->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   phielphileadj109->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   phielphileadj109->SetMarkerColor(ci);
   phielphileadj109->SetMarkerStyle(20);
   phielphileadj109->GetXaxis()->SetTitle("phielphileadj");
   phielphileadj109->GetXaxis()->SetLabelFont(42);
   phielphileadj109->GetXaxis()->SetLabelSize(0.035);
   phielphileadj109->GetXaxis()->SetTitleSize(0.035);
   phielphileadj109->GetXaxis()->SetTitleFont(42);
   phielphileadj109->GetYaxis()->SetTitle("Events/pb");
   phielphileadj109->GetYaxis()->SetLabelFont(42);
   phielphileadj109->GetYaxis()->SetLabelSize(0.035);
   phielphileadj109->GetYaxis()->SetTitleSize(0.035);
   phielphileadj109->GetYaxis()->SetTitleFont(42);
   phielphileadj109->GetZaxis()->SetLabelFont(42);
   phielphileadj109->GetZaxis()->SetLabelSize(0.035);
   phielphileadj109->GetZaxis()->SetTitleSize(0.035);
   phielphileadj109->GetZaxis()->SetTitleFont(42);
   phielphileadj->Add(phielphileadj,"");
   
   TH1D *phielphileadj110 = new TH1D("phielphileadj110"," #Delta_{#phi}[e_{-},jet_{1}]",10,0,3.141593);
   phielphileadj110->SetBinContent(1,0.001593307);
   phielphileadj110->SetBinContent(2,0.0005199211);
   phielphileadj110->SetBinContent(3,0.000335433);
   phielphileadj110->SetBinContent(4,0.0004696061);
   phielphileadj110->SetBinContent(5,0.0004696061);
   phielphileadj110->SetBinContent(6,0.0006540943);
   phielphileadj110->SetBinContent(7,0.0008888973);
   phielphileadj110->SetBinContent(8,0.001962283);
   phielphileadj110->SetBinContent(9,0.002331259);
   phielphileadj110->SetBinContent(10,0.003119526);
   phielphileadj110->SetBinError(1,0.0001634698);
   phielphileadj110->SetBinError(2,9.338058e-05);
   phielphileadj110->SetBinError(3,7.500509e-05);
   phielphileadj110->SetBinError(4,8.874722e-05);
   phielphileadj110->SetBinError(5,8.874722e-05);
   phielphileadj110->SetBinError(6,0.0001047389);
   phielphileadj110->SetBinError(7,0.0001220994);
   phielphileadj110->SetBinError(8,0.0001814131);
   phielphileadj110->SetBinError(9,0.0001977348);
   phielphileadj110->SetBinError(10,0.0002287348);
   phielphileadj110->SetEntries(736);

   ci = TColor::GetColor("#0000ff");
   phielphileadj110->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   phielphileadj110->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   phielphileadj110->SetMarkerColor(ci);
   phielphileadj110->SetMarkerStyle(21);
   phielphileadj110->GetXaxis()->SetTitle("phielphileadj");
   phielphileadj110->GetXaxis()->SetLabelFont(42);
   phielphileadj110->GetXaxis()->SetLabelSize(0.035);
   phielphileadj110->GetXaxis()->SetTitleSize(0.035);
   phielphileadj110->GetXaxis()->SetTitleFont(42);
   phielphileadj110->GetYaxis()->SetTitle("Events/pb");
   phielphileadj110->GetYaxis()->SetLabelFont(42);
   phielphileadj110->GetYaxis()->SetLabelSize(0.035);
   phielphileadj110->GetYaxis()->SetTitleSize(0.035);
   phielphileadj110->GetYaxis()->SetTitleFont(42);
   phielphileadj110->GetZaxis()->SetLabelFont(42);
   phielphileadj110->GetZaxis()->SetLabelSize(0.035);
   phielphileadj110->GetZaxis()->SetTitleSize(0.035);
   phielphileadj110->GetZaxis()->SetTitleFont(42);
   phielphileadj->Add(phielphileadj,"");
   phielphileadj->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3377011,0.9342857,0.6622989,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("phielphileadj");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("phielphileadj","phielphileadj_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phielphileadj","phielphileadj_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phielphileadj","phielphileadj_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phielphileadj","phielphileadj_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("phielphileadj","phielphileadj_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   phielphileadj->Modified();
   phielphileadj->cd();
   phielphileadj->SetSelected(phielphileadj);
}
void METJets()
{
//=========Macro generated from canvas: METJets/METJets
//=========  (Fri Nov  6 09:02:55 2015) by ROOT version6.02/05
   TCanvas *METJets = new TCanvas("METJets", "METJets",435,102,700,700);
   METJets->Range(-2.5,-6.939719,22.5,0.708446);
   METJets->SetFillColor(0);
   METJets->SetBorderMode(0);
   METJets->SetBorderSize(2);
   METJets->SetLogy();
   METJets->SetFrameBorderMode(0);
   METJets->SetFrameBorderMode(0);
   
   THStack *METJets = new THStack();
   METJets->SetName("METJets");
   METJets->SetTitle("METJets");
   
   TH1F *METJets_stack_3 = new TH1F("METJets_stack_3","METJets",20,0,20);
   METJets_stack_3->SetMinimum(6.684943e-07);
   METJets_stack_3->SetMaximum(0.8782728);
   METJets_stack_3->SetDirectory(0);
   METJets_stack_3->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   METJets_stack_3->SetLineColor(ci);
   METJets_stack_3->GetXaxis()->SetTitle("METJets");
   METJets_stack_3->GetXaxis()->SetLabelFont(42);
   METJets_stack_3->GetXaxis()->SetLabelSize(0.035);
   METJets_stack_3->GetXaxis()->SetTitleSize(0.035);
   METJets_stack_3->GetXaxis()->SetTitleFont(42);
   METJets_stack_3->GetYaxis()->SetTitle("Events/pb");
   METJets_stack_3->GetYaxis()->SetLabelFont(42);
   METJets_stack_3->GetYaxis()->SetLabelSize(0.035);
   METJets_stack_3->GetYaxis()->SetTitleSize(0.035);
   METJets_stack_3->GetYaxis()->SetTitleFont(42);
   METJets_stack_3->GetZaxis()->SetLabelFont(42);
   METJets_stack_3->GetZaxis()->SetLabelSize(0.035);
   METJets_stack_3->GetZaxis()->SetTitleSize(0.035);
   METJets_stack_3->GetZaxis()->SetTitleFont(42);
   METJets->SetHistogram(METJets_stack_3);
   
   
   TH1D *METJets11 = new TH1D("METJets11"," Number of jets in MET hemisphere",20,0,20);
   METJets11->SetBinContent(4,0.001250901);
   METJets11->SetBinContent(5,0.02882494);
   METJets11->SetBinError(4,0.001250901);
   METJets11->SetBinError(5,0.02638252);
   METJets11->SetEntries(4);

   ci = TColor::GetColor("#00cc00");
   METJets11->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   METJets11->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   METJets11->SetMarkerColor(ci);
   METJets11->SetMarkerStyle(22);
   METJets11->GetXaxis()->SetTitle("METJets");
   METJets11->GetXaxis()->SetLabelFont(42);
   METJets11->GetXaxis()->SetLabelSize(0.035);
   METJets11->GetXaxis()->SetTitleSize(0.035);
   METJets11->GetXaxis()->SetTitleFont(42);
   METJets11->GetYaxis()->SetTitle("Events/pb");
   METJets11->GetYaxis()->SetLabelFont(42);
   METJets11->GetYaxis()->SetLabelSize(0.035);
   METJets11->GetYaxis()->SetTitleSize(0.035);
   METJets11->GetYaxis()->SetTitleFont(42);
   METJets11->GetZaxis()->SetLabelFont(42);
   METJets11->GetZaxis()->SetLabelSize(0.035);
   METJets11->GetZaxis()->SetTitleSize(0.035);
   METJets11->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets12 = new TH1D("METJets12"," Number of jets in MET hemisphere",20,0,20);
   METJets12->SetBinContent(1,0.1125815);
   METJets12->SetBinContent(2,0.4285217);
   METJets12->SetBinContent(3,0.3409504);
   METJets12->SetBinContent(4,0.1708964);
   METJets12->SetBinContent(5,0.05932811);
   METJets12->SetBinContent(6,0.02373303);
   METJets12->SetBinContent(7,0.006545923);
   METJets12->SetBinContent(8,0.002482997);
   METJets12->SetBinContent(9,0.0004501454);
   METJets12->SetBinContent(10,5.615768e-05);
   METJets12->SetBinContent(11,5.615768e-05);
   METJets12->SetBinContent(12,1.392893e-05);
   METJets12->SetBinError(1,0.007309092);
   METJets12->SetBinError(2,0.01328181);
   METJets12->SetBinError(3,0.01094448);
   METJets12->SetBinError(4,0.006993249);
   METJets12->SetBinError(5,0.003460026);
   METJets12->SetBinError(6,0.002212104);
   METJets12->SetBinError(7,0.0008953739);
   METJets12->SetBinError(8,0.0006170034);
   METJets12->SetBinError(9,0.0001016709);
   METJets12->SetBinError(10,3.448057e-05);
   METJets12->SetBinError(11,3.448057e-05);
   METJets12->SetBinError(12,1.392893e-05);
   METJets12->SetEntries(9534);

   ci = TColor::GetColor("#00ffff");
   METJets12->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   METJets12->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   METJets12->SetMarkerColor(ci);
   METJets12->SetMarkerStyle(20);
   METJets12->GetXaxis()->SetTitle("METJets");
   METJets12->GetXaxis()->SetLabelFont(42);
   METJets12->GetXaxis()->SetLabelSize(0.035);
   METJets12->GetXaxis()->SetTitleSize(0.035);
   METJets12->GetXaxis()->SetTitleFont(42);
   METJets12->GetYaxis()->SetTitle("Events/pb");
   METJets12->GetYaxis()->SetLabelFont(42);
   METJets12->GetYaxis()->SetLabelSize(0.035);
   METJets12->GetYaxis()->SetTitleSize(0.035);
   METJets12->GetYaxis()->SetTitleFont(42);
   METJets12->GetZaxis()->SetLabelFont(42);
   METJets12->GetZaxis()->SetLabelSize(0.035);
   METJets12->GetZaxis()->SetTitleSize(0.035);
   METJets12->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets13 = new TH1D("METJets13"," Number of jets in MET hemisphere",20,0,20);
   METJets13->SetBinContent(1,0.03196155);
   METJets13->SetBinContent(2,0.1172069);
   METJets13->SetBinContent(3,0.0774148);
   METJets13->SetBinContent(4,0.03694924);
   METJets13->SetBinContent(5,0.01471217);
   METJets13->SetBinContent(6,0.00457922);
   METJets13->SetBinContent(7,0.001196242);
   METJets13->SetBinContent(8,0.0003010538);
   METJets13->SetBinContent(9,3.996704e-05);
   METJets13->SetBinContent(10,2.319189e-05);
   METJets13->SetBinContent(11,2.691694e-06);
   METJets13->SetBinError(1,0.001597341);
   METJets13->SetBinError(2,0.002788097);
   METJets13->SetBinError(3,0.002050992);
   METJets13->SetBinError(4,0.001252285);
   METJets13->SetBinError(5,0.000761537);
   METJets13->SetBinError(6,0.0003464749);
   METJets13->SetBinError(7,0.0001505212);
   METJets13->SetBinError(8,6.572956e-05);
   METJets13->SetBinError(9,1.412354e-05);
   METJets13->SetBinError(10,9.646618e-06);
   METJets13->SetBinError(11,2.691694e-06);
   METJets13->SetEntries(13132);

   ci = TColor::GetColor("#ffcc00");
   METJets13->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   METJets13->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   METJets13->SetMarkerColor(ci);
   METJets13->SetMarkerStyle(21);
   METJets13->GetXaxis()->SetTitle("METJets");
   METJets13->GetXaxis()->SetLabelFont(42);
   METJets13->GetXaxis()->SetLabelSize(0.035);
   METJets13->GetXaxis()->SetTitleSize(0.035);
   METJets13->GetXaxis()->SetTitleFont(42);
   METJets13->GetYaxis()->SetTitle("Events/pb");
   METJets13->GetYaxis()->SetLabelFont(42);
   METJets13->GetYaxis()->SetLabelSize(0.035);
   METJets13->GetYaxis()->SetTitleSize(0.035);
   METJets13->GetYaxis()->SetTitleFont(42);
   METJets13->GetZaxis()->SetLabelFont(42);
   METJets13->GetZaxis()->SetLabelSize(0.035);
   METJets13->GetZaxis()->SetTitleSize(0.035);
   METJets13->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets14 = new TH1D("METJets14"," Number of jets in MET hemisphere",20,0,20);
   METJets14->SetBinContent(1,0.001156843);
   METJets14->SetBinContent(2,0.007372947);
   METJets14->SetBinContent(3,0.009563237);
   METJets14->SetBinContent(4,0.007326674);
   METJets14->SetBinContent(5,0.003763597);
   METJets14->SetBinContent(6,0.002066893);
   METJets14->SetBinContent(7,0.0008175025);
   METJets14->SetBinContent(8,0.0003084915);
   METJets14->SetBinContent(9,0.0001233966);
   METJets14->SetBinContent(10,3.084915e-05);
   METJets14->SetBinContent(11,1.542458e-05);
   METJets14->SetBinError(1,0.0001335807);
   METJets14->SetBinError(2,0.0003372308);
   METJets14->SetBinError(3,0.0003840688);
   METJets14->SetBinError(4,0.0003361708);
   METJets14->SetBinError(5,0.0002409396);
   METJets14->SetBinError(6,0.0001785524);
   METJets14->SetBinError(7,0.0001122926);
   METJets14->SetBinError(8,6.89808e-05);
   METJets14->SetBinError(9,4.362729e-05);
   METJets14->SetBinError(10,2.181364e-05);
   METJets14->SetBinError(11,1.542458e-05);
   METJets14->SetEntries(2110);

   ci = TColor::GetColor("#ff0000");
   METJets14->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   METJets14->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   METJets14->SetMarkerColor(ci);
   METJets14->SetMarkerStyle(20);
   METJets14->GetXaxis()->SetTitle("METJets");
   METJets14->GetXaxis()->SetLabelFont(42);
   METJets14->GetXaxis()->SetLabelSize(0.035);
   METJets14->GetXaxis()->SetTitleSize(0.035);
   METJets14->GetXaxis()->SetTitleFont(42);
   METJets14->GetYaxis()->SetTitle("Events/pb");
   METJets14->GetYaxis()->SetLabelFont(42);
   METJets14->GetYaxis()->SetLabelSize(0.035);
   METJets14->GetYaxis()->SetTitleSize(0.035);
   METJets14->GetYaxis()->SetTitleFont(42);
   METJets14->GetZaxis()->SetLabelFont(42);
   METJets14->GetZaxis()->SetLabelSize(0.035);
   METJets14->GetZaxis()->SetTitleSize(0.035);
   METJets14->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets15 = new TH1D("METJets15"," Number of jets in MET hemisphere",20,0,20);
   METJets15->SetBinContent(3,1.677165e-05);
   METJets15->SetBinContent(4,1.677165e-05);
   METJets15->SetBinContent(5,6.708659e-05);
   METJets15->SetBinContent(6,5.031494e-05);
   METJets15->SetBinContent(7,8.385824e-05);
   METJets15->SetBinContent(8,3.35433e-05);
   METJets15->SetBinContent(10,1.677165e-05);
   METJets15->SetBinError(3,1.677165e-05);
   METJets15->SetBinError(4,1.677165e-05);
   METJets15->SetBinError(5,3.35433e-05);
   METJets15->SetBinError(6,2.904935e-05);
   METJets15->SetBinError(7,3.750254e-05);
   METJets15->SetBinError(8,2.371869e-05);
   METJets15->SetBinError(10,1.677165e-05);
   METJets15->SetEntries(17);

   ci = TColor::GetColor("#0000ff");
   METJets15->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   METJets15->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   METJets15->SetMarkerColor(ci);
   METJets15->SetMarkerStyle(21);
   METJets15->GetXaxis()->SetTitle("METJets");
   METJets15->GetXaxis()->SetLabelFont(42);
   METJets15->GetXaxis()->SetLabelSize(0.035);
   METJets15->GetXaxis()->SetTitleSize(0.035);
   METJets15->GetXaxis()->SetTitleFont(42);
   METJets15->GetYaxis()->SetTitle("Events/pb");
   METJets15->GetYaxis()->SetLabelFont(42);
   METJets15->GetYaxis()->SetLabelSize(0.035);
   METJets15->GetYaxis()->SetTitleSize(0.035);
   METJets15->GetYaxis()->SetTitleFont(42);
   METJets15->GetZaxis()->SetLabelFont(42);
   METJets15->GetZaxis()->SetLabelSize(0.035);
   METJets15->GetZaxis()->SetTitleSize(0.035);
   METJets15->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   METJets->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3872701,0.94,0.6127299,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("METJets");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("METJets","METJets_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("METJets","METJets_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   METJets->Modified();
   METJets->cd();
   METJets->SetSelected(METJets);
}
void BJets()
{
//=========Macro generated from canvas: BJets/BJets
//=========  (Fri Nov 13 11:38:51 2015) by ROOT version6.02/05
   TCanvas *BJets = new TCanvas("BJets", "BJets",40,62,700,700);
   BJets->Range(-0.8750001,-5.970713,7.875,1.123078);
   BJets->SetFillColor(0);
   BJets->SetBorderMode(0);
   BJets->SetBorderSize(2);
   BJets->SetLogy();
   BJets->SetFrameBorderMode(0);
   BJets->SetFrameBorderMode(0);
   
   THStack *BJets = new THStack();
   BJets->SetName("BJets");
   BJets->SetTitle("BJets");
   
   TH1F *BJets_stack_3 = new TH1F("BJets_stack_3","BJets",7,0,7);
   BJets_stack_3->SetMinimum(5.478552e-06);
   BJets_stack_3->SetMaximum(2.592381);
   BJets_stack_3->SetDirectory(0);
   BJets_stack_3->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   BJets_stack_3->SetLineColor(ci);
   BJets_stack_3->GetXaxis()->SetTitle("BJets");
   BJets_stack_3->GetXaxis()->SetLabelFont(42);
   BJets_stack_3->GetXaxis()->SetLabelSize(0.035);
   BJets_stack_3->GetXaxis()->SetTitleSize(0.035);
   BJets_stack_3->GetXaxis()->SetTitleFont(42);
   BJets_stack_3->GetYaxis()->SetTitle("Events/pb");
   BJets_stack_3->GetYaxis()->SetLabelFont(42);
   BJets_stack_3->GetYaxis()->SetLabelSize(0.035);
   BJets_stack_3->GetYaxis()->SetTitleSize(0.035);
   BJets_stack_3->GetYaxis()->SetTitleFont(42);
   BJets_stack_3->GetZaxis()->SetLabelFont(42);
   BJets_stack_3->GetZaxis()->SetLabelSize(0.035);
   BJets_stack_3->GetZaxis()->SetTitleSize(0.035);
   BJets_stack_3->GetZaxis()->SetTitleFont(42);
   BJets->SetHistogram(BJets_stack_3);
   
   
   TH1D *BJets11 = new TH1D("BJets11"," Number of b-tagged jets",7,0,7);
   BJets11->SetBinContent(1,0.04976213);
   BJets11->SetBinContent(2,0.01376429);
   BJets11->SetBinError(1,0.01875019);
   BJets11->SetBinError(2,0.008538656);
   BJets11->SetEntries(26);

   ci = TColor::GetColor("#00cc00");
   BJets11->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   BJets11->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   BJets11->SetMarkerColor(ci);
   BJets11->SetMarkerStyle(22);
   BJets11->GetXaxis()->SetTitle("BJets");
   BJets11->GetXaxis()->SetLabelFont(42);
   BJets11->GetXaxis()->SetLabelSize(0.035);
   BJets11->GetXaxis()->SetTitleSize(0.035);
   BJets11->GetXaxis()->SetTitleFont(42);
   BJets11->GetYaxis()->SetTitle("Events/pb");
   BJets11->GetYaxis()->SetLabelFont(42);
   BJets11->GetYaxis()->SetLabelSize(0.035);
   BJets11->GetYaxis()->SetTitleSize(0.035);
   BJets11->GetYaxis()->SetTitleFont(42);
   BJets11->GetZaxis()->SetLabelFont(42);
   BJets11->GetZaxis()->SetLabelSize(0.035);
   BJets11->GetZaxis()->SetTitleSize(0.035);
   BJets11->GetZaxis()->SetTitleFont(42);
   BJets->Add(BJets,"");
   
   TH1D *BJets12 = new TH1D("BJets12"," Number of b-tagged jets",7,0,7);
   BJets12->SetBinContent(1,1.316424);
   BJets12->SetBinContent(2,0.0629929);
   BJets12->SetBinContent(3,0.003590708);
   BJets12->SetBinContent(4,0.0001294132);
   BJets12->SetBinError(1,0.01510642);
   BJets12->SetBinError(2,0.002440041);
   BJets12->SetBinError(3,0.0004620195);
   BJets12->SetBinError(4,4.315464e-05);
   BJets12->SetEntries(30221);

   ci = TColor::GetColor("#00ffff");
   BJets12->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   BJets12->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   BJets12->SetMarkerColor(ci);
   BJets12->SetMarkerStyle(20);
   BJets12->GetXaxis()->SetTitle("BJets");
   BJets12->GetXaxis()->SetLabelFont(42);
   BJets12->GetXaxis()->SetLabelSize(0.035);
   BJets12->GetXaxis()->SetTitleSize(0.035);
   BJets12->GetXaxis()->SetTitleFont(42);
   BJets12->GetYaxis()->SetTitle("Events/pb");
   BJets12->GetYaxis()->SetLabelFont(42);
   BJets12->GetYaxis()->SetLabelSize(0.035);
   BJets12->GetYaxis()->SetTitleSize(0.035);
   BJets12->GetYaxis()->SetTitleFont(42);
   BJets12->GetZaxis()->SetLabelFont(42);
   BJets12->GetZaxis()->SetLabelSize(0.035);
   BJets12->GetZaxis()->SetTitleSize(0.035);
   BJets12->GetZaxis()->SetTitleFont(42);
   BJets->Add(BJets,"");
   
   TH1D *BJets13 = new TH1D("BJets13"," Number of b-tagged jets",7,0,7);
   BJets13->SetBinContent(1,0.0370729);
   BJets13->SetBinContent(2,0.006439609);
   BJets13->SetBinContent(3,0.0004691772);
   BJets13->SetBinContent(4,2.083768e-05);
   BJets13->SetBinError(1,0.0009774393);
   BJets13->SetBinError(2,0.0003617629);
   BJets13->SetBinError(3,7.429316e-05);
   BJets13->SetBinError(4,6.908249e-06);
   BJets13->SetEntries(7352);

   ci = TColor::GetColor("#ffcc00");
   BJets13->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   BJets13->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   BJets13->SetMarkerColor(ci);
   BJets13->SetMarkerStyle(21);
   BJets13->GetXaxis()->SetTitle("BJets");
   BJets13->GetXaxis()->SetLabelFont(42);
   BJets13->GetXaxis()->SetLabelSize(0.035);
   BJets13->GetXaxis()->SetTitleSize(0.035);
   BJets13->GetXaxis()->SetTitleFont(42);
   BJets13->GetYaxis()->SetTitle("Events/pb");
   BJets13->GetYaxis()->SetLabelFont(42);
   BJets13->GetYaxis()->SetLabelSize(0.035);
   BJets13->GetYaxis()->SetTitleSize(0.035);
   BJets13->GetYaxis()->SetTitleFont(42);
   BJets13->GetZaxis()->SetLabelFont(42);
   BJets13->GetZaxis()->SetLabelSize(0.035);
   BJets13->GetZaxis()->SetTitleSize(0.035);
   BJets13->GetZaxis()->SetTitleFont(42);
   BJets->Add(BJets,"");
   
   TH1D *BJets14 = new TH1D("BJets14"," Number of b-tagged jets",7,0,7);
   BJets14->SetBinContent(1,0.0343968);
   BJets14->SetBinContent(2,0.003840719);
   BJets14->SetBinContent(3,0.0006015585);
   BJets14->SetBinError(1,0.0007283928);
   BJets14->SetBinError(2,0.0002433957);
   BJets14->SetBinError(3,9.632645e-05);
   BJets14->SetEntries(2518);

   ci = TColor::GetColor("#ff0000");
   BJets14->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   BJets14->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   BJets14->SetMarkerColor(ci);
   BJets14->SetMarkerStyle(20);
   BJets14->GetXaxis()->SetTitle("BJets");
   BJets14->GetXaxis()->SetLabelFont(42);
   BJets14->GetXaxis()->SetLabelSize(0.035);
   BJets14->GetXaxis()->SetTitleSize(0.035);
   BJets14->GetXaxis()->SetTitleFont(42);
   BJets14->GetYaxis()->SetTitle("Events/pb");
   BJets14->GetYaxis()->SetLabelFont(42);
   BJets14->GetYaxis()->SetLabelSize(0.035);
   BJets14->GetYaxis()->SetTitleSize(0.035);
   BJets14->GetYaxis()->SetTitleFont(42);
   BJets14->GetZaxis()->SetLabelFont(42);
   BJets14->GetZaxis()->SetLabelSize(0.035);
   BJets14->GetZaxis()->SetTitleSize(0.035);
   BJets14->GetZaxis()->SetTitleFont(42);
   BJets->Add(BJets,"");
   
   TH1D *BJets15 = new TH1D("BJets15"," Number of b-tagged jets",7,0,7);
   BJets15->SetBinContent(1,0.0004696061);
   BJets15->SetBinContent(2,0.0006876375);
   BJets15->SetBinContent(3,0.0006373226);
   BJets15->SetBinContent(4,0.0002515747);
   BJets15->SetBinContent(5,0.0001006299);
   BJets15->SetBinError(1,8.874722e-05);
   BJets15->SetBinError(2,0.0001073909);
   BJets15->SetBinError(3,0.0001033874);
   BJets15->SetBinError(4,6.495631e-05);
   BJets15->SetBinError(5,4.108198e-05);
   BJets15->SetEntries(128);

   ci = TColor::GetColor("#0000ff");
   BJets15->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   BJets15->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   BJets15->SetMarkerColor(ci);
   BJets15->SetMarkerStyle(21);
   BJets15->GetXaxis()->SetTitle("BJets");
   BJets15->GetXaxis()->SetLabelFont(42);
   BJets15->GetXaxis()->SetLabelSize(0.035);
   BJets15->GetXaxis()->SetTitleSize(0.035);
   BJets15->GetXaxis()->SetTitleFont(42);
   BJets15->GetYaxis()->SetTitle("Events/pb");
   BJets15->GetYaxis()->SetLabelFont(42);
   BJets15->GetYaxis()->SetLabelSize(0.035);
   BJets15->GetYaxis()->SetTitleSize(0.035);
   BJets15->GetYaxis()->SetTitleFont(42);
   BJets15->GetZaxis()->SetLabelFont(42);
   BJets15->GetZaxis()->SetLabelSize(0.035);
   BJets15->GetZaxis()->SetTitleSize(0.035);
   BJets15->GetZaxis()->SetTitleFont(42);
   BJets->Add(BJets,"");
   BJets->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.4217529,0.94,0.5782471,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("BJets");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("BJets","BJets_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("BJets","BJets_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("BJets","BJets_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("BJets","BJets_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("BJets","BJets_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   BJets->Modified();
   BJets->cd();
   BJets->SetSelected(BJets);
}
void VBFDeltaEta()
{
//=========Macro generated from canvas: VBFDeltaEta/VBFDeltaEta
//=========  (Wed Nov  4 11:47:03 2015) by ROOT version6.02/05
   TCanvas *VBFDeltaEta = new TCanvas("VBFDeltaEta", "VBFDeltaEta",220,242,700,700);
   VBFDeltaEta->Range(-12.5,-5.529375,12.5,2.023205);
   VBFDeltaEta->SetFillColor(0);
   VBFDeltaEta->SetBorderMode(0);
   VBFDeltaEta->SetBorderSize(2);
   VBFDeltaEta->SetLogy();
   VBFDeltaEta->SetFrameBorderMode(0);
   VBFDeltaEta->SetFrameBorderMode(0);
   
   THStack *VBFDeltaEta = new THStack();
   VBFDeltaEta->SetName("VBFDeltaEta");
   VBFDeltaEta->SetTitle("VBFDeltaEta");
   
   TH1F *VBFDeltaEta_stack_12 = new TH1F("VBFDeltaEta_stack_12","VBFDeltaEta",20,-10,10);
   VBFDeltaEta_stack_12->SetMinimum(1.682221e-05);
   VBFDeltaEta_stack_12->SetMaximum(18.53305);
   VBFDeltaEta_stack_12->SetDirectory(0);
   VBFDeltaEta_stack_12->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   VBFDeltaEta_stack_12->SetLineColor(ci);
   VBFDeltaEta_stack_12->GetXaxis()->SetTitle("VBFDeltaEta");
   VBFDeltaEta_stack_12->GetXaxis()->SetLabelFont(42);
   VBFDeltaEta_stack_12->GetXaxis()->SetLabelSize(0.035);
   VBFDeltaEta_stack_12->GetXaxis()->SetTitleSize(0.035);
   VBFDeltaEta_stack_12->GetXaxis()->SetTitleFont(42);
   VBFDeltaEta_stack_12->GetYaxis()->SetTitle("Events/pb");
   VBFDeltaEta_stack_12->GetYaxis()->SetLabelFont(42);
   VBFDeltaEta_stack_12->GetYaxis()->SetLabelSize(0.035);
   VBFDeltaEta_stack_12->GetYaxis()->SetTitleSize(0.035);
   VBFDeltaEta_stack_12->GetYaxis()->SetTitleFont(42);
   VBFDeltaEta_stack_12->GetZaxis()->SetLabelFont(42);
   VBFDeltaEta_stack_12->GetZaxis()->SetLabelSize(0.035);
   VBFDeltaEta_stack_12->GetZaxis()->SetTitleSize(0.035);
   VBFDeltaEta_stack_12->GetZaxis()->SetTitleFont(42);
   VBFDeltaEta->SetHistogram(VBFDeltaEta_stack_12);
   
   
   TH1D *VBFDeltaEta56 = new TH1D("VBFDeltaEta56","#Delta_{#eta} + VBF cuts",20,-10,10);
   VBFDeltaEta56->SetBinContent(2,0.02757404);
   VBFDeltaEta56->SetBinContent(3,0.03883215);
   VBFDeltaEta56->SetBinContent(4,0.634203);
   VBFDeltaEta56->SetBinContent(5,5.370436);
   VBFDeltaEta56->SetBinContent(6,3.979399);
   VBFDeltaEta56->SetBinContent(11,6.295011);
   VBFDeltaEta56->SetBinContent(15,1.928552);
   VBFDeltaEta56->SetBinContent(16,5.0433);
   VBFDeltaEta56->SetBinContent(17,3.894055);
   VBFDeltaEta56->SetBinContent(18,0.1366193);
   VBFDeltaEta56->SetBinContent(19,0.003752704);
   VBFDeltaEta56->SetBinContent(20,0.02632314);
   VBFDeltaEta56->SetBinError(2,0.02635285);
   VBFDeltaEta56->SetBinError(3,0.0266187);
   VBFDeltaEta56->SetBinError(4,0.1263838);
   VBFDeltaEta56->SetBinError(5,1.984666);
   VBFDeltaEta56->SetBinError(6,1.622458);
   VBFDeltaEta56->SetBinError(11,1.989275);
   VBFDeltaEta56->SetBinError(15,0.2097407);
   VBFDeltaEta56->SetBinError(16,1.982566);
   VBFDeltaEta56->SetBinError(17,1.975533);
   VBFDeltaEta56->SetBinError(18,0.05891348);
   VBFDeltaEta56->SetBinError(19,0.002166624);
   VBFDeltaEta56->SetBinError(20,0.02632314);
   VBFDeltaEta56->SetEntries(1398);

   ci = TColor::GetColor("#00cc00");
   VBFDeltaEta56->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   VBFDeltaEta56->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   VBFDeltaEta56->SetMarkerColor(ci);
   VBFDeltaEta56->SetMarkerStyle(22);
   VBFDeltaEta56->GetXaxis()->SetTitle("VBFDeltaEta");
   VBFDeltaEta56->GetXaxis()->SetLabelFont(42);
   VBFDeltaEta56->GetXaxis()->SetLabelSize(0.035);
   VBFDeltaEta56->GetXaxis()->SetTitleSize(0.035);
   VBFDeltaEta56->GetXaxis()->SetTitleFont(42);
   VBFDeltaEta56->GetYaxis()->SetTitle("Events/pb");
   VBFDeltaEta56->GetYaxis()->SetLabelFont(42);
   VBFDeltaEta56->GetYaxis()->SetLabelSize(0.035);
   VBFDeltaEta56->GetYaxis()->SetTitleSize(0.035);
   VBFDeltaEta56->GetYaxis()->SetTitleFont(42);
   VBFDeltaEta56->GetZaxis()->SetLabelFont(42);
   VBFDeltaEta56->GetZaxis()->SetLabelSize(0.035);
   VBFDeltaEta56->GetZaxis()->SetTitleSize(0.035);
   VBFDeltaEta56->GetZaxis()->SetTitleFont(42);
   VBFDeltaEta->Add(VBFDeltaEta,"");
   
   TH1D *VBFDeltaEta57 = new TH1D("VBFDeltaEta57","#Delta_{#eta} + VBF cuts",20,-10,10);
   VBFDeltaEta57->SetBinContent(1,0.02028896);
   VBFDeltaEta57->SetBinContent(2,0.08985857);
   VBFDeltaEta57->SetBinContent(3,0.4571356);
   VBFDeltaEta57->SetBinContent(4,1.161785);
   VBFDeltaEta57->SetBinContent(5,3.111093);
   VBFDeltaEta57->SetBinContent(6,3.297386);
   VBFDeltaEta57->SetBinContent(11,9.104142);
   VBFDeltaEta57->SetBinContent(15,3.349544);
   VBFDeltaEta57->SetBinContent(16,2.978421);
   VBFDeltaEta57->SetBinContent(17,1.133212);
   VBFDeltaEta57->SetBinContent(18,0.5140127);
   VBFDeltaEta57->SetBinContent(19,0.0909154);
   VBFDeltaEta57->SetBinContent(20,0.01469553);
   VBFDeltaEta57->SetBinError(1,0.00406594);
   VBFDeltaEta57->SetBinError(2,0.00809007);
   VBFDeltaEta57->SetBinError(3,0.01852798);
   VBFDeltaEta57->SetBinError(4,0.02902226);
   VBFDeltaEta57->SetBinError(5,0.04737842);
   VBFDeltaEta57->SetBinError(6,0.04719168);
   VBFDeltaEta57->SetBinError(11,0.08243018);
   VBFDeltaEta57->SetBinError(15,0.04736777);
   VBFDeltaEta57->SetBinError(16,0.04612548);
   VBFDeltaEta57->SetBinError(17,0.02866639);
   VBFDeltaEta57->SetBinError(18,0.01972925);
   VBFDeltaEta57->SetBinError(19,0.008035675);
   VBFDeltaEta57->SetBinError(20,0.003248628);
   VBFDeltaEta57->SetEntries(106434);

   ci = TColor::GetColor("#00ffff");
   VBFDeltaEta57->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   VBFDeltaEta57->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   VBFDeltaEta57->SetMarkerColor(ci);
   VBFDeltaEta57->SetMarkerStyle(20);
   VBFDeltaEta57->GetXaxis()->SetTitle("VBFDeltaEta");
   VBFDeltaEta57->GetXaxis()->SetLabelFont(42);
   VBFDeltaEta57->GetXaxis()->SetLabelSize(0.035);
   VBFDeltaEta57->GetXaxis()->SetTitleSize(0.035);
   VBFDeltaEta57->GetXaxis()->SetTitleFont(42);
   VBFDeltaEta57->GetYaxis()->SetTitle("Events/pb");
   VBFDeltaEta57->GetYaxis()->SetLabelFont(42);
   VBFDeltaEta57->GetYaxis()->SetLabelSize(0.035);
   VBFDeltaEta57->GetYaxis()->SetTitleSize(0.035);
   VBFDeltaEta57->GetYaxis()->SetTitleFont(42);
   VBFDeltaEta57->GetZaxis()->SetLabelFont(42);
   VBFDeltaEta57->GetZaxis()->SetLabelSize(0.035);
   VBFDeltaEta57->GetZaxis()->SetTitleSize(0.035);
   VBFDeltaEta57->GetZaxis()->SetTitleFont(42);
   VBFDeltaEta->Add(VBFDeltaEta,"");
   
   TH1D *VBFDeltaEta58 = new TH1D("VBFDeltaEta58","#Delta_{#eta} + VBF cuts",20,-10,10);
   VBFDeltaEta58->SetBinContent(1,0.002795082);
   VBFDeltaEta58->SetBinContent(2,0.01316622);
   VBFDeltaEta58->SetBinContent(3,0.0740267);
   VBFDeltaEta58->SetBinContent(4,0.1689951);
   VBFDeltaEta58->SetBinContent(5,0.474113);
   VBFDeltaEta58->SetBinContent(6,0.5076733);
   VBFDeltaEta58->SetBinContent(11,1.595792);
   VBFDeltaEta58->SetBinContent(15,0.5220246);
   VBFDeltaEta58->SetBinContent(16,0.472889);
   VBFDeltaEta58->SetBinContent(17,0.1752986);
   VBFDeltaEta58->SetBinContent(18,0.0716702);
   VBFDeltaEta58->SetBinContent(19,0.01745);
   VBFDeltaEta58->SetBinContent(20,0.003213651);
   VBFDeltaEta58->SetBinError(1,0.0006578478);
   VBFDeltaEta58->SetBinError(2,0.001353033);
   VBFDeltaEta58->SetBinError(3,0.003294266);
   VBFDeltaEta58->SetBinError(4,0.004879182);
   VBFDeltaEta58->SetBinError(5,0.008172085);
   VBFDeltaEta58->SetBinError(6,0.008148824);
   VBFDeltaEta58->SetBinError(11,0.01529831);
   VBFDeltaEta58->SetBinError(15,0.008295855);
   VBFDeltaEta58->SetBinError(16,0.008141481);
   VBFDeltaEta58->SetBinError(17,0.00495115);
   VBFDeltaEta58->SetBinError(18,0.003269719);
   VBFDeltaEta58->SetBinError(19,0.001647783);
   VBFDeltaEta58->SetBinError(20,0.0006736957);
   VBFDeltaEta58->SetEntries(92263);

   ci = TColor::GetColor("#ffcc00");
   VBFDeltaEta58->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   VBFDeltaEta58->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   VBFDeltaEta58->SetMarkerColor(ci);
   VBFDeltaEta58->SetMarkerStyle(21);
   VBFDeltaEta58->GetXaxis()->SetTitle("VBFDeltaEta");
   VBFDeltaEta58->GetXaxis()->SetLabelFont(42);
   VBFDeltaEta58->GetXaxis()->SetLabelSize(0.035);
   VBFDeltaEta58->GetXaxis()->SetTitleSize(0.035);
   VBFDeltaEta58->GetXaxis()->SetTitleFont(42);
   VBFDeltaEta58->GetYaxis()->SetTitle("Events/pb");
   VBFDeltaEta58->GetYaxis()->SetLabelFont(42);
   VBFDeltaEta58->GetYaxis()->SetLabelSize(0.035);
   VBFDeltaEta58->GetYaxis()->SetTitleSize(0.035);
   VBFDeltaEta58->GetYaxis()->SetTitleFont(42);
   VBFDeltaEta58->GetZaxis()->SetLabelFont(42);
   VBFDeltaEta58->GetZaxis()->SetLabelSize(0.035);
   VBFDeltaEta58->GetZaxis()->SetTitleSize(0.035);
   VBFDeltaEta58->GetZaxis()->SetTitleFont(42);
   VBFDeltaEta->Add(VBFDeltaEta,"");
   
   TH1D *VBFDeltaEta59 = new TH1D("VBFDeltaEta59","#Delta_{#eta} + VBF cuts",20,-10,10);
   VBFDeltaEta59->SetBinContent(1,0.0002467932);
   VBFDeltaEta59->SetBinContent(2,0.001758402);
   VBFDeltaEta59->SetBinContent(3,0.005568272);
   VBFDeltaEta59->SetBinContent(4,0.01050414);
   VBFDeltaEta59->SetBinContent(5,0.01783081);
   VBFDeltaEta59->SetBinContent(6,0.01866374);
   VBFDeltaEta59->SetBinContent(11,0.02649942);
   VBFDeltaEta59->SetBinContent(15,0.01784623);
   VBFDeltaEta59->SetBinContent(16,0.01798506);
   VBFDeltaEta59->SetBinContent(17,0.01124452);
   VBFDeltaEta59->SetBinContent(18,0.004843317);
   VBFDeltaEta59->SetBinContent(19,0.002082318);
   VBFDeltaEta59->SetBinContent(20,0.0002467932);
   VBFDeltaEta59->SetBinError(1,6.16983e-05);
   VBFDeltaEta59->SetBinError(2,0.0001646894);
   VBFDeltaEta59->SetBinError(3,0.0002930669);
   VBFDeltaEta59->SetBinError(4,0.0004025194);
   VBFDeltaEta59->SetBinError(5,0.0005244356);
   VBFDeltaEta59->SetBinError(6,0.0005365447);
   VBFDeltaEta59->SetBinError(11,0.0006393296);
   VBFDeltaEta59->SetBinError(15,0.0005246624);
   VBFDeltaEta59->SetBinError(16,0.000526699);
   VBFDeltaEta59->SetBinError(17,0.0004164636);
   VBFDeltaEta59->SetBinError(18,0.0002733242);
   VBFDeltaEta59->SetBinError(19,0.0001792174);
   VBFDeltaEta59->SetBinError(20,6.16983e-05);
   VBFDeltaEta59->SetEntries(8773);

   ci = TColor::GetColor("#ff0000");
   VBFDeltaEta59->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   VBFDeltaEta59->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   VBFDeltaEta59->SetMarkerColor(ci);
   VBFDeltaEta59->SetMarkerStyle(20);
   VBFDeltaEta59->GetXaxis()->SetTitle("VBFDeltaEta");
   VBFDeltaEta59->GetXaxis()->SetLabelFont(42);
   VBFDeltaEta59->GetXaxis()->SetLabelSize(0.035);
   VBFDeltaEta59->GetXaxis()->SetTitleSize(0.035);
   VBFDeltaEta59->GetXaxis()->SetTitleFont(42);
   VBFDeltaEta59->GetYaxis()->SetTitle("Events/pb");
   VBFDeltaEta59->GetYaxis()->SetLabelFont(42);
   VBFDeltaEta59->GetYaxis()->SetLabelSize(0.035);
   VBFDeltaEta59->GetYaxis()->SetTitleSize(0.035);
   VBFDeltaEta59->GetYaxis()->SetTitleFont(42);
   VBFDeltaEta59->GetZaxis()->SetLabelFont(42);
   VBFDeltaEta59->GetZaxis()->SetLabelSize(0.035);
   VBFDeltaEta59->GetZaxis()->SetTitleSize(0.035);
   VBFDeltaEta59->GetZaxis()->SetTitleFont(42);
   VBFDeltaEta->Add(VBFDeltaEta,"");
   
   TH1D *VBFDeltaEta60 = new TH1D("VBFDeltaEta60","#Delta_{#eta} + VBF cuts",20,-10,10);
   VBFDeltaEta60->SetBinContent(2,0.0001341732);
   VBFDeltaEta60->SetBinContent(3,0.0003186613);
   VBFDeltaEta60->SetBinContent(4,0.0007211808);
   VBFDeltaEta60->SetBinContent(5,0.001911968);
   VBFDeltaEta60->SetBinContent(6,0.003136298);
   VBFDeltaEta60->SetBinContent(11,0.004327085);
   VBFDeltaEta60->SetBinContent(15,0.003304015);
   VBFDeltaEta60->SetBinContent(16,0.001995826);
   VBFDeltaEta60->SetBinContent(17,0.0008218107);
   VBFDeltaEta60->SetBinContent(18,0.0003522046);
   VBFDeltaEta60->SetBinContent(19,6.708659e-05);
   VBFDeltaEta60->SetBinError(2,4.743738e-05);
   VBFDeltaEta60->SetBinError(3,7.310592e-05);
   VBFDeltaEta60->SetBinError(4,0.000109979);
   VBFDeltaEta60->SetBinError(5,0.0001790722);
   VBFDeltaEta60->SetBinError(6,0.0002293488);
   VBFDeltaEta60->SetBinError(11,0.0002693925);
   VBFDeltaEta60->SetBinError(15,0.0002354013);
   VBFDeltaEta60->SetBinError(16,0.0001829571);
   VBFDeltaEta60->SetBinError(17,0.0001174015);
   VBFDeltaEta60->SetBinError(18,7.685734e-05);
   VBFDeltaEta60->SetBinError(19,3.35433e-05);
   VBFDeltaEta60->SetEntries(1019);

   ci = TColor::GetColor("#0000ff");
   VBFDeltaEta60->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   VBFDeltaEta60->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   VBFDeltaEta60->SetMarkerColor(ci);
   VBFDeltaEta60->SetMarkerStyle(21);
   VBFDeltaEta60->GetXaxis()->SetTitle("VBFDeltaEta");
   VBFDeltaEta60->GetXaxis()->SetLabelFont(42);
   VBFDeltaEta60->GetXaxis()->SetLabelSize(0.035);
   VBFDeltaEta60->GetXaxis()->SetTitleSize(0.035);
   VBFDeltaEta60->GetXaxis()->SetTitleFont(42);
   VBFDeltaEta60->GetYaxis()->SetTitle("Events/pb");
   VBFDeltaEta60->GetYaxis()->SetLabelFont(42);
   VBFDeltaEta60->GetYaxis()->SetLabelSize(0.035);
   VBFDeltaEta60->GetYaxis()->SetTitleSize(0.035);
   VBFDeltaEta60->GetYaxis()->SetTitleFont(42);
   VBFDeltaEta60->GetZaxis()->SetLabelFont(42);
   VBFDeltaEta60->GetZaxis()->SetLabelSize(0.035);
   VBFDeltaEta60->GetZaxis()->SetTitleSize(0.035);
   VBFDeltaEta60->GetZaxis()->SetTitleFont(42);
   VBFDeltaEta->Add(VBFDeltaEta,"");
   VBFDeltaEta->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3391379,0.94,0.6608621,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("VBFDeltaEta");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("VBFDeltaEta","VBFDeltaEta_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("VBFDeltaEta","VBFDeltaEta_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("VBFDeltaEta","VBFDeltaEta_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("VBFDeltaEta","VBFDeltaEta_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("VBFDeltaEta","VBFDeltaEta_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   VBFDeltaEta->Modified();
   VBFDeltaEta->cd();
   VBFDeltaEta->SetSelected(VBFDeltaEta);
}
void BalanceJets()
{
//=========Macro generated from canvas: BalanceJets/BalanceJets
//=========  (Fri Nov  6 09:02:49 2015) by ROOT version6.02/05
   TCanvas *BalanceJets = new TCanvas("BalanceJets", "BalanceJets",624,66,700,700);
   BalanceJets->Range(-1.875,-6.968408,16.875,0.8802541);
   BalanceJets->SetFillColor(0);
   BalanceJets->SetBorderMode(0);
   BalanceJets->SetBorderSize(2);
   BalanceJets->SetLogy();
   BalanceJets->SetFrameBorderMode(0);
   BalanceJets->SetFrameBorderMode(0);
   
   THStack *BalanceJets = new THStack();
   BalanceJets->SetName("BalanceJets");
   BalanceJets->SetTitle("BalanceJets");
   
   TH1F *BalanceJets_stack_2 = new TH1F("BalanceJets_stack_2","BalanceJets",15,0,15);
   BalanceJets_stack_2->SetMinimum(6.553267e-07);
   BalanceJets_stack_2->SetMaximum(1.245626);
   BalanceJets_stack_2->SetDirectory(0);
   BalanceJets_stack_2->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   BalanceJets_stack_2->SetLineColor(ci);
   BalanceJets_stack_2->GetXaxis()->SetTitle("BalanceJets");
   BalanceJets_stack_2->GetXaxis()->SetLabelFont(42);
   BalanceJets_stack_2->GetXaxis()->SetLabelSize(0.035);
   BalanceJets_stack_2->GetXaxis()->SetTitleSize(0.035);
   BalanceJets_stack_2->GetXaxis()->SetTitleFont(42);
   BalanceJets_stack_2->GetYaxis()->SetTitle("Events/pb");
   BalanceJets_stack_2->GetYaxis()->SetLabelFont(42);
   BalanceJets_stack_2->GetYaxis()->SetLabelSize(0.035);
   BalanceJets_stack_2->GetYaxis()->SetTitleSize(0.035);
   BalanceJets_stack_2->GetYaxis()->SetTitleFont(42);
   BalanceJets_stack_2->GetZaxis()->SetLabelFont(42);
   BalanceJets_stack_2->GetZaxis()->SetLabelSize(0.035);
   BalanceJets_stack_2->GetZaxis()->SetTitleSize(0.035);
   BalanceJets_stack_2->GetZaxis()->SetTitleFont(42);
   BalanceJets->SetHistogram(BalanceJets_stack_2);
   
   
   TH1D *BalanceJets6 = new TH1D("BalanceJets6"," Number of jets in balancing hemisphere",15,0,15);
   BalanceJets6->SetBinContent(3,0.002501802);
   BalanceJets6->SetBinContent(4,0.02632314);
   BalanceJets6->SetBinContent(5,0.001250901);
   BalanceJets6->SetBinError(3,0.001769041);
   BalanceJets6->SetBinError(4,0.02632314);
   BalanceJets6->SetBinError(5,0.001250901);
   BalanceJets6->SetEntries(4);

   ci = TColor::GetColor("#00cc00");
   BalanceJets6->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   BalanceJets6->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   BalanceJets6->SetMarkerColor(ci);
   BalanceJets6->SetMarkerStyle(22);
   BalanceJets6->GetXaxis()->SetTitle("BalanceJets");
   BalanceJets6->GetXaxis()->SetLabelFont(42);
   BalanceJets6->GetXaxis()->SetLabelSize(0.035);
   BalanceJets6->GetXaxis()->SetTitleSize(0.035);
   BalanceJets6->GetXaxis()->SetTitleFont(42);
   BalanceJets6->GetYaxis()->SetTitle("Events/pb");
   BalanceJets6->GetYaxis()->SetLabelFont(42);
   BalanceJets6->GetYaxis()->SetLabelSize(0.035);
   BalanceJets6->GetYaxis()->SetTitleSize(0.035);
   BalanceJets6->GetYaxis()->SetTitleFont(42);
   BalanceJets6->GetZaxis()->SetLabelFont(42);
   BalanceJets6->GetZaxis()->SetLabelSize(0.035);
   BalanceJets6->GetZaxis()->SetTitleSize(0.035);
   BalanceJets6->GetZaxis()->SetTitleFont(42);
   BalanceJets->Add(BalanceJets,"");
   
   TH1D *BalanceJets7 = new TH1D("BalanceJets7"," Number of jets in balancing hemisphere",15,0,15);
   BalanceJets7->SetBinContent(1,0.1774551);
   BalanceJets7->SetBinContent(2,0.5992429);
   BalanceJets7->SetBinContent(3,0.2936699);
   BalanceJets7->SetBinContent(4,0.06202773);
   BalanceJets7->SetBinContent(5,0.0110591);
   BalanceJets7->SetBinContent(6,0.002035104);
   BalanceJets7->SetBinContent(7,0.0001266863);
   BalanceJets7->SetBinError(1,0.009014634);
   BalanceJets7->SetBinError(2,0.01484423);
   BalanceJets7->SetBinError(3,0.009769683);
   BalanceJets7->SetBinError(4,0.004116148);
   BalanceJets7->SetBinError(5,0.001446235);
   BalanceJets7->SetBinError(6,0.0006914949);
   BalanceJets7->SetBinError(7,5.463227e-05);
   BalanceJets7->SetEntries(9534);

   ci = TColor::GetColor("#00ffff");
   BalanceJets7->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   BalanceJets7->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   BalanceJets7->SetMarkerColor(ci);
   BalanceJets7->SetMarkerStyle(20);
   BalanceJets7->GetXaxis()->SetTitle("BalanceJets");
   BalanceJets7->GetXaxis()->SetLabelFont(42);
   BalanceJets7->GetXaxis()->SetLabelSize(0.035);
   BalanceJets7->GetXaxis()->SetTitleSize(0.035);
   BalanceJets7->GetXaxis()->SetTitleFont(42);
   BalanceJets7->GetYaxis()->SetTitle("Events/pb");
   BalanceJets7->GetYaxis()->SetLabelFont(42);
   BalanceJets7->GetYaxis()->SetLabelSize(0.035);
   BalanceJets7->GetYaxis()->SetTitleSize(0.035);
   BalanceJets7->GetYaxis()->SetTitleFont(42);
   BalanceJets7->GetZaxis()->SetLabelFont(42);
   BalanceJets7->GetZaxis()->SetLabelSize(0.035);
   BalanceJets7->GetZaxis()->SetTitleSize(0.035);
   BalanceJets7->GetZaxis()->SetTitleFont(42);
   BalanceJets->Add(BalanceJets,"");
   
   TH1D *BalanceJets8 = new TH1D("BalanceJets8"," Number of jets in balancing hemisphere",15,0,15);
   BalanceJets8->SetBinContent(1,0.04543894);
   BalanceJets8->SetBinContent(2,0.1504929);
   BalanceJets8->SetBinContent(3,0.06916986);
   BalanceJets8->SetBinContent(4,0.01647221);
   BalanceJets8->SetBinContent(5,0.002396891);
   BalanceJets8->SetBinContent(6,0.0003984328);
   BalanceJets8->SetBinContent(7,1.511681e-05);
   BalanceJets8->SetBinContent(8,2.691694e-06);
   BalanceJets8->SetBinError(1,0.00186173);
   BalanceJets8->SetBinError(2,0.003013343);
   BalanceJets8->SetBinError(3,0.001860847);
   BalanceJets8->SetBinError(4,0.0008396466);
   BalanceJets8->SetBinError(5,0.0003162465);
   BalanceJets8->SetBinError(6,0.0001136094);
   BalanceJets8->SetBinError(7,8.445211e-06);
   BalanceJets8->SetBinError(8,2.691694e-06);
   BalanceJets8->SetEntries(13132);

   ci = TColor::GetColor("#ffcc00");
   BalanceJets8->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   BalanceJets8->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   BalanceJets8->SetMarkerColor(ci);
   BalanceJets8->SetMarkerStyle(21);
   BalanceJets8->GetXaxis()->SetTitle("BalanceJets");
   BalanceJets8->GetXaxis()->SetLabelFont(42);
   BalanceJets8->GetXaxis()->SetLabelSize(0.035);
   BalanceJets8->GetXaxis()->SetTitleSize(0.035);
   BalanceJets8->GetXaxis()->SetTitleFont(42);
   BalanceJets8->GetYaxis()->SetTitle("Events/pb");
   BalanceJets8->GetYaxis()->SetLabelFont(42);
   BalanceJets8->GetYaxis()->SetLabelSize(0.035);
   BalanceJets8->GetYaxis()->SetTitleSize(0.035);
   BalanceJets8->GetYaxis()->SetTitleFont(42);
   BalanceJets8->GetZaxis()->SetLabelFont(42);
   BalanceJets8->GetZaxis()->SetLabelSize(0.035);
   BalanceJets8->GetZaxis()->SetTitleSize(0.035);
   BalanceJets8->GetZaxis()->SetTitleFont(42);
   BalanceJets->Add(BalanceJets,"");
   
   TH1D *BalanceJets9 = new TH1D("BalanceJets9"," Number of jets in balancing hemisphere",15,0,15);
   BalanceJets9->SetBinContent(1,0.002236564);
   BalanceJets9->SetBinContent(2,0.01363533);
   BalanceJets9->SetBinContent(3,0.01110569);
   BalanceJets9->SetBinContent(4,0.004365155);
   BalanceJets9->SetBinContent(5,0.001018022);
   BalanceJets9->SetBinContent(6,0.0001850949);
   BalanceJets9->SetBinError(1,0.0001857365);
   BalanceJets9->SetBinError(2,0.0004586056);
   BalanceJets9->SetBinError(3,0.0004138848);
   BalanceJets9->SetBinError(4,0.0002594815);
   BalanceJets9->SetBinError(5,0.0001253098);
   BalanceJets9->SetBinError(6,5.34323e-05);
   BalanceJets9->SetEntries(2110);

   ci = TColor::GetColor("#ff0000");
   BalanceJets9->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   BalanceJets9->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   BalanceJets9->SetMarkerColor(ci);
   BalanceJets9->SetMarkerStyle(20);
   BalanceJets9->GetXaxis()->SetTitle("BalanceJets");
   BalanceJets9->GetXaxis()->SetLabelFont(42);
   BalanceJets9->GetXaxis()->SetLabelSize(0.035);
   BalanceJets9->GetXaxis()->SetTitleSize(0.035);
   BalanceJets9->GetXaxis()->SetTitleFont(42);
   BalanceJets9->GetYaxis()->SetTitle("Events/pb");
   BalanceJets9->GetYaxis()->SetLabelFont(42);
   BalanceJets9->GetYaxis()->SetLabelSize(0.035);
   BalanceJets9->GetYaxis()->SetTitleSize(0.035);
   BalanceJets9->GetYaxis()->SetTitleFont(42);
   BalanceJets9->GetZaxis()->SetLabelFont(42);
   BalanceJets9->GetZaxis()->SetLabelSize(0.035);
   BalanceJets9->GetZaxis()->SetTitleSize(0.035);
   BalanceJets9->GetZaxis()->SetTitleFont(42);
   BalanceJets->Add(BalanceJets,"");
   
   TH1D *BalanceJets10 = new TH1D("BalanceJets10"," Number of jets in balancing hemisphere",15,0,15);
   BalanceJets10->SetBinContent(1,1.677165e-05);
   BalanceJets10->SetBinContent(2,6.708659e-05);
   BalanceJets10->SetBinContent(3,0.0001006299);
   BalanceJets10->SetBinContent(4,6.708659e-05);
   BalanceJets10->SetBinContent(5,3.35433e-05);
   BalanceJets10->SetBinError(1,1.677165e-05);
   BalanceJets10->SetBinError(2,3.35433e-05);
   BalanceJets10->SetBinError(3,4.108198e-05);
   BalanceJets10->SetBinError(4,3.35433e-05);
   BalanceJets10->SetBinError(5,2.371869e-05);
   BalanceJets10->SetEntries(17);

   ci = TColor::GetColor("#0000ff");
   BalanceJets10->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   BalanceJets10->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   BalanceJets10->SetMarkerColor(ci);
   BalanceJets10->SetMarkerStyle(21);
   BalanceJets10->GetXaxis()->SetTitle("BalanceJets");
   BalanceJets10->GetXaxis()->SetLabelFont(42);
   BalanceJets10->GetXaxis()->SetLabelSize(0.035);
   BalanceJets10->GetXaxis()->SetTitleSize(0.035);
   BalanceJets10->GetXaxis()->SetTitleFont(42);
   BalanceJets10->GetYaxis()->SetTitle("Events/pb");
   BalanceJets10->GetYaxis()->SetLabelFont(42);
   BalanceJets10->GetYaxis()->SetLabelSize(0.035);
   BalanceJets10->GetYaxis()->SetTitleSize(0.035);
   BalanceJets10->GetYaxis()->SetTitleFont(42);
   BalanceJets10->GetZaxis()->SetLabelFont(42);
   BalanceJets10->GetZaxis()->SetLabelSize(0.035);
   BalanceJets10->GetZaxis()->SetTitleSize(0.035);
   BalanceJets10->GetZaxis()->SetTitleFont(42);
   BalanceJets->Add(BalanceJets,"");
   BalanceJets->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3434483,0.94,0.6565517,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("BalanceJets");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("BalanceJets","BalanceJets_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("BalanceJets","BalanceJets_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("BalanceJets","BalanceJets_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("BalanceJets","BalanceJets_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("BalanceJets","BalanceJets_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   BalanceJets->Modified();
   BalanceJets->cd();
   BalanceJets->SetSelected(BalanceJets);
}
void phimuphileadj()
{
//=========Macro generated from canvas: phimuphileadj/phimuphileadj
//=========  (Fri Nov 13 11:38:57 2015) by ROOT version6.02/05
   TCanvas *phimuphileadj = new TCanvas("phimuphileadj", "phimuphileadj",320,342,700,700);
   phimuphileadj->Range(-0.3926991,-3.784782,3.534292,3.42208);
   phimuphileadj->SetFillColor(0);
   phimuphileadj->SetBorderMode(0);
   phimuphileadj->SetBorderSize(2);
   phimuphileadj->SetLogy();
   phimuphileadj->SetFrameBorderMode(0);
   phimuphileadj->SetFrameBorderMode(0);
   
   THStack *phimuphileadj = new THStack();
   phimuphileadj->SetName("phimuphileadj");
   phimuphileadj->SetTitle("phimuphileadj");
   
   TH1F *phimuphileadj_stack_17 = new TH1F("phimuphileadj_stack_17","phimuphileadj",10,0,3.141593);
   phimuphileadj_stack_17->SetMinimum(0.0008627887);
   phimuphileadj_stack_17->SetMaximum(502.798);
   phimuphileadj_stack_17->SetDirectory(0);
   phimuphileadj_stack_17->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   phimuphileadj_stack_17->SetLineColor(ci);
   phimuphileadj_stack_17->GetXaxis()->SetTitle("phimuphileadj");
   phimuphileadj_stack_17->GetXaxis()->SetLabelFont(42);
   phimuphileadj_stack_17->GetXaxis()->SetLabelSize(0.035);
   phimuphileadj_stack_17->GetXaxis()->SetTitleSize(0.035);
   phimuphileadj_stack_17->GetXaxis()->SetTitleFont(42);
   phimuphileadj_stack_17->GetYaxis()->SetTitle("Events/pb");
   phimuphileadj_stack_17->GetYaxis()->SetLabelFont(42);
   phimuphileadj_stack_17->GetYaxis()->SetLabelSize(0.035);
   phimuphileadj_stack_17->GetYaxis()->SetTitleSize(0.035);
   phimuphileadj_stack_17->GetYaxis()->SetTitleFont(42);
   phimuphileadj_stack_17->GetZaxis()->SetLabelFont(42);
   phimuphileadj_stack_17->GetZaxis()->SetLabelSize(0.035);
   phimuphileadj_stack_17->GetZaxis()->SetTitleSize(0.035);
   phimuphileadj_stack_17->GetZaxis()->SetTitleFont(42);
   phimuphileadj->SetHistogram(phimuphileadj_stack_17);
   
   
   TH1D *phimuphileadj81 = new TH1D("phimuphileadj81"," #Delta_{#phi}[#mu,jet_{1}]",10,0,3.141593);
   phimuphileadj81->SetBinContent(1,164.3086);
   phimuphileadj81->SetBinContent(2,158.9707);
   phimuphileadj81->SetBinContent(3,152.6519);
   phimuphileadj81->SetBinContent(4,155.4826);
   phimuphileadj81->SetBinContent(5,174.6439);
   phimuphileadj81->SetBinContent(6,162.912);
   phimuphileadj81->SetBinContent(7,196.4007);
   phimuphileadj81->SetBinContent(8,233.483);
   phimuphileadj81->SetBinContent(9,252.2103);
   phimuphileadj81->SetBinContent(10,253.2217);
   phimuphileadj81->SetBinError(1,7.263807);
   phimuphileadj81->SetBinError(2,7.139482);
   phimuphileadj81->SetBinError(3,6.989024);
   phimuphileadj81->SetBinError(4,7.06061);
   phimuphileadj81->SetBinError(5,7.498774);
   phimuphileadj81->SetBinError(6,7.210214);
   phimuphileadj81->SetBinError(7,7.948456);
   phimuphileadj81->SetBinError(8,8.669647);
   phimuphileadj81->SetBinError(9,9.023818);
   phimuphileadj81->SetBinError(10,9.03635);
   phimuphileadj81->SetEntries(17572);

   ci = TColor::GetColor("#00cc00");
   phimuphileadj81->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   phimuphileadj81->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   phimuphileadj81->SetMarkerColor(ci);
   phimuphileadj81->SetMarkerStyle(22);
   phimuphileadj81->GetXaxis()->SetTitle("phimuphileadj");
   phimuphileadj81->GetXaxis()->SetLabelFont(42);
   phimuphileadj81->GetXaxis()->SetLabelSize(0.035);
   phimuphileadj81->GetXaxis()->SetTitleSize(0.035);
   phimuphileadj81->GetXaxis()->SetTitleFont(42);
   phimuphileadj81->GetYaxis()->SetTitle("Events/pb");
   phimuphileadj81->GetYaxis()->SetLabelFont(42);
   phimuphileadj81->GetYaxis()->SetLabelSize(0.035);
   phimuphileadj81->GetYaxis()->SetTitleSize(0.035);
   phimuphileadj81->GetYaxis()->SetTitleFont(42);
   phimuphileadj81->GetZaxis()->SetLabelFont(42);
   phimuphileadj81->GetZaxis()->SetLabelSize(0.035);
   phimuphileadj81->GetZaxis()->SetTitleSize(0.035);
   phimuphileadj81->GetZaxis()->SetTitleFont(42);
   phimuphileadj->Add(phimuphileadj,"");
   
   TH1D *phimuphileadj82 = new TH1D("phimuphileadj82"," #Delta_{#phi}[#mu,jet_{1}]",10,0,3.141593);
   phimuphileadj82->SetBinContent(1,5.319914);
   phimuphileadj82->SetBinContent(2,5.853705);
   phimuphileadj82->SetBinContent(3,6.019083);
   phimuphileadj82->SetBinContent(4,6.225302);
   phimuphileadj82->SetBinContent(5,6.19784);
   phimuphileadj82->SetBinContent(6,6.103911);
   phimuphileadj82->SetBinContent(7,6.165883);
   phimuphileadj82->SetBinContent(8,6.326974);
   phimuphileadj82->SetBinContent(9,6.405323);
   phimuphileadj82->SetBinContent(10,6.617285);
   phimuphileadj82->SetBinError(1,0.06468258);
   phimuphileadj82->SetBinError(2,0.06770466);
   phimuphileadj82->SetBinError(3,0.06834855);
   phimuphileadj82->SetBinError(4,0.06932268);
   phimuphileadj82->SetBinError(5,0.06866042);
   phimuphileadj82->SetBinError(6,0.06767851);
   phimuphileadj82->SetBinError(7,0.06827349);
   phimuphileadj82->SetBinError(8,0.06943524);
   phimuphileadj82->SetBinError(9,0.06968458);
   phimuphileadj82->SetBinError(10,0.0710816);
   phimuphileadj82->SetEntries(277262);

   ci = TColor::GetColor("#00ffff");
   phimuphileadj82->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   phimuphileadj82->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   phimuphileadj82->SetMarkerColor(ci);
   phimuphileadj82->SetMarkerStyle(20);
   phimuphileadj82->GetXaxis()->SetTitle("phimuphileadj");
   phimuphileadj82->GetXaxis()->SetLabelFont(42);
   phimuphileadj82->GetXaxis()->SetLabelSize(0.035);
   phimuphileadj82->GetXaxis()->SetTitleSize(0.035);
   phimuphileadj82->GetXaxis()->SetTitleFont(42);
   phimuphileadj82->GetYaxis()->SetTitle("Events/pb");
   phimuphileadj82->GetYaxis()->SetLabelFont(42);
   phimuphileadj82->GetYaxis()->SetLabelSize(0.035);
   phimuphileadj82->GetYaxis()->SetTitleSize(0.035);
   phimuphileadj82->GetYaxis()->SetTitleFont(42);
   phimuphileadj82->GetZaxis()->SetLabelFont(42);
   phimuphileadj82->GetZaxis()->SetLabelSize(0.035);
   phimuphileadj82->GetZaxis()->SetTitleSize(0.035);
   phimuphileadj82->GetZaxis()->SetTitleFont(42);
   phimuphileadj->Add(phimuphileadj,"");
   
   TH1D *phimuphileadj83 = new TH1D("phimuphileadj83"," #Delta_{#phi}[#mu,jet_{1}]",10,0,3.141593);
   phimuphileadj83->SetBinContent(1,0.1541125);
   phimuphileadj83->SetBinContent(2,0.1331917);
   phimuphileadj83->SetBinContent(3,0.1352328);
   phimuphileadj83->SetBinContent(4,0.1304887);
   phimuphileadj83->SetBinContent(5,0.1343696);
   phimuphileadj83->SetBinContent(6,0.1394865);
   phimuphileadj83->SetBinContent(7,0.1477775);
   phimuphileadj83->SetBinContent(8,0.1587236);
   phimuphileadj83->SetBinContent(9,0.1622725);
   phimuphileadj83->SetBinContent(10,0.1719804);
   phimuphileadj83->SetBinError(1,0.003480518);
   phimuphileadj83->SetBinError(2,0.003167268);
   phimuphileadj83->SetBinError(3,0.003207302);
   phimuphileadj83->SetBinError(4,0.003155552);
   phimuphileadj83->SetBinError(5,0.003214368);
   phimuphileadj83->SetBinError(6,0.003264449);
   phimuphileadj83->SetBinError(7,0.003381659);
   phimuphileadj83->SetBinError(8,0.003482947);
   phimuphileadj83->SetBinError(9,0.003492376);
   phimuphileadj83->SetBinError(10,0.00362831);
   phimuphileadj83->SetEntries(46443);

   ci = TColor::GetColor("#ffcc00");
   phimuphileadj83->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   phimuphileadj83->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   phimuphileadj83->SetMarkerColor(ci);
   phimuphileadj83->SetMarkerStyle(21);
   phimuphileadj83->GetXaxis()->SetTitle("phimuphileadj");
   phimuphileadj83->GetXaxis()->SetLabelFont(42);
   phimuphileadj83->GetXaxis()->SetLabelSize(0.035);
   phimuphileadj83->GetXaxis()->SetTitleSize(0.035);
   phimuphileadj83->GetXaxis()->SetTitleFont(42);
   phimuphileadj83->GetYaxis()->SetTitle("Events/pb");
   phimuphileadj83->GetYaxis()->SetLabelFont(42);
   phimuphileadj83->GetYaxis()->SetLabelSize(0.035);
   phimuphileadj83->GetYaxis()->SetTitleSize(0.035);
   phimuphileadj83->GetYaxis()->SetTitleFont(42);
   phimuphileadj83->GetZaxis()->SetLabelFont(42);
   phimuphileadj83->GetZaxis()->SetLabelSize(0.035);
   phimuphileadj83->GetZaxis()->SetTitleSize(0.035);
   phimuphileadj83->GetZaxis()->SetTitleFont(42);
   phimuphileadj->Add(phimuphileadj,"");
   
   TH1D *phimuphileadj84 = new TH1D("phimuphileadj84"," #Delta_{#phi}[#mu,jet_{1}]",10,0,3.141593);
   phimuphileadj84->SetBinContent(1,0.009594086);
   phimuphileadj84->SetBinContent(2,0.01139876);
   phimuphileadj84->SetBinContent(3,0.01298749);
   phimuphileadj84->SetBinContent(4,0.01272528);
   phimuphileadj84->SetBinContent(5,0.0146842);
   phimuphileadj84->SetBinContent(6,0.01607241);
   phimuphileadj84->SetBinContent(7,0.01844779);
   phimuphileadj84->SetBinContent(8,0.02017535);
   phimuphileadj84->SetBinContent(9,0.02227309);
   phimuphileadj84->SetBinContent(10,0.02423201);
   phimuphileadj84->SetBinError(1,0.0003846878);
   phimuphileadj84->SetBinError(2,0.0004193102);
   phimuphileadj84->SetBinError(3,0.0004475786);
   phimuphileadj84->SetBinError(4,0.0004430372);
   phimuphileadj84->SetBinError(5,0.0004759175);
   phimuphileadj84->SetBinError(6,0.0004979057);
   phimuphileadj84->SetBinError(7,0.0005334317);
   phimuphileadj84->SetBinError(8,0.0005578496);
   phimuphileadj84->SetBinError(9,0.0005861339);
   phimuphileadj84->SetBinError(10,0.0006113661);
   phimuphileadj84->SetEntries(10541);

   ci = TColor::GetColor("#ff0000");
   phimuphileadj84->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   phimuphileadj84->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   phimuphileadj84->SetMarkerColor(ci);
   phimuphileadj84->SetMarkerStyle(20);
   phimuphileadj84->GetXaxis()->SetTitle("phimuphileadj");
   phimuphileadj84->GetXaxis()->SetLabelFont(42);
   phimuphileadj84->GetXaxis()->SetLabelSize(0.035);
   phimuphileadj84->GetXaxis()->SetTitleSize(0.035);
   phimuphileadj84->GetXaxis()->SetTitleFont(42);
   phimuphileadj84->GetYaxis()->SetTitle("Events/pb");
   phimuphileadj84->GetYaxis()->SetLabelFont(42);
   phimuphileadj84->GetYaxis()->SetLabelSize(0.035);
   phimuphileadj84->GetYaxis()->SetTitleSize(0.035);
   phimuphileadj84->GetYaxis()->SetTitleFont(42);
   phimuphileadj84->GetZaxis()->SetLabelFont(42);
   phimuphileadj84->GetZaxis()->SetLabelSize(0.035);
   phimuphileadj84->GetZaxis()->SetTitleSize(0.035);
   phimuphileadj84->GetZaxis()->SetTitleFont(42);
   phimuphileadj->Add(phimuphileadj,"");
   
   TH1D *phimuphileadj85 = new TH1D("phimuphileadj85"," #Delta_{#phi}[#mu,jet_{1}]",10,0,3.141593);
   phimuphileadj85->SetBinContent(1,0.003320786);
   phimuphileadj85->SetBinContent(2,0.003907794);
   phimuphileadj85->SetBinContent(3,0.003790392);
   phimuphileadj85->SetBinContent(4,0.004058739);
   phimuphileadj85->SetBinContent(5,0.004612203);
   phimuphileadj85->SetBinContent(6,0.005031494);
   phimuphileadj85->SetBinContent(7,0.00457866);
   phimuphileadj85->SetBinContent(8,0.004863778);
   phimuphileadj85->SetBinContent(9,0.004461258);
   phimuphileadj85->SetBinContent(10,0.004159369);
   phimuphileadj85->SetBinError(1,0.000235998);
   phimuphileadj85->SetBinError(2,0.0002560081);
   phimuphileadj85->SetBinError(3,0.0002521331);
   phimuphileadj85->SetBinError(4,0.0002609056);
   phimuphileadj85->SetBinError(5,0.0002781263);
   phimuphileadj85->SetBinError(6,0.0002904935);
   phimuphileadj85->SetBinError(7,0.0002771131);
   phimuphileadj85->SetBinError(8,0.0002856109);
   phimuphileadj85->SetBinError(9,0.0002735373);
   phimuphileadj85->SetBinError(10,0.0002641202);
   phimuphileadj85->SetEntries(2551);

   ci = TColor::GetColor("#0000ff");
   phimuphileadj85->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   phimuphileadj85->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   phimuphileadj85->SetMarkerColor(ci);
   phimuphileadj85->SetMarkerStyle(21);
   phimuphileadj85->GetXaxis()->SetTitle("phimuphileadj");
   phimuphileadj85->GetXaxis()->SetLabelFont(42);
   phimuphileadj85->GetXaxis()->SetLabelSize(0.035);
   phimuphileadj85->GetXaxis()->SetTitleSize(0.035);
   phimuphileadj85->GetXaxis()->SetTitleFont(42);
   phimuphileadj85->GetYaxis()->SetTitle("Events/pb");
   phimuphileadj85->GetYaxis()->SetLabelFont(42);
   phimuphileadj85->GetYaxis()->SetLabelSize(0.035);
   phimuphileadj85->GetYaxis()->SetTitleSize(0.035);
   phimuphileadj85->GetYaxis()->SetTitleFont(42);
   phimuphileadj85->GetZaxis()->SetLabelFont(42);
   phimuphileadj85->GetZaxis()->SetLabelSize(0.035);
   phimuphileadj85->GetZaxis()->SetTitleSize(0.035);
   phimuphileadj85->GetZaxis()->SetTitleFont(42);
   phimuphileadj->Add(phimuphileadj,"");
   phimuphileadj->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3211782,0.9342857,0.6788218,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("phimuphileadj");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("phimuphileadj","phimuphileadj_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phimuphileadj","phimuphileadj_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phimuphileadj","phimuphileadj_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phimuphileadj","phimuphileadj_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("phimuphileadj","phimuphileadj_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   phimuphileadj->Modified();
   phimuphileadj->cd();
   phimuphileadj->SetSelected(phimuphileadj);
}
void METJets()
{
//=========Macro generated from canvas: METJets/METJets
//=========  (Mon Nov 23 12:44:57 2015) by ROOT version6.02/05
   TCanvas *METJets = new TCanvas("METJets", "METJets",100,122,700,700);
   METJets->Range(-1.875,-6.017385,16.875,0.5057179);
   METJets->SetFillColor(0);
   METJets->SetBorderMode(0);
   METJets->SetBorderSize(2);
   METJets->SetLogy();
   METJets->SetFrameBorderMode(0);
   METJets->SetFrameBorderMode(0);
   
   THStack *METJets = new THStack();
   METJets->SetName("METJets");
   METJets->SetTitle("METJets");
   
   TH1F *METJets_stack_6 = new TH1F("METJets_stack_6","METJets",15,0,15);
   METJets_stack_6->SetMinimum(4.314451e-06);
   METJets_stack_6->SetMaximum(0.7135223);
   METJets_stack_6->SetDirectory(0);
   METJets_stack_6->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   METJets_stack_6->SetLineColor(ci);
   METJets_stack_6->GetXaxis()->SetTitle("METJets");
   METJets_stack_6->GetXaxis()->SetLabelFont(42);
   METJets_stack_6->GetXaxis()->SetLabelSize(0.035);
   METJets_stack_6->GetXaxis()->SetTitleSize(0.035);
   METJets_stack_6->GetXaxis()->SetTitleFont(42);
   METJets_stack_6->GetYaxis()->SetTitle("Events/pb");
   METJets_stack_6->GetYaxis()->SetLabelFont(42);
   METJets_stack_6->GetYaxis()->SetLabelSize(0.035);
   METJets_stack_6->GetYaxis()->SetTitleSize(0.035);
   METJets_stack_6->GetYaxis()->SetTitleFont(42);
   METJets_stack_6->GetZaxis()->SetLabelFont(42);
   METJets_stack_6->GetZaxis()->SetLabelSize(0.035);
   METJets_stack_6->GetZaxis()->SetTitleSize(0.035);
   METJets_stack_6->GetZaxis()->SetTitleFont(42);
   METJets->SetHistogram(METJets_stack_6);
   
   
   TH1D *METJets26 = new TH1D("METJets26"," Number of jets in MET hemisphere",15,0,15);
   METJets26->SetBinContent(2,0.04212405);
   METJets26->SetBinContent(3,0.07948327);
   METJets26->SetBinContent(4,0.01036084);
   METJets26->SetBinError(2,0.01681759);
   METJets26->SetBinError(3,0.02371537);
   METJets26->SetBinError(4,0.008401902);
   METJets26->SetEntries(48);

   ci = TColor::GetColor("#00cc00");
   METJets26->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   METJets26->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   METJets26->SetMarkerColor(ci);
   METJets26->SetMarkerStyle(22);
   METJets26->GetXaxis()->SetTitle("METJets");
   METJets26->GetXaxis()->SetLabelFont(42);
   METJets26->GetXaxis()->SetLabelSize(0.035);
   METJets26->GetXaxis()->SetTitleSize(0.035);
   METJets26->GetXaxis()->SetTitleFont(42);
   METJets26->GetYaxis()->SetTitle("Events/pb");
   METJets26->GetYaxis()->SetLabelFont(42);
   METJets26->GetYaxis()->SetLabelSize(0.035);
   METJets26->GetYaxis()->SetTitleSize(0.035);
   METJets26->GetYaxis()->SetTitleFont(42);
   METJets26->GetZaxis()->SetLabelFont(42);
   METJets26->GetZaxis()->SetLabelSize(0.035);
   METJets26->GetZaxis()->SetTitleSize(0.035);
   METJets26->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets27 = new TH1D("METJets27"," Number of jets in MET hemisphere",15,0,15);
   METJets27->SetBinContent(1,0.03065968);
   METJets27->SetBinContent(2,0.3781184);
   METJets27->SetBinContent(3,0.170029);
   METJets27->SetBinContent(4,0.01983644);
   METJets27->SetBinContent(5,0.001731819);
   METJets27->SetBinContent(6,8.600525e-05);
   METJets27->SetBinError(1,0.00294369);
   METJets27->SetBinError(2,0.007985565);
   METJets27->SetBinError(3,0.00484409);
   METJets27->SetBinError(4,0.001537283);
   METJets27->SetBinError(5,0.00033659);
   METJets27->SetBinError(6,3.512553e-05);
   METJets27->SetEntries(12325);

   ci = TColor::GetColor("#00ffff");
   METJets27->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   METJets27->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   METJets27->SetMarkerColor(ci);
   METJets27->SetMarkerStyle(20);
   METJets27->GetXaxis()->SetTitle("METJets");
   METJets27->GetXaxis()->SetLabelFont(42);
   METJets27->GetXaxis()->SetLabelSize(0.035);
   METJets27->GetXaxis()->SetTitleSize(0.035);
   METJets27->GetXaxis()->SetTitleFont(42);
   METJets27->GetYaxis()->SetTitle("Events/pb");
   METJets27->GetYaxis()->SetLabelFont(42);
   METJets27->GetYaxis()->SetLabelSize(0.035);
   METJets27->GetYaxis()->SetTitleSize(0.035);
   METJets27->GetYaxis()->SetTitleFont(42);
   METJets27->GetZaxis()->SetLabelFont(42);
   METJets27->GetZaxis()->SetLabelSize(0.035);
   METJets27->GetZaxis()->SetTitleSize(0.035);
   METJets27->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets28 = new TH1D("METJets28"," Number of jets in MET hemisphere",15,0,15);
   METJets28->SetBinContent(1,0.006934464);
   METJets28->SetBinContent(2,0.09758253);
   METJets28->SetBinContent(3,0.03751483);
   METJets28->SetBinContent(4,0.004169631);
   METJets28->SetBinContent(5,0.0002374636);
   METJets28->SetBinContent(6,3.744021e-05);
   METJets28->SetBinError(1,0.0004695246);
   METJets28->SetBinError(2,0.001593906);
   METJets28->SetBinError(3,0.000898225);
   METJets28->SetBinError(4,0.0002412372);
   METJets28->SetBinError(5,4.540663e-05);
   METJets28->SetBinError(6,2.848295e-05);
   METJets28->SetEntries(19290);

   ci = TColor::GetColor("#ffcc00");
   METJets28->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   METJets28->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   METJets28->SetMarkerColor(ci);
   METJets28->SetMarkerStyle(21);
   METJets28->GetXaxis()->SetTitle("METJets");
   METJets28->GetXaxis()->SetLabelFont(42);
   METJets28->GetXaxis()->SetLabelSize(0.035);
   METJets28->GetXaxis()->SetTitleSize(0.035);
   METJets28->GetXaxis()->SetTitleFont(42);
   METJets28->GetYaxis()->SetTitle("Events/pb");
   METJets28->GetYaxis()->SetLabelFont(42);
   METJets28->GetYaxis()->SetLabelSize(0.035);
   METJets28->GetYaxis()->SetTitleSize(0.035);
   METJets28->GetYaxis()->SetTitleFont(42);
   METJets28->GetZaxis()->SetLabelFont(42);
   METJets28->GetZaxis()->SetLabelSize(0.035);
   METJets28->GetZaxis()->SetTitleSize(0.035);
   METJets28->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets29 = new TH1D("METJets29"," Number of jets in MET hemisphere",15,0,15);
   METJets29->SetBinContent(1,0.0008483517);
   METJets29->SetBinContent(2,0.008946254);
   METJets29->SetBinContent(3,0.00525978);
   METJets29->SetBinContent(4,0.0007866534);
   METJets29->SetBinContent(5,7.712288e-05);
   METJets29->SetBinContent(6,1.542458e-05);
   METJets29->SetBinError(1,0.0001143917);
   METJets29->SetBinError(2,0.000371473);
   METJets29->SetBinError(3,0.0002848331);
   METJets29->SetBinError(4,0.0001101535);
   METJets29->SetBinError(5,3.44904e-05);
   METJets29->SetBinError(6,1.542458e-05);
   METJets29->SetEntries(1033);

   ci = TColor::GetColor("#ff0000");
   METJets29->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   METJets29->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   METJets29->SetMarkerColor(ci);
   METJets29->SetMarkerStyle(20);
   METJets29->GetXaxis()->SetTitle("METJets");
   METJets29->GetXaxis()->SetLabelFont(42);
   METJets29->GetXaxis()->SetLabelSize(0.035);
   METJets29->GetXaxis()->SetTitleSize(0.035);
   METJets29->GetXaxis()->SetTitleFont(42);
   METJets29->GetYaxis()->SetTitle("Events/pb");
   METJets29->GetYaxis()->SetLabelFont(42);
   METJets29->GetYaxis()->SetLabelSize(0.035);
   METJets29->GetYaxis()->SetTitleSize(0.035);
   METJets29->GetYaxis()->SetTitleFont(42);
   METJets29->GetZaxis()->SetLabelFont(42);
   METJets29->GetZaxis()->SetLabelSize(0.035);
   METJets29->GetZaxis()->SetTitleSize(0.035);
   METJets29->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets30 = new TH1D("METJets30"," Number of jets in MET hemisphere",15,0,15);
   METJets30->SetBinContent(3,1.677165e-05);
   METJets30->SetBinError(3,1.677165e-05);
   METJets30->SetEntries(1);

   ci = TColor::GetColor("#0000ff");
   METJets30->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   METJets30->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   METJets30->SetMarkerColor(ci);
   METJets30->SetMarkerStyle(21);
   METJets30->GetXaxis()->SetTitle("METJets");
   METJets30->GetXaxis()->SetLabelFont(42);
   METJets30->GetXaxis()->SetLabelSize(0.035);
   METJets30->GetXaxis()->SetTitleSize(0.035);
   METJets30->GetXaxis()->SetTitleFont(42);
   METJets30->GetYaxis()->SetTitle("Events/pb");
   METJets30->GetYaxis()->SetLabelFont(42);
   METJets30->GetYaxis()->SetLabelSize(0.035);
   METJets30->GetYaxis()->SetTitleSize(0.035);
   METJets30->GetYaxis()->SetTitleFont(42);
   METJets30->GetZaxis()->SetLabelFont(42);
   METJets30->GetZaxis()->SetLabelSize(0.035);
   METJets30->GetZaxis()->SetTitleSize(0.035);
   METJets30->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   METJets->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3872701,0.94,0.6127299,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("METJets");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("METJets","METJets_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("METJets","METJets_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   METJets->Modified();
   METJets->cd();
   METJets->SetSelected(METJets);
}
void METopt()
{
//=========Macro generated from canvas: METopt/METopt
//=========  (Mon Nov 23 12:45:00 2015) by ROOT version6.02/05
   TCanvas *METopt = new TCanvas("METopt", "METopt",140,162,700,700);
   METopt->Range(-0.375,-6.432596,3.375,0.05191559);
   METopt->SetFillColor(0);
   METopt->SetBorderMode(0);
   METopt->SetBorderSize(2);
   METopt->SetLogy();
   METopt->SetFrameBorderMode(0);
   METopt->SetFrameBorderMode(0);
   
   THStack *METopt = new THStack();
   METopt->SetName("METopt");
   METopt->SetTitle("METopt");
   
   TH1F *METopt_stack_8 = new TH1F("METopt_stack_8","METopt",15,0,3);
   METopt_stack_8->SetMinimum(1.643823e-06);
   METopt_stack_8->SetMaximum(0.2532004);
   METopt_stack_8->SetDirectory(0);
   METopt_stack_8->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   METopt_stack_8->SetLineColor(ci);
   METopt_stack_8->GetXaxis()->SetTitle("METopt");
   METopt_stack_8->GetXaxis()->SetLabelFont(42);
   METopt_stack_8->GetXaxis()->SetLabelSize(0.035);
   METopt_stack_8->GetXaxis()->SetTitleSize(0.035);
   METopt_stack_8->GetXaxis()->SetTitleFont(42);
   METopt_stack_8->GetYaxis()->SetTitle("Events/pb");
   METopt_stack_8->GetYaxis()->SetLabelFont(42);
   METopt_stack_8->GetYaxis()->SetLabelSize(0.035);
   METopt_stack_8->GetYaxis()->SetTitleSize(0.035);
   METopt_stack_8->GetYaxis()->SetTitleFont(42);
   METopt_stack_8->GetZaxis()->SetLabelFont(42);
   METopt_stack_8->GetZaxis()->SetLabelSize(0.035);
   METopt_stack_8->GetZaxis()->SetTitleSize(0.035);
   METopt_stack_8->GetZaxis()->SetTitleFont(42);
   METopt->SetHistogram(METopt_stack_8);
   
   
   TH1D *METopt36 = new TH1D("METopt36","MET/p_{T}^{lead jet}",15,0,3);
   METopt36->SetBinContent(1,0.00068069);
   METopt36->SetBinContent(2,0.00952966);
   METopt36->SetBinContent(3,0.06912243);
   METopt36->SetBinContent(4,0.01104153);
   METopt36->SetBinContent(5,0.01663754);
   METopt36->SetBinContent(6,0.02495631);
   METopt36->SetBinError(1,0.00068069);
   METopt36->SetBinError(2,0.002546909);
   METopt36->SetBinError(3,0.02217717);
   METopt36->SetBinError(4,0.00842943);
   METopt36->SetBinError(5,0.01176452);
   METopt36->SetBinError(6,0.01440853);
   METopt36->SetEntries(48);

   ci = TColor::GetColor("#00cc00");
   METopt36->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   METopt36->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   METopt36->SetMarkerColor(ci);
   METopt36->SetMarkerStyle(22);
   METopt36->GetXaxis()->SetTitle("METopt");
   METopt36->GetXaxis()->SetLabelFont(42);
   METopt36->GetXaxis()->SetLabelSize(0.035);
   METopt36->GetXaxis()->SetTitleSize(0.035);
   METopt36->GetXaxis()->SetTitleFont(42);
   METopt36->GetYaxis()->SetTitle("Events/pb");
   METopt36->GetYaxis()->SetLabelFont(42);
   METopt36->GetYaxis()->SetLabelSize(0.035);
   METopt36->GetYaxis()->SetTitleSize(0.035);
   METopt36->GetYaxis()->SetTitleFont(42);
   METopt36->GetZaxis()->SetLabelFont(42);
   METopt36->GetZaxis()->SetLabelSize(0.035);
   METopt36->GetZaxis()->SetTitleSize(0.035);
   METopt36->GetZaxis()->SetTitleFont(42);
   METopt->Add(METopt,"");
   
   TH1D *METopt37 = new TH1D("METopt37","MET/p_{T}^{lead jet}",15,0,3);
   METopt37->SetBinContent(1,1.392893e-05);
   METopt37->SetBinContent(2,0.001351916);
   METopt37->SetBinContent(3,0.009267276);
   METopt37->SetBinContent(4,0.04333138);
   METopt37->SetBinContent(5,0.1226104);
   METopt37->SetBinContent(6,0.1345744);
   METopt37->SetBinContent(7,0.1072757);
   METopt37->SetBinContent(8,0.0786938);
   METopt37->SetBinContent(9,0.04683283);
   METopt37->SetBinContent(10,0.0271465);
   METopt37->SetBinContent(11,0.0117321);
   METopt37->SetBinContent(12,0.007680578);
   METopt37->SetBinContent(13,0.003504385);
   METopt37->SetBinContent(14,0.002544782);
   METopt37->SetBinContent(15,0.001871985);
   METopt37->SetBinContent(16,0.002029317);
   METopt37->SetBinError(1,1.392893e-05);
   METopt37->SetBinError(2,0.0001372687);
   METopt37->SetBinError(3,0.0003814526);
   METopt37->SetBinError(4,0.001364947);
   METopt37->SetBinError(5,0.003448717);
   METopt37->SetBinError(6,0.004099139);
   METopt37->SetBinError(7,0.004180275);
   METopt37->SetBinError(8,0.004584045);
   METopt37->SetBinError(9,0.003621192);
   METopt37->SetBinError(10,0.002726748);
   METopt37->SetBinError(11,0.001513075);
   METopt37->SetBinError(12,0.001337888);
   METopt37->SetBinError(13,0.001122201);
   METopt37->SetBinError(14,0.001068918);
   METopt37->SetBinError(15,0.001029262);
   METopt37->SetBinError(16,0.001037471);
   METopt37->SetEntries(12325);

   ci = TColor::GetColor("#00ffff");
   METopt37->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   METopt37->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   METopt37->SetMarkerColor(ci);
   METopt37->SetMarkerStyle(20);
   METopt37->GetXaxis()->SetTitle("METopt");
   METopt37->GetXaxis()->SetLabelFont(42);
   METopt37->GetXaxis()->SetLabelSize(0.035);
   METopt37->GetXaxis()->SetTitleSize(0.035);
   METopt37->GetXaxis()->SetTitleFont(42);
   METopt37->GetYaxis()->SetTitle("Events/pb");
   METopt37->GetYaxis()->SetLabelFont(42);
   METopt37->GetYaxis()->SetLabelSize(0.035);
   METopt37->GetYaxis()->SetTitleSize(0.035);
   METopt37->GetYaxis()->SetTitleFont(42);
   METopt37->GetZaxis()->SetLabelFont(42);
   METopt37->GetZaxis()->SetLabelSize(0.035);
   METopt37->GetZaxis()->SetTitleSize(0.035);
   METopt37->GetZaxis()->SetTitleFont(42);
   METopt->Add(METopt,"");
   
   TH1D *METopt38 = new TH1D("METopt38","MET/p_{T}^{lead jet}",15,0,3);
   METopt38->SetBinContent(1,5.851509e-06);
   METopt38->SetBinContent(2,0.0002960863);
   METopt38->SetBinContent(3,0.002055587);
   METopt38->SetBinContent(4,0.009485694);
   METopt38->SetBinContent(5,0.02637833);
   METopt38->SetBinContent(6,0.03542185);
   METopt38->SetBinContent(7,0.02902985);
   METopt38->SetBinContent(8,0.01931192);
   METopt38->SetBinContent(9,0.01045294);
   METopt38->SetBinContent(10,0.006260894);
   METopt38->SetBinContent(11,0.004006631);
   METopt38->SetBinContent(12,0.001811275);
   METopt38->SetBinContent(13,0.001055017);
   METopt38->SetBinContent(14,0.0003970447);
   METopt38->SetBinContent(15,0.0002648587);
   METopt38->SetBinContent(16,0.0002425362);
   METopt38->SetBinError(1,2.616874e-06);
   METopt38->SetBinError(2,1.861479e-05);
   METopt38->SetBinError(3,5.431574e-05);
   METopt38->SetBinError(4,0.0002770452);
   METopt38->SetBinError(5,0.000680549);
   METopt38->SetBinError(6,0.0009013724);
   METopt38->SetBinError(7,0.0009115706);
   METopt38->SetBinError(8,0.0007784417);
   METopt38->SetBinError(9,0.0005631055);
   METopt38->SetBinError(10,0.000447395);
   METopt38->SetBinError(11,0.0003988073);
   METopt38->SetBinError(12,0.0002844883);
   METopt38->SetBinError(13,0.0002045993);
   METopt38->SetBinError(14,0.0001303943);
   METopt38->SetBinError(15,8.467851e-05);
   METopt38->SetBinError(16,0.0001139839);
   METopt38->SetEntries(19290);

   ci = TColor::GetColor("#ffcc00");
   METopt38->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   METopt38->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   METopt38->SetMarkerColor(ci);
   METopt38->SetMarkerStyle(21);
   METopt38->GetXaxis()->SetTitle("METopt");
   METopt38->GetXaxis()->SetLabelFont(42);
   METopt38->GetXaxis()->SetLabelSize(0.035);
   METopt38->GetXaxis()->SetTitleSize(0.035);
   METopt38->GetXaxis()->SetTitleFont(42);
   METopt38->GetYaxis()->SetTitle("Events/pb");
   METopt38->GetYaxis()->SetLabelFont(42);
   METopt38->GetYaxis()->SetLabelSize(0.035);
   METopt38->GetYaxis()->SetTitleSize(0.035);
   METopt38->GetYaxis()->SetTitleFont(42);
   METopt38->GetZaxis()->SetLabelFont(42);
   METopt38->GetZaxis()->SetLabelSize(0.035);
   METopt38->GetZaxis()->SetTitleSize(0.035);
   METopt38->GetZaxis()->SetTitleFont(42);
   METopt->Add(METopt,"");
   
   TH1D *METopt39 = new TH1D("METopt39","MET/p_{T}^{lead jet}",15,0,3);
   METopt39->SetBinContent(2,1.542458e-05);
   METopt39->SetBinContent(3,9.254746e-05);
   METopt39->SetBinContent(4,0.0009717483);
   METopt39->SetBinContent(5,0.003146613);
   METopt39->SetBinContent(6,0.003840719);
   METopt39->SetBinContent(7,0.002637602);
   METopt39->SetBinContent(8,0.001758402);
   METopt39->SetBinContent(9,0.001326514);
   METopt39->SetBinContent(10,0.0007866534);
   METopt39->SetBinContent(11,0.0004781619);
   METopt39->SetBinContent(12,0.0003084915);
   METopt39->SetBinContent(13,0.0002159441);
   METopt39->SetBinContent(14,0.0001233966);
   METopt39->SetBinContent(15,0.0001233966);
   METopt39->SetBinContent(16,0.000107972);
   METopt39->SetBinError(2,1.542458e-05);
   METopt39->SetBinError(3,3.778234e-05);
   METopt39->SetBinError(4,0.0001224288);
   METopt39->SetBinError(5,0.000220307);
   METopt39->SetBinError(6,0.0002433957);
   METopt39->SetBinError(7,0.0002017025);
   METopt39->SetBinError(8,0.0001646894);
   METopt39->SetBinError(9,0.0001430416);
   METopt39->SetBinError(10,0.0001101535);
   METopt39->SetBinError(11,8.58804e-05);
   METopt39->SetBinError(12,6.89808e-05);
   METopt39->SetBinError(13,5.771348e-05);
   METopt39->SetBinError(14,4.362729e-05);
   METopt39->SetBinError(15,4.362729e-05);
   METopt39->SetBinError(16,4.080959e-05);
   METopt39->SetEntries(1033);

   ci = TColor::GetColor("#ff0000");
   METopt39->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   METopt39->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   METopt39->SetMarkerColor(ci);
   METopt39->SetMarkerStyle(20);
   METopt39->GetXaxis()->SetTitle("METopt");
   METopt39->GetXaxis()->SetLabelFont(42);
   METopt39->GetXaxis()->SetLabelSize(0.035);
   METopt39->GetXaxis()->SetTitleSize(0.035);
   METopt39->GetXaxis()->SetTitleFont(42);
   METopt39->GetYaxis()->SetTitle("Events/pb");
   METopt39->GetYaxis()->SetLabelFont(42);
   METopt39->GetYaxis()->SetLabelSize(0.035);
   METopt39->GetYaxis()->SetTitleSize(0.035);
   METopt39->GetYaxis()->SetTitleFont(42);
   METopt39->GetZaxis()->SetLabelFont(42);
   METopt39->GetZaxis()->SetLabelSize(0.035);
   METopt39->GetZaxis()->SetTitleSize(0.035);
   METopt39->GetZaxis()->SetTitleFont(42);
   METopt->Add(METopt,"");
   
   TH1D *METopt40 = new TH1D("METopt40","MET/p_{T}^{lead jet}",15,0,3);
   METopt40->SetBinContent(4,1.677165e-05);
   METopt40->SetBinError(4,1.677165e-05);
   METopt40->SetEntries(1);

   ci = TColor::GetColor("#0000ff");
   METopt40->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   METopt40->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   METopt40->SetMarkerColor(ci);
   METopt40->SetMarkerStyle(21);
   METopt40->GetXaxis()->SetTitle("METopt");
   METopt40->GetXaxis()->SetLabelFont(42);
   METopt40->GetXaxis()->SetLabelSize(0.035);
   METopt40->GetXaxis()->SetTitleSize(0.035);
   METopt40->GetXaxis()->SetTitleFont(42);
   METopt40->GetYaxis()->SetTitle("Events/pb");
   METopt40->GetYaxis()->SetLabelFont(42);
   METopt40->GetYaxis()->SetLabelSize(0.035);
   METopt40->GetYaxis()->SetTitleSize(0.035);
   METopt40->GetYaxis()->SetTitleFont(42);
   METopt40->GetZaxis()->SetLabelFont(42);
   METopt40->GetZaxis()->SetLabelSize(0.035);
   METopt40->GetZaxis()->SetTitleSize(0.035);
   METopt40->GetZaxis()->SetTitleFont(42);
   METopt->Add(METopt,"");
   METopt->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.398046,0.9342857,0.601954,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("METopt");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("METopt","METopt_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METopt","METopt_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METopt","METopt_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METopt","METopt_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("METopt","METopt_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   METopt->Modified();
   METopt->cd();
   METopt->SetSelected(METopt);
}
void METJets()
{
//=========Macro generated from canvas: METJets/METJets
//=========  (Mon Nov 23 11:05:00 2015) by ROOT version6.02/05
   TCanvas *METJets = new TCanvas("METJets", "METJets",100,122,700,700);
   METJets->Range(-1.875,-6.772831,16.875,5.054722);
   METJets->SetFillColor(0);
   METJets->SetBorderMode(0);
   METJets->SetBorderSize(2);
   METJets->SetLogy();
   METJets->SetFrameBorderMode(0);
   METJets->SetFrameBorderMode(0);
   
   THStack *METJets = new THStack();
   METJets->SetName("METJets");
   METJets->SetTitle("METJets");
   
   TH1F *METJets_stack_6 = new TH1F("METJets_stack_6","METJets",15,0,15);
   METJets_stack_6->SetMinimum(2.569948e-06);
   METJets_stack_6->SetMaximum(7446.75);
   METJets_stack_6->SetDirectory(0);
   METJets_stack_6->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   METJets_stack_6->SetLineColor(ci);
   METJets_stack_6->GetXaxis()->SetTitle("METJets");
   METJets_stack_6->GetXaxis()->SetLabelFont(42);
   METJets_stack_6->GetXaxis()->SetLabelSize(0.035);
   METJets_stack_6->GetXaxis()->SetTitleSize(0.035);
   METJets_stack_6->GetXaxis()->SetTitleFont(42);
   METJets_stack_6->GetYaxis()->SetTitle("Events/pb");
   METJets_stack_6->GetYaxis()->SetLabelFont(42);
   METJets_stack_6->GetYaxis()->SetLabelSize(0.035);
   METJets_stack_6->GetYaxis()->SetTitleSize(0.035);
   METJets_stack_6->GetYaxis()->SetTitleFont(42);
   METJets_stack_6->GetZaxis()->SetLabelFont(42);
   METJets_stack_6->GetZaxis()->SetLabelSize(0.035);
   METJets_stack_6->GetZaxis()->SetTitleSize(0.035);
   METJets_stack_6->GetZaxis()->SetTitleFont(42);
   METJets->SetHistogram(METJets_stack_6);
   
   
   TH1D *METJets26 = new TH1D("METJets26"," Number of jets in MET hemisphere",15,0,15);
   METJets26->SetBinContent(1,2.358311);
   METJets26->SetBinContent(2,1799.25);
   METJets26->SetBinContent(3,2794.573);
   METJets26->SetBinContent(4,982.1805);
   METJets26->SetBinContent(5,126.0732);
   METJets26->SetBinContent(6,6.831502);
   METJets26->SetBinContent(7,0.05059331);
   METJets26->SetBinError(1,0.8851475);
   METJets26->SetBinError(2,24.25261);
   METJets26->SetBinError(3,30.24717);
   METJets26->SetBinError(4,17.9355);
   METJets26->SetBinError(5,6.393654);
   METJets26->SetBinError(6,1.459512);
   METJets26->SetBinError(7,0.02038811);
   METJets26->SetEntries(35032);

   ci = TColor::GetColor("#00cc00");
   METJets26->SetFillColor(ci);

   ci = TColor::GetColor("#00cc00");
   METJets26->SetLineColor(ci);

   ci = TColor::GetColor("#00cc00");
   METJets26->SetMarkerColor(ci);
   METJets26->SetMarkerStyle(22);
   METJets26->GetXaxis()->SetTitle("METJets");
   METJets26->GetXaxis()->SetLabelFont(42);
   METJets26->GetXaxis()->SetLabelSize(0.035);
   METJets26->GetXaxis()->SetTitleSize(0.035);
   METJets26->GetXaxis()->SetTitleFont(42);
   METJets26->GetYaxis()->SetTitle("Events/pb");
   METJets26->GetYaxis()->SetLabelFont(42);
   METJets26->GetYaxis()->SetLabelSize(0.035);
   METJets26->GetYaxis()->SetTitleSize(0.035);
   METJets26->GetYaxis()->SetTitleFont(42);
   METJets26->GetZaxis()->SetLabelFont(42);
   METJets26->GetZaxis()->SetLabelSize(0.035);
   METJets26->GetZaxis()->SetTitleSize(0.035);
   METJets26->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets27 = new TH1D("METJets27"," Number of jets in MET hemisphere",15,0,15);
   METJets27->SetBinContent(1,0.8785647);
   METJets27->SetBinContent(2,19.65506);
   METJets27->SetBinContent(3,13.48662);
   METJets27->SetBinContent(4,1.798839);
   METJets27->SetBinContent(5,0.132607);
   METJets27->SetBinContent(6,0.006526677);
   METJets27->SetBinContent(7,0.0001605133);
   METJets27->SetBinContent(8,1.473949e-05);
   METJets27->SetBinError(1,0.02795641);
   METJets27->SetBinError(2,0.1254575);
   METJets27->SetBinError(3,0.1000964);
   METJets27->SetBinError(4,0.03249664);
   METJets27->SetBinError(5,0.007171238);
   METJets27->SetBinError(6,0.001513783);
   METJets27->SetBinError(7,4.840768e-05);
   METJets27->SetBinError(8,1.473949e-05);
   METJets27->SetEntries(136801);

   ci = TColor::GetColor("#00ffff");
   METJets27->SetFillColor(ci);

   ci = TColor::GetColor("#00ffff");
   METJets27->SetLineColor(ci);

   ci = TColor::GetColor("#00ffff");
   METJets27->SetMarkerColor(ci);
   METJets27->SetMarkerStyle(20);
   METJets27->GetXaxis()->SetTitle("METJets");
   METJets27->GetXaxis()->SetLabelFont(42);
   METJets27->GetXaxis()->SetLabelSize(0.035);
   METJets27->GetXaxis()->SetTitleSize(0.035);
   METJets27->GetXaxis()->SetTitleFont(42);
   METJets27->GetYaxis()->SetTitle("Events/pb");
   METJets27->GetYaxis()->SetLabelFont(42);
   METJets27->GetYaxis()->SetLabelSize(0.035);
   METJets27->GetYaxis()->SetTitleSize(0.035);
   METJets27->GetYaxis()->SetTitleFont(42);
   METJets27->GetZaxis()->SetLabelFont(42);
   METJets27->GetZaxis()->SetLabelSize(0.035);
   METJets27->GetZaxis()->SetTitleSize(0.035);
   METJets27->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets28 = new TH1D("METJets28"," Number of jets in MET hemisphere",15,0,15);
   METJets28->SetBinContent(1,0.1431715);
   METJets28->SetBinContent(2,2.860636);
   METJets28->SetBinContent(3,1.738326);
   METJets28->SetBinContent(4,0.1855333);
   METJets28->SetBinContent(5,0.01162161);
   METJets28->SetBinContent(6,0.0007176836);
   METJets28->SetBinContent(7,3.39293e-05);
   METJets28->SetBinError(1,0.003525434);
   METJets28->SetBinError(2,0.01498037);
   METJets28->SetBinError(3,0.0112588);
   METJets28->SetBinError(4,0.003217574);
   METJets28->SetBinError(5,0.0006944844);
   METJets28->SetBinError(6,0.0001304861);
   METJets28->SetBinError(7,2.841073e-05);
   METJets28->SetEntries(131338);

   ci = TColor::GetColor("#ffcc00");
   METJets28->SetFillColor(ci);

   ci = TColor::GetColor("#ffcc00");
   METJets28->SetLineColor(ci);

   ci = TColor::GetColor("#ffcc00");
   METJets28->SetMarkerColor(ci);
   METJets28->SetMarkerStyle(21);
   METJets28->GetXaxis()->SetTitle("METJets");
   METJets28->GetXaxis()->SetLabelFont(42);
   METJets28->GetXaxis()->SetLabelSize(0.035);
   METJets28->GetXaxis()->SetTitleSize(0.035);
   METJets28->GetXaxis()->SetTitleFont(42);
   METJets28->GetYaxis()->SetTitle("Events/pb");
   METJets28->GetYaxis()->SetLabelFont(42);
   METJets28->GetYaxis()->SetLabelSize(0.035);
   METJets28->GetYaxis()->SetTitleSize(0.035);
   METJets28->GetYaxis()->SetTitleFont(42);
   METJets28->GetZaxis()->SetLabelFont(42);
   METJets28->GetZaxis()->SetLabelSize(0.035);
   METJets28->GetZaxis()->SetTitleSize(0.035);
   METJets28->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets29 = new TH1D("METJets29"," Number of jets in MET hemisphere",15,0,15);
   METJets29->SetBinContent(1,0.003208312);
   METJets29->SetBinContent(2,0.03535313);
   METJets29->SetBinContent(3,0.02142474);
   METJets29->SetBinContent(4,0.003779021);
   METJets29->SetBinContent(5,0.0003701898);
   METJets29->SetBinContent(6,9.254746e-05);
   METJets29->SetBinError(1,0.0002224564);
   METJets29->SetBinError(2,0.0007384491);
   METJets29->SetBinError(3,0.000574863);
   METJets29->SetBinError(4,0.0002414328);
   METJets29->SetBinError(5,7.556468e-05);
   METJets29->SetBinError(6,3.778234e-05);
   METJets29->SetEntries(4164);

   ci = TColor::GetColor("#ff0000");
   METJets29->SetFillColor(ci);

   ci = TColor::GetColor("#ff0000");
   METJets29->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   METJets29->SetMarkerColor(ci);
   METJets29->SetMarkerStyle(20);
   METJets29->GetXaxis()->SetTitle("METJets");
   METJets29->GetXaxis()->SetLabelFont(42);
   METJets29->GetXaxis()->SetLabelSize(0.035);
   METJets29->GetXaxis()->SetTitleSize(0.035);
   METJets29->GetXaxis()->SetTitleFont(42);
   METJets29->GetYaxis()->SetTitle("Events/pb");
   METJets29->GetYaxis()->SetLabelFont(42);
   METJets29->GetYaxis()->SetLabelSize(0.035);
   METJets29->GetYaxis()->SetTitleSize(0.035);
   METJets29->GetYaxis()->SetTitleFont(42);
   METJets29->GetZaxis()->SetLabelFont(42);
   METJets29->GetZaxis()->SetLabelSize(0.035);
   METJets29->GetZaxis()->SetTitleSize(0.035);
   METJets29->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   
   TH1D *METJets30 = new TH1D("METJets30"," Number of jets in MET hemisphere",15,0,15);
   METJets30->SetBinContent(2,0.000335433);
   METJets30->SetBinContent(3,0.000335433);
   METJets30->SetBinContent(4,0.0002180314);
   METJets30->SetBinContent(5,0.0001341732);
   METJets30->SetBinError(2,7.500509e-05);
   METJets30->SetBinError(3,7.500509e-05);
   METJets30->SetBinError(4,6.047104e-05);
   METJets30->SetBinError(5,4.743738e-05);
   METJets30->SetEntries(61);

   ci = TColor::GetColor("#0000ff");
   METJets30->SetFillColor(ci);

   ci = TColor::GetColor("#0000ff");
   METJets30->SetLineColor(ci);

   ci = TColor::GetColor("#0000ff");
   METJets30->SetMarkerColor(ci);
   METJets30->SetMarkerStyle(21);
   METJets30->GetXaxis()->SetTitle("METJets");
   METJets30->GetXaxis()->SetLabelFont(42);
   METJets30->GetXaxis()->SetLabelSize(0.035);
   METJets30->GetXaxis()->SetTitleSize(0.035);
   METJets30->GetXaxis()->SetTitleFont(42);
   METJets30->GetYaxis()->SetTitle("Events/pb");
   METJets30->GetYaxis()->SetLabelFont(42);
   METJets30->GetYaxis()->SetLabelSize(0.035);
   METJets30->GetYaxis()->SetTitleSize(0.035);
   METJets30->GetYaxis()->SetTitleFont(42);
   METJets30->GetZaxis()->SetLabelFont(42);
   METJets30->GetZaxis()->SetLabelSize(0.035);
   METJets30->GetZaxis()->SetTitleSize(0.035);
   METJets30->GetZaxis()->SetTitleFont(42);
   METJets->Add(METJets,"");
   METJets->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3872701,0.94,0.6127299,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("METJets");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("METJets","METJets_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#ffcc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("METJets","METJets_signal","lp");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   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("METJets","METJets_ttbar","lp");

   ci = TColor::GetColor("#0000ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#0000ff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   METJets->Modified();
   METJets->cd();
   METJets->SetSelected(METJets);
}