Neutrino energy reconstruction in long-baseline experiments