-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDrawjetmatch.C
190 lines (177 loc) · 8.47 KB
/
Drawjetmatch.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
{
gROOT->SetBatch();
gStyle->SetOptStat(0);
TFile *fFL = new TFile("results/MatchTest_FL1.root");
TFile *fLL = new TFile("results/MatchTest_LL1.root");
TFile *fBG = new TFile("results/MatchTest_BG1.root");
TCanvas *cJetMatchRatio = new TCanvas("cJetMatchRatio","JetMatchRatio",800,500);
TH1F* JetMatchRatioFL = (TH1F*)fFL->Get("JetMatchRatio");
JetMatchRatioFL->SetLineColor(2);
TH1F* JetMatchRatioLL = (TH1F*)fLL->Get("JetMatchRatio");
JetMatchRatioLL->SetLineColor(3);
TH1F* JetMatchRatioBG = (TH1F*)fBG->Get("JetMatchRatio");
JetMatchRatioBG->SetLineColor(4);
TLegend *lJetMatchRatio = new TLegend(0.8,0.8,1.,1.);
lJetMatchRatio->AddEntry(JetMatchRatioFL,"FL","l");
lJetMatchRatio->AddEntry(JetMatchRatioLL,"LL","l");
lJetMatchRatio->AddEntry(JetMatchRatioBG,"BG","l");
JetMatchRatioBG->DrawNormalized("");
JetMatchRatioFL->DrawNormalized("same");
JetMatchRatioLL->DrawNormalized("same");
lJetMatchRatio->Draw();
cJetMatchRatio->Draw();
cJetMatchRatio->SaveAs("plots/MatchTest/JetMatchRatio.pdf");
TCanvas *cAdvJetMatchRatio = new TCanvas("cAdvJetMatchRatio","AdvJetMatchRatio",800,500);
TH1F* AdvJetMatchRatioFL = (TH1F*)fFL->Get("AdvJetMatchRatio");
AdvJetMatchRatioFL->SetLineColor(2);
TH1F* AdvJetMatchRatioLL = (TH1F*)fLL->Get("AdvJetMatchRatio");
AdvJetMatchRatioLL->SetLineColor(3);
TH1F* AdvJetMatchRatioBG = (TH1F*)fBG->Get("AdvJetMatchRatio");
AdvJetMatchRatioBG->SetLineColor(4);
TLegend *lAdvJetMatchRatio = new TLegend(0.8,0.8,1.,1.);
lAdvJetMatchRatio->AddEntry(AdvJetMatchRatioFL,"FL","l");
lAdvJetMatchRatio->AddEntry(AdvJetMatchRatioLL,"LL","l");
lAdvJetMatchRatio->AddEntry(AdvJetMatchRatioBG,"BG","l");
AdvJetMatchRatioBG->DrawNormalized("");
AdvJetMatchRatioFL->DrawNormalized("same");
AdvJetMatchRatioLL->DrawNormalized("same");
lAdvJetMatchRatio->Draw();
cAdvJetMatchRatio->Draw();
cAdvJetMatchRatio->SaveAs("plots/MatchTest/AdvJetMatchRatio.pdf");
TCanvas *cCJetMatchRatio = new TCanvas("cCJetMatchRatio","CJetMatchRatio",800,500);
JetMatchRatioFL->SetLineColor(6);
JetMatchRatioLL->SetLineColor(7);
// JetMatchRatioBG->SetLineColor(8);
TLegend *lCJetMatchRatio = new TLegend(0.8,0.8,1.,1.);
lCJetMatchRatio->AddEntry(AdvJetMatchRatioFL,"AdvFL","l");
lCJetMatchRatio->AddEntry(AdvJetMatchRatioLL,"AdvLL","l");
// lCJetMatchRatio->AddEntry(AdvJetMatchRatioBG,"AdvBG","l");
lCJetMatchRatio->AddEntry(JetMatchRatioFL,"FL","l");
lCJetMatchRatio->AddEntry(JetMatchRatioLL,"LL","l");
// lCJetMatchRatio->AddEntry(JetMatchRatioBG,"BG","l");
AdvJetMatchRatioFL->Draw("");
AdvJetMatchRatioLL->Draw("same");
JetMatchRatioFL->Draw("same");
JetMatchRatioLL->Draw("same");
lCJetMatchRatio->Draw();
cCJetMatchRatio->Draw();
cCJetMatchRatio->SaveAs("plots/MatchTest/CJetMatchRatio.pdf");
TCanvas *cAdvJetMatch2Rate = new TCanvas("cAdvJetMatch2Rate","AdvJetMatch2Rate",800,500);
TH1F* AdvJetMatch2RateFL = (TH1F*)fFL->Get("AdvJetMatch2Rate");
AdvJetMatch2RateFL->SetLineColor(2);
TH1F* AdvJetMatch2RateLL = (TH1F*)fLL->Get("AdvJetMatch2Rate");
AdvJetMatch2RateLL->SetLineColor(3);
TH1F* AdvJetMatch2RateBG = (TH1F*)fBG->Get("AdvJetMatch2Rate");
AdvJetMatch2RateBG->SetLineColor(4);
TLegend *lAdvJetMatch2Rate = new TLegend(0.8,0.8,1.,1.);
lAdvJetMatch2Rate->AddEntry(AdvJetMatch2RateFL,"FL","l");
lAdvJetMatch2Rate->AddEntry(AdvJetMatch2RateLL,"LL","l");
lAdvJetMatch2Rate->AddEntry(AdvJetMatch2RateBG,"BG","l");
AdvJetMatch2RateBG->DrawNormalized("");
AdvJetMatch2RateFL->DrawNormalized("same");
AdvJetMatch2RateLL->DrawNormalized("same");
lAdvJetMatch2Rate->Draw();
cAdvJetMatch2Rate->Draw();
cAdvJetMatch2Rate->SaveAs("plots/MatchTest/AdvJetMatch2Rate.pdf");
TCanvas *cNoMatch = new TCanvas("cNoMatch","NoMatch",800,500);
TH1F* NoMatchFL = (TH1F*)fFL->Get("NoMatch");
NoMatchFL->SetLineColor(2);
TH1F* NoMatchLL = (TH1F*)fLL->Get("NoMatch");
NoMatchLL->SetLineColor(3);
TH1F* NoMatchBG = (TH1F*)fBG->Get("NoMatch");
NoMatchBG->SetLineColor(4);
TLegend *lNoMatch = new TLegend(0.8,0.8,1.,1.);
lNoMatch->AddEntry(NoMatchFL,"FL","l");
lNoMatch->AddEntry(NoMatchLL,"LL","l");
lNoMatch->AddEntry(NoMatchBG,"BG","l");
NoMatchBG->DrawNormalized("");
NoMatchFL->DrawNormalized("same");
NoMatchLL->DrawNormalized("same");
lNoMatch->Draw();
cNoMatch->Draw();
cNoMatch->SaveAs("plots/MatchTest/NoMatch.pdf");
TCanvas *cNoAdvMatch = new TCanvas("cNoAdvMatch","NoAdvMatch",800,500);
TH1F* NoAdvMatchFL = (TH1F*)fFL->Get("NoAdvMatch");
NoAdvMatchFL->SetLineColor(2);
TH1F* NoAdvMatchLL = (TH1F*)fLL->Get("NoAdvMatch");
NoAdvMatchLL->SetLineColor(3);
TH1F* NoAdvMatchBG = (TH1F*)fBG->Get("NoAdvMatch");
NoAdvMatchBG->SetLineColor(4);
TLegend *lNoAdvMatch = new TLegend(0.8,0.8,1.,1.);
lNoAdvMatch->AddEntry(NoAdvMatchFL,"FL","l");
lNoAdvMatch->AddEntry(NoAdvMatchLL,"LL","l");
lNoAdvMatch->AddEntry(NoAdvMatchBG,"BG","l");
NoAdvMatchBG->DrawNormalized("");
NoAdvMatchFL->DrawNormalized("same");
NoAdvMatchLL->DrawNormalized("same");
lNoAdvMatch->Draw();
cNoAdvMatch->Draw();
cNoAdvMatch->SaveAs("plots/MatchTest/NoAdvMatch.pdf");
TCanvas *cCNoMatch = new TCanvas("cCNoMatch","CNoMatch",800,500);
NoMatchFL->SetLineColor(6);
NoMatchLL->SetLineColor(7);
// NoMatchBG->SetLineColor(8);
TLegend *lCNoMatch = new TLegend(0.8,0.8,1.,1.);
lCNoMatch->AddEntry(NoAdvMatchFL,"AdvFL","l");
lCNoMatch->AddEntry(NoAdvMatchLL,"AdvLL","l");
// lCNoMatch->AddEntry(NoAdvMatchBG,"AdvBG","l");
lCNoMatch->AddEntry(NoMatchFL,"FL","l");
lCNoMatch->AddEntry(NoMatchLL,"LL","l");
// lCNoMatch->AddEntry(NoMatchBG,"BG","l");
NoAdvMatchFL->Draw("");
NoAdvMatchLL->Draw("same");
NoMatchFL->Draw("same");
NoMatchLL->Draw("same");
lCNoMatch->Draw();
cCNoMatch->Draw();
cCNoMatch->SaveAs("plots/MatchTest/CNoMatch.pdf");
TCanvas *cLeptonResolution = new TCanvas("cLeptonResolution","LeptonResolution",800,500);
TH1F* LeptonResolutionFL = (TH1F*)fFL->Get("LeptonResolution");
LeptonResolutionFL->SetLineColor(2);
TH1F* LeptonResolutionLL = (TH1F*)fLL->Get("LeptonResolution");
LeptonResolutionLL->SetLineColor(3);
TH1F* LeptonResolutionBG = (TH1F*)fBG->Get("LeptonResolution");
LeptonResolutionBG->SetLineColor(4);
TLegend *lLeptonResolution = new TLegend(0.8,0.8,1.,1.);
lLeptonResolution->AddEntry(LeptonResolutionFL,"FL","l");
lLeptonResolution->AddEntry(LeptonResolutionLL,"LL","l");
lLeptonResolution->AddEntry(LeptonResolutionBG,"BG","l");
LeptonResolutionBG->DrawNormalized("");
LeptonResolutionFL->DrawNormalized("same");
LeptonResolutionLL->DrawNormalized("same");
lLeptonResolution->Draw();
cLeptonResolution->Draw();
cLeptonResolution->SaveAs("plots/MatchTest/LeptonResolution.pdf");
TCanvas *cLowerMergedJets = new TCanvas("cLowerMergedJets","cLowerMergedJets",800,500);
TH2F* LowerMergedJetsFL = (TH2F*)fFL->Get("LowerMergedJets");
TH2F* LowerMergedJetsLL = (TH2F*)fLL->Get("LowerMergedJets");
TH2F* LowerMergedJetsBG = (TH2F*)fBG->Get("LowerMergedJets");
LowerMergedJetsFL->Add(LowerMergedJetsLL);
LowerMergedJetsFL->Add(LowerMergedJetsBG);
LowerMergedJetsFL->GetXaxis()->SetRangeUser(0,200);
LowerMergedJetsFL->Draw("colz");
cLowerMergedJets->SaveAs("plots/MatchTest/LowerMergedJets.pdf");
TCanvas *cHigherMergedJets = new TCanvas("cHigherMergedJets","cHigherMergedJets",800,500);
TH2F* HigherMergedJetsFL = (TH2F*)fFL->Get("HigherMergedJets");
TH2F* HigherMergedJetsLL = (TH2F*)fLL->Get("HigherMergedJets");
TH2F* HigherMergedJetsBG = (TH2F*)fBG->Get("HigherMergedJets");
HigherMergedJetsFL->Add(HigherMergedJetsLL);
HigherMergedJetsFL->Add(HigherMergedJetsBG);
HigherMergedJetsFL->GetXaxis()->SetRangeUser(0,200);
HigherMergedJetsFL->Draw("colz");
cHigherMergedJets->SaveAs("plots/MatchTest/HigherMergedJets.pdf");
// TCanvas *cNBJetsVsBJetsFL = new TCanvas("cNBJetsVsBJetsFL","## of b-jet VS non-b-jet (FL)",800,500);
// TH2F* NBJetsVsBJetsFL = (TH2F*)fFL->Get("NBJetsVsBJets");
// NBJetsVsBJetsFL->Draw("colz");
// cNBJetsVsBJetsFL->SaveAs("plots/hypothesis/NBJetsVsBJetsFL.pdf");
//
// TCanvas *cNBJetsVsBJetsLL = new TCanvas("cNBJetsVsBJetsLL","## of b-jet VS non-b-jet (LL)",800,500);
// TH2F* NBJetsVsBJetsLL = (TH2F*)fLL->Get("NBJetsVsBJets");
// NBJetsVsBJetsLL->Draw("colz");
// cNBJetsVsBJetsLL->SaveAs("plots/hypothesis/NBJetsVsBJetsLL.pdf");
//
// TCanvas *cNBJetsVsBJetsBG = new TCanvas("cNBJetsVsBJetsBG","## of b-jet VS non-b-jet (BG)",800,500);
// TH2F* NBJetsVsBJetsBG = (TH2F*)fBG->Get("NBJetsVsBJets");
// NBJetsVsBJetsBG->Draw("colz");
// cNBJetsVsBJetsBG->SaveAs("plots/hypothesis/NBJetsVsBJetsBG.pdf");
}