Definition at line 6 of file stack_spectra.py.
8 hists = [[
util.get_tobject(args, h.lstrip(
"-"))
for h
in hlist]
for hlist
in args.hstack]
12 canvas = ROOT.TCanvas(
"canvas",
"Canvas", 250,100,700,500)
13 hstack = ROOT.THStack()
15 for i, (hlist,hnames)
in enumerate(
zip(hists, args.hstack)):
18 for hadd,hname
in zip(hlist[1:],hnames[1:]):
21 if hname.startswith(
"-"):
26 if args.area_normalize
and h.Integral() > 1e-4: h.Scale(1. / h.Integral())
35 if args.nevent_in_legend:
36 name +=
" (%i)" % int(h.Integral())
40 drawstr =
"HIST" if args.stack
else "NOSTACK HIST"
43 if args.legend_position: legend = ROOT.gPad.BuildLegend(*(args.legend_position + [
""]))
auto enumerate(Iterables &&...iterables)
Range-for loop helper tracking the number of iteration.
auto zip(Iterables &&...iterables)
Range-for loop helper iterating across many collections at the same time.