CorrectedJetsFactory#

class coffea.jetmet_tools.CorrectedJetsFactory(name_map, jec_stack)[source]#

Bases: object

Factory class for applying corrections to jets, including organizing variations (eg: JES up and down). It is constructed from a name map, which translates between field names for corrections and field names in inputs, and a JECStack, which contains the actual correction functions.

Once a CorrectedJetsFactory is constructed, the build method can produce corrected jets from an input array of jets.

Parameters:
  • name_map (dict[str, str]) – Keys are argument names in the various corrections’ signatures (eg: the signature attribute of a FactorizedJetCorrector object). Values are the names of the corresponding fields as they would appear in the jet array passed to the build method.

  • jec_stack (JECStack) – Contains the corrections that will be applied to the input jet array when calling build.

Methods Summary

build(injets)

Apply the corrections to the array of jets, returning an array of corrected jets.

uncertainties()

Returns a list of the sources of uncertainty included in the stack.

Methods Documentation

build(injets)[source]#

Apply the corrections to the array of jets, returning an array of corrected jets.

Parameters:

injets (awkward.Array or dask_awkward.Array) – An array of uncorrected jets, to which we want to apply corrections.

Returns:

Array of jets, representing the corrected jets, with shape matching injets.

Return type:

awkward.Array or dask_awkward.Array

uncertainties()[source]#

Returns a list of the sources of uncertainty included in the stack.

Returns:

A list of the sources of uncertainty.

Return type:

list[str]