If you need this for all interactions in all volumes, the easiest way to do this is with a SteppingAction. For the step, check if the track’s ParentID() is zero, meaning it’s a primary. Then you can collect information from the step, including the energy, the post-step GetProcessDefinedStep().
If you are only interested in primary photons’ secondaries in a particular target volume, you can do the same thing with a SensitiveDetector attached to that volume.
You could either accumulate this stuff in a HitsCollection, or push it directly into an N-tuple.