HOWTO to simulate a single-particle gun