from ROOT import gSystem gSystem.Load('fake_C.so') from ROOT import getDYWeight from ROOT import shutdown print 'return = ', getDYWeight(1.) shutdown()
def getDYMassPtWeight(event): if not hasattr(event, 'parentBoson'): event.parentBoson = GenAnalyzer.getParentBoson(event) event.dy_weight = getDYWeight(event.parentBoson.mass(), event.parentBoson.pt())