In the attached document, I have collected the energy data of a run of 10 e- with an energy of 10 MeV on a material plate.
I noticed that the total energy deposited by the particle is is not always equal to the energy variation between the two points of a step.
The conditions on this data are: {
Track Parent ID == 0 AND
PreStepPoint == PlateVolume AND ( PostStepPoint == fGeomBoundary OR PostStepPoint == PlateVolume )}
If you have a SteppingAction, take a look at G4Step::GetNumberOfSecondariesInCurrentStep(). If secondaries are created (like ionizaton electrons, decays, whatever), their energy is not included in GetTotalEnergyDeposit().
I made a call on the secondary numbers of the primaries from my SteppingAction class, and clearly the missing energies were transferred to the descendants. Thank you.
However, I expected to have 13 events, since the total number of secondaries for the primaries was 13, while I get 22 events as a results for PID==1. (please see attached)
Are these 9 particles considered secondaries? Where do they get their energies from?
Kinds,
Younes
Attached the results for PID==1,2… all with the creator process name and the number of secondaries.
One more question:
Why does the electron created by ionization in line 30 have the same Parent ID and Track ID as the gamma created by Bremsstrahlung in line 32 ? (please see eboundary_.txt above)
Are these tracks from one single event, or have you jumbled up multiple events together? If you use /run/beamOn with a number greater than 1, I would encourage you to include the event number in your printout.
I quote it here for the benefit of future readers: energy deposition at a step is the sum of ionisation energy loss, which includes energy transfer for atoms below production threshold of secondary particles: delta-electrons, bremsstrahlung gamma, low energy nuclear recoil after elastic scattering.