Fork me on GitHub

Changeset 7bb13cd in git


Ignore:
Timestamp:
Aug 25, 2016, 11:31:31 AM (8 years ago)
Author:
Alexandre Mertens <alexandre.mertens@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
70b9632
Parents:
ea0f50d
Message:

validation work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/Validation.C

    rea0f50d r7bb13cd  
    3232int objStyle = 1;
    3333int trackStyle = 7;
    34 int towerStyle = 5;
     34int towerStyle = 3;
    3535
    3636Color_t objColor = kBlack;
     
    3939
    4040double effLegXmin = 0.22;
    41 double effLegXmax = 0.5;
     41double effLegXmax = 0.7;
    4242double effLegYmin = 0.22;
    43 double effLegYmax = 0.4;
     43double effLegYmax = 0.5;
     44
     45double resLegXmin = 0.62;
     46double resLegXmax = 0.9;
     47double resLegYmin = 0.52;
     48double resLegYmax = 0.85;
     49
     50double topLeftLegXmin = 0.22;
     51double topLeftLegXmax = 0.7;
     52double topLeftLegYmin = 0.52;
     53double topLeftLegYmax = 0.85;
     54
    4455
    4556struct resolPlot
     
    7485    obj = object;
    7586
    76     cenResolHist = new TH1D(obj+"_delta_pt_"+Form("%4.2f",ptmin)+"_"+Form("%4.2f",ptmax)+"_cen", obj+"_delta_pt_"+Form("%4.2f",ptmin)+"_"+Form("%4.2f",ptmax)+"_cen", 500,  xmin, xmax);
    77     fwdResolHist = new TH1D(obj+"_delta_pt_"+Form("%4.2f",ptmin)+"_"+Form("%4.2f",ptmax)+"_fwd", obj+"_delta_pt_"+Form("%4.2f",ptmin)+"_"+Form("%4.2f",ptmax)+"_fwd", 500,  xmin, xmax);
     87    cenResolHist = new TH1D(obj+"_delta_pt_"+Form("%4.2f",ptmin)+"_"+Form("%4.2f",ptmax)+"_cen", obj+"_delta_pt_"+Form("%4.2f",ptmin)+"_"+Form("%4.2f",ptmax)+"_cen", 200,  xmin, xmax);
     88    fwdResolHist = new TH1D(obj+"_delta_pt_"+Form("%4.2f",ptmin)+"_"+Form("%4.2f",ptmax)+"_fwd", obj+"_delta_pt_"+Form("%4.2f",ptmin)+"_"+Form("%4.2f",ptmax)+"_fwd", 200,  xmin, xmax);
    7889
    7990}
     
    390401  Double_t ht;
    391402
     403  Jet *jet;
     404  TLorentzVector p1, p2;
     405
    392406  // Loop over all events
    393407  for(entry = 0; entry < allEntries; ++entry)
     
    400414    if (branchJet->GetEntriesFast() > 1)
    401415    {
     416     
     417      jet = (Jet*) branchJet->At(0);
     418      p1 = jet->P4();
     419      jet = (Jet*) branchJet->At(1);
     420      p2 = jet->P4();
     421       
    402422      met = (MissingET*) branchMet->At(0);
    403423      scalarHT = (ScalarHT*) branchScalarHT->At(0);
    404424      ht = scalarHT->HT;
     425
     426      if(p1.Pt() < 0.75*ht/2) continue;
     427      if(p2.Pt() < 0.75*ht/2) continue;
    405428
    406429      for (bin = 0; bin < Nbins; bin++)
     
    419442std::pair<Double_t, Double_t> GausFit(TH1* hist)
    420443{
     444   
    421445    TF1 *f1 = new TF1("f1", "gaus", hist->GetMean()-2*hist->GetRMS(), hist->GetMean()+2*hist->GetRMS());
    422446    hist->Fit("f1","RQ");
     
    425449    delete f1;
    426450    return make_pair (sig, sigErr);
     451   
     452    /*
     453    int bin1 = hist->FindFirstBinAbove(hist->GetMaximum()/2);
     454    int bin2 = hist->FindLastBinAbove(hist->GetMaximum()/2);
     455    double fwhm = hist->GetBinCenter(bin2) - hist->GetBinCenter(bin1);
     456
     457    return make_pair (fwhm, fwhm);
    427458    //return make_pair (hist->GetRMS(), hist->GetRMSError());
     459    */
    428460}
    429461
     
    483515{
    484516
    485   gr->SetLineWidth(3);
     517  gr->SetLineWidth(2);
    486518
    487519  switch ( type )
     
    509541      break;
    510542
     543    case 0:
     544      gr->SetLineColor(objColor);
     545      gr->SetLineStyle(objStyle);
     546      mg->Add(gr);
     547      break;
     548
    511549    default:
    512550      std::cout << "wrong type, possibles choices are Object, Track and Tower" << std::endl;
     
    517555void addHist(TH1D *h, TLegend *leg, int type)
    518556{
    519   h->SetLineWidth(3);
     557  h->SetLineWidth(2);
    520558
    521559  switch ( type )
     
    539577      break;
    540578
     579    case 0:
     580      h->SetLineColor(objColor);
     581      h->SetLineStyle(objStyle);
     582      break;
     583
    541584    default:
    542585      std::cout << "wrong type, possibles choices are Object, Track and Tower" << std::endl;
     
    550593  mg->SetMaximum(max);
    551594  mg->GetXaxis()->SetLimits(ptrangemin,ptrangemax);
    552   mg->GetYaxis()->SetTitle("#sigma (E) / E_{gen}");
    553   mg->GetXaxis()->SetTitle("E_{gen}");
     595  mg->GetYaxis()->SetTitle("resolution");
     596  mg->GetXaxis()->SetTitle("p_{T} [GeV]");
    554597  mg->GetYaxis()->SetTitleSize(0.07);
    555598  mg->GetXaxis()->SetTitleSize(0.07);
    556   mg->GetYaxis()->SetLabelSize(0.07);
    557   mg->GetXaxis()->SetLabelSize(0.07);
    558 
    559   leg->SetLineStyle(0);
     599  mg->GetYaxis()->SetLabelSize(0.06);
     600  mg->GetXaxis()->SetLabelSize(0.06);
     601  mg->GetYaxis()->SetLabelOffset(0.03);
     602  mg->GetYaxis()->SetTitleOffset(1.4);
     603  mg->GetXaxis()->SetTitleOffset(1.4);
     604 
     605  mg->GetYaxis()->SetNdivisions(505);
     606 
     607  leg->SetBorderSize(0);
     608  leg->SetShadowColor(0);
     609  leg->SetFillColor(0);
    560610  leg->SetFillStyle(0);
    561   leg->SetLineWidth(0);
    562   leg->SetLineColor(0);
    563611
    564612  gStyle->SetOptTitle(0);
     
    574622{
    575623
    576   h->GetYaxis()->SetRangeUser(0,1.2);
    577   if (type == 0) h->GetXaxis()->SetTitle("E_{gen}");
     624  h->GetYaxis()->SetRangeUser(0,1.0);
     625  if (type == 0) h->GetXaxis()->SetTitle("p_{T} [GeV]");
    578626  else h->GetXaxis()->SetTitle("#eta");
    579   h->GetYaxis()->SetTitle("#epsilon");
     627  h->GetYaxis()->SetTitle("efficiency");
    580628  h->GetYaxis()->SetTitleSize(0.07);
    581629  h->GetXaxis()->SetTitleSize(0.07);
    582   h->GetYaxis()->SetLabelSize(0.07);
    583   h->GetXaxis()->SetLabelSize(0.07);
    584   leg->SetLineStyle(0);
     630  h->GetYaxis()->SetLabelSize(0.06);
     631  h->GetXaxis()->SetLabelSize(0.06);
     632  h->GetYaxis()->SetLabelOffset(0.03);
     633  h->GetYaxis()->SetTitleOffset(1.3);
     634  h->GetXaxis()->SetTitleOffset(1.4);
     635 
     636  h->GetYaxis()->SetNdivisions(505);
     637 
     638  leg->SetBorderSize(0);
     639  leg->SetShadowColor(0);
     640  leg->SetFillColor(0);
    585641  leg->SetFillStyle(0);
    586   leg->SetLineWidth(0);
    587   leg->SetLineColor(0);
    588642
    589643  gStyle->SetOptTitle(0);
     
    620674  TClonesArray *branchMet = treeReader->UseBranch("MissingET");
    621675
     676
    622677#ifdef ELECTRON
    623678
     
    666721  // Canvases
    667722  TString elEff = "electronEff";
    668   TCanvas *C_el1 = new TCanvas(elEff,elEff, 1000, 500);
     723  TCanvas *C_el1 = new TCanvas(elEff,elEff, 1600, 600);
    669724  C_el1->Divide(2);
    670725  C_el1->cd(1);
    671726  TLegend *leg_el1 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
     727  leg_el1->SetHeader("#splitline{electrons}{|#eta| < 1.5}");
     728  leg_el1->AddEntry("","","");
    672729
    673730  gPad->SetLogx();
    674   histos_eltrack.first->Draw();
     731  histos_eltrack.first->Draw("][");
    675732  addHist(histos_eltrack.first, leg_el1, 2);
    676   histos_eltower.first->Draw("same");
    677   addHist(histos_eltower.first, leg_el1, 3);
    678   histos_el.first->Draw("same");
     733  //histos_eltower.first->Draw("same");
     734  //addHist(histos_eltower.first, leg_el1, 3);
     735  histos_el.first->Draw("same ][");
    679736  addHist(histos_el.first, leg_el1, 1);
    680 
    681737  DrawAxis(histos_eltrack.first, leg_el1, 0);
     738 
    682739  leg_el1->Draw();
    683 
     740 
     741/*
     742  TPaveText* txt = new TPaveText(effLegXmin,effLegYmax+0.02,effLegXmax,effLegYmax+0.1,"brNDC") ;
     743  txt->AddText("electrons");
     744  txt->SetBorderSize(0);
     745  txt->SetShadowColor(0);
     746  txt->SetFillColor(0);
     747  txt->SetFillStyle(0);
     748  txt->SetTextAlign(22);
     749  txt->Draw();
     750*/
    684751  C_el1->cd(2);
    685752  TLegend *leg_el2 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
     753  leg_el2->SetHeader("#splitline{electrons}{1.5 < |#eta| < 2.5}");
     754  leg_el2->AddEntry("","","");
    686755
    687756  gPad->SetLogx();
    688   histos_eltrack.second->Draw();
     757  histos_eltrack.second->Draw("][");
    689758  addHist(histos_eltrack.second, leg_el2, 2);
    690   histos_eltower.second->Draw("same");
    691   addHist(histos_eltower.second, leg_el2, 3);
    692   histos_el.second->Draw("same");
     759  //histos_eltower.second->Draw("same");
     760  //addHist(histos_eltower.second, leg_el2, 3);
     761  histos_el.second->Draw("same ][");
    693762  addHist(histos_el.second, leg_el2, 1);
    694763
    695764  DrawAxis(histos_eltrack.second, leg_el2, 0);
    696   delete(leg_el2);
     765  leg_el2->Draw();
     766
     767  //txt->Draw("same");
     768 
    697769  C_el1->cd(0);
    698770 
    699771  TString elRes = "electronERes";
    700772  TString elResFwd = "electronEResForward";
    701   TCanvas *C_el2 = new TCanvas(elRes,elRes, 1000, 500);
     773  TCanvas *C_el2 = new TCanvas(elRes,elRes, 1600, 600);
    702774  C_el2->Divide(2);
    703775  C_el2->cd(1);
    704776  TMultiGraph *mg_el = new TMultiGraph(elRes,elRes);
    705   TLegend *leg_el = new TLegend(0.52,0.7,0.9,0.9);
     777  TLegend *leg_el = new TLegend(resLegXmin,resLegYmin,resLegXmax,resLegYmax);
     778  leg_el->SetHeader("#splitline{electrons}{|#eta| < 1.5}");
     779  leg_el->AddEntry("","","");
    706780
    707781  addGraph(mg_el, &gr_eltower, leg_el, 3);
     
    711785  mg_el->Draw("ACX");
    712786  leg_el->Draw();
     787 
     788/*
     789  TPaveText* txt2 = new TPaveText(0.72,0.57,0.95,0.65,"brNDC") ;
     790 
     791  txt2->AddText("electrons");
     792  txt2->SetBorderSize(0);
     793  txt2->SetShadowColor(0);
     794  txt2->SetFillColor(0);
     795  txt2->SetFillStyle(0);
     796  //txt2->SetTextAlign(12);
     797  txt2->Draw();
     798*/
    713799
    714800  DrawAxis(mg_el, leg_el, 0.1);
     
    716802  C_el2->cd(2);
    717803  TMultiGraph *mg_elFwd = new TMultiGraph(elResFwd,elResFwd);
    718   TLegend *leg_elFwd = new TLegend(0.52,0.7,0.9,0.9);
     804  TLegend *leg_elFwd = new TLegend(resLegXmin,resLegYmin,resLegXmax,resLegYmax);
     805  leg_elFwd->SetHeader("#splitline{electrons}{1.5 < |#eta| < 2.5}");
     806  leg_elFwd->AddEntry("","","");
     807
    719808
    720809  addGraph(mg_elFwd, &gr_eltowerFwd, leg_elFwd, 3);
     
    723812
    724813  mg_elFwd->Draw("ACX");
    725 
    726   DrawAxis(mg_elFwd, leg_elFwd, 0.1);
    727 
     814  leg_elFwd->Draw();
    728815 
    729   C_el1->SaveAs(elEff+".eps");
    730   C_el2->SaveAs(elRes+".eps");
     816  //txt2->Draw();
     817
     818  DrawAxis(mg_elFwd, leg_elFwd, 0.2);
     819
     820  C_el1->Print("electron.pdf(","pdf");
     821  C_el2->Print("electron.pdf)","pdf");
     822 
     823  //C_el1->SaveAs(elEff+".eps");
     824  //C_el2->SaveAs(elRes+".eps");
    731825
    732826#endif
     
    767861
    768862  TString muEff = "muonEff";
    769   TCanvas *C_mu1 = new TCanvas(muEff,muEff, 1000, 500);
     863  TCanvas *C_mu1 = new TCanvas(muEff,muEff, 1600, 600);
    770864  C_mu1->Divide(2);
    771865  C_mu1->cd(1);
    772866  TLegend *leg_mu1 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
     867  leg_mu1->SetHeader("#splitline{muons}{|#eta| < 1.5}");
     868  leg_mu1->AddEntry("","","");
     869
    773870
    774871  gPad->SetLogx();
    775   histos_mutrack.first->Draw();
     872  histos_mutrack.first->Draw("][");
    776873  addHist(histos_mutrack.first, leg_mu1, 2);
    777   histos_mu.first->Draw("same");
     874  histos_mu.first->Draw("same ][");
    778875  addHist(histos_mu.first, leg_mu1, 1);
    779876
    780877  DrawAxis(histos_mutrack.first, leg_mu1, 0);
     878 
    781879  leg_mu1->Draw();
    782880
    783881  C_mu1->cd(2);
    784882  TLegend *leg_mu2 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
     883  leg_mu2->SetHeader("#splitline{muons}{1.5 < |#eta| < 2.5}");
     884  leg_mu2->AddEntry("","","");
    785885
    786886  gPad->SetLogx();
    787   histos_mutrack.second->Draw();
     887  histos_mutrack.second->Draw("][");
    788888  addHist(histos_mutrack.second, leg_mu2, 2);
    789   histos_mu.second->Draw("same");
     889  histos_mu.second->Draw("same ][");
    790890  addHist(histos_mu.second, leg_mu2, 1);
    791891
    792892  DrawAxis(histos_mutrack.second, leg_mu2, 1);
     893  leg_mu2->Draw();
    793894
    794895  TString muRes = "muonERes";
    795896  TString muResFwd = "muonEResFwd";
    796897
    797   TCanvas *C_mu = new TCanvas(muRes,muRes, 1000, 500);
     898  TCanvas *C_mu = new TCanvas(muRes,muRes, 1600, 600);
    798899  C_mu->Divide(2);
    799900  C_mu->cd(1);
    800901  TMultiGraph *mg_mu = new TMultiGraph(muRes,muRes);
    801   TLegend *leg_mu = new TLegend(0.52,0.7,0.9,0.9);
     902  TLegend *leg_mu = new TLegend(topLeftLegXmin,topLeftLegYmin,topLeftLegXmax,topLeftLegYmax);
     903  leg_mu->SetHeader("#splitline{muons}{|#eta| < 1.5}");
     904  leg_mu->AddEntry("","","");
    802905
    803906  addGraph(mg_mu, &gr_mutrack, leg_mu, 2);
     
    811914  C_mu->cd(2);
    812915  TMultiGraph *mg_muFwd = new TMultiGraph(muResFwd,muResFwd);
    813   TLegend *leg_muFwd = new TLegend(0.52,0.7,0.9,0.9);
     916  TLegend *leg_muFwd = new TLegend(topLeftLegXmin,topLeftLegYmin,topLeftLegXmax,topLeftLegYmax);
     917  leg_muFwd->SetHeader("#splitline{muons}{1.5 < |#eta| < 2.5}");
     918  leg_muFwd->AddEntry("","","");
    814919
    815920  addGraph(mg_muFwd, &gr_mutrackFwd, leg_muFwd, 2);
     
    817922
    818923  mg_muFwd->Draw("ACX");
     924  leg_muFwd->Draw();
    819925
    820926  DrawAxis(mg_muFwd, leg_muFwd, 0.3);
    821927
    822   C_mu1->SaveAs(muEff+".eps");
    823   C_mu->SaveAs(muRes+".eps");
     928  //C_mu1->SaveAs(muEff+".eps");
     929  //C_mu->SaveAs(muRes+".eps");
     930 
     931  C_mu1->Print("muon.pdf(","pdf");
     932  C_mu->Print("muon.pdf)","pdf");
    824933
    825934#endif
     
    860969
    861970  TString phEff = "photonEff";
    862   TCanvas *C_ph1 = new TCanvas(phEff,phEff, 1000, 500);
     971  TCanvas *C_ph1 = new TCanvas(phEff,phEff, 1600, 600);
    863972  C_ph1->Divide(2);
    864973  C_ph1->cd(1);
    865974  TLegend *leg_ph1 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
     975  leg_ph1->SetHeader("#splitline{photons}{|#eta| < 1.5}");
     976  leg_ph1->AddEntry("","","");
     977
    866978
    867979  gPad->SetLogx();
    868   histos_phtower.first->Draw();
     980  histos_phtower.first->Draw("][");
    869981  addHist(histos_phtower.first, leg_ph1, 3);
    870   histos_ph.first->Draw("same");
     982  histos_ph.first->Draw("same ][");
    871983  addHist(histos_ph.first, leg_ph1, 1);
    872984
     
    876988  C_ph1->cd(2);
    877989  TLegend *leg_ph2 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
     990  leg_ph2->SetHeader("#splitline{photons}{1.5 < |#eta| < 2.5}");
     991  leg_ph2->AddEntry("","","");
     992
    878993
    879994  gPad->SetLogx();
    880   histos_phtower.second->Draw("same");
     995  histos_phtower.second->Draw("][");
    881996  addHist(histos_phtower.second, leg_ph2, 3);
    882   histos_ph.second->Draw("same");
     997  histos_ph.second->Draw("same ][");
    883998  addHist(histos_ph.second, leg_ph2, 1);
    884999
    8851000  DrawAxis(histos_phtower.second, leg_ph2, 1);
     1001  leg_ph2->Draw();
    8861002
    8871003  C_ph1->SaveAs(phEff+".eps");
     
    8901006  TString phResFwd = "phEResFwd";
    8911007
    892   TCanvas *C_ph = new TCanvas(phRes,phRes, 1000, 500);
     1008  TCanvas *C_ph = new TCanvas(phRes,phRes, 1600, 600);
    8931009  C_ph->Divide(2);
    8941010  C_ph->cd(1);
    8951011  TMultiGraph *mg_ph = new TMultiGraph(phRes,phRes);
    896   TLegend *leg_ph = new TLegend(0.52,0.7,0.9,0.9);
     1012  TLegend *leg_ph = new TLegend(resLegXmin,resLegYmin,resLegXmax,resLegYmax);
     1013  leg_ph->SetHeader("#splitline{photons}{|#eta| < 1.5}");
     1014  leg_ph->AddEntry("","","");
    8971015
    8981016  addGraph(mg_ph, &gr_phtower, leg_ph, 3);
     
    9061024  C_ph->cd(2);
    9071025  TMultiGraph *mg_phFwd = new TMultiGraph(phResFwd,phResFwd);
    908   TLegend *leg_phFwd = new TLegend(0.52,0.7,0.9,0.9);
     1026  TLegend *leg_phFwd = new TLegend(resLegXmin,resLegYmin,resLegXmax,resLegYmax);
     1027  leg_phFwd->SetHeader("#splitline{photons}{1.5 < |#eta| < 2.5}");
     1028  leg_phFwd->AddEntry("","","");
    9091029
    9101030  addGraph(mg_phFwd, &gr_phtowerFwd, leg_phFwd, 3);
     
    9121032
    9131033  mg_phFwd->Draw("ACX");
     1034  leg_phFwd->Draw();
    9141035
    9151036  DrawAxis(mg_phFwd, leg_phFwd, 0.3);
    9161037
    9171038  C_ph->SaveAs(phRes+".eps");
     1039
     1040  C_ph1->Print("photon.pdf(","pdf");
     1041  C_ph->Print("photon.pdf)","pdf");
     1042
    9181043
    9191044#endif
     
    9551080  // MET Resolution vs HT
    9561081  std::vector<resolPlot> plots_met;
    957   HistogramsCollection(&plots_met, TMath::Log10(ptrangemin), TMath::Log10(ptrangemax), "MET", -200, 200);
     1082  HistogramsCollection(&plots_met, TMath::Log10(ptrangemin), TMath::Log10(ptrangemax), "MET", -500, 500);
    9581083  GetMetres( &plots_met, branchScalarHT, branchMet, branchPFJet, treeReader);
    9591084  TGraphErrors gr_met = EresGraph(&plots_met, true);
     
    9621087  // Canvas
    9631088  TString btagEff = "btagEff";
    964   TCanvas *C_btag1 = new TCanvas(btagEff,btagEff, 1000, 500);
     1089  TCanvas *C_btag1 = new TCanvas(btagEff,btagEff, 1600, 600);
    9651090  C_btag1->Divide(2);
    9661091  C_btag1->cd(1);
    967   TLegend *leg_btag1 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
     1092  TLegend *leg_btag1 = new TLegend(resLegXmin,resLegYmin,resLegXmax,resLegYmax);
     1093  leg_btag1->SetHeader("#splitline{B-tagging}{|#eta| < 1.5}");
     1094  leg_btag1->AddEntry("","","");
    9681095
    9691096  gPad->SetLogx();
    9701097  histos_btag.first->Draw();
    971   addHist(histos_btag.first, leg_btag1, 1);
     1098  addHist(histos_btag.first, leg_btag1, 0);
    9721099
    9731100  DrawAxis(histos_btag.first, leg_btag1, 0);
     
    9751102
    9761103  C_btag1->cd(2);
    977   TLegend *leg_btag2 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
    978 
     1104  TLegend *leg_btag2 = new TLegend(resLegXmin,resLegYmin,resLegXmax+0.05,resLegYmax);
     1105  leg_btag2->SetHeader("#splitline{B-tagging}{1.5 < |#eta| < 2.5}");
     1106  leg_btag2->AddEntry("","","");
     1107 
     1108  gPad->SetLogx();
    9791109  histos_btag.second->Draw();
    980   addHist(histos_btag.second, leg_btag2, 1);
    981 
    982   DrawAxis(histos_btag.second, leg_btag2, 1);
    983   delete(leg_btag2);
     1110  addHist(histos_btag.second, leg_btag2, 0);
     1111
     1112  DrawAxis(histos_btag.second, leg_btag2, 0);
     1113  leg_btag2->Draw();
    9841114  C_btag1->cd(0);
    9851115
    9861116  TString tautagEff = "tautagEff";
    987   TCanvas *C_tautag1 = new TCanvas(tautagEff,tautagEff, 1000, 500);
     1117  TCanvas *C_tautag1 = new TCanvas(tautagEff,tautagEff, 1600, 600);
    9881118  C_tautag1->Divide(2);
    9891119  C_tautag1->cd(1);
    990   TLegend *leg_tautag1 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
     1120  TLegend *leg_tautag1 = new TLegend(resLegXmin,resLegYmin,resLegXmax,resLegYmax);
     1121  leg_tautag1->SetHeader("#splitline{#tau-tagging}{|#eta| < 1.5}");
     1122  leg_tautag1->AddEntry("","","");
    9911123
    9921124  gPad->SetLogx();
    9931125  histos_tautag.first->Draw();
    994   addHist(histos_tautag.first, leg_tautag1, 1);
     1126  addHist(histos_tautag.first, leg_tautag1, 0);
    9951127
    9961128  DrawAxis(histos_tautag.first, leg_tautag1, 0);
     
    9981130
    9991131  C_tautag1->cd(2);
    1000   TLegend *leg_tautag2 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax);
    1001 
     1132  TLegend *leg_tautag2 = new TLegend(resLegXmin,resLegYmin,resLegXmax+0.05,resLegYmax);
     1133  leg_tautag2->SetHeader("#splitline{#tau-tagging}{1.5 < |#eta| < 2.5}");
     1134  leg_tautag2->AddEntry("","","");
     1135
     1136  gPad->SetLogx();
    10021137  histos_tautag.second->Draw();
    1003   addHist(histos_tautag.second, leg_tautag2, 1);
    1004 
    1005   DrawAxis(histos_tautag.second, leg_tautag2, 1);
    1006   delete(leg_tautag2);
     1138  addHist(histos_tautag.second, leg_tautag2, 0);
     1139
     1140  DrawAxis(histos_tautag.second, leg_tautag2, 0);
     1141  leg_tautag2->Draw();
    10071142  C_tautag1->cd(0);
    10081143
    10091144  TString jetRes = "jetERes";
    10101145  TString jetResFwd = "jetEResFwd";
    1011   TCanvas *C_jet = new TCanvas(jetRes,jetRes, 1000, 500);
     1146  TCanvas *C_jet = new TCanvas(jetRes,jetRes, 1600, 600);
    10121147  C_jet->Divide(2);
    10131148
    10141149  C_jet->cd(1);
    10151150  TMultiGraph *mg_jet = new TMultiGraph(jetRes,jetRes);
    1016   TLegend *leg_jet = new TLegend(0.52,0.7,0.9,0.9);
     1151  TLegend *leg_jet = new TLegend(resLegXmin,resLegYmin,resLegXmax,resLegYmax);
     1152  leg_jet->SetHeader("#splitline{jets}{|#eta| < 1.5}");
     1153  leg_jet->AddEntry("","","");
    10171154
    10181155  addGraph(mg_jet, &gr_calojets, leg_jet, 3);
     
    10261163  C_jet->cd(2);
    10271164  TMultiGraph *mg_jetFwd = new TMultiGraph(jetResFwd,jetResFwd);
    1028   TLegend *leg_jetFwd = new TLegend(0.52,0.7,0.9,0.9);
     1165  TLegend *leg_jetFwd = new TLegend(resLegXmin,resLegYmin,resLegXmax,resLegYmax);
     1166  leg_jetFwd->SetHeader("#splitline{jets}{|#eta| < 1.5}");
     1167  leg_jetFwd->AddEntry("","","");
    10291168
    10301169  addGraph(mg_jetFwd, &gr_calojetsFwd, leg_jetFwd, 3);
     
    10321171
    10331172  mg_jetFwd->Draw("ACX");
     1173  leg_jetFwd->Draw();
    10341174
    10351175  DrawAxis(mg_jetFwd, leg_jetFwd, 0.25);
     
    10391179
    10401180  TString metRes = "MetRes";
    1041   TCanvas *C_met = new TCanvas(metRes,metRes, 1000, 500);
     1181  TCanvas *C_met = new TCanvas(metRes,metRes, 800, 600);
    10421182
    10431183  TMultiGraph *mg_met = new TMultiGraph(metRes,metRes);
    1044   TLegend *leg_met = new TLegend(0.52,0.7,0.9,0.9);
    1045 
    1046   addGraph(mg_met, &gr_met, leg_met, 3);
     1184  TLegend *leg_met = new TLegend(topLeftLegXmin,topLeftLegYmin+0.2,topLeftLegXmax-0.2,topLeftLegYmax);
     1185  leg_met->SetHeader("E_{T}^{miss}");
     1186  leg_met->AddEntry("","","");
     1187 
     1188
     1189  addGraph(mg_met, &gr_met, leg_met, 0);
    10471190
    10481191  mg_met->Draw("ACX");
    10491192  leg_met->Draw();
    10501193
    1051   DrawAxis(mg_met, leg_met, 100);
     1194  DrawAxis(mg_met, leg_met, 300);
     1195
     1196  mg_met->GetXaxis()->SetTitle("H_{T} [GeV]");
     1197  mg_met->GetYaxis()->SetTitle("#sigma(ME_{x}) [GeV]");
    10521198
    10531199  C_met->SaveAs(metRes+".eps");
     1200
     1201  C_jet->Print("jet.pdf(","pdf");
     1202  C_btag1->Print("jet.pdf","pdf");
     1203  C_tautag1->Print("jet.pdf","pdf"); 
     1204  C_met->Print("jet.pdf)","pdf");
    10541205
    10551206
Note: See TracChangeset for help on using the changeset viewer.