ftag.labels#

Classes#

Label

Dataclass to hold info about one flavour/label.

LabelContainer

Label container that holds multiple labels.

Functions#

remove_suffix(→ str)

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

cuts#

Cuts of this flavour/label

Type:

Cuts

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.

labels#

Dict with the labels this container will hold

Type:

dict[str, Label]

labels: dict[str, Label]#
__iter__() collections.abc.Iterator#
__getitem__(key) Label#
__len__() int#
__getattr__(name) Label#
__contains__(label: str | Label) bool#
__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#