5 |
|
import sys, os |
6 |
|
from optparse import OptionParser |
7 |
|
from copy import copy,deepcopy |
8 |
< |
from math import sqrt |
8 |
> |
from math import sqrt, log10 |
9 |
|
ROOT.gROOT.SetBatch(True) |
10 |
+ |
from myutils import TdrStyles |
11 |
|
|
12 |
|
#CONFIGURE |
13 |
|
argv = sys.argv |
18 |
|
help="figure of merit to be used to weight the plots. Possibilities: s/b, s/sqrt(b)") |
19 |
|
parser.add_option("-C", "--config", dest="config", default=[], action="append", |
20 |
|
help="configuration file") |
21 |
< |
parser.add_option("-S", "--subtructed", dest="sub", default="False", |
22 |
< |
help="subtruction plot") |
23 |
< |
parser.add_option("-L", "--rescale", dest="rescale", default="False", |
21 |
> |
parser.add_option("-S", "--subtracted", dest="sub", default="False", |
22 |
> |
help="subtracted plot") |
23 |
> |
parser.add_option("-L", "--rescale", dest="rescale", default="True", |
24 |
|
help="rescale by 1/max_weight") |
25 |
+ |
parser.add_option("-T", "--type", dest="type", default="mjj", |
26 |
+ |
help="type of plot you want to make: mjj, log10") |
27 |
+ |
parser.add_option("-F", "--format", dest="format", default="pdf", |
28 |
+ |
help="outut format for the plot: pdf, root, png, C, jpg, etc.") |
29 |
+ |
|
30 |
|
|
31 |
|
(opts, args) = parser.parse_args(argv) |
32 |
|
if opts.config =="": |
38 |
|
opts.config.append('8TeVconfig/vhbbPlotDef.ini') |
39 |
|
config = BetterConfigParser() |
40 |
|
config.read(opts.config) |
41 |
+ |
TdrStyles.tdrStyle() |
42 |
+ |
|
43 |
|
|
44 |
< |
def get_s_over_b(fName): |
37 |
< |
#using bin 9, 10, 11 |
44 |
> |
def get_s_or_b(fName,binmin,binmax,sb): |
45 |
|
s=0 |
46 |
|
b=0 |
47 |
< |
histos = get_th1(fName) |
47 |
> |
if isinstance(fName,str): |
48 |
> |
histos = get_th1(fName) |
49 |
> |
else: |
50 |
> |
histos = [fName] |
51 |
|
for histo in histos: |
52 |
|
if 'data' in histo.GetName(): continue |
53 |
< |
for i in range(7,9): |
53 |
> |
for i in range(binmin,binmax+1): |
54 |
|
if 'VH' in histo.GetName(): |
55 |
|
s+=histo.GetBinContent(i) |
56 |
|
else: |
57 |
|
b+=histo.GetBinContent(i) |
58 |
+ |
if 's' in sb: |
59 |
+ |
return s |
60 |
+ |
else: |
61 |
+ |
return b |
62 |
+ |
|
63 |
+ |
def get_s_over_b(fName,binmin,binmax): |
64 |
+ |
s = get_s_or_b(fName,binmin,binmax,'s') |
65 |
+ |
b = get_s_or_b(fName,binmin,binmax,'b') |
66 |
|
return s/b |
67 |
|
|
68 |
< |
def get_s_over_sb(fName): |
69 |
< |
#using bin 9, 10, 11 |
70 |
< |
s=0 |
53 |
< |
b=0 |
54 |
< |
histos = get_th1(fName) |
55 |
< |
for histo in histos: |
56 |
< |
if 'data' in histo.GetName(): continue |
57 |
< |
for i in range(7,9): |
58 |
< |
if 'VH' in histo.GetName(): |
59 |
< |
s+=histo.GetBinContent(i) |
60 |
< |
else: |
61 |
< |
b+=histo.GetBinContent(i) |
68 |
> |
def get_s_over_sb(fName,binmin,binmax): |
69 |
> |
s = get_s_or_b(fName,binmin,binmax,'s') |
70 |
> |
b = get_s_or_b(fName,binmin,binmax,'b') |
71 |
|
return s/(s+b) |
72 |
|
|
64 |
– |
|
73 |
|
def get_th1(fName): |
74 |
|
infile = ROOT.TFile.Open(fName,'read') |
75 |
|
th1 = [] |
78 |
|
th1.append(key.ReadObj()) |
79 |
|
return th1 |
80 |
|
|
73 |
– |
def plot(): |
74 |
– |
signalRegion = True |
75 |
– |
region = 'plot' |
76 |
– |
var = 'Hmass' |
81 |
|
|
82 |
< |
stack = StackMaker(config,var,region,signalRegion) |
82 |
> |
def log_s_over_b(fileList): |
83 |
> |
#-------------- |
84 |
> |
# log s over b |
85 |
> |
#-------------- |
86 |
|
|
87 |
+ |
histosL={} |
88 |
+ |
s_b_d_histos = {} |
89 |
+ |
for file in fileList: |
90 |
+ |
print file |
91 |
+ |
name = '%s' %file |
92 |
+ |
histosL[name] = [] |
93 |
+ |
for th1 in get_th1(file): |
94 |
+ |
#th1.Sumw2() |
95 |
+ |
if 'VVLF' in th1.GetName(): |
96 |
+ |
th1.SetName('VV') |
97 |
+ |
if 'Zj1b' in th1.GetName(): |
98 |
+ |
th1.SetName('Zj2b') |
99 |
+ |
if 'Wj1b' in th1.GetName(): |
100 |
+ |
th1.SetName('Wj2b') |
101 |
+ |
histosL[name].append(th1) |
102 |
+ |
i = 0 |
103 |
+ |
for hist in histosL[name]: |
104 |
+ |
if 'VH' in hist.GetName() and not 'VVHF' in hist.GetName(): |
105 |
+ |
hSignal = hist.Clone() |
106 |
+ |
elif 'data_obs' in hist.GetName(): |
107 |
+ |
hData = hist.Clone() |
108 |
+ |
else: |
109 |
+ |
if i == 0: |
110 |
+ |
hBkg = hist.Clone() |
111 |
+ |
else: |
112 |
+ |
hBkg.Add(hist) |
113 |
+ |
i += 1 |
114 |
+ |
s_b_d_histos[name] = {'b': hBkg, 's': hSignal, 'd': hData} |
115 |
+ |
|
116 |
+ |
|
117 |
+ |
bmin=-4 |
118 |
+ |
bmax=0 |
119 |
+ |
nbins=16 |
120 |
+ |
|
121 |
+ |
log_s_over_b_b = ROOT.TH1F("log_s_over_b_b","log_s_over_b_b",nbins,bmin,bmax) |
122 |
+ |
log_s_over_b_b.SetFillColor(4) |
123 |
+ |
log_s_over_b_b.GetXaxis().SetTitle("log(S/B)") |
124 |
+ |
log_s_over_b_b.GetYaxis().SetTitle("Events") |
125 |
+ |
log_s_over_b_s = ROOT.TH1F("log_s_over_b_s","log_s_over_b_s",nbins,bmin,bmax) |
126 |
+ |
log_s_over_b_s.SetFillColor(2) |
127 |
+ |
log_s_over_b_d = ROOT.TH1F("log_s_over_b_d","log_s_over_b_d",nbins,bmin,bmax) |
128 |
+ |
log_s_over_b = ROOT.THStack("log_s_over_b","log_s_over_b") |
129 |
+ |
|
130 |
+ |
stack_log_s_over_b = ROOT.THStack("stack_log_s_over_b","stack_log_s_over_b") |
131 |
+ |
|
132 |
+ |
for key, s_b_d in s_b_d_histos.iteritems(): |
133 |
+ |
for bin in range(0,s_b_d['b'].GetNbinsX()+1): |
134 |
+ |
s = s_b_d['s'].GetBinContent(bin) |
135 |
+ |
b = s_b_d['b'].GetBinContent(bin) |
136 |
+ |
d = s_b_d['d'].GetBinContent(bin) |
137 |
+ |
sErr = s_b_d['s'].GetBinError(bin) |
138 |
+ |
bErr = s_b_d['b'].GetBinError(bin) |
139 |
+ |
dErr = s_b_d['d'].GetBinError(bin) |
140 |
+ |
logsb = -3.9 |
141 |
+ |
if b > 0. and s > 0.: |
142 |
+ |
logsb = log10(s/b) |
143 |
+ |
elif s > 0.: |
144 |
+ |
logsb = -0. |
145 |
+ |
#print logsb |
146 |
+ |
newBin = log_s_over_b_b.FindBin(logsb) |
147 |
+ |
log_s_over_b_b.SetBinContent(newBin, b+log_s_over_b_b.GetBinContent(newBin)) |
148 |
+ |
log_s_over_b_s.SetBinContent(newBin, s+log_s_over_b_s.GetBinContent(newBin)) |
149 |
+ |
log_s_over_b_d.SetBinContent(newBin, d+log_s_over_b_d.GetBinContent(newBin)) |
150 |
+ |
log_s_over_b_b.SetBinError(newBin, sqrt(bErr*bErr+log_s_over_b_b.GetBinError(newBin)*log_s_over_b_b.GetBinError(newBin))) |
151 |
+ |
log_s_over_b_s.SetBinError(newBin, sqrt(sErr*sErr+log_s_over_b_s.GetBinError(newBin)*log_s_over_b_s.GetBinError(newBin))) |
152 |
+ |
log_s_over_b_d.SetBinError(newBin, sqrt(dErr*dErr+log_s_over_b_d.GetBinError(newBin)*log_s_over_b_d.GetBinError(newBin))) |
153 |
+ |
|
154 |
+ |
stack = StackMaker(config,'logSB','plot1',False) |
155 |
+ |
stack.setup = ['VH','BKG'] |
156 |
+ |
stack.typs = ['VH','BKG'] |
157 |
+ |
stack.lumi = 19000. |
158 |
+ |
stack.histos = [log_s_over_b_s,log_s_over_b_b] |
159 |
+ |
stack.datas = [log_s_over_b_d] |
160 |
+ |
stack.datanames='data_obs' |
161 |
+ |
stack.overlay = log_s_over_b_s |
162 |
+ |
stack.doPlot() |
163 |
|
|
81 |
– |
fileList = [] |
164 |
|
|
165 |
< |
#MedPt |
166 |
< |
fileList += [ '/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZmmMedPt_PostFit_s.root', |
167 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZeeMedPt_PostFit_s.root', |
168 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Znn_MedPt_ZnunuMedPt_8TeV_PostFit_s.root', |
87 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch2_Wmunu2_PostFit_s.root'] |
88 |
< |
#LowPt |
89 |
< |
fileList += [ '/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Znn_LowPt_ZnunuLowPt_8TeV_PostFit_s.root', |
90 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZmmLowPt_PostFit_s.root', |
91 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZeeLowPt_PostFit_s.root', |
92 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch1_Wenu_PostFit_s.root', |
93 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch2_Wmunu_PostFit_s.root'] |
94 |
< |
#highPt |
95 |
< |
fileList += [ '/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch1_WenuHighPt_PostFit_s.root', |
96 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZeeHighPt_PostFit_s.root', |
97 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Znn_HighPt_ZnunuHighPt_8TeV_PostFit_s.root', |
98 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch2_WmunuHighPt_PostFit_s.root', |
99 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZmmHighPt_PostFit_s.root', |
100 |
< |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wtn_Wtn_PostFit_s.root'] |
101 |
< |
|
102 |
< |
# 7tev |
103 |
< |
fileList += ['ZeeLowPt_7TeV.root','ZmmLowPt_7TeV.root','WmnLowPt_7TeV.root','ZnnLowPt_7TeV.root'] |
104 |
< |
fileList += ['ZeeHighPt_7TeV.root','ZmmHighPt_7TeV.root','WmnHighPt_7TeV.root','ZnnHighPt_7TeV.root'] |
165 |
> |
def plot(fileList): |
166 |
> |
signalRegion = True |
167 |
> |
region = 'plot' |
168 |
> |
var = 'Hmass' |
169 |
|
|
170 |
+ |
stack = StackMaker(config,var,region,signalRegion) |
171 |
|
|
172 |
|
histosL = [] |
173 |
+ |
overlayL = [] |
174 |
|
|
175 |
+ |
#7-9 for the higgs |
176 |
+ |
#5-6 for the VV |
177 |
+ |
binmin=7 |
178 |
+ |
binmax=9 |
179 |
+ |
|
180 |
|
max_sb = 0 |
181 |
|
max_ssb = 0 |
182 |
|
for file in fileList: |
183 |
< |
if max_sb < get_s_over_b(file): |
184 |
< |
max_sb = get_s_over_b(file) |
185 |
< |
if max_ssb < get_s_over_sb(file): |
186 |
< |
max_ssb = get_s_over_sb(file) |
183 |
> |
if max_sb < get_s_over_b(file,binmin,binmax): |
184 |
> |
max_sb = get_s_over_b(file,binmin,binmax) |
185 |
> |
if max_ssb < get_s_over_sb(file,binmin,binmax): |
186 |
> |
max_ssb = get_s_over_sb(file,binmin,binmax) |
187 |
|
|
188 |
|
print max_ssb |
189 |
|
print max_sb |
190 |
|
|
191 |
|
for file in fileList: |
192 |
|
print file |
193 |
< |
print get_s_over_b(file) |
193 |
> |
print get_s_over_b(file,binmin,binmax) |
194 |
|
if eval(opts.rescale) == False: |
195 |
|
max_sb = 1. |
196 |
|
max_ssb = 1. |
197 |
|
for th1 in get_th1(file): |
198 |
< |
th1.Sumw2() |
198 |
> |
#th1.Sumw2() |
199 |
|
if 's/b' in opts.fom: |
200 |
< |
th1.Scale(get_s_over_b(file)/max_sb) |
201 |
< |
elif 's/s+b' in opts.fom: |
202 |
< |
th1.Scale(get_s_over_sb(file)/max_ssb) |
200 |
> |
th1.Scale(get_s_over_b(file,binmin,binmax)/max_sb) |
201 |
> |
if 's/s+b' in opts.fom: |
202 |
> |
th1.Scale(get_s_over_sb(file,binmin,binmax)/max_ssb) |
203 |
|
if 'VV' in th1.GetName(): |
204 |
|
th1.SetName('VV') |
205 |
+ |
if 'Zj1b' in th1.GetName(): |
206 |
+ |
th1.SetName('Zj2b') |
207 |
+ |
if 'Wj1b' in th1.GetName(): |
208 |
+ |
th1.SetName('Wj2b') |
209 |
+ |
# new stack for the overlay plot |
210 |
+ |
if 'VH' in th1.GetName() or 'VV' in th1.GetName(): |
211 |
+ |
overlayL.append(th1) |
212 |
|
histosL.append(th1) |
213 |
|
|
214 |
|
print 'histoL' |
218 |
|
datas = [] |
219 |
|
datasL = [] |
220 |
|
|
221 |
+ |
overlay_typs=[] |
222 |
+ |
|
223 |
|
#append the name just once |
224 |
|
for histo in histosL: |
225 |
|
typsL.append(histo.GetName()) |
226 |
|
if 'data' in histo.GetName(): |
227 |
< |
datasL.append(histo) |
227 |
> |
datasL.append(histo) |
228 |
> |
if 'VH' in histo.GetName() or 'VV' in histo.GetName(): |
229 |
> |
overlay_typs.append(histo.GetName()) |
230 |
|
|
231 |
|
#datasL.append(datas) |
232 |
|
#typsL.append(typs) |
233 |
|
print typsL |
234 |
< |
|
234 |
> |
print 'Overlay list' |
235 |
> |
print overlayL |
236 |
> |
|
237 |
> |
overlay_histo_dict = HistoMaker.orderandadd([{overlay_typs[i]:overlayL[i]} for i in range(len(overlayL))],['VH','VV']) |
238 |
> |
|
239 |
> |
overlayL2=[] |
240 |
|
stack.histos = histosL |
241 |
|
stack.typs = typsL |
242 |
|
stack.datas = datasL |
243 |
|
# stack.datatyps = Ldatatyps[v] |
244 |
|
stack.datanames='data_obs' |
245 |
< |
#if signalRegion: |
246 |
< |
# stack.overlay = ['VH','VVHF','VVLF'] |
160 |
< |
# stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_preFit.pdf') |
245 |
> |
for key in overlay_histo_dict: |
246 |
> |
overlayL2.append(overlay_histo_dict[key]) |
247 |
|
|
248 |
+ |
mjj_sub = eval(opts.sub) |
249 |
+ |
if not mjj_sub: |
250 |
+ |
stack.overlay = overlayL2 |
251 |
+ |
|
252 |
|
appendix = '' |
253 |
|
if(eval(opts.rescale) == True): |
254 |
|
appendix = '_rescaled_' |
255 |
|
|
256 |
|
if 's/s+b' in opts.fom: |
257 |
< |
stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_combined78tev_postFit_s_over_sb'+appendix+'.pdf') |
257 |
> |
stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_combined78tev_postFit_s_over_sb'+appendix+'.'+opts.format) |
258 |
|
elif 's/b' in opts.fom: |
259 |
< |
stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_combined78tev_postFit_s_over_b'+appendix+'.pdf') |
259 |
> |
stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_combined78tev_postFit_s_over_b'+appendix+'.'+opts.format) |
260 |
|
else: |
261 |
< |
stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_unweighted.pdf') |
261 |
> |
stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_unweighted.'+opts.format) |
262 |
|
|
263 |
|
# stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_highPt_7tev.pdf') |
264 |
|
# stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_combined_postFit_s_over_b_Hpt_weight_1.pdf' |
265 |
|
stack.lumi = 19040 |
176 |
– |
|
177 |
– |
|
178 |
– |
mjj_sub = eval(opts.sub) |
266 |
|
|
267 |
|
if mjj_sub == False: |
268 |
|
stack.doPlot() |
269 |
|
elif mjj_sub == True: |
270 |
< |
stack.options['pdfName'] = stack.options['pdfName'].replace('.pdf','_subtracted.pdf') |
270 |
> |
stack.options['pdfName'] = stack.options['pdfName'].replace('.'+opts.format,'_subtracted.'+opts.format) |
271 |
|
stack.doSubPlot(['VH','VV']) |
272 |
|
print 'i am done!\n' |
273 |
|
|
274 |
|
|
275 |
< |
plot() |
275 |
> |
|
276 |
> |
|
277 |
> |
|
278 |
> |
########################## |
279 |
> |
#### ____ main _____ ##### |
280 |
> |
########################## |
281 |
> |
fileList = [] |
282 |
> |
fileList += [ '/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZmmMedPt_PostFit_s.root', |
283 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZeeMedPt_PostFit_s.root', |
284 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Znn_MedPt_ZnunuMedPt_8TeV_PostFit_s.root', |
285 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch2_Wmunu2_PostFit_s.root'] |
286 |
> |
#LowPt |
287 |
> |
fileList += [ '/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Znn_LowPt_ZnunuLowPt_8TeV_PostFit_s.root', |
288 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZmmLowPt_PostFit_s.root', |
289 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZeeLowPt_PostFit_s.root', |
290 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch1_Wenu_PostFit_s.root', |
291 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch2_Wmunu_PostFit_s.root'] |
292 |
> |
#highPt |
293 |
> |
fileList += [ '/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch1_WenuHighPt_PostFit_s.root', |
294 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZeeHighPt_PostFit_s.root', |
295 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Znn_HighPt_ZnunuHighPt_8TeV_PostFit_s.root', |
296 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wln_ch2_WmunuHighPt_PostFit_s.root', |
297 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Zll_ZmmHighPt_PostFit_s.root', |
298 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_v0.1/MJJ_Wtn_Wtn_PostFit_s.root'] |
299 |
> |
|
300 |
> |
# 7tev |
301 |
> |
fileList += ['ZeeLowPt_7TeV.root','ZmmLowPt_7TeV.root','WmnLowPt_7TeV.root','ZnnLowPt_7TeV.root'] |
302 |
> |
fileList += ['ZeeHighPt_7TeV.root','ZmmHighPt_7TeV.root','WmnHighPt_7TeV.root','ZnnHighPt_7TeV.root'] |
303 |
> |
|
304 |
> |
|
305 |
> |
bdt_fileList = [] |
306 |
> |
# 7tev |
307 |
> |
#bdt_fileList += ['ZeeLowPt_7TeV.root','ZmmLowPt_7TeV.root','WmnLowPt_7TeV.root','ZnnLowPt_7TeV.root'] |
308 |
> |
#bdt_fileList += ['ZeeHighPt_7TeV.root','ZmmHighPt_7TeV.root','WmnHighPt_7TeV.root','ZnnHighPt_7TeV.root'] |
309 |
> |
|
310 |
> |
bdt_fileList+=[ |
311 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Wln_ch1_Wenu2_PostFit_s.root', |
312 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Wln_ch1_Wenu3_PostFit_s.root', |
313 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Wln_ch1_Wenu_PostFit_s.root', |
314 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Wln_ch2_Wmunu2_PostFit_s.root', |
315 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Wln_ch2_Wmunu3_PostFit_s.root', |
316 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Wln_ch2_Wmunu_PostFit_s.root', |
317 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Wtn_Wtn_PostFit_s.root', |
318 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Zll_ZeeHighPt_PostFit_s.root', |
319 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Zll_ZeeLowPt_PostFit_s.root', |
320 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Zll_ZmmHighPt_PostFit_s.root', |
321 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Zll_ZmmLowPt_PostFit_s.root', |
322 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Znn_HighPt_ZnunuHighPt_8TeV_PostFit_s.root', |
323 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Znn_LowPt_ZnunuLowPt_8TeV_PostFit_s.root', |
324 |
> |
'/shome/bortigno/VHbbAnalysis/postPreApp//LHCP_PostFit_BDT_v0.0/BDT_Znn_MedPt_ZnunuMedPt_8TeV_PostFit_s.root', |
325 |
> |
] |
326 |
> |
bdt_fileList_7TeV=[ |
327 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Wln_VH_7TeV_Wln_7TeV_ch1_Wenu2_PostFit_s.root', |
328 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Wln_VH_7TeV_Wln_7TeV_ch1_Wenu_PostFit_s.root', |
329 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Wln_VH_7TeV_Wln_7TeV_ch2_Wmunu2_PostFit_s.root', |
330 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Wln_VH_7TeV_Wln_7TeV_ch2_Wmunu_PostFit_s.root', |
331 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Zll_VH_7TeV_Zll_7TeV_card1_PostFit_s.root', |
332 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Zll_VH_7TeV_Zll_7TeV_card2_PostFit_s.root', |
333 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Zll_VH_7TeV_Zll_7TeV_card3_PostFit_s.root', |
334 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Zll_VH_7TeV_Zll_7TeV_card4_PostFit_s.root', |
335 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Znn_VH_7TeV_Znn_7TeV_ch1_PostFit_s.root', |
336 |
> |
'/shome/bortigno//VHbbAnalysis/postPreApp/stack_from_dc_7TeV/BDT_Znn_VH_7TeV_Znn_7TeV_ch2_PostFit_s.root' |
337 |
> |
] |
338 |
> |
|
339 |
> |
bdt_fileList+=bdt_fileList_7TeV |
340 |
> |
|
341 |
> |
bdt_fileList1 = [] |
342 |
> |
bdt_fileList1+=[ |
343 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Wln_VV_ch1_Wenu2_PostFit_s.root', |
344 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Wln_VV_ch1_Wenu3_PostFit_s.root', |
345 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Wln_VV_ch1_Wenu_PostFit_s.root', |
346 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Wln_VV_ch2_Wmunu2_PostFit_s.root', |
347 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Wln_VV_ch2_Wmunu3_PostFit_s.root', |
348 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Wln_VV_ch2_Wmunu_PostFit_s.root', |
349 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Wtn_VV_Wtn_PostFit_s.root', |
350 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Zll_VV_ZeeHighPt_PostFit_s.root', |
351 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Zll_VV_ZeeLowPt_PostFit_s.root', |
352 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Zll_VV_ZmmHighPt_PostFit_s.root', |
353 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Zll_VV_ZmmLowPt_PostFit_s.root', |
354 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Znn_VV_HighPt_ZnunuHighPt_PostFit_s.root', |
355 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Znn_VV_LowPt_ZnunuLowPt_PostFit_s.root', |
356 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDTVV/BDT_Znn_VV_MedPt_ZnunuMedPt_PostFit_s.root' |
357 |
> |
] |
358 |
> |
bdt_fileList2 = [] |
359 |
> |
bdt_fileList2+=[ |
360 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Wln_ch1_Wenu2_PostFit_s.root', |
361 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Wln_ch1_Wenu3_PostFit_s.root', |
362 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Wln_ch1_Wenu_PostFit_s.root', |
363 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Wln_ch2_Wmunu2_PostFit_s.root', |
364 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Wln_ch2_Wmunu3_PostFit_s.root', |
365 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Wln_ch2_Wmunu_PostFit_s.root', |
366 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Wtn_Wtn_PostFit_s.root', |
367 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Zll_ZeeHighPt_PostFit_s.root', |
368 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Zll_ZeeLowPt_PostFit_s.root', |
369 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Zll_ZmmHighPt_PostFit_s.root', |
370 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Zll_ZmmLowPt_PostFit_s.root', |
371 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Znn_HighPt_ZnunuHighPt_8TeV_PostFit_s.root', |
372 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Znn_LowPt_ZnunuLowPt_8TeV_PostFit_s.root', |
373 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/mBDT/BDT_Znn_MedPt_ZnunuMedPt_8TeV_PostFit_s.root' |
374 |
> |
] |
375 |
> |
|
376 |
> |
bdt_fix = [ |
377 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Wln_ch1_Wenu2_PostFit_s.root', |
378 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Wln_ch1_Wenu_PostFit_s.root', |
379 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Wln_ch2_Wmunu2_PostFit_s.root', |
380 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Wln_ch2_Wmunu_PostFit_s.root', |
381 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Zll_card1_PostFit_s.root', |
382 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Zll_card2_PostFit_s.root', |
383 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Zll_card3_PostFit_s.root', |
384 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Zll_card4_PostFit_s.root', |
385 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Znn_ch1_PostFit_s.root', |
386 |
> |
'/shome/nmohr/VHbb/lhcp/PrePost/BDT7TeV/BDT_Znn_ch2_PostFit_s.root' ] |
387 |
> |
|
388 |
> |
bdt_fileList2+=bdt_fix |
389 |
> |
|
390 |
> |
|
391 |
> |
|
392 |
> |
if('mjj' in opts.type): |
393 |
> |
plot(fileList) |
394 |
> |
else: |
395 |
> |
log_s_over_b(bdt_fileList2) |
396 |
> |
|
397 |
|
sys.exit(0) |
398 |
|
|
399 |
|
|