We analyze the crossing of a quantum critical point based on exact results for the transverse XY model. In dependence of the change rate of the driving field, the evolution of the ground state is studied while the transverse magnetic field is tuned through the critical point with a linear ramping. The excitation probability is obtained exactly and is compared to previous studies and to the Landau-Zener formula, a long time solution for non-adiabatic transitions in two-level systems. The exact time dependence of the excitations density in the system allows to identify the adiabatic and diabatic regions during the sweep and to study the mesoscopic fluctuations of the excitations. The effect of white noise is investigated, where the critical point transmutes into a non-hermitian ``degenerate region''. Besides an overall increase of the excitations during and at the end of the sweep, the most destructive effect of the noise is the decay of the state purity that is enhanced by the passage through the degenerate region.