How to get energy given to a secondary in an event

In Stepping Action, is it possible to get the energy given to a secondary from the primary in the current step?

For example, in a scattering process, the beamline will scatter a particle residing in the default volume. How might I find the energy change of that particle?
If for example, an O16 is scattered, the energy change of the O16 is neither the kinetic nor the total energy of the O16 - it is the kinetic energy minus the binding energy.
If a gamma is generated, then it would be the total energy.

This is in order to perform an energy conservation sanity check. If I understand Geant4’s energy deposition right, the energy of the primary particle at the preStepPoint is equal to the GetTotalEnergyDeposited + the energy of the primary at the postStepPoint + the energy change of all secondaries.

Also, is there a way to track all the final secondaries generated from a particular primary (from PrimaryActionGenerator)?
Ex: for the following process (assuming nuclear reactions):
proton -> neutron + positron + electron neutrino -> positive ion + neutron + gamma + electron neutrino,

I would like to get a list of the final particles (the ion, neutron, gamma, and neutrino).

I appreciate your help.

Thank you,

A secondary is a newly created particle. So (for low energy processes), you can get that secondary in your stepping action and just ask for GetKineticEnergy().

What about scattered particles?
For example, I have a proton @ 40 MeV hitting a volume, upon which an O16 is generated as a secondary.
Clearly the O16 was not generated by the proton, so it is not GetTotalEnergy(),
and clearly the O16’s kinetic energy is less than the energy given to the O16.

Are you saying that the binding energy is equal to the energy deposition from GetTotalEnergyDeposit()?
Then the GetKineticEnergy() + GetTotalEnergyDeposit() + current energy of primary should be equal to the previous energy of the primary, right?

Thank you.

Yes, the nucleus in a scatter is “created” as a secondary. G4Material is treated as a continuum. It is not made up of G4Ions particles :slight_smile:

The O16 in your example was “generated” by the proton, in the sense of Geant4 processes.

like e- by photoelectric or Compton interactions

Thank you Dr. Kelsey and Mr. Maire.

I understand that in the sense of Geant4 processes, secondaries are generated. But (again using my example), how does Geant4 account for binding energy tying the O16 to the volume?

I assumed that this binding energy equaled the GetTotalEnergyDeposit and ran a debug run:

Given that the quantity denoted as “Total” equals the primary particle in the previous step, the assumption seems correct.

How can I account for the energy lost during the absorption of the proton?

The run is in G4Air and is 1 proton, while the timing data is local time of the preStep and secondary (which is 0ns as expected).

There is no binding energy of O16 : it is assumed free.
There is a production threshold mechanism (via cut for proton !). If kinetic energy of O16 is bigger than threshold it is explicitly generated, else it is accounted as local energy deposit of the proton.
Below, 2 events with tracking/verbose 2 :
1- threshold = 0 eV : ion O16 is explicitly created
2- threshold = 100 GeV : ion O16 is not created. it is accounted as dEstep.

ps. to play with setCut in this exercice, comment out line 147 of PhysicsList of Hadr03

akhil.mac.txt (442 Bytes)
akhil1.out.txt (1.7 KB)
akhil2.out.txt (1.4 KB)

1 Like

Thank you so much for your help!



There is no binding energy of O16 : it is assumed free.

Is this true for all the material in GEANT4? If energy deposition is the kinetic energy of secondary particles which do not pass the cut, then the energy loss of Primary particle should = sum of kinetic energy of all the secondary particles?

I tried a 5GeV pi- beam and looked at the inelastic scattering:

**process name: pi-Inelastic
**Number of secondaries: 96
**Etot_pre: 5.02999 Etot_post:0.13957
E lost: 4.89042
GetTotalEnergyDeposit : 0.0122239
sum of secondary Ek : 4.06298
GetTotalEnergyDeposit + secondary Ek : 4.07521

In this example, the energy change of primary particle is 4.89042, but the sum of kinetic energy of all the secondary particles is only 4.06298, even I added TotalEnergyDeposit it is still less than the primary particle energy change. Does anyone know what is the missing energy here?