Reconstruction of distribution functions of fast ions and runaway electrons in