Changeset 7bb13cd in git
- Timestamp:
- Aug 25, 2016, 11:31:31 AM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 70b9632
- Parents:
- ea0f50d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/Validation.C
rea0f50d r7bb13cd 32 32 int objStyle = 1; 33 33 int trackStyle = 7; 34 int towerStyle = 5;34 int towerStyle = 3; 35 35 36 36 Color_t objColor = kBlack; … … 39 39 40 40 double effLegXmin = 0.22; 41 double effLegXmax = 0. 5;41 double effLegXmax = 0.7; 42 42 double effLegYmin = 0.22; 43 double effLegYmax = 0.4; 43 double effLegYmax = 0.5; 44 45 double resLegXmin = 0.62; 46 double resLegXmax = 0.9; 47 double resLegYmin = 0.52; 48 double resLegYmax = 0.85; 49 50 double topLeftLegXmin = 0.22; 51 double topLeftLegXmax = 0.7; 52 double topLeftLegYmin = 0.52; 53 double topLeftLegYmax = 0.85; 54 44 55 45 56 struct resolPlot … … 74 85 obj = object; 75 86 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); 78 89 79 90 } … … 390 401 Double_t ht; 391 402 403 Jet *jet; 404 TLorentzVector p1, p2; 405 392 406 // Loop over all events 393 407 for(entry = 0; entry < allEntries; ++entry) … … 400 414 if (branchJet->GetEntriesFast() > 1) 401 415 { 416 417 jet = (Jet*) branchJet->At(0); 418 p1 = jet->P4(); 419 jet = (Jet*) branchJet->At(1); 420 p2 = jet->P4(); 421 402 422 met = (MissingET*) branchMet->At(0); 403 423 scalarHT = (ScalarHT*) branchScalarHT->At(0); 404 424 ht = scalarHT->HT; 425 426 if(p1.Pt() < 0.75*ht/2) continue; 427 if(p2.Pt() < 0.75*ht/2) continue; 405 428 406 429 for (bin = 0; bin < Nbins; bin++) … … 419 442 std::pair<Double_t, Double_t> GausFit(TH1* hist) 420 443 { 444 421 445 TF1 *f1 = new TF1("f1", "gaus", hist->GetMean()-2*hist->GetRMS(), hist->GetMean()+2*hist->GetRMS()); 422 446 hist->Fit("f1","RQ"); … … 425 449 delete f1; 426 450 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); 427 458 //return make_pair (hist->GetRMS(), hist->GetRMSError()); 459 */ 428 460 } 429 461 … … 483 515 { 484 516 485 gr->SetLineWidth( 3);517 gr->SetLineWidth(2); 486 518 487 519 switch ( type ) … … 509 541 break; 510 542 543 case 0: 544 gr->SetLineColor(objColor); 545 gr->SetLineStyle(objStyle); 546 mg->Add(gr); 547 break; 548 511 549 default: 512 550 std::cout << "wrong type, possibles choices are Object, Track and Tower" << std::endl; … … 517 555 void addHist(TH1D *h, TLegend *leg, int type) 518 556 { 519 h->SetLineWidth( 3);557 h->SetLineWidth(2); 520 558 521 559 switch ( type ) … … 539 577 break; 540 578 579 case 0: 580 h->SetLineColor(objColor); 581 h->SetLineStyle(objStyle); 582 break; 583 541 584 default: 542 585 std::cout << "wrong type, possibles choices are Object, Track and Tower" << std::endl; … … 550 593 mg->SetMaximum(max); 551 594 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]"); 554 597 mg->GetYaxis()->SetTitleSize(0.07); 555 598 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); 560 610 leg->SetFillStyle(0); 561 leg->SetLineWidth(0);562 leg->SetLineColor(0);563 611 564 612 gStyle->SetOptTitle(0); … … 574 622 { 575 623 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]"); 578 626 else h->GetXaxis()->SetTitle("#eta"); 579 h->GetYaxis()->SetTitle(" #epsilon");627 h->GetYaxis()->SetTitle("efficiency"); 580 628 h->GetYaxis()->SetTitleSize(0.07); 581 629 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); 585 641 leg->SetFillStyle(0); 586 leg->SetLineWidth(0);587 leg->SetLineColor(0);588 642 589 643 gStyle->SetOptTitle(0); … … 620 674 TClonesArray *branchMet = treeReader->UseBranch("MissingET"); 621 675 676 622 677 #ifdef ELECTRON 623 678 … … 666 721 // Canvases 667 722 TString elEff = "electronEff"; 668 TCanvas *C_el1 = new TCanvas(elEff,elEff, 1 000, 500);723 TCanvas *C_el1 = new TCanvas(elEff,elEff, 1600, 600); 669 724 C_el1->Divide(2); 670 725 C_el1->cd(1); 671 726 TLegend *leg_el1 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax); 727 leg_el1->SetHeader("#splitline{electrons}{|#eta| < 1.5}"); 728 leg_el1->AddEntry("","",""); 672 729 673 730 gPad->SetLogx(); 674 histos_eltrack.first->Draw( );731 histos_eltrack.first->Draw("]["); 675 732 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 ]["); 679 736 addHist(histos_el.first, leg_el1, 1); 680 681 737 DrawAxis(histos_eltrack.first, leg_el1, 0); 738 682 739 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 */ 684 751 C_el1->cd(2); 685 752 TLegend *leg_el2 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax); 753 leg_el2->SetHeader("#splitline{electrons}{1.5 < |#eta| < 2.5}"); 754 leg_el2->AddEntry("","",""); 686 755 687 756 gPad->SetLogx(); 688 histos_eltrack.second->Draw( );757 histos_eltrack.second->Draw("]["); 689 758 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 ]["); 693 762 addHist(histos_el.second, leg_el2, 1); 694 763 695 764 DrawAxis(histos_eltrack.second, leg_el2, 0); 696 delete(leg_el2); 765 leg_el2->Draw(); 766 767 //txt->Draw("same"); 768 697 769 C_el1->cd(0); 698 770 699 771 TString elRes = "electronERes"; 700 772 TString elResFwd = "electronEResForward"; 701 TCanvas *C_el2 = new TCanvas(elRes,elRes, 1 000, 500);773 TCanvas *C_el2 = new TCanvas(elRes,elRes, 1600, 600); 702 774 C_el2->Divide(2); 703 775 C_el2->cd(1); 704 776 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("","",""); 706 780 707 781 addGraph(mg_el, &gr_eltower, leg_el, 3); … … 711 785 mg_el->Draw("ACX"); 712 786 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 */ 713 799 714 800 DrawAxis(mg_el, leg_el, 0.1); … … 716 802 C_el2->cd(2); 717 803 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 719 808 720 809 addGraph(mg_elFwd, &gr_eltowerFwd, leg_elFwd, 3); … … 723 812 724 813 mg_elFwd->Draw("ACX"); 725 726 DrawAxis(mg_elFwd, leg_elFwd, 0.1); 727 814 leg_elFwd->Draw(); 728 815 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"); 731 825 732 826 #endif … … 767 861 768 862 TString muEff = "muonEff"; 769 TCanvas *C_mu1 = new TCanvas(muEff,muEff, 1 000, 500);863 TCanvas *C_mu1 = new TCanvas(muEff,muEff, 1600, 600); 770 864 C_mu1->Divide(2); 771 865 C_mu1->cd(1); 772 866 TLegend *leg_mu1 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax); 867 leg_mu1->SetHeader("#splitline{muons}{|#eta| < 1.5}"); 868 leg_mu1->AddEntry("","",""); 869 773 870 774 871 gPad->SetLogx(); 775 histos_mutrack.first->Draw( );872 histos_mutrack.first->Draw("]["); 776 873 addHist(histos_mutrack.first, leg_mu1, 2); 777 histos_mu.first->Draw("same ");874 histos_mu.first->Draw("same ]["); 778 875 addHist(histos_mu.first, leg_mu1, 1); 779 876 780 877 DrawAxis(histos_mutrack.first, leg_mu1, 0); 878 781 879 leg_mu1->Draw(); 782 880 783 881 C_mu1->cd(2); 784 882 TLegend *leg_mu2 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax); 883 leg_mu2->SetHeader("#splitline{muons}{1.5 < |#eta| < 2.5}"); 884 leg_mu2->AddEntry("","",""); 785 885 786 886 gPad->SetLogx(); 787 histos_mutrack.second->Draw( );887 histos_mutrack.second->Draw("]["); 788 888 addHist(histos_mutrack.second, leg_mu2, 2); 789 histos_mu.second->Draw("same ");889 histos_mu.second->Draw("same ]["); 790 890 addHist(histos_mu.second, leg_mu2, 1); 791 891 792 892 DrawAxis(histos_mutrack.second, leg_mu2, 1); 893 leg_mu2->Draw(); 793 894 794 895 TString muRes = "muonERes"; 795 896 TString muResFwd = "muonEResFwd"; 796 897 797 TCanvas *C_mu = new TCanvas(muRes,muRes, 1 000, 500);898 TCanvas *C_mu = new TCanvas(muRes,muRes, 1600, 600); 798 899 C_mu->Divide(2); 799 900 C_mu->cd(1); 800 901 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("","",""); 802 905 803 906 addGraph(mg_mu, &gr_mutrack, leg_mu, 2); … … 811 914 C_mu->cd(2); 812 915 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("","",""); 814 919 815 920 addGraph(mg_muFwd, &gr_mutrackFwd, leg_muFwd, 2); … … 817 922 818 923 mg_muFwd->Draw("ACX"); 924 leg_muFwd->Draw(); 819 925 820 926 DrawAxis(mg_muFwd, leg_muFwd, 0.3); 821 927 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"); 824 933 825 934 #endif … … 860 969 861 970 TString phEff = "photonEff"; 862 TCanvas *C_ph1 = new TCanvas(phEff,phEff, 1 000, 500);971 TCanvas *C_ph1 = new TCanvas(phEff,phEff, 1600, 600); 863 972 C_ph1->Divide(2); 864 973 C_ph1->cd(1); 865 974 TLegend *leg_ph1 = new TLegend(effLegXmin,effLegYmin,effLegXmax,effLegYmax); 975 leg_ph1->SetHeader("#splitline{photons}{|#eta| < 1.5}"); 976 leg_ph1->AddEntry("","",""); 977 866 978 867 979 gPad->SetLogx(); 868 histos_phtower.first->Draw( );980 histos_phtower.first->Draw("]["); 869 981 addHist(histos_phtower.first, leg_ph1, 3); 870 histos_ph.first->Draw("same ");982 histos_ph.first->Draw("same ]["); 871 983 addHist(histos_ph.first, leg_ph1, 1); 872 984 … … 876 988 C_ph1->cd(2); 877 989 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 878 993 879 994 gPad->SetLogx(); 880 histos_phtower.second->Draw(" same");995 histos_phtower.second->Draw("]["); 881 996 addHist(histos_phtower.second, leg_ph2, 3); 882 histos_ph.second->Draw("same ");997 histos_ph.second->Draw("same ]["); 883 998 addHist(histos_ph.second, leg_ph2, 1); 884 999 885 1000 DrawAxis(histos_phtower.second, leg_ph2, 1); 1001 leg_ph2->Draw(); 886 1002 887 1003 C_ph1->SaveAs(phEff+".eps"); … … 890 1006 TString phResFwd = "phEResFwd"; 891 1007 892 TCanvas *C_ph = new TCanvas(phRes,phRes, 1 000, 500);1008 TCanvas *C_ph = new TCanvas(phRes,phRes, 1600, 600); 893 1009 C_ph->Divide(2); 894 1010 C_ph->cd(1); 895 1011 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("","",""); 897 1015 898 1016 addGraph(mg_ph, &gr_phtower, leg_ph, 3); … … 906 1024 C_ph->cd(2); 907 1025 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("","",""); 909 1029 910 1030 addGraph(mg_phFwd, &gr_phtowerFwd, leg_phFwd, 3); … … 912 1032 913 1033 mg_phFwd->Draw("ACX"); 1034 leg_phFwd->Draw(); 914 1035 915 1036 DrawAxis(mg_phFwd, leg_phFwd, 0.3); 916 1037 917 1038 C_ph->SaveAs(phRes+".eps"); 1039 1040 C_ph1->Print("photon.pdf(","pdf"); 1041 C_ph->Print("photon.pdf)","pdf"); 1042 918 1043 919 1044 #endif … … 955 1080 // MET Resolution vs HT 956 1081 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); 958 1083 GetMetres( &plots_met, branchScalarHT, branchMet, branchPFJet, treeReader); 959 1084 TGraphErrors gr_met = EresGraph(&plots_met, true); … … 962 1087 // Canvas 963 1088 TString btagEff = "btagEff"; 964 TCanvas *C_btag1 = new TCanvas(btagEff,btagEff, 1 000, 500);1089 TCanvas *C_btag1 = new TCanvas(btagEff,btagEff, 1600, 600); 965 1090 C_btag1->Divide(2); 966 1091 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("","",""); 968 1095 969 1096 gPad->SetLogx(); 970 1097 histos_btag.first->Draw(); 971 addHist(histos_btag.first, leg_btag1, 1);1098 addHist(histos_btag.first, leg_btag1, 0); 972 1099 973 1100 DrawAxis(histos_btag.first, leg_btag1, 0); … … 975 1102 976 1103 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(); 979 1109 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(); 984 1114 C_btag1->cd(0); 985 1115 986 1116 TString tautagEff = "tautagEff"; 987 TCanvas *C_tautag1 = new TCanvas(tautagEff,tautagEff, 1 000, 500);1117 TCanvas *C_tautag1 = new TCanvas(tautagEff,tautagEff, 1600, 600); 988 1118 C_tautag1->Divide(2); 989 1119 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("","",""); 991 1123 992 1124 gPad->SetLogx(); 993 1125 histos_tautag.first->Draw(); 994 addHist(histos_tautag.first, leg_tautag1, 1);1126 addHist(histos_tautag.first, leg_tautag1, 0); 995 1127 996 1128 DrawAxis(histos_tautag.first, leg_tautag1, 0); … … 998 1130 999 1131 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(); 1002 1137 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(); 1007 1142 C_tautag1->cd(0); 1008 1143 1009 1144 TString jetRes = "jetERes"; 1010 1145 TString jetResFwd = "jetEResFwd"; 1011 TCanvas *C_jet = new TCanvas(jetRes,jetRes, 1 000, 500);1146 TCanvas *C_jet = new TCanvas(jetRes,jetRes, 1600, 600); 1012 1147 C_jet->Divide(2); 1013 1148 1014 1149 C_jet->cd(1); 1015 1150 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("","",""); 1017 1154 1018 1155 addGraph(mg_jet, &gr_calojets, leg_jet, 3); … … 1026 1163 C_jet->cd(2); 1027 1164 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("","",""); 1029 1168 1030 1169 addGraph(mg_jetFwd, &gr_calojetsFwd, leg_jetFwd, 3); … … 1032 1171 1033 1172 mg_jetFwd->Draw("ACX"); 1173 leg_jetFwd->Draw(); 1034 1174 1035 1175 DrawAxis(mg_jetFwd, leg_jetFwd, 0.25); … … 1039 1179 1040 1180 TString metRes = "MetRes"; 1041 TCanvas *C_met = new TCanvas(metRes,metRes, 1000, 500);1181 TCanvas *C_met = new TCanvas(metRes,metRes, 800, 600); 1042 1182 1043 1183 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); 1047 1190 1048 1191 mg_met->Draw("ACX"); 1049 1192 leg_met->Draw(); 1050 1193 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]"); 1052 1198 1053 1199 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"); 1054 1205 1055 1206
Note:
See TracChangeset
for help on using the changeset viewer.