Incorrect Setting of isIon in Trajectories for Hydrogen Ions with nElectrons > 0
There is a misidentification of particle ID in the case of negative hydrogen ions. The ion is defined with 'particle="ion 1 1 -1" ' but in the output file the variable "isIon" is false. In the debugger the G4ParticleDefinition variable "theParticleName" is "proton".
Comments (4)
-
-
We use Geant’s IsIon which identifies a proton as an ion. This is because it inherits G4Ions and is considered an ion. In BDSIM, we treat a proton as a specific particle and therefore filter IsIon specifically for protons. This is wrong in the case of a proton with at least 1 electron as it’s better considered an ion then.
-
Correct “samplers” to “trajectories” in title. This was ambiguous. The problem is only the new trajectory variable in develop.
-
- changed status to resolved
This has been fixed in develop now. The code for checking this was duplicated in a few places and is now in BDSPhysicsUtilities. This has also be fixed for aperture impacts too.
- Log in to comment