mc_weight#

Methods for dealing with MC weights.

Classes:

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

class mc_weight(*args, requires_func=law.util.no_value, setup_func=law.util.no_value, sandbox=law.util.no_value, call_force=law.util.no_value, pick_cached_result=law.util.no_value, inst_dict=None, **kwargs)[source]#

Bases: Producer

Methods:

call_func(events, **kwargs)

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

skip_func()

Attributes:

data_only

mc_only

nominal_only

produces

shifts_only

uses

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#
nominal_only = False#
produces = {'mc_weight'}#
shifts_only = None#
skip_func()#
uses = {'genWeight', <Route 'LHEWeight.originalXWGTUP' (tags=optional)>}#