ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/HistoMaker.py
(Generate patch)

Comparing UserCode/VHbb/python/HistoMaker.py (file contents):
Revision 1.3 by peller, Tue Oct 2 13:19:45 2012 UTC vs.
Revision 1.4 by nmohr, Thu Oct 4 13:02:23 2012 UTC

# Line 46 | Line 46 | class HistoMaker:
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':
# Line 112 | Line 113 | class HistoMaker:
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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines