A proton synchrotron tracking code