8 |
|
TChain ch_w("ttljets"); |
9 |
|
TChain ch_z("ttljets"); |
10 |
|
TChain ch_qcd("mva/ttljets"); |
11 |
< |
ch_ttbar . Add("tjets_muon-08apr2009.root"); |
11 |
> |
//ch_ttbar . Add("tjets_muon-08apr2009.root"); |
12 |
> |
ch_ttbar . Add("TTJets_Fall08.root"); |
13 |
> |
// |
14 |
|
//ch_w . Add("wjets_muon-08apr2009.root"); |
15 |
|
//ch_z . Add("zjets_muon-08apr2009.root"); |
16 |
|
ch_w . Add("wjets_muon_fastsim-23apr2009.root"); |
53 |
|
|
54 |
|
cout << "Selecting events..." << endl; |
55 |
|
|
56 |
< |
TH1F h1("h1","IP",100,-0.2, 0.2); |
57 |
< |
TH1F h2("h2","IP",100,-0.2, 0.2); |
56 |
> |
//TH1F h1("h1","IP",100,-0.2, 0.2); |
57 |
> |
TH1F h1("h1","PDF weight positive",100,-10.0, 10.0); |
58 |
> |
TH1F h2("h2","PDF weight negative",100,-10.0, 10.0); |
59 |
> |
//TH1F h2("h2","IP",100,-0.2, 0.2); |
60 |
|
TH1F h3("h3","IP",100,-0.2, 0.2); |
61 |
|
TH1F h4("h4","IP",100,-0.2, 0.2); |
62 |
|
h1 . SetFillColor(2); |
65 |
|
h2 . SetFillColor(5); |
66 |
|
|
67 |
|
TCanvas c("canvas", "canvas", 800, 400); |
68 |
+ |
c.Divide(2,1); |
69 |
|
c.GetPad(0)->SetLogy(1); |
70 |
+ |
c.GetPad(1)->SetLogy(1); |
71 |
|
|
72 |
< |
Long64_t n_selected_ttbar = ch_ttbar -> Draw("lepton_d0>>h1", the_cut); |
73 |
< |
Long64_t n_selected_w = ch_w -> Draw("lepton_d0>>h2", the_cut); |
74 |
< |
Long64_t n_selected_z = ch_z -> Draw("lepton_d0>>h3", the_cut); |
75 |
< |
Long64_t n_selected_qcd = ch_qcd -> Draw("lepton_d0>>h4", the_cut); |
72 |
> |
//Long64_t n_selected_ttbar = ch_ttbar -> Draw("weight_pdf_pos>>h1", the_cut); |
73 |
> |
c.cd(1); |
74 |
> |
Long64_t n_selected_ttbar = ch_ttbar -> Draw("((weight_pdf_pos-1.0)/4.69)+1.0>>h1", the_cut); |
75 |
> |
c.cd(2); |
76 |
> |
Long64_t n_selected_ttbar = ch_ttbar -> Draw("1.0-((1.0-weight_pdf_neg)/4.69)>>h2", the_cut); |
77 |
> |
cout << "Selected ttbar events: " << n_selected_ttbar << endl; |
78 |
> |
// |
79 |
> |
//Long64_t n_selected_ttbar = ch_ttbar -> Draw("lepton_d0>>h1", the_cut); |
80 |
> |
//Long64_t n_selected_w = ch_w -> Draw("lepton_d0>>h2", the_cut); |
81 |
> |
//Long64_t n_selected_z = ch_z -> Draw("lepton_d0>>h3", the_cut); |
82 |
> |
//Long64_t n_selected_qcd = ch_qcd -> Draw("lepton_d0>>h4", the_cut); |
83 |
|
|
84 |
+ |
|
85 |
+ |
/* |
86 |
|
double eff_sel_ttbar = (double)n_selected_ttbar/(double)n_processed_ttbar; |
87 |
|
double eff_sel_w = (double)n_selected_w/(double)n_processed_w; |
88 |
|
double eff_sel_z = (double)n_selected_z/(double)n_processed_z; |
95 |
|
|
96 |
|
double n_expected_all = n_expected_ttbar + n_expected_w + n_expected_z + n_expected_qcd; |
97 |
|
double n_expected_phys = n_expected_ttbar + n_expected_w + n_expected_z; |
98 |
< |
|
98 |
> |
*/ |
99 |
> |
//h1.Draw(); |
100 |
|
|
101 |
|
/* |
102 |
|
TH1F h_id("h_id","Track Isolation",60,0, 60); |