Gate
Gate copied to clipboard
GatePhaseSpaceSource does not work for ions
Hi,
I wanted to use the phase space source with a phase space recording of a carbon ion (C12) beam. This does not work. Error message: "GateSourcePhaseSpace.cc (l.420): No particle type defined in phase space file." Tested with the current releas 9.2 as well as with the current development branch.
Closer inspection of GateSourcePhaseSpace.cc indicated, that pParticleDefinition = particleTable->FindParticle(particleName); Does not find a particle definition.
The name C12 should be a valid Geant4 particle name. Nevertheless, I have modified the source code to use the PDGCode of C12 (1000060120) instead with the same result.
For more common particles, like proton (2212) or He3 (1000020030) it works.
Inserting particleTable->DumpTable(); in the source code provides a lengthy list of particles, but it does not include all PDGCodes or ions.
The obvious workaround to use particleTable->FindIon(6, 12, 0, 0) does not work because of "error: ‘class G4ParticleTable’ has no member named ‘FindIon’"
This could also be related why using the GPSsource also does not work with C12, am I correct?
How could we fix that? I am willing to fix it, but would need some pointers in the correct direction.
Best, Hermann
Hi Hermann! A few years ago, the "heavy" ions got their own table in geant4, outside of the particle table. So now you have a G4ParticleTable and a G4IonTable. Intriguingly, smaller nuclei like protons/deuterons/tritiumnuclei/he3-nuclei and maybe even he4 are still considered particles, only heavier ions are in the ion table. I believe that this has something to do with the way nuclear interactions are currently implemented. For the phase space source I guess it means that both tables should be used in order to provide functionality for all possible flying objects collected in a phase space. Good luck!
thanks for #549 !