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

Comparing UserCode/VHbb/python/Ratio.py (file contents):
Revision 1.1 by peller, Fri May 25 12:59:11 2012 UTC vs.
Revision 1.2 by nmohr, Thu Oct 4 13:02:23 2012 UTC

# Line 27 | Line 27 | def renewHist(hist,reference,min,max):
27   def getRatio(hist,reference,min,max,yTitle="",maxUncertainty = 0.2,restrict=True):
28      from ROOT import gROOT
29      theHist, theReference = renewHist(hist,reference,min,max)
30 <    gROOT.LoadMacro('./Ratio.C+')
30 >    ROOT.gSystem.Load('./Ratio_C.so')
31      from ROOT import coolRatio
32      thePlotter = coolRatio()
33      theRatio = thePlotter.make_rebinned_ratios(theHist,theReference,maxUncertainty,False,0)
# Line 51 | Line 51 | def getRatio(hist,reference,min,max,yTit
51      theRatio.GetYaxis().CenterTitle(ROOT.kTRUE)
52      theRatio.GetYaxis().SetDrawOption("M")
53      theRatio.SetXTitle(yTitle)
54 <    if yTitle == "":
55 <        theRatio.SetYTitle("Data/MC")
56 <    print 'Data mean = %.2f' %(theHist.GetMean())
57 <    print 'MC mean = %.2f' %(theReference.GetMean())
58 <    ksScore = theHist.KolmogorovTest( theReference )
59 <    chiScore = theHist.Chi2Test( theReference , "UW")
60 <    return theRatio, refError, ksScore, chiScore
54 >    theRatio.SetYTitle("Data/MC")
55 >    return theRatio, refError
56      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines