pdf#

Column production methods related to the PDF weights.

Classes:

pdf_weights(*args, **kwargs)

class pdf_weights(*args, **kwargs)[source]#

Bases: Producer

Attributes:

Methods:

call_func(events[, invalid_weights_action, ...])

Producer that determines and stores pdf weights with different methods.

init_func(**kwargs)

skip_func(**kwargs)

update_cls_dict(cls_name, cls_dict, get_attr)

cache_instances = True#
call_func(events, invalid_weights_action='raise', outlier_threshold=0.5, outlier_action='ignore', outlier_log_mode='warning', **kwargs)#

Producer that determines and stores pdf weights with different methods. When store_all_weights is False, the nominal weight and its up and down variations are computed on an event-by-event basis. Otherwise, the nominal and all pdf set weights (normalized to the nominal one) are stored.

For the per-event evaluation, the producer assumes that the nominal entry is always the first LHEPdfWeight value and that the nominal weight is already included in the LHEWeight. It can only be called with MC datasets.

The invalid_weights_action defines the procedure of how to handle events with a an unexpected number of pdf weights (not 101 or 103). Supported modes are: :rtype: Array

  • "raise": an exception is raised

  • "ignore": nominal weight is set to one, up/down weights too if not storing all weights

    and an empty vector for all weights otherwise

The outlier_action defines the procedure of how to handle events with a pdf uncertainty above the outlier_threshold. Supported modes are:

  • "ignore": events are kept unmodified

  • "remove": pdf weight nominal/up/down are all set to 0

  • "raise": an exception is raised

Additionally, the verbosity of the procedure can be set with outlier_log_mode, which offers the following options:

  • "none": no message is given

  • "info": a logger.info message is given

  • "debug": a logger.debug message is given

  • "warning": a logger.warning message is given

Resources:

data_only = False#
init_func(**kwargs)#
Return type:

None

mc_only = True#
skip_func(**kwargs) bool#
Return type:

bool

store_all_weights = False#
static update_cls_dict(cls_name, cls_dict, get_attr)#
uses = {'LHEPdfWeight'}#