示例#1
0
文件: __init__.py 项目: pwaller/pwa
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
示例#2
0
文件: __init__.py 项目: pwaller/pwa
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