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

Comparing UserCode/VHbb/python/gethistofromtree.py (file contents):
Revision 1.20 by nmohr, Thu Nov 22 14:08:24 2012 UTC vs.
Revision 1.21 by peller, Wed Dec 5 15:00:20 2012 UTC

# Line 11 | Line 11 | import sys
11  
12   def getScale(job,path,config,rescale,subsample=-1):
13      anaTag=config.get('Analysis','tag')
14 <    input = TFile.Open(path+'/'+job.getpath())
15 <    CountWithPU = input.Get("CountWithPU")
16 <    CountWithPU2011B = input.Get("CountWithPU2011B")
14 >    inputfile = TFile.Open(path+'/'+job.getpath())
15 >    CountWithPU = inputfile.Get("CountWithPU")
16 >    CountWithPU2011B = inputfile.Get("CountWithPU2011B")
17      #print lumi*xsecs[i]/hist.GetBinContent(1)
18      
19      if subsample>-1:
# Line 31 | Line 31 | def getScale(job,path,config,rescale,sub
31          theScale = float(job.lumi)*xsec*sf/(0.46502*CountWithPU.GetBinContent(1)+0.53498*CountWithPU2011B.GetBinContent(1))*rescale/float(job.split)
32      elif anaTag == '8TeV':
33          theScale = float(job.lumi)*xsec*sf/(CountWithPU.GetBinContent(1))*rescale/float(job.split)
34 <    input.Close()
34 >    inputfile.Close()
35      return theScale
36  
37   def getHistoFromTree(job,path,config,options,rescale=1,subsample=-1,which_weightF='weightF'):

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines