ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/root/draw_templates.C
Revision: 1.3
Committed: Tue May 5 19:18:53 2009 UTC (16 years ago) by kukartse
Content type: text/plain
Branch: MAIN
CVS Tags: V00-03-01, ZMorph_BASE_20100408, gak040610_morphing, V00-02-02, gak011410, gak010310, ejterm2010_25nov2009, V00-02-01, V00-02-00, gak112409, CMSSW_22X_branch_base, segala101609, V00-01-15, V00-01-14, V00-01-13, HEAD
Branch point for: ZMorph-V00-03-01, CMSSW_22X_branch
Changes since 1.2: +2 -2 lines
Error occurred while calculating annotation data.
Log Message:
*** empty log message ***

File Contents

# Content
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
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 //ttbar->Draw();
45
46 //wzjets->Draw();
47
48 qcd->Draw();
49 }