17 |
|
#print lumi*xsecs[i]/hist.GetBinContent(1) |
18 |
|
|
19 |
|
if subsample>-1: |
20 |
< |
xsec=float(job.xsec[subsample]) |
20 |
> |
if type(job.xsec[subsample]) == str: xsec=float(eval(job.xsec[subsample])) |
21 |
> |
else: xsec=float(job.xsec[subsample]) |
22 |
|
sf=float(job.sf[subsample]) |
23 |
|
else: |
24 |
< |
xsec=float(job.xsec) |
24 |
> |
if type(job.xsec) == str: xsec=float(eval(job.xsec)) |
25 |
> |
else: xsec=float(job.xsec) |
26 |
|
sf=float(job.sf) |
27 |
|
|
28 |
|
|
52 |
|
#addOverFlow=eval(config.get('Plot_general','addOverFlow')) |
53 |
|
addOverFlow = False |
54 |
|
|
55 |
+ |
TrainFlag = eval(config.get('Analysis','TrainFlag')) |
56 |
+ |
if TrainFlag: traincut = " & EventForTraining == 0" |
57 |
+ |
if not TrainFlag: traincut="" |
58 |
+ |
|
59 |
|
if job.type != 'DATA': |
60 |
|
|
61 |
|
if type(options[7])==str: |
65 |
|
cutcut=cutcut.replace(options[7][1],options[7][2]) |
66 |
|
#print cutcut |
67 |
|
if subsample>-1: |
68 |
< |
treeCut='%s & %s & EventForTraining == 0'%(cutcut,job.subcuts[subsample]) |
68 |
> |
treeCut='%s & %s%s'%(cutcut,job.subcuts[subsample],traincut) |
69 |
|
else: |
70 |
< |
treeCut='%s & EventForTraining == 0'%(cutcut) |
70 |
> |
treeCut='%s%s'%(cutcut,traincut) |
71 |
|
|
72 |
|
elif job.type == 'DATA': |
73 |
|
cutcut=config.get('Cuts',options[8]) |
147 |
|
num=[0]*len(setup) |
148 |
|
for i in range(0,len(setup)): |
149 |
|
for j in range(0,len(histos)): |
150 |
< |
if typs[j] in setup[i]: |
150 |
> |
if typs[j] == setup[i]: |
151 |
|
num[i]+=1 |
152 |
|
ordnung.append(histos[j]) |
153 |
|
ordnungtyp.append(typs[j]) |