-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ekin in EnergyDepositionSD gives kinetic energy after, not before first interaction #17
Comments
Dear jvavrek, Thank you for pointing out this issue and for the thorough documentation. Indeed, the readout of the kinetic energy was in contradiction to what is written in the README. I applied your proposed fix to all detector classes. Now, the value of Ekin should make more sense. So far, I did not notice this issue, because I usually do not read out Ekin when using an EnergyDepositionSD. This is because the EnergyDepositionSD stores information only at the level of G4Events (
, an electron and a positron can be emitted in opposite directions inside a detector. They will be part of the same event. Similar to your pileup effect, the EnergyDepositionSD records
, because the electron is emitted first. Note that it records an energy deposition which is even higher than the sum of the kinetical energies of the two emitted particles, because the positron was annihilated. Actually, no sensitive detector exists at the moment that can store all the information that
condition in |
I will try to make the limitations of the detector classes more clear in the documentation and implement a real tracking detector. For the NRF experiments usually performed at HIγS, this may be overpowered, but it is nice to have it for debugging. |
@uga-uga thanks for the update. I agree that a full tracking detector would be overpowered for NRF. I've found that the initial kinetic energy can be a useful diagnostic for efficiencies and fluxes, though, so it's nice to have directly alongside the energy deposition. |
Jack Silano (LLNL) and I have found that in the EnergyDepositionSD class, the kinetic energy appears to be tallied incorrectly. Based on the documentation, Ekin should be the kinetic energy of the incident particle, but based on experimentation, the kinetic energy is that after the primary's first interaction.
For example, firing 2500 keV photons at the ZeroDegree detector, a verbose output of EnergyDepositionSD::ProcessHits() gives the following:
Here we can see that the final value of Ekin = 1783.58 comes from the outgoing kinetic energy after the first Compton interaction at 2500 keV. Note also that this (quite often) causes Edep > Ekin.
A simple fix might be to change
hit->SetKineticEnergy(track->GetKineticEnergy());
to
hit->SetKineticEnergy(aStep->GetPreStepPoint()->GetKineticEnergy());
This gives a better picture of what the true incident kinetic energy is, but doesn't perfectly solve the Edep > Ekin problem, as it doesn't account for pileup within the same event—multiple secondary photons depositing energy in the detector, e.g.:
Here two photons of energies 759.784 keV and 72.2999 keV both deposit their full energies in the detector, but only 759.784 keV is set as the value of Ekin.
Either way, I think the change recommended above is still a more intuitive measure of the 'Ekin' despite the pileup issue.
The text was updated successfully, but these errors were encountered: