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

Comparing UserCode/VHbb/python/addingSamples.py (file contents):
Revision 1.7 by nmohr, Tue Mar 5 17:02:59 2013 UTC vs.
Revision 1.8 by nmohr, Thu Mar 14 17:09:31 2013 UTC

# Line 62 | Line 62 | def get_weights(fileList,lheBin):
62          del tree
63  
64      CountIncl = fileList[0][3]
65 +    xSecIncl = fileList[0][1]
66      print fileList
67 +    print 'Inclusive cross-section %.2f pb' %xSecIncl
68  
69      #total -> total numer of events in each lheBin
70      print 'Calculating total'
# Line 79 | Line 81 | def get_weights(fileList,lheBin):
81          #print fileList
82          if total[bin] > 0.:
83              #the first is always the one with the highest N in the bin:
84 <            weight.append( (fileList[0][1]/fileList[0][3]) * (CountIncl/2950.0) * fileList[0][2][bin]/total[bin] )
84 >            weight.append( (fileList[0][1]/fileList[0][3]) * (CountIncl/xSecIncl) * fileList[0][2][bin]/total[bin] )
85          else:
86              weight.append(1.)
87  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines