muon#

Muon related event weights.

Classes:

MuonSFConfig(correction[, campaign])

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

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

class MuonSFConfig(correction, campaign='')[source]#

Bases: object

Attributes:

Methods:

new(obj)

rtype:

MuonSFConfig

correction: str#
campaign: str = ''#
classmethod new(obj)[source]#
Return type:

MuonSFConfig

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

Bases: Producer

Methods:

call_func(events[, muon_mask])

Creates muon weights using the correctionlib.

get_muon_config()

get_muon_file(external_files)

init_func(**kwargs)

rtype:

None

requires_func(reqs)

rtype:

None

setup_func(reqs, inputs, reader_targets)

rtype:

None

skip_func()

update_cls_dict(cls_name, cls_dict, get_attr)

Attributes:

call_func(events, muon_mask=Ellipsis, **kwargs)#

Creates muon weights using the correctionlib. Requires an external file in the config under muon_sf:

cfg.x.external_files = DotDict.wrap({
    "muon_sf": "/afs/cern.ch/work/m/mrieger/public/mirrors/jsonpog-integration-9ea86c4c/POG/MUO/2017_UL/muon_z.json.gz",  # noqa
})

get_muon_file can be adapted in a subclass in case it is stored differently in the external files.

The name of the correction set and the year string for the weight evaluation should be given as an auxiliary entry in the config:

cfg.x.muon_sf_names = MuonSFConfig(
    correction="NUM_TightRelIso_DEN_TightIDandIPCut",
    campaign="2017_UL",
)

get_muon_config can be adapted in a subclass in case it is stored differently in the config.

Optionally, a muon_mask can be supplied to compute the scale factor weight based only on a subset of muons.

Return type:

ak.Array

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

None

mc_only = True#
nominal_only = False#
requires_func(reqs)#
Return type:

None

setup_func(reqs, inputs, reader_targets)#
Return type:

None

shifts_only = None#
skip_func()#
supported_versions = (1, 2)#
static update_cls_dict(cls_name, cls_dict, get_attr)#
uses = {'Muon.{pt,eta}'}#
weight_name = 'muon_weight'#
class muon_trigger_weights(*args, requires_func=law.util.no_value, setup_func=law.util.no_value, sandbox=law.util.no_value, call_force=law.util.no_value, max_chunk_size=law.util.no_value, pick_cached_result=law.util.no_value, inst_dict=None, **kwargs)#

Bases: muon_weights

Methods:

Attributes:

get_muon_config()#
get_muon_file(external_files)#
skip_func()#
weight_name = 'muon_trigger_weight'#