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.16 by peller, Tue Oct 9 21:17:34 2012 UTC vs.
Revision 1.17 by peller, Sun Oct 14 09:53:49 2012 UTC

# Line 50 | Line 50 | def getHistoFromTree(job,path,config,opt
50      #addOverFlow=eval(config.get('Plot_general','addOverFlow'))
51      addOverFlow = False
52  
53 +    TrainFlag = eval(config.get('Analysis','TrainFlag'))
54 +    if TrainFlag: traincut = " & EventForTraining == 0"
55 +    if not TrainFlag: traincut=""
56 +
57      if job.type != 'DATA':
58      
59          if type(options[7])==str:
# Line 59 | Line 63 | def getHistoFromTree(job,path,config,opt
63              cutcut=cutcut.replace(options[7][1],options[7][2])
64              #print cutcut
65          if subsample>-1:
66 <            treeCut='%s & %s & EventForTraining == 0'%(cutcut,job.subcuts[subsample])        
66 >            treeCut='%s & %s%s'%(cutcut,job.subcuts[subsample],traincut)        
67          else:
68 <            treeCut='%s & EventForTraining == 0'%(cutcut)
68 >            treeCut='%s%s'%(cutcut,traincut)
69  
70      elif job.type == 'DATA':
71          cutcut=config.get('Cuts',options[8])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines