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.7 by peller, Thu Aug 2 16:03:52 2012 UTC vs.
Revision 1.8 by peller, Fri Aug 10 09:36:16 2012 UTC

# Line 11 | Line 11 | import sys
11  
12   #load config
13   config = BetterConfigParser()
14 < config.read('./config')
14 > config.read('./config7TeV_ZZ')
15  
16   #get locations:
17   Wdir=config.get('Directories','Wdir')
# Line 41 | Line 41 | def getScale(job,rescale,subsample=-1):
41      return theScale
42  
43   def getHistoFromTree(job,options,rescale=1,subsample=-1):
44 +
45 +    #print job.getpath()
46 +    #print options
47      treeVar=options[0]
48      if subsample>-1:
49          name=job.subnames[subsample]
# Line 56 | Line 59 | def getHistoFromTree(job,options,rescale
59  
60      if job.type != 'DATA':
61          cutcut=config.get('Cuts',options[7])
62 <        if subsample>0:
62 >        if subsample>-1:
63              treeCut='%s & %s & EventForTraining == 0'%(cutcut,job.subcuts[subsample])        
64          else:
65              treeCut='%s & EventForTraining == 0'%(cutcut)
66  
67      elif job.type == 'DATA':
68          cutcut=config.get('Cuts',options[8])
69 <        treeCut='%s & EventForTraining == 0'%(cutcut)
69 >        treeCut='%s'%(cutcut)
70  
71  
72      input = TFile.Open(job.getpath(),'read')

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines