ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/root/plot.C
Revision: 1.2
Committed: Wed May 6 08:04:29 2009 UTC (16 years ago) by kukartse
Content type: text/plain
Branch: MAIN
CVS Tags: V00-01-14, V00-01-13
Changes since 1.1: +84 -35 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 kukartse 1.2 { gROOT->SetStyle("Plain");
2     gStyle->SetOptStat(0000);
3     gStyle->SetPalette(1);
4    
5     TChain ch_ttbar("mva/ttljets");
6     //TChain ch_w("mva/ttljets");
7     //TChain ch_z("mva/ttljets");
8     TChain ch_w("ttljets");
9     TChain ch_z("ttljets");
10     TChain ch_qcd("mva/ttljets");
11     ch_ttbar . Add("tjets_muon-08apr2009.root");
12     //ch_w . Add("wjets_muon-08apr2009.root");
13     //ch_z . Add("zjets_muon-08apr2009.root");
14     ch_w . Add("wjets_muon_fastsim-23apr2009.root");
15     ch_z . Add("zjets_muon_fastsim-23apr2009.root");
16     ch_qcd . Add("qcd_muon-08apr2009.root");
17    
18     #include "cuts.C"
19    
20     //reversible_cut = "lepton_pt/(lepton_pt + lepton_calo_iso) > 0.9";
21     //reversible_cut = "lepton_pt/(lepton_pt + lepton_track_iso) > 0.9";
22    
23     TCut nom_cut = semilep_cut && reversible_cut;
24     TCut rev_cut = semilep_cut && !reversible_cut;
25    
26     //the_cut = "";
27     //the_cut = cut3;
28     //the_cut = cut3_rev;
29     //the_cut = cut3_qcd;
30     the_cut = cut4;
31    
32     double lumi = 20.0;
33    
34     double xsec_ttbar = 317.0;
35     double xsec_w = 40000.0;
36     double xsec_z = 3700.0;
37     double xsec_qcd = 0.5091e+9;
38    
39     double eff_gen_ttbar = 1.0;
40     double eff_gen_w = 1.0;
41     double eff_gen_z = 1.0;
42     double eff_gen_qcd = 0.000239;
43    
44     Long64_t n_processed_ttbar = 1018924;
45     //Long64_t n_processed_w = 9984223; // FIXME not precise fullsim
46     //Long64_t n_processed_z = 1163479; //PAT: 236345
47     Long64_t n_processed_w = 101467739;
48     Long64_t n_processed_z = 9679459; // PAT: 2000116
49     //Long64_t n_processed_qcd = 3889924; // ~half of the processed set
50     Long64_t n_processed_qcd = 6142581; // PAT: 1282829
51    
52     cout << "Selecting events..." << endl;
53    
54     TH1F h1("h1","IP",100,-0.2, 0.2);
55     TH1F h2("h2","IP",100,-0.2, 0.2);
56     TH1F h3("h3","IP",100,-0.2, 0.2);
57     TH1F h4("h4","IP",100,-0.2, 0.2);
58     h1 . SetFillColor(2);
59     h2 . SetFillColor(3);
60     h2 . SetFillColor(4);
61     h2 . SetFillColor(5);
62 kukartse 1.1
63 kukartse 1.2 TCanvas c("canvas", "canvas", 800, 400);
64     c.GetPad(0)->SetLogy(1);
65    
66     Long64_t n_selected_ttbar = ch_ttbar -> Draw("lepton_d0>>h1", the_cut);
67     Long64_t n_selected_w = ch_w -> Draw("lepton_d0>>h2", the_cut);
68     Long64_t n_selected_z = ch_z -> Draw("lepton_d0>>h3", the_cut);
69     Long64_t n_selected_qcd = ch_qcd -> Draw("lepton_d0>>h4", the_cut);
70    
71     double eff_sel_ttbar = (double)n_selected_ttbar/(double)n_processed_ttbar;
72     double eff_sel_w = (double)n_selected_w/(double)n_processed_w;
73     double eff_sel_z = (double)n_selected_z/(double)n_processed_z;
74     double eff_sel_qcd = (double)n_selected_qcd/(double)n_processed_qcd;
75    
76     double n_expected_ttbar = xsec_ttbar * eff_gen_ttbar * eff_sel_ttbar * lumi;
77     double n_expected_w = xsec_w * eff_gen_w * eff_sel_w * lumi;
78     double n_expected_z = xsec_z * eff_gen_z * eff_sel_z * lumi;
79     double n_expected_qcd = xsec_qcd * eff_gen_qcd * eff_sel_qcd * lumi;
80    
81     double n_expected_all = n_expected_ttbar + n_expected_w + n_expected_z + n_expected_qcd;
82     double n_expected_phys = n_expected_ttbar + n_expected_w + n_expected_z;
83    
84 kukartse 1.1
85 kukartse 1.2 /*
86 kukartse 1.1 TH1F h_id("h_id","Track Isolation",60,0, 60);
87     h_id . SetFillColor(2);
88    
89    
90     TH1F h_calo_iso("h_calo_iso","Calorimeter Isolation",100,0, 6);
91     TH1F h_calo_iso_2("h_calo_iso_2","Calorimeter Isolation",100,0, 6);
92     h_calo_iso . SetFillColor(2);
93     h_calo_iso_2 . SetFillColor(3);
94    
95     TH1F h_apl("h_apl","Aplanarity",100,0, 0.5);
96     TH1F h_apl_2("h_apl_2","Aplanarity",100,0, 0.5);
97     h_apl . SetFillColor(2);
98     h_apl_2 . SetFillColor(3);
99    
100     TH1F h_et3("h_et3","Et3",100,0, 300);
101     TH1F h_et3_2("h_et3_2","Et3",100,0, 300);
102     h_et3 . SetFillColor(2);
103     h_et3_2 . SetFillColor(3);
104    
105     TH1F h_ht2p("h_ht2p","Ht2p",100,0, 3);
106     TH1F h_ht2p_2("h_ht2p_2","Ht2p",100,0, 3);
107     h_ht2p . SetFillColor(2);
108     h_ht2p_2 . SetFillColor(3);
109    
110     TH1F h_sphericity("h_sphericity","Sphericity",100,0, 1);
111     TH1F h_sphericity_2("h_sphericity_2","Sphericity",100,0, 1);
112     h_sphericity . SetFillColor(2);
113     h_sphericity_2 . SetFillColor(3);
114    
115     //TCanvas c("canvas", "canvas", 770, 595);
116    
117     //chain . Draw("process_id>>h_id", weight);
118     //chain . Draw("process_id>>h_id_2", weight*sig_cut, "same");
119     h_id . SetMarkerSize(1.5);
120     chain . Draw("process_id>>h_id", weight, "TEXT");
121 kukartse 1.2 */
122 kukartse 1.1 }