Added code to track neutron energies, but quickly revamped it to keep track of the positions as well. The code now has two boxes - the polyethylene, then an outer box filled with air. Position and energy are recorded when a neutron either hits the poly surface or the outer box surface. For each, the information goes into separate trees. Secondary particles are also discarded when they're generated.
This is the final code used for the project - there have been a few minor tweaks but nothing major.