Systematic

class coffea.nanoevents.methods.base.Systematic[source]

Bases: object

A base mixin class to describe and build variations on a feature of a nanoevents object.

Attributes Summary

systematics

Return the list of all systematics attached to this object.

Methods Summary

add_kind(kind)

Register a type of systematic variation, which must fulfill the base class interface.

add_systematic(name, kind, what, ...)

Add a systematic to the nanoevents object's systematics field, with field name name, of kind kind (must be registered with add_kind already), and varying the objects under field(s) what with a function varying_function.

describe_variations()

returns a list of variation names

explodes_how()

This describes how a systematic uncertainty needs to be evaluated in the context of other systematic uncertainties.

Attributes Documentation

systematics

Return the list of all systematics attached to this object.

Methods Documentation

classmethod add_kind(kind: str)[source]

Register a type of systematic variation, which must fulfill the base class interface. Types of systematic variations must be registered here before an actual systematic of that type can be added. For example, by default an up/down systematic is registered, as described in coffea.nanoevents.methods.systematics.UpDownSystematic.

Parameters:

kind (str) – The name of the type of systematic described by this class

add_systematic(name: str, kind: str, what: str | List[str] | Tuple[str], varying_function: Callable)[source]

Add a systematic to the nanoevents object’s systematics field, with field name name, of kind kind (must be registered with add_kind already), and varying the objects under field(s) what with a function varying_function.

Parameters:
  • name (str) – Name of the systematic variation / uncertainty source

  • kind (str) – The name of the kind of systematic variation

  • what (Union[str, List[str], Tuple[str]]) – Name what gets varied, this could be a list or tuple of column names

  • varying_function (Union[function, bound method]) – A function that describes how ‘what’ is varied, it must close over all non-event-data arguments.

abstract describe_variations()[source]

returns a list of variation names

abstract explodes_how()[source]

This describes how a systematic uncertainty needs to be evaluated in the context of other systematic uncertainties. i.e. Do you iterate over this keeping all others fixed or do you need to have correlations with other (subsets of) systematics.