ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/tcmet/scripts/plotMET.C
Revision: 1.1
Committed: Fri Jan 22 09:58:14 2010 UTC (15 years, 3 months ago) by benhoob
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Log Message:
*** empty log message ***

File Contents

# Content
1 {
2 gStyle->SetOptStat(0);
3 gROOT->SetStyle("Plain");
4 gROOT->LoadMacro("scripts/plotMETHistos1.C");
5 gROOT->LoadMacro("scripts/plotDeltaMETHistos1.C");
6 gROOT->LoadMacro("scripts/drawLeg1.C");
7
8 bool plotgif=false;
9
10 string dir="trial4";
11 string filename="runs/"+dir+"/root/histos.root";
12
13 TCanvas *c1=new TCanvas("c1","",1200,600);
14 c1->Divide(3,2);
15
16 TFile file(filename.c_str());
17 file.cd();
18
19 // void plotMETHistos1(TH1F* h1, TH1F* h2,TH1F* h3,
20 // char* c1, char* c2, char* c3,
21 // char* title,char* xtitle,float min,bool drawLeg,bool writeLatex);
22
23
24 c1->cd(1);
25 plotMETHistos1(DYmm_hmumet,DYmm_htcmet,DYmm_htcmetNew,
26 "muCorrMET","tcMET","tcMETNew",
27 "DY#rightarrow#mu^{+}#mu^{-}","MET (GeV)",0.1,true,true);
28
29 c1->cd(2);
30 plotMETHistos1(DYee_hmumet,DYee_htcmet,DYee_htcmetNew,
31 "muCorrMET","tcMET","tcMETNew",
32 "DY#rightarrow e^{+}e^{-}","MET (GeV)",0.1,true,true);
33
34 c1->cd(3);
35 plotMETHistos1(QCDpt30_hmumet,QCDpt30_htcmet,QCDpt30_htcmetNew,
36 "muCorrMET","tcMET","tcMETNew",
37 "QCD p_{T}>30 GeV","MET (GeV)",0.1,true,true);
38
39 c1->cd(4);
40 plotDeltaMETHistos1(TTbar_hdeltamumet,TTbar_hdeltatcmet,TTbar_hdeltatcmetNew,
41 "muCorrMET","tcMET","tcMETNew",
42 "t#bar{t}","MET^{RECO}-MET^{GEN} (GeV)",0.1,true,true);
43
44 c1->cd(5);
45 plotDeltaMETHistos1(TTbar_hdeltamumetphi,TTbar_hdeltatcmetphi,TTbar_hdeltatcmetphiNew,
46 "muCorrMET","tcMET","tcMETNew",
47 "t#bar{t}","#phi^{RECO}_{MET}-#phi^{GEN}_{MET}",0.1,true,true);
48
49
50
51 if(plotgif){
52 string giffile1="runs/"+dir+"/plots/met.gif";
53 c1->Print(giffile1.c_str());
54 }
55
56
57
58 }
59
60
61 /*
62 TCanvas *c2=new TCanvas("c2","",1200,800);
63 c2->Divide(2,2);
64
65 c2->cd(2);
66 QCDpt30_correctedJetEta->Draw();
67 QCDpt30_correctedJetEta->GetXaxis()->SetTitle("#eta_{JET}");
68 QCDpt30_correctedJetEta->SetTitle("QCD p_{T}>30 GeV");
69
70 c2->cd(3);
71 DYee_correctedJetEta->Draw();
72 DYee_correctedJetEta->GetXaxis()->SetTitle("#eta_{JET}");
73 DYee_correctedJetEta->SetTitle("DY#rightarrow e^{+}e^{-}");
74
75 c2->cd(4);
76 DYmm_correctedJetEta->Draw();
77 DYmm_correctedJetEta->GetXaxis()->SetTitle("#eta_{JET}");
78 DYmm_correctedJetEta->SetTitle("DY#rightarrow #mu^{+}#mu^{-}");
79 */