ftag.labels#
Classes#
Dataclass to hold info about one flavour/label. |
|
Label container that holds multiple labels. |
Functions#
|
Remove the suffix from a string. |
Module Contents#
- ftag.labels.remove_suffix(string: str, suffix: str) str #
Remove the suffix from a string.
- Parameters:
string (str) – String from which the suffix is to be removed
suffix (str) – Suffix to remove
- Returns:
String with the suffix removed
- Return type:
str
- class ftag.labels.Label#
Dataclass to hold info about one flavour/label.
- name#
Name of the flavour/label
- Type:
str
- label#
Plot label for this flavour/label
- Type:
str
- colour#
Colour of this flavour/label
- Type:
str
- category#
Flavour category, to which this flavour/label belongs
- Type:
str
- name: str#
- label: str#
- cuts: ftag.cuts.Cuts#
- colour: str#
- category: str#
- _px: str | None = None#
- property px: str#
- property eff_str: str#
- property rej_str: str#
- property frac_str: str#
- __str__() str #
- __lt__(other) bool #
- class ftag.labels.LabelContainer#
Label container that holds multiple labels.
- __iter__() collections.abc.Iterator #
- __len__() int #
- __eq__(other) bool #
- __repr__() str #
- property categories: list[str]#
- by_category(category: str) LabelContainer #
- from_cuts(cuts: list | ftag.cuts.Cuts) Label #
- classmethod from_yaml(yaml_path: pathlib.Path | None = None, include_categories: collections.abc.Iterable[str] | None = None, exclude_categories: collections.abc.Iterable[str] | None = None) LabelContainer #
- classmethod from_list(labels: list[Label]) LabelContainer #
- backgrounds(signal: Label, only_signals: bool = True) LabelContainer #