Skip to content

Commit

Permalink
fix debug print, fix CompareShapes() call
Browse files Browse the repository at this point in the history
  • Loading branch information
ammitra committed Jan 11, 2022
1 parent f09148f commit ace34d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def select(setname,year):
inhist = infile.Get(key.GetName()) # get it from the file
inhist.SetDirectory(0) # set the directory so hist is stored in memory and not as reference to TFile (this way it doesn't get tossed by python garbage collection when infile changes)
histgroups[setname].Add(varname,inhist) # add to our group
print('add var name for ',setname)
print('add var {} for {}'.format(varname, setname))

# For each variable to plot...
for varname in varnames.keys():
Expand Down Expand Up @@ -242,4 +242,4 @@ def select(setname,year):
for sig in signal_names: signal_hists[sig] = histgroups[sig][varname]#all_hists[sig] = histgroups[sig][varname]#

# Plot everything together!
CompareShapes(plot_filename,options.year,varnames[varname],bkgs=bkg_hists,signals=signal_hists,colors=colors,names=names)
CompareShapes(plot_filename,options.year,varnames[varname],bkgs=bkg_hists,signals=signal_hists,colors=colors,names=names,stackBkg=True)

0 comments on commit ace34d1

Please sign in to comment.