met#

MET corrections.

Calibrators#

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

Bases: Calibrator

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

Performs the MET phi (type II) correction using the correctionlib for events there the uncorrected MET pt is below the beam energy (extracted from config_inst.campaign.ecm * 0.5). Requires an external file in the config under met_phi_corr:

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

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

The name of the correction set should be present as an auxiliary entry in the config:

cfg.x.met_phi_correction_set = "{variable}_metphicorr_pfmet_{data_source}"

where “variable” and “data_source” are placeholders that are inserted in the calibrator setup setup_func(). get_met_correction_set can be adapted in a subclass in case it is stored differently in the config.

Parameters:

events (Array) – awkward array containing events to process

Return type:

Array

data_only = False#
get_met_config()#
get_met_file(external_files)#
init_func(**kwargs)#

Initialize the met_pt_corrector and met_phi_corrector attributes.

Return type:

None

mc_only = False#
met_name = 'MET'#
requires_func(task, reqs, **kwargs)#
Return type:

None

setup_func(task, reqs, inputs, reader_targets, **kwargs)#

Load the correct met files using the from_string() method of the correctionlib.highlevel.CorrectionSet function and apply the corrections as needed.

Parameters:
  • reqs (dict[str, DotDict[str, Any]]) – Requirement dictionary for this Calibrator instance

  • inputs (dict[str, Any]) – Additional inputs, currently not used.

  • reader_targets (InsertableDict) – Additional targets, currently not used.

Return type:

None

skip_func(**kwargs) bool#
Return type:

bool

static update_cls_dict(cls_name, cls_dict, get_attr)#
uses = {'PV.npvs', 'run'}#