JetCorrectionUncertainty#
- class coffea.jetmet_tools.JetCorrectionUncertainty(**kwargs)[source]#
Bases:
objectThis class is a columnar implementation of the JetCorrectionUncertainty tool in CMSSW and FWLite. It calculates the jet energy scale uncertainty for a corrected jet in a given binning.
It implements the jet energy correction definition specified in the JES Uncertainty TWiki.
You can use this class as follows:
jcu = JetCorrectionUncertainty(name1=corrL1,...) jetUncs = jcu.getUncertainty(JetParameter1=jet.parameter1,...)
in which
jetUncsare the uncertainties, with the same shape as the input parameters. In order to see which parameters must be passed togetUncertainty, one can dojcu.signature.You construct a JetCorrectionUncertainty by passing in a dict of names and functions. Names must be formatted as ‘<campaign>_<dataera>_<datatype>_<level>_<jettype>’. You can use coffea.lookup_tools’
extractorandevaluatorto get the functions from some input files.Attributes Summary
list the different sources of uncertainty
list the necessary jet properties that must be input to this function
Methods Summary
getUncertainty(**kwargs)Returns the set of uncertainties for all input jets for all the levels (== sources)
Attributes Documentation
- levels#
list the different sources of uncertainty
- signature#
list the necessary jet properties that must be input to this function
Methods Documentation
- getUncertainty(**kwargs)[source]#
Returns the set of uncertainties for all input jets for all the levels (== sources)
Use it like:
juncs = uncertainty.getUncertainty(JetProperty1=jet.property1,...) #'juncs' will be formatted like [('SourceName', [[up_val down_val]_jet1 ... ]), ...] #in a zip iterator