35 |
|
theScale = float(self.lumi)*xsec*sf/(0.46502*CountWithPU.GetBinContent(1)+0.53498*CountWithPU2011B.GetBinContent(1))*MC_rescale_factor/float(job.split) |
36 |
|
elif anaTag == '8TeV': |
37 |
|
theScale = float(self.lumi)*xsec*sf/(CountWithPU.GetBinContent(1))*MC_rescale_factor/float(job.split) |
38 |
+ |
input.Close() |
39 |
|
return theScale |
40 |
|
|
41 |
|
|
78 |
|
Tree = input.Get(job.tree) |
79 |
|
output.cd() |
80 |
|
CuttedTree=Tree.CopyTree(treeCut) |
81 |
< |
|
81 |
> |
input.Close() |
82 |
> |
del input |
83 |
|
# get all Histos at once |
84 |
|
weightF=self.config.get('Weights',self.which_weightF) |
85 |
|
for options in self.optionsList: |
111 |
|
if options[11] == 'blind': |
112 |
|
output.cd() |
113 |
|
if treeVar == 'H.mass': |
114 |
< |
CuttedTree.Draw('%s>>%s(%s,%s,%s)' %(treeVar,name,nBins,xMin,xMax),treeVar+'<80. || '+treeVar + '>150.' , "goff,e") |
114 |
> |
CuttedTree.Draw('%s>>%s(%s,%s,%s)' %(treeVar,name,nBins,xMin,xMax),treeVar+'<90. || '+treeVar + '>150.' , "goff,e") |
115 |
|
else: |
116 |
|
CuttedTree.Draw('%s>>%s(%s,%s,%s)' %(treeVar,name,nBins,xMin,xMax),treeVar+'<0', "goff,e") |
117 |
|
|
146 |
|
hTree.SetBinError(1,uFlowErr) |
147 |
|
hTree.SetBinError(hTree.GetNbinsX(),oFlowErr) |
148 |
|
hTree.SetDirectory(0) |
147 |
– |
input.Close() |
149 |
|
hTreeList.append(hTree) |
150 |
|
groupList.append(group) |
151 |
< |
|
151 |
> |
|
152 |
> |
output.Close() |
153 |
> |
del output |
154 |
|
return hTreeList, groupList |
155 |
|
|
156 |
|
|