met
#
MET corrections.
Calibrators#
- class met_phi(*args, requires_func=<law.util.NoValue object>, setup_func=<law.util.NoValue object>, sandbox=<law.util.NoValue object>, call_force=<law.util.NoValue object>, 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 undermet_phi_corr
:cfg.x.external_files = DotDict.wrap({ "met_phi_corr": "/afs/cern.ch/user/m/mrieger/public/mirrors/jsonpog-integration-f018adfb/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.
- data_only = False#
- get_met_config()#
- get_met_file(external_files)#
- mc_only = False#
- nominal_only = False#
- produces = {'MET.phi', 'MET.pt'}#
- setup_func(reqs, inputs, reader_targets)#
Load the correct met files using the
from_string()
method of thecorrectionlib.highlevel.CorrectionSet
function and apply the corrections as needed.- Parameters:
reqs (
dict
) – Requirement dictionary for thisCalibrator
instanceinputs (
dict
) – Additional inputs, currently not used.reader_targets (
dict
) – Additional targets, currently not used.
- Return type:
- shifts_only = None#
- uses = {'MET.phi', 'MET.pt', 'PV.npvs', 'run'}#