Closed HuajieChengCN closed 3 years ago
Hi Huajie, great! This look good overall.
However, I see you are using the PlotTools
, which was an outdated version of the plotting tools you'll find in Plotter/python/plot
and common/python/tools
. We would like to use one set of plotting tool, so we can ensure a uniform style, and avoid code duplication. Could you please replace the use of these outdated tools everywhere where possible, e.g. in
Fitter/analysis/TauES/plotParabola_TES.py
Fitter/analysis/TauES/checkShapes_TES.py
(you can remove drawStacks
if you want, it's been superseded by plotinputs
in Fitter/python/datacard.py
, and you can adapt the code in plotpostfit.py
for drawPrePostFit
.)Fitter/analysis/TauES/plotParabola_TES.py
Fitter/analysis/TauES/plotPostFitScan_TES.py
and remove PlotTools
all together, please?
You can find some examples in the README.md
of Plotter
or in Fitter/python/plot/postfit.py
, e.g. for making TES variation comparisons:
from TauFW.Plotter.plot.Stack import Stack, CMSStyle
CMSStyle.setCMSEra(2018)
plot = Stack("p_{T} [GeV]",datahist,exphists)
plot.draw(ratio=True,logy=False)
plot.drawlegend(pos='right')
plot.drawtext("#mu#tau_{h} baseline")
plot.saveas("stack.png")
plot.saveas("stack.pdf")
plots.close()
for making stacked plots:
from TauFW.Plotter.plot.Stack import Stack
plot = Stack(xtitle,obshist,exphists)
plot.draw(xmin=xmin,xmax=xmax,ymax=ymax,square=square,ratio=ratio,rmin=rmin,rmax=rmax,
staterror=True,errtitle=errtitle)
plot.drawlegend(position,tsize=tsize,text=text,ncol=ncol)
if title:
plot.drawtext(title,bold=False)
plot.saveas(pname,outdir=outdir,ext=exts)
plot.close()
and to get the CMSSW style for the NLL profiles, TES summaries, etc., you can use
from TauFW.Plotter.sample.utils import CMSStyle
CMSStyle.setCMSEra(2018)
... # prepare canvas (=gPad)
CMSStyle.setCMSLumiStyle(gPad,0)
Let me know if you need help.
Superseded by clean PR https://github.com/cms-tau-pog/TauFW/pull/12.
Hi all, this is the pull request to add the combine stuff for TES measurement.