4 from optparse
import OptionParser
6 p = OptionParser(usage=
"usage: <path:ROOT file directory>", version=
"0.1")
8 p.add_option(
'--pref', type=
'string', default=
None, dest=
'pref')
9 p.add_option(
'--outdir',
'-o', type=
'string', default=
'plot-flip', dest=
'outdir')
10 p.add_option(
'--rfile',
'-r', type=
'string', default=
None, dest=
'rfile')
12 p.add_option(
'--debug', action=
'store_true', default=
False, dest=
'debug')
13 p.add_option(
'--save',
'-s', action=
'store_true', default=
False, dest=
'save')
14 p.add_option(
'--wait',
'-w', action=
'store_true', default=
False, dest=
'wait')
15 p.add_option(
'--do-err', action=
'store_true', default=
False, dest=
'do_err')
17 (options, args) = p.parse_args()
30 import PhysicsLight.PhysicsLightConfig
as Config
32 Config.setPlotDefaults(ROOT)
34 can = ROOT.TCanvas(
'can',
'can', 650, 600)
37 ROOT.gStyle.SetPaintTextFormat(
'0.2f')
38 ROOT.gStyle.SetPalette(1)
39 ROOT.gROOT.ForceStyle()
41 rf = ROOT.TFile(args[0],
'READ')
43 regions = [
'barrel_sf',
'endcap_sf']
45 err_hists = [
'err_stat_up',
56 plotErr(r,
'%s_%s' %(r, h), rf, can)
61 print 'plotErr - %s / %s' %(hsyst, hbase)
90 if options.save
and name !=
None:
91 can.Print(
'%s.pdf' %name,
'pdf')
96 print 'plotNom - %s' %(hbase)
105 if __name__ ==
"__main__":