Visualizing recoil protons

I am trying to model neutron interactions in water. I’m starting from example Hadr04. The results seem to make sense but I cannot figure out how to display the recoil protons.
I’ve tried playing with track visualization but it doesn’t seem to help.
how do I get Geant to track and display the recoils?

It’s possible that your visualization scale is too large. The protons may only travel a few mm depending on their kinetic energy.

good point the range of 1 MeV protons in water is ~25 micron. I tried zooming in on a few interaction points but didn’t see any tracks coming out. is there a way to at least mark track ends with a large spot?

At that range, I expect you’re not getting any “real” protons at all. Geant4 has “production cuts”, which are set as part of the physics list, and which have units of distance. When a secondary is created, G4 estimates its range in the current material, and if that range is less than the production cut, the secondary is not tracked. Instead, its energy is added to the “EnergyDeposit” total for the step.

Typically, the default production cuts are 1 mm, but you can set them as you wish either in your physics list, by calling the physics list SetCutValue() functions (see G4VUserPhysicsList.hh) from a physics list pointer (e.g., in your main()).

As said in readme, all secondaries are killed in StackingAction.
To see them, replace last line of StackingAction by : return fUrgent;

ps : remember that, in this example, electromagnetic interactions are not registered. Protons do not lose energy …

Thank you mkelsey and maire,
I fixed the killing of secondaries and the production cuts and received my non-interacting protons (and oxygen ions - quite a few more of those than I had naively thought I’d get).
I’m now working on bringing in the appropriate interactions

Be care … If you modify Hadr04, I am not sure that output will remain meaningful.
To make a “realistic” simulation, I suggest to start from Hadr06 or Hadr07.

following your comment I switched to Hadr07 and got it to do what I need.