met#

MET corrections.

Calibrators#

class met_phi(*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: Calibrator

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)#
mc_only = False#
nominal_only = False#
produces = {'MET.phi', 'MET.pt'}#
requires_func(reqs)#
Return type:

None

setup_func(reqs, inputs, reader_targets)#

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) – Requirement dictionary for this Calibrator instance

  • inputs (dict) – Additional inputs, currently not used.

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

Return type:

None

shifts_only = None#
uses = {'MET.phi', 'MET.pt', 'PV.npvs', 'run'}#