class for energy loss calculation