15 |
|
|
16 |
|
#get locations: |
17 |
|
Wdir=config.get('Directories','Wdir') |
18 |
< |
|
18 |
> |
anaTag=config.get('Analysis','tag') |
19 |
|
|
20 |
|
|
21 |
|
|
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) |
28 |
< |
|
27 |
> |
theScale = 1. |
28 |
> |
if anaTag == '7TeV': |
29 |
> |
theScale = float(job.lumi)*float(job.xsec)*float(job.sf)/(0.46502*CountWithPU.GetBinContent(1)+0.53498*CountWithPU2011B.GetBinContent(1))*rescale/float(job.split) |
30 |
> |
elif anaTag == '8TeV': |
31 |
> |
theScale = float(job.lumi)*float(job.xsec)*float(job.sf)/(CountWithPU.GetBinContent(1))*rescale/float(job.split) |
32 |
> |
return theScale |
33 |
|
|
34 |
|
def getHistoFromTree(job,options,rescale=1): |
35 |
|
treeVar=options[0] |
41 |
|
|
42 |
|
if job.type != 'DATA': |
43 |
|
cutcut=config.get('Cuts',options[7]) |
44 |
< |
treeCut='%s & EventForTraining == 0'%cutcut |
44 |
> |
treeCut='%s & EventForTraining == 0'%(cutcut) |
45 |
|
|
46 |
|
elif job.type == 'DATA': |
47 |
< |
treeCut=config.get('Cuts',options[8]) |
47 |
> |
cutcut=config.get('Cuts',options[8]) |
48 |
> |
treeCut='%s & EventForTraining == 0'%(cutcut) |
49 |
> |
|
50 |
|
|
51 |
|
input = TFile.Open(job.getpath(),'read') |
52 |
|
|