ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/root/qcd_purity.C
Revision: 1.1
Committed: Fri Feb 13 00:53:03 2009 UTC (16 years, 3 months ago) by kukartse
Content type: text/plain
Branch: MAIN
CVS Tags: gak021209
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 kukartse 1.1 { gROOT->SetStyle("Plain");
2     gStyle->SetOptStat(0000);
3     gStyle->SetPalette(1);
4    
5     TChain ch_ttbar("ttljets");
6     TChain ch_w("ttljets");
7     TChain ch_z("ttljets");
8     TChain ch_qcd("ttljets");
9     ch_ttbar . Add("/uscms/home/kukarzev/work/disk_ljmet/MVA/Summer08/Jan_23_2009/PAT_Layer1/TTJets-madgraph_Fall08_IDEAL_V9_v1_GEN-SIM-RECO/secondary/ljmet_tmva_ttjets-06feb2009.root");
10     ch_w . Add("/uscms/home/kukarzev/work/disk_ljmet/MVA/Summer08/Jan_23_2009/PAT_Layer1/WJets-madgraph_Fall08_IDEAL_V9_v1_GEN-SIM-RECO/secondary/ljmet_tmva_wjets-06feb2009.root");
11     ch_z . Add("/uscms/home/kukarzev/work/disk_ljmet/MVA/Summer08/Jan_23_2009/PAT_Layer1/ZJets-madgraph_Fall08_IDEAL_V9_v1_GEN-SIM-RECO/secondary/ljmet_tmva_zjets-06feb2009.root");
12     ch_qcd . Add("/uscms/home/kukarzev/work/disk_ljmet/kukarzev/tmp/ljmet_tmva_InclusiveMuPt15-12feb2009.root");
13    
14     #include "cuts.C"
15    
16     TCut nom_cut = semilep_cut && reversible_cut;
17     TCut rev_cut = semilep_cut && !reversible_cut;
18    
19     the_cut = rev_cut;
20    
21     double lumi = 100.0;
22    
23     double xsec_ttbar = 317.0;
24     double xsec_w = 40000.0;
25     double xsec_z = 3700.0;
26     double xsec_qcd = 14000000.0;
27    
28     double eff_gen_ttbar = 1.0;
29     double eff_gen_w = 1.0;
30     double eff_gen_z = 1.0;
31     double eff_gen_qcd = 0.02;
32    
33     Long64_t n_processed_ttbar = 1002347;
34     Long64_t n_processed_w = 9862233;
35     Long64_t n_processed_z = 1227404;
36     Long64_t n_processed_qcd = 6212692;
37    
38     cout << "Selecting events..." << endl;
39     Long64_t n_selected_ttbar = ch_ttbar -> Draw("event", the_cut);
40     Long64_t n_selected_w = ch_w -> Draw("event", the_cut);
41     Long64_t n_selected_z = ch_z -> Draw("event", the_cut);
42     Long64_t n_selected_qcd = ch_qcd -> Draw("event", the_cut);
43    
44     double eff_sel_ttbar = (double)n_selected_ttbar/(double)n_processed_ttbar;
45     double eff_sel_w = (double)n_selected_w/(double)n_processed_w;
46     double eff_sel_z = (double)n_selected_z/(double)n_processed_z;
47     double eff_sel_qcd = (double)n_selected_qcd/(double)n_processed_qcd;
48    
49     double n_expected_ttbar = xsec_ttbar * eff_gen_ttbar * eff_sel_ttbar * lumi;
50     double n_expected_w = xsec_w * eff_gen_w * eff_sel_w * lumi;
51     double n_expected_z = xsec_z * eff_gen_z * eff_sel_z * lumi;
52     double n_expected_qcd = xsec_qcd * eff_gen_qcd * eff_sel_qcd * lumi;
53    
54     double n_expected_all = n_expected_ttbar + n_expected_w + n_expected_z + n_expected_qcd;
55     double n_expected_phys = n_expected_ttbar + n_expected_w + n_expected_z;
56    
57     cout << endl << "Selection efficiency, ttbar events: " << eff_sel_ttbar << endl;
58     cout << "Expected ttbar events: " << n_expected_ttbar << endl;
59     cout << endl << "Selection efficiency, w events: " << eff_sel_w << endl;
60     cout << "Expected w events: " << n_expected_w << endl;
61     cout << endl << "Selection efficiency, z events: " << eff_sel_z << endl;
62     cout << "Expected z events: " << n_expected_z << endl;
63     cout << endl << "Selection efficiency, qcd events: " << eff_sel_qcd << endl;
64     cout << "Expected qcd events: " << n_expected_qcd << endl;
65    
66     cout << endl << "Total events expected: " << n_expected_all << endl;
67     cout << "Ttbar,W,Z+jets events expected: " << n_expected_phys << endl;
68    
69    
70    
71     }
72    
73