Systematic#
- class coffea.nanoevents.methods.base.Systematic[source]#
Bases:
objectA base mixin class to describe and build variations on a feature of a nanoevents object.
Attributes Summary
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
systematicsfield, with field namename, of kindkind(must be registered withadd_kindalready), and varying the objects under field(s)whatwith a functionvarying_function.returns a list of variation names
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)#
Add a systematic to the nanoevents object’s
systematicsfield, with field namename, of kindkind(must be registered withadd_kindalready), and varying the objects under field(s)whatwith a functionvarying_function.- Parameters:
name (
str) – Name of the systematic variation / uncertainty sourcekind (
str) – The name of the kind of systematic variationwhat (
strorlist[str,tuple[str]]) – Name what gets varied, this could be a list or tuple of column namesvarying_function (
Callable) – A function that describes how ‘what’ is varied, it must close over all non-event-data arguments.