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

Comparing UserCode/VHbb/python/evaluateMVA.py (file contents):
Revision 1.24 by bortigno, Tue Feb 19 17:23:59 2013 UTC vs.
Revision 1.28 by bortigno, Tue Feb 26 13:10:41 2013 UTC

# Line 109 | Line 109 | for job in samples:
109      tree = input.Get(job.tree)
110      nEntries = tree.GetEntries()
111      outfile.cd()
112 <    newtree = tree.CopyTree('V.pt > 100') #hard skim to get faster
113 <    input.Close()
112 >    newtree = tree.CloneTree(0)
113              
114      #Set branch adress for all vars
115      for i in range(0,len(theMVAs)):
116 <        theMVAs[i].setVariables(newtree,job)
116 >        theMVAs[i].setVariables(tree,job)
117      outfile.cd()
118      #Setup Branches
119      mvaVals=[]
# Line 129 | Line 128 | for job in samples:
128          print('\n--> ' + job.name +':')
129      #Fill event by event:
130      for entry in range(0,nEntries):
131 <        newtree.GetEntry(entry)
131 >        tree.GetEntry(entry)
132                              
133          for i in range(0,len(theMVAs)):
134              theMVAs[i].evaluate(mvaVals[i],job)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines