16 |
|
self.rescale = rescale |
17 |
|
self.which_weightF=which_weightF |
18 |
|
self.region = region |
19 |
+ |
self.lumi=0. |
20 |
|
|
21 |
|
def getScale(self,job,subsample=-1): |
22 |
|
anaTag=self.config.get('Analysis','tag') |
32 |
|
sf=float(job.sf) |
33 |
|
theScale = 1. |
34 |
|
if anaTag == '7TeV': |
35 |
< |
theScale = float(job.lumi)*xsec*sf/(0.46502*CountWithPU.GetBinContent(1)+0.53498*CountWithPU2011B.GetBinContent(1))*self.rescale/float(job.split) |
35 |
> |
theScale = float(self.lumi)*xsec*sf/(0.46502*CountWithPU.GetBinContent(1)+0.53498*CountWithPU2011B.GetBinContent(1))*self.rescale/float(job.split) |
36 |
|
elif anaTag == '8TeV': |
37 |
< |
theScale = float(job.lumi)*xsec*sf/(CountWithPU.GetBinContent(1))*self.rescale/float(job.split) |
37 |
> |
theScale = float(self.lumi)*xsec*sf/(CountWithPU.GetBinContent(1))*self.rescale/float(job.split) |
38 |
|
return theScale |
39 |
|
|
40 |
|
|
41 |
|
def getHistoFromTree(self,job,subsample=-1): |
42 |
< |
|
42 |
> |
if self.lumi == 0: raise Exception("You're trying to plot with no lumi") |
43 |
> |
|
44 |
|
hTreeList=[] |
45 |
|
groupList=[] |
46 |
|
|