I have a quick question. I am running the TestEm3 example and found out the energy deposit in the calorimeter plus the leakage energy does not always equal to the incoming beam energy.
For example, in the attached plot, there are always around 1-2% events with energy slightly smaller (~0.1%) than the incoming particle energy. Sorry for being nitpicky, but naively I would expect for EM showers the total energy to be exactly the same.
Is this purely a numerical precision issue, or there are some underlying physics that causes 1% of events having a small fraction of energy not captured in the Edep + Eleak simulation?
What is the material in the “world” volume that the beam passes through? If it’s G4_Galactic, then I would expect, like you, 100% energy in the calorimeter+leakage.
If the world volume is G4_Air, and you’ve put the source back from the calorimeter, then you can occasional scatters in the air along the beam path, so that what hits the calorimeter is slightly lower energy.
I would think so. If your energy is high enough to have non-trivial nuclear interactions, or if you’re using a hadronic beam (protons or neutrons), that stops being true. Neutron or proton capture will give you some sort of radioisotope, with different nuclear binding energy, that breaks the nice summing.
But a 1 GeV gamma ought to give you 1 GeV of Edep + Eleak. If you really want to debug it, you’re going to need to record a whole lot more detail. Use a SensitiveDetector in your volume and make an N-tuple of the particle steps, recording track and step ID, position, momentum, kinetic energy before and after each step, Edep and NIEL (usually zero). Then you can look at the whole event structure offline and see what’s happening where.
Thanks. I can further look into this. Originally I was thinking since this was one of the examples provided by the team, there might be some already existing explanations and understandings on these.
On the hadronic case, indeed we have seen the behaviors you described that the sum is different from the input by 10%. Is there any possibility we can retrieve the truth information of energy lost from nuclear binding energy, radioisotope, etc, from GEANT? (GetTotalEnergyDeposit doest not include these right?) Since there are simulations I would naively expect everything should be trackable.
It is not a numerical problem.
This missing energy is due to positons created by Gamma Conversion process, which leave the detector instead of to be annihilated in it.
( For Gamma Conversion process Q = -2 electron_mass; for annihilation Q = +2 electron_mass. )
This effect can be seen in few other examples. Below a macro for TestEm11 and the associated plot.
thanks a lot! after fixing it things are consistent now.
beyond the trick, is there a more general way to tag if a secondary particle comes from existing material (in which case m_0 will not be included in the total energy deposit) or comes from the energy deposit (e.g., photon conversions, where 2*m_e needs to be included in the total energy deposit, as you suggested) with Geant?
Your question is too general.
In electromagnetic processes, positron is probably the only particle which can make a problem of energy balance.
With hadronic processes (pions production and so one …) the situation is probably too complicated to have a general and automatic mechanism to control energy balance.