1 |
kukartse |
1.1 |
{
|
2 |
kukartse |
1.2 |
//
|
3 |
|
|
//_____ muon + jets _______________________________________________
|
4 |
|
|
//
|
5 |
|
|
//TFile * data_file = new TFile("./TMVApp-data-27apr2009.root","READ");
|
6 |
|
|
//TFile * ttbar_phys_template_file = new TFile("./TMVA.root","READ");
|
7 |
|
|
//TFile * qcd_template_file = new TFile("./TMVApp-qcd-27apr2009.root","READ");
|
8 |
|
|
//
|
9 |
|
|
//_____ electron + jets _______________________________________________
|
10 |
|
|
//
|
11 |
|
|
TFile * data_file = new TFile("./TMVApp-data-wzfastsim-electron-01may2009.root","READ");
|
12 |
|
|
TFile * ttbar_phys_template_file = new TFile("./TMVA-el.root","READ");
|
13 |
|
|
TFile * qcd_template_file = new TFile("./TMVApp-qcd-electron-01may2009.root","READ");
|
14 |
kukartse |
1.1 |
|
15 |
|
|
TTree * t_data = data_file->Get("classifier");
|
16 |
|
|
TTree * t_ttbar_phys = ttbar_phys_template_file->Get("TestTree");
|
17 |
|
|
TTree * t_qcd = qcd_template_file->Get("classifier");
|
18 |
|
|
|
19 |
|
|
TH1F * data = new TH1F("data" ,"data" ,50, -0.9, 0.9);
|
20 |
|
|
TH1F * ttbar = new TH1F("ttbar" ,"ttbar" ,50, -0.9, 0.9);
|
21 |
|
|
TH1F * wzjets = new TH1F("wzjets","wzjets",50, -0.9, 0.9);
|
22 |
|
|
TH1F * qcd = new TH1F("qcd" ,"qcd" ,50, -0.9, 0.9);
|
23 |
|
|
|
24 |
|
|
int n_data = t_data->GetEntries();
|
25 |
|
|
|
26 |
|
|
t_data . Draw("MVA_BDT>>data");
|
27 |
|
|
t_ttbar_phys . Draw("MVA_BDT>>ttbar","type==1");
|
28 |
|
|
t_ttbar_phys . Draw("MVA_BDT>>wzjets","type==0");
|
29 |
|
|
t_qcd . Draw("MVA_BDT>>qcd");
|
30 |
|
|
|
31 |
|
|
//
|
32 |
|
|
//_____ set underflow and overflow bins _______________________________
|
33 |
|
|
//
|
34 |
|
|
//ttbar->AddBinContent(1,ttbar->GetBinContent(0));
|
35 |
|
|
//Int_t _last_bin = ttbar->GetNbinsX();
|
36 |
|
|
//Double_t _overflow = ttbar->GetBinContent(_last_bin+1);
|
37 |
|
|
//ttbar->AddBinContent(_last_bin,_overflow);
|
38 |
|
|
toyMC toy;
|
39 |
|
|
toy.set_overflow_bins(data);
|
40 |
|
|
toy.set_overflow_bins(ttbar);
|
41 |
|
|
toy.set_overflow_bins(wzjets);
|
42 |
|
|
toy.set_overflow_bins(qcd);
|
43 |
|
|
|
44 |
kukartse |
1.3 |
//ttbar->Draw();
|
45 |
kukartse |
1.1 |
|
46 |
|
|
//wzjets->Draw();
|
47 |
|
|
|
48 |
kukartse |
1.3 |
qcd->Draw();
|
49 |
kukartse |
1.1 |
}
|