46 |
|
|
47 |
|
|
48 |
|
plot_path = self.config.get('Directories','plotpath') |
49 |
+ |
addOverFlow=eval(self.config.get('Plot_general','addOverFlow')) |
50 |
|
|
51 |
|
# define treeCut |
52 |
|
if job.type != 'DATA': |
113 |
|
if ScaleFactor != 0: |
114 |
|
hTree.Scale(ScaleFactor) |
115 |
|
#print '\t-->import %s\t Integral: %s'%(job.name,hTree.Integral()) |
116 |
+ |
if addOverFlow: |
117 |
+ |
uFlow = hTree.GetBinContent(0)+hTree.GetBinContent(1) |
118 |
+ |
oFlow = hTree.GetBinContent(hTree.GetNbinsX()+1)+hTree.GetBinContent(hTree.GetNbinsX()) |
119 |
+ |
uFlowErr = ROOT.TMath.Sqrt(ROOT.TMath.Power(hTree.GetBinError(0),2)+ROOT.TMath.Power(hTree.GetBinError(1),2)) |
120 |
+ |
oFlowErr = ROOT.TMath.Sqrt(ROOT.TMath.Power(hTree.GetBinError(hTree.GetNbinsX()),2)+ROOT.TMath.Power(hTree.GetBinError(hTree.GetNbinsX()+1),2)) |
121 |
+ |
hTree.SetBinContent(1,uFlow) |
122 |
+ |
hTree.SetBinContent(hTree.GetNbinsX(),oFlow) |
123 |
+ |
hTree.SetBinError(1,uFlowErr) |
124 |
+ |
hTree.SetBinError(hTree.GetNbinsX(),oFlowErr) |
125 |
|
hTree.SetDirectory(0) |
126 |
|
input.Close() |
127 |
|
hTreeList.append(hTree) |