File indexing completed on 2024-04-06 12:13:53
0001 #include <iostream>
0002 #include <fstream>
0003 #include <iomanip>
0004 #include <string>
0005 #include <list>
0006
0007 #include <math.h>
0008 #include <vector>
0009
0010 #include "Rtypes.h"
0011 #include "TROOT.h"
0012 #include "TRint.h"
0013 #include "TObject.h"
0014 #include "TFile.h"
0015
0016 #include "TH1F.h"
0017 #include "TCanvas.h"
0018 #include "TApplication.h"
0019 #include "TRefArray.h"
0020 #include "TStyle.h"
0021 #include "TGraph.h"
0022 #include "TLegend.h"
0023
0024
0025
0026
0027
0028 const int NQCutTTbar = 23 ;
0029 double QCutTTbar[23] = { 20., 25., 30.,
0030 31., 32., 33., 34., 35., 36., 37., 38., 39.,
0031 40.,
0032 41., 42., 43., 44., 45., 46., 47., 48., 49., 50. };
0033
0034
0035
0036 double TTbarEffPy6[23] = { 24.1, 27.1, 28.6,
0037 28.5, 28.6, 29.0, 29.3, 29.2, 29.5, 29.3, 29.5, 29.7,
0038 29.9,
0039 29.7, 30.0, 30.0, 30.1, 30.0, 30.0, 30.3, 30.2, 30.2, 30.3 };
0040
0041
0042
0043 double TTbarEffPy8[23] = { 19.4, 22.3, 24.1,
0044 24.5, 24.7, 24.8, 24.9, 25.3, 25.7, 25.8, 25.9, 26.0,
0045 26.2,
0046 26.2,
0047 26.5,
0048 26.6, 26.5, 26.7, 26.7, 26.9, 26.8, 27.1, 26.9 };
0049
0050
0051
0052
0053 const int NQCutWbb = 25 ;
0054 double QCutWbb[25] = { 10., 11., 12., 13., 14.,
0055 15.,
0056 16., 17., 18., 19., 20, 21., 22., 23., 24., 25., 26., 27., 28., 29., 30.,
0057 35., 40., 45., 50. };
0058
0059
0060
0061 double WbbEffPy6[25] = { 39.1, 40.4, 41.2, 41.5, 41.8,
0062 42.3,
0063 42.4, 42.1, 42.0, 41.6, 41.3, 41.0, 40.6, 40.3, 40.0, 39.3, 39.3, 38.8, 38.5, 38.2, 37.5,
0064 35.8, 33.9, 32.5, 31.3 };
0065
0066
0067
0068 double WbbEffPy8[25] = { 30.3, 31.7, 32.7, 33.7, 34.5,
0069 34.8,
0070 35.2,
0071 35.7, 35.7, 35.8, 35.9, 35.8, 35.9, 35.7, 35.7, 35.4, 35.2, 35.2, 34.9, 34.5, 34.6,
0072 33.3, 32.3, 31.1, 30.1 };
0073
0074
0075
0076
0077 const int NQCutW = 25;
0078 double QCutW[25] = { 10., 11., 12., 13., 14., 15., 16., 17., 18., 19.,
0079 20.,
0080 21., 22., 23., 24., 25.,
0081 26.,
0082 27., 28., 29., 30.,
0083 35., 40., 45., 50. };
0084
0085
0086
0087 double WEffPy6[25] = { 41.4, 43.7, 45.3, 46.3, 47.4, 48.0, 48.7, 48.8, 49.1, 49.5,
0088 49.6,
0089 49.8, 49.6, 49.8, 50.0, 49.9, 49.9, 49.9, 49.9, 50.0, 50.0,
0090 49.9, 49.8, 49.4, 49.2 };
0091
0092
0093
0094 double WEffPy8[25] = { 33.7, 36.3, 37.8, 39.4, 40.6, 41.5, 42.2, 43.0, 43.3, 43.9,
0095 44.1,
0096 44.5, 44.9, 45.1, 45.5, 45.4,
0097 45.8,
0098 45.6, 45.8, 45.9, 45.9,
0099 46.1, 46.4, 46.4, 46.2 };
0100
0101
0102
0103
0104 const int NQCutZ = 25;
0105 double QCutZ[25] = { 10., 11., 12., 13., 14., 15., 16., 17., 18., 19.,
0106 20.,
0107 21., 22., 23., 24.,
0108 25.,
0109 26., 27., 28., 29., 30.,
0110 35., 40., 45., 50. };
0111
0112
0113
0114 double ZEffPy6[25] = { 37.8, 39.9, 41.6, 42.4, 43.3, 43.7, 44.4, 44.5, 44.9, 45.0,
0115 45.0,
0116 45.1, 45.3, 45.4, 45.3, 45.5, 45.4, 45.4, 45.4, 45.3, 45.5,
0117 45.1, 44.9, 44.8, 44.7 };
0118
0119
0120
0121 double ZEffPy8[25] = { 30.9, 32.9, 34.9, 36.0, 37.1, 37.9, 38.6, 39.2, 39.7, 40.1,
0122 40.1,
0123 40.7, 41.0, 41.0, 41.3,
0124 41.4,
0125 41.5, 41.7, 41.7, 41.7, 41.8,
0126 42.1, 42.1, 42.1, 42.1 };
0127
0128
0129
0130
0131
0132 void plotTTbarEff()
0133 {
0134
0135 TCanvas* myc = new TCanvas("myc","", 800, 600);
0136
0137 TLegend* leg = new TLegend(0.6, 0.70, 0.9, 0.9);
0138
0139 TGraph* grTotalEffPy6 = new TGraph( NQCutTTbar, QCutTTbar, TTbarEffPy6 );
0140 grTotalEffPy6->SetTitle("ttbar+jets at 7TeV (MG+Py6/Py8, xqcut=20)" );
0141 grTotalEffPy6->SetMarkerStyle(21);
0142 grTotalEffPy6->SetMarkerSize(1.5);
0143 grTotalEffPy6->SetMarkerColor(kBlue);
0144 grTotalEffPy6->GetYaxis()->SetRangeUser(0.,100.);
0145 grTotalEffPy6->GetXaxis()->SetTitle("qcut");
0146 grTotalEffPy6->GetYaxis()->SetTitle("PS Matching Efficiencvy (%)");
0147 grTotalEffPy6->GetYaxis()->SetTitleOffset(1.5);
0148 grTotalEffPy6->Draw("apl");
0149
0150 TGraph* grTotalEffPy8 = new TGraph( NQCutTTbar, QCutTTbar, TTbarEffPy8 );
0151 grTotalEffPy8->SetMarkerStyle(21);
0152 grTotalEffPy8->SetMarkerSize(1.5);
0153 grTotalEffPy8->SetMarkerColor(kRed);
0154 grTotalEffPy8->GetYaxis()->SetRangeUser(0.,100.);
0155
0156
0157
0158 grTotalEffPy8->Draw("plsame");
0159
0160 leg->AddEntry( grTotalEffPy6, "Total Eff., Pythia6/Z2", "p");
0161 leg->AddEntry( grTotalEffPy8, "Total Eff., Pythia8/4C", "p");
0162 leg->SetFillColor(kWhite);
0163 leg->Draw();
0164
0165 myc->cd();
0166
0167 return;
0168
0169 }
0170
0171 void plotWbbEff()
0172 {
0173
0174 TCanvas* myc = new TCanvas("myc","", 800, 600);
0175
0176 TLegend* leg = new TLegend(0.6, 0.70, 0.9, 0.9);
0177 TGraph* grTotalEffPy6 = new TGraph( NQCutWbb, QCutWbb, WbbEffPy6 );
0178 grTotalEffPy6->SetTitle("Wbb at 8TeV (MG+Py6/Py8, xqcut=10)" );
0179 grTotalEffPy6->SetMarkerStyle(21);
0180 grTotalEffPy6->SetMarkerSize(1.5);
0181 grTotalEffPy6->SetMarkerColor(kBlue);
0182 grTotalEffPy6->GetYaxis()->SetRangeUser(0.,100.);
0183 grTotalEffPy6->GetXaxis()->SetTitle("qcut");
0184 grTotalEffPy6->GetYaxis()->SetTitle("PS Matching Efficiencvy (%)");
0185 grTotalEffPy6->GetYaxis()->SetTitleOffset(1.5);
0186 grTotalEffPy6->Draw("apl");
0187
0188 TGraph* grTotalEffPy8 = new TGraph( NQCutWbb, QCutWbb, WbbEffPy8 );
0189 grTotalEffPy8->SetMarkerStyle(21);
0190 grTotalEffPy8->SetMarkerSize(1.5);
0191 grTotalEffPy8->SetMarkerColor(kRed);
0192 grTotalEffPy8->GetYaxis()->SetRangeUser(0.,100.);
0193
0194
0195
0196 grTotalEffPy8->Draw("plsame");
0197
0198 leg->AddEntry( grTotalEffPy6, "Total Eff., Pythia6/Z2star", "p");
0199 leg->AddEntry( grTotalEffPy8, "Total Eff., Pythia8/4C", "p");
0200 leg->SetFillColor(kWhite);
0201 leg->Draw();
0202
0203 myc->cd();
0204
0205
0206 return;
0207
0208 }
0209
0210 void plotWjetsEff()
0211 {
0212
0213 TCanvas* myc = new TCanvas("myc","", 800, 600);
0214
0215 TLegend* leg = new TLegend(0.6, 0.70, 0.9, 0.9);
0216 TGraph* grTotalEffPy6 = new TGraph( NQCutW, QCutW, WEffPy6 );
0217 grTotalEffPy6->SetTitle("W+jets at 7TeV (MG+Py6/Py8, xqcut=10)" );
0218 grTotalEffPy6->SetMarkerStyle(21);
0219 grTotalEffPy6->SetMarkerSize(1.5);
0220 grTotalEffPy6->SetMarkerColor(kBlue);
0221 grTotalEffPy6->GetYaxis()->SetRangeUser(0.,100.);
0222 grTotalEffPy6->GetXaxis()->SetTitle("qcut");
0223 grTotalEffPy6->GetYaxis()->SetTitle("PS Matching Efficiencvy (%)");
0224 grTotalEffPy6->GetYaxis()->SetTitleOffset(1.5);
0225 grTotalEffPy6->Draw("apl");
0226
0227 TGraph* grTotalEffPy8 = new TGraph( NQCutW, QCutW, WEffPy8 );
0228 grTotalEffPy8->SetMarkerStyle(21);
0229 grTotalEffPy8->SetMarkerSize(1.5);
0230 grTotalEffPy8->SetMarkerColor(kRed);
0231 grTotalEffPy8->GetYaxis()->SetRangeUser(0.,100.);
0232
0233
0234
0235 grTotalEffPy8->Draw("plsame");
0236
0237 leg->AddEntry( grTotalEffPy6, "Total Eff., Pythia6/Z2", "p");
0238 leg->AddEntry( grTotalEffPy8, "Total Eff., Pythia8/4C", "p");
0239 leg->SetFillColor(kWhite);
0240 leg->Draw();
0241
0242 myc->cd();
0243
0244
0245 return;
0246
0247 }
0248
0249 void plotZinclEff()
0250 {
0251
0252 TCanvas* myc = new TCanvas("myc","", 800, 600);
0253
0254 TLegend* leg = new TLegend(0.6, 0.70, 0.9, 0.9);
0255 TGraph* grTotalEffPy6 = new TGraph( NQCutZ, QCutZ, ZEffPy6 );
0256 grTotalEffPy6->SetTitle("Z at 7TeV (MG+Py6/Py8, xqcut=10)" );
0257 grTotalEffPy6->SetMarkerStyle(21);
0258 grTotalEffPy6->SetMarkerSize(1.5);
0259 grTotalEffPy6->SetMarkerColor(kBlue);
0260 grTotalEffPy6->GetYaxis()->SetRangeUser(0.,100.);
0261 grTotalEffPy6->GetXaxis()->SetTitle("qcut");
0262 grTotalEffPy6->GetYaxis()->SetTitle("PS Matching Efficiencvy (%)");
0263 grTotalEffPy6->GetYaxis()->SetTitleOffset(1.5);
0264 grTotalEffPy6->Draw("apl");
0265
0266 TGraph* grTotalEffPy8 = new TGraph( NQCutZ, QCutZ, ZEffPy8 );
0267 grTotalEffPy8->SetMarkerStyle(21);
0268 grTotalEffPy8->SetMarkerSize(1.5);
0269 grTotalEffPy8->SetMarkerColor(kRed);
0270 grTotalEffPy8->GetYaxis()->SetRangeUser(0.,100.);
0271
0272
0273
0274 grTotalEffPy8->Draw("plsame");
0275
0276 leg->AddEntry( grTotalEffPy6, "Total Eff., Pythia6/Z2", "p");
0277 leg->AddEntry( grTotalEffPy8, "Total Eff., Pythia8/4C", "p");
0278 leg->SetFillColor(kWhite);
0279 leg->Draw();
0280
0281 myc->cd();
0282
0283
0284 return;
0285
0286 }