mc_weight#

Methods for dealing with MC weights.

Classes:

mc_weight(*args, **kwargs)

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

Bases: Producer

Attributes:

Methods:

call_func(events, **kwargs)

Reads the genWeight and LHEWeight columns and makes a decision about which one to save.

skip_func(**kwargs)

update_cls_dict(cls_name, cls_dict, get_attr)

cache_instances = True#
call_func(events, **kwargs)#

Reads the genWeight and LHEWeight columns and makes a decision about which one to save. This should have been configured centrally [1] and stored in genWeight, but there are some samples where this failed.

Strategy: :rtype: Array

  1. Use LHEWeight.originalXWGTUP when it exists and genWeight is always 1.

  2. In all other cases, use genWeight.

[1] https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookNanoAOD?rev=99#Weigths

data_only = False#
mc_only = True#
produces = {'mc_weight'}#
skip_func(**kwargs) bool#
Return type:

bool

static update_cls_dict(cls_name, cls_dict, get_attr)#
uses = {'genWeight', <Route 'LHEWeight.originalXWGTUP' (tags=optional)>}#