columnflow.calibration#

Object and event calibration tools.

Classes:

Calibrator(*args[, requires_func, ...])

Base class for all calibrators.

Functions:

calibrator([func, bases, mc_only, ...])

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

class Calibrator(*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 calibrators.

Methods:

calibrator([func, bases, mc_only, ...])

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

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

Decorator for creating a new Calibrator 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) – Function to be wrapped and integrated into new Calibrator instance , defaults to None

  • bases (tuple, default: ()) – additional bases for new Calibrator, defaults to ()

  • mc_only (bool, default: False) – only run this Calibrator on Monte Carlo simulation , defaults to False

  • data_only (bool, default: False) – only run this Calibrator on observed data, defaults to False

Return type:

DerivableMeta | Callable

Returns:

new Calibrator instance with func as the call_func or the decorator itself

calibrator(func=None, bases=(), mc_only=False, data_only=False, nominal_only=False, shifts_only=None, **kwargs)#

Decorator for creating a new Calibrator 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) – Function to be wrapped and integrated into new Calibrator instance , defaults to None

  • bases (tuple, default: ()) – additional bases for new Calibrator, defaults to ()

  • mc_only (bool, default: False) – only run this Calibrator on Monte Carlo simulation , defaults to False

  • data_only (bool, default: False) – only run this Calibrator on observed data, defaults to False

Return type:

DerivableMeta | Callable

Returns:

new Calibrator instance with func as the call_func or the decorator itself

Summary#