columnflow.production#

Tools for producing new array columns (e.g. high-level variables).

Classes#

class Producer(*args, requires_func=<law.util.NoValue object>, setup_func=<law.util.NoValue object>, sandbox=<law.util.NoValue object>, call_force=<law.util.NoValue object>, inst_dict=None, **kwargs)[source]#

Bases: TaskArrayFunction

Base class for all producers.

classmethod producer(func=None, bases=(), mc_only=True, data_only=False, nominal_only=False, shifts_only=None, **kwargs)[source]#

Decorator for creating a new Producer subclass with additional, optional bases and attaching the decorated function to it as call_func().

When mc_only (data_only) is True, the calibrator is skipped and not considered by other calibrators, selectors and producers in case they are evalauted on a order.Dataset (using the dataset_inst attribute) whose is_mc (is_data) attribute is False.

When nominal_only is True or shifts_only is set, the calibrator is skipped and not considered by other calibrators, selectors and producers in case they are evalauted on a order.Shift (using the global_shift_inst attribute) whose name does not match.

All additional kwargs are added as class members of the new subclasses.

Parameters:
  • func (Callable | None, default: None) – Callable function that produces new columns

  • bases (tuple, default: ()) – Additional bases for new Producer instance

  • mc_only (bool, default: True) – boolean flag indicating that this Producer instance should only run on Monte Carlo simulation

  • data_only (bool, default: False) – boolean flag indicating that this Producer instance should only run on observed data

Return type:

DerivableMeta | Callable

Returns:

new Producer instance