pocket_coffea.lib.weights.common package#

Submodules#

pocket_coffea.lib.weights.common.common module#

class pocket_coffea.lib.weights.common.common.SF_btag(params, metadata)#

Bases: WeightWrapper

compute(events, size, shape_variation)#
has_variations: ClassVar[bool] = True#
name: ClassVar[str] = 'sf_btag'#
class pocket_coffea.lib.weights.common.common.SF_btag_calib(params, metadata)#

Bases: WeightWrapper

compute(events, size, shape_variation)#
has_variations: ClassVar[bool] = False#
name: ClassVar[str] = 'sf_btag_calib'#
class pocket_coffea.lib.weights.common.common.SF_ctag(params, metadata)#

Bases: WeightWrapper

compute(events, size, shape_variation)#
has_variations: ClassVar[bool] = True#
name: ClassVar[str] = 'sf_ctag'#
class pocket_coffea.lib.weights.common.common.SF_ctag_calib(params, metadata)#

Bases: WeightWrapper

compute(events, size, shape_variation)#
has_variations: ClassVar[bool] = True#
name: ClassVar[str] = 'sf_ctag_calib'#
class pocket_coffea.lib.weights.common.common.SF_jet_puId(params, metadata)#

Bases: WeightWrapper

compute(events, size, shape_variation)#
has_variations: ClassVar[bool] = True#
name: ClassVar[str] = 'sf_jet_puId'#

pocket_coffea.lib.weights.common.weights_run2_UL module#

class pocket_coffea.lib.weights.common.weights_run2_UL.SF_ele_trigger(params, metadata)#

Bases: WeightWrapper

compute(events, size, shape_variation)#
has_variations: ClassVar[bool] = True#
name: ClassVar[str] = 'sf_ele_trigger'#
pocket_coffea.lib.weights.common.weights_run2_UL.get_ele_trigger_sf(params, year, pt, eta, phi, counts, variations)#

Compute the electron trigger scale factors for Run2. Note that this a custom implementation to apply the single electron trigger scale factors in the ttH(bb) Run-2 analysis. This implementation is not supported by the EGM-POG. The procedure to compute the trigger SF correction map can be found at PocketCoffea/AnalysisConfigs . The structure of the correction map and the naming convention follows the one of the implementation.

pocket_coffea.lib.weights.common.weights_run2_UL.sf_ele_trigger(params, events, year, variations=['nominal'])#

This function computes the semileptonic electron trigger SF by considering the leading electron in the event. This computation is valid only in the case of the semileptonic final state. Additionally, also the up and down variations of the SF for a set of systematic uncertainties are returned.

pocket_coffea.lib.weights.common.weights_run2_UL.sf_qcd_factor_scale(events)#

Up and down variations for the factorization scale weights. The up variation of the factorization scale weight is defined as the ratio of the weight with factorization scale increased by a factor of 2 to the nominal weight ([5]/[4]). The down variation of the factorization scale weight is defined as the ratio of the weight with factorization scale decreased by a factor of 2 to the nominal weight ([3]/[4]). Conventions for the LHEScaleWeight (valid for NanoAODv9) are: LHE scale variation weights (w_var / w_nominal); [0] is renscfact=0.5d0 facscfact=0.5d0 ; [1] is renscfact=0.5d0 facscfact=1d0 ; [2] is renscfact=0.5d0 facscfact=2d0 ; [3] is renscfact=1d0 facscfact=0.5d0 ; [4] is renscfact=1d0 facscfact=1d0 ; [5] is renscfact=1d0 facscfact=2d0 ; [6] is renscfact=2d0 facscfact=0.5d0 ; [7] is renscfact=2d0 facscfact=1d0 ; [8] is renscfact=2d0 facscfact=2d0

pocket_coffea.lib.weights.common.weights_run2_UL.sf_qcd_renorm_scale(events)#

Up and down variations for the renormalization scale weights. The up variation of the renormalization scale weight is defined as the ratio of the weight with renormalization scale increased by a factor of 2 to the nominal weight ([7]/[4]). The down variation of the renormalization scale weight is defined as the ratio of the weight with renormalization scale decreased by a factor of 2 to the nominal weight ([1]/[4]). Conventions for the LHEScaleWeight (valid for NanoAODv9) are: LHE scale variation weights (w_var / w_nominal); [0] is renscfact=0.5d0 facscfact=0.5d0 ; [1] is renscfact=0.5d0 facscfact=1d0 ; [2] is renscfact=0.5d0 facscfact=2d0 ; [3] is renscfact=1d0 facscfact=0.5d0 ; [4] is renscfact=1d0 facscfact=1d0 ; [5] is renscfact=1d0 facscfact=2d0 ; [6] is renscfact=2d0 facscfact=0.5d0 ; [7] is renscfact=2d0 facscfact=1d0 ; [8] is renscfact=2d0 facscfact=2d0

pocket_coffea.lib.weights.common.weights_run3 module#

Module contents#