5 |
|
from ROOT import TFile, TTree |
6 |
|
import ROOT |
7 |
|
from array import array |
8 |
< |
from ConfigParser import SafeConfigParser |
8 |
> |
from BetterConfigParser import BetterConfigParser |
9 |
|
import sys |
10 |
|
|
11 |
|
|
12 |
|
#load config |
13 |
< |
config = SafeConfigParser() |
13 |
> |
config = BetterConfigParser() |
14 |
|
config.read('./config') |
15 |
|
|
16 |
|
#get locations: |
24 |
|
CountWithPU = input.Get("CountWithPU") |
25 |
|
CountWithPU2011B = input.Get("CountWithPU2011B") |
26 |
|
#print lumi*xsecs[i]/hist.GetBinContent(1) |
27 |
< |
return float(job.lumi)*float(job.xsec)*float(job.sf)/(0.46502*CountWithPU.GetBinContent(1)+0.53498*CountWithPU2011B.GetBinContent(1))*rescale/float(job.split) |
27 |
> |
return float(job.lumi)*float(job.xsec)*float(job.sf)/(CountWithPU.GetBinContent(1))*rescale/float(job.split) |
28 |
|
|
29 |
|
|
30 |
|
def getHistoFromTree(job,options,rescale=1): |
102 |
|
num=[0]*len(setup) |
103 |
|
for i in range(0,len(setup)): |
104 |
|
for j in range(0,len(histos)): |
105 |
< |
if typs[j] == setup[i]: |
105 |
> |
if typs[j] in setup[i]: |
106 |
|
num[i]+=1 |
107 |
|
ordnung.append(histos[j]) |
108 |
|
ordnungtyp.append(typs[j]) |
119 |
|
|
120 |
|
#add |
121 |
|
histos[k].Add(histos[k+1],1) |
122 |
< |
#printc('red','','\t--> added %s to %s'%(typs[k],typs[k+1])) |
122 |
> |
printc('magenta','','\t--> added %s to %s'%(typs[k],typs[k+1])) |
123 |
|
del histos[k+1] |
124 |
|
del typs[k+1] |
125 |
|
|