We discuss a GEANT4 simulation of the phase rotation system for a neutrino factory. The comparison with the beam transport code PATH shows a good agreement. Preliminary results for the energy disposition in the cryostat of the superconducting 1.8 T solenoid are briefly presented