from minty.utils import deferred_root_loader, make_deferred_instance CaloIsoCorrection = deferred_root_loader("CaloIsoCorrection.cxx", "CaloIsoCorrection") calo_iso_correction = make_deferred_instance(CaloIsoCorrection) GetPtEDCorrectedIsolation = calo_iso_correction.GetPtEDCorrectedIsolation GetPtNPVCorrectedIsolation = calo_iso_correction.GetPtNPVCorrectedIsolation
from logging import getLogger; log = getLogger("EnergyRescaler") from minty.utils import deferred_root_loader, make_deferred_instance EnergyRescaler = deferred_root_loader("EnergyRescaler.cxx+", "EnergyRescaler") def initialize_EnergyRescaler(EnergyRescaler): er = EnergyRescaler() log.info("Initializing energy rescaler") er.useDefaultCalibConstants() return er energy_rescaler = make_deferred_instance(EnergyRescaler, initialize_EnergyRescaler) v16_E_correction = energy_rescaler.applyEnergyCorrection