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.PhotonIDMVAShape(mvaID, events, year='2024', is_correction=True, workflow='base')[source]
Photon MVA ID shape systematic derived via quantile mapping of the data–MC mvaID discrepancy.
There is no correction associated with this systematic – the normalizing flows are the correction. Calling with
is_correction=Trueraises aRuntimeError.When
is_correction=Falsethe function loads the pre-derived correctionlib JSON, evaluates an additive shift delta(mvaID) for every photon, and returns the up / down varied mvaID values as an (N, 2) array.https://indico.cern.ch/event/1624987/#31-shape-systematic-on-the-pho
- higgs_dna.systematics.photon_systematics.Photon_Scale_EGM(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.Photon_Smearing_EGM(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.Scale(pt, events, year='2022postEE', is_correction=True, gaussians='1G', restriction=None, is_Zee=True)[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.ShowerShape(pt, events, year='2017', is_correction=True, workflow='base')[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(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
Module contents
- 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.