Using phase space

Hello,
I want to save the data information of particles which cross a plan (such as: energy, type of particle, position and direction), after use this data information as primary source of particles.
does anyone have an idea …
cheers