higgs_dna.systematics package

Submodules

higgs_dna.systematics.event_systematics module

higgs_dna.systematics.photon_systematics module

higgs_dna.systematics.photon_systematics.FNUF(pt, events, year='2017', is_correction=True)[source]

—This is an implementation of the FNUF uncertainty copied from flashgg, — Preliminary JSON (run2 I don’t know if this needs to be changed) file created with correctionlib starting from flashgg: https://github.com/cms-analysis/flashgg/blob/2677dfea2f0f40980993cade55144636656a8a4f/Systematics/python/flashggDiPhotonSystematics2017_Legacy_cfi.py Applies the photon pt and energy scale corrections and corresponding uncertainties. To be checked by experts

higgs_dna.systematics.photon_systematics.Material(pt, events, year='2017', is_correction=True)[source]

—This is an implementation of the Material uncertainty copied from flashgg, — JSON file for run2 created with correctionlib starting from flashgg: https://github.com/cms-analysis/flashgg/blob/2677dfea2f0f40980993cade55144636656a8a4f/Systematics/python/flashggDiPhotonSystematics2017_Legacy_cfi.py Applies the photon pt and energy scale corrections and corresponding uncertainties. To be checked by experts

higgs_dna.systematics.photon_systematics.Scale_IJazZ(pt, events, year='2022postEE', is_correction=True, gaussians='1G', restriction=None)[source]

Applies the IJazZ photon pt scale corrections (use on data!) and corresponding uncertainties (on MC!). JSONs need to be pulled first with scripts/pull_files.py. The IJazZ corrections are independent and detached from the Egamma corrections.

higgs_dna.systematics.photon_systematics.Scale_Trad(pt, events, year='2022postEE', is_correction=True, restriction=None)[source]

Applies the photon pt scale corrections (use on data!) and corresponding uncertainties (on MC!). JSONs need to be pulled first with scripts/pull_files.py

higgs_dna.systematics.photon_systematics.ShowerShape(pt, events, year='2017', is_correction=True)[source]

—This is an implementation of the ShowerShape uncertainty copied from flashgg, — Preliminary JSON (run2 I don’t know if this needs to be changed) file created with correctionlib starting from flashgg: https://github.com/cms-analysis/flashgg/blob/2677dfea2f0f40980993cade55144636656a8a4f/Systematics/python/flashggDiPhotonSystematics2017_Legacy_cfi.py Applies the photon pt and energy scale corrections and corresponding uncertainties (only on the pt because it is what is used in selection). To be checked by experts

higgs_dna.systematics.photon_systematics.Smearing_IJazZ(pt, events, year='2022postEE', is_correction=True, gaussians='1G')[source]

Applies the photon smearing corrections and corresponding uncertainties (on MC!). JSON needs to be pulled first with scripts/pull_files.py

higgs_dna.systematics.photon_systematics.Smearing_Trad(pt, events, year='2022postEE', is_correction=True)[source]

Applies the photon smearing corrections and corresponding uncertainties (on MC!). JSON needs to be pulled first with scripts/pull_files.py

higgs_dna.systematics.photon_systematics.double_smearing(std_normal, std_flat, mu, sigma1, sigma2, frac)[source]
higgs_dna.systematics.photon_systematics.energyErrShift(energyErr, events, year='2022postEE', is_correction=True)[source]
higgs_dna.systematics.photon_systematics.photon_pt_scale_dummy(pt, **kwargs)[source]

Module contents

higgs_dna.systematics.add_jme_corr_syst(corrections_dict, systematics_dict, logger)[source]
higgs_dna.systematics.apply_systematic_variations_object_level(systematic_names, events, dataset_year, logger, available_object_systematics, available_weight_systematics, collections)[source]

Apply systematic variations to the provided object collections.

Parameters:

systematic_names (list): List of systematic variation names to process. events (awkward.Array): The events collection. dataset_year (str): Year information for the dataset. logger (logging.Logger): Logger for output messages. available_object_systematics (dict): Dictionary mapping systematic names to definitions for objects. available_weight_systematics (dict): Dictionary mapping systematic names to definitions for weights. collections (dict): Dictionary mapping object names (e.g., “Photon”, “Electron”, “Muon”) to their collections.

Returns:

dict: The updated collections with systematics applied.

higgs_dna.systematics.check_corr_syst_combinations(corrections_dict, systematics_dict, logger)[source]

This function is a sanity check for the choice of systematics and corrections which the user wants to process. It ensures that systematic variations of a correction can only be processed when the correction itself is applied.