electron#

Electron related event weights.

Classes:

ElectronSFConfig(correction, campaign[, ...])

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

electron_trigger_weights(*args[, ...])

class ElectronSFConfig(correction, campaign, working_point='', hlt_path='')[source]#

Bases: object

Attributes:

Methods:

new(obj)

rtype:

ElectronSFConfig

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

ElectronSFConfig

class electron_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[, electron_mask])

Creates electron weights using the correctionlib.

get_electron_config()

get_electron_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, electron_mask=Ellipsis, **kwargs)#

Creates electron weights using the correctionlib. Requires an external file in the config under electron_sf:

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

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

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

cfg.x.electron_sf_names = ElectronSFConfig(
    correction="UL-Electron-ID-SF",
    campaign="2017",
    working_point="wp80iso",  # for trigger weights use hlt_path instead
)

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

Optionally, an electron_mask can be supplied to compute the scale factor weight based only on a subset of electrons.

Return type:

ak.Array

data_only = False#
get_electron_config()#
get_electron_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, 3)#
static update_cls_dict(cls_name, cls_dict, get_attr)#
use_supercluster_eta = True#
uses = {'Electron.{pt,eta,phi,deltaEtaSC}'}#
weight_name = 'electron_weight'#
class electron_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: electron_weights

Methods:

Attributes:

get_electron_config()#
get_electron_file(external_files)#
skip_func()#
use_supercluster_eta = False#
weight_name = 'electron_trigger_weight'#