afw.common.DiscriminantToPlot#
- class afw.common.DiscriminantToPlot(label: str)[source]#
Bases:
ThingToPlot,ABCPlot a discriminant (a float ranging from 0 to 1) such as DeepJet Score
Methods
__init__(label)Create a histogram for the given thing to plot.
fill_histogram(histogram, events, dataset, ...)Fill a histogram with a given set of events, post-selection
plot_histogram(histogram, metadata, title, ...)Plot a filled histogram to a given file
- create_histogram() Hist[source]#
Create a histogram for the given thing to plot.
- Returns:
A histogram.
- Return type:
hist.Hist
- abstractmethod fill_histogram(histogram: Hist, events: Array, dataset: str, weights: Array, **kwargs: dict) Hist[source]#
Fill a histogram with a given set of events, post-selection
- plot_histogram(histogram: Hist, metadata: dict, title: str, output_file: str) None[source]#
Plot a filled histogram to a given file
- Parameters:
histogram (
hist.Hist) – The filled histogram to plot.metadata (
dict) – The metadata for use with generating plots.title (
str) – The title (eg. channel) to useoutput_file (
str) – The output file, given as an absolute path.**kwargs (
dict | None) – A set of keyword arguments created in by the analysis config.
- Returns:
None