1 |
|
#!/usr/bin/env python |
2 |
|
import ROOT |
3 |
+ |
ROOT.gROOT.SetBatch(True) |
4 |
|
from ROOT import TFile |
5 |
|
from optparse import OptionParser |
6 |
|
import sys |
7 |
|
from myutils import BetterConfigParser, TdrStyles, getRatio |
8 |
|
|
8 |
– |
ROOT.gROOT.SetBatch(True) |
9 |
|
|
10 |
|
argv = sys.argv |
11 |
|
parser = OptionParser() |
156 |
|
|
157 |
|
|
158 |
|
|
159 |
– |
|
159 |
|
ratioU.SetStats(0) |
160 |
|
ratioU.SetMinimum(0.01) |
161 |
|
ratioU.SetMaximum(2.49) |
170 |
|
ratioU.GetXaxis().SetTitle('BDT output') |
171 |
|
ratioU.GetYaxis().SetTitle('Ratio') |
172 |
|
ratioU.Draw("hist") |
173 |
+ |
fitRatioU = ratioU.Fit("pol2","S") |
174 |
+ |
fitRatioU.Draw("SAME") |
175 |
|
ratioU.SetTitle("") |
176 |
|
ratioD.SetStats(0) |
177 |
|
ratioD.GetYaxis().SetRangeUser(0.5,1.5) |
184 |
|
ratioD.SetLineStyle(3) |
185 |
|
ratioD.SetLineWidth(2) |
186 |
|
ratioD.Draw("hist same") |
187 |
+ |
fitRatioD = ratioD.Fit("pol2","S") |
188 |
+ |
fitRatioD.Draw("SAME") |
189 |
|
ratioD.SetTitle("") |
190 |
|
m_one_line = ROOT.TLine(xMin,1,xMax,1) |
191 |
|
m_one_line.SetLineStyle(7) |
195 |
|
|
196 |
|
#name = outpath+Abin+'_M'+mass+'_'+channel+'_'+MC+syst+'.png' |
197 |
|
#c.Print(name) |
198 |
< |
name = outpath+Abin+'_M'+mass+'_'+channel+'_'+MC+syst+'.pdf' |
198 |
> |
name = outpath+'systPlot_'+Abin+'_M'+mass+'_'+channel+'_'+MC+syst+'.pdf' |
199 |
|
c.Print(name) |
200 |
|
|
201 |
|
|