Symplectic integrator for $s$-dependent static magnetic fields based on   mixed-variable generating functions
  We describe a technique for constructing a symplectic transfer map for a charged particle moving through an accelerator component with arbitrary three-dimensional static magnetic field. The transfer map is constructed by symplectic integration; by representing the map at each step of the integration by a mixed-variable generating function, exact symplecticity is ensured. By using an appropriate integration algorithm, there is no necessity to make the paraxial approximation. The technique is illustrated by application (in one degree of freedom) to a quadrupole magnet with strong octupole component and fringe field. 
Andy Wolski, Jonathan Gratus, Robin W. Tucker
physics.acc-ph