mc_weight#
Methods for dealing with MC weights.
Classes:
|
- class mc_weight(*args, **kwargs)[source]#
Bases:
ProducerAttributes:
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:
ArrayUse LHEWeight.originalXWGTUP when it exists and genWeight is always 1.
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'}#
- static update_cls_dict(cls_name, cls_dict, get_attr)#
- uses = {'genWeight', <Route 'LHEWeight.originalXWGTUP' (tags=optional)>}#