Study of the magnetosphere using energetic solar particles