SMS dit: Theory and design of charged particle beams