Scoring ions tracklength

Hello,
I’d like to quantify the displacement of the ions of the G4_Fe target I am irradiating with neutrons.
I have tried to use the command based scoring:

/score/quantity/trackLength IronTrackLength
/score/filter/particle Fe55 Fe56

However there is an error at run time which says:


issued by : G4SDParticleFilter::G4SDParticleFilter
Particle Fe55 not found.

I’d like to know whether my solution is viable or not.
In case it isn’t, I suppose I must write my own stepping and/or tracking actions but I cannot find instructions or examples about identifying ions within the stepping or tracking actions. Are there any I can start from?

Thank you very much,
AB

Hi,

Altough the G4SDParticleFilter class has a method “addIon()” for filtering ions,
the command-line filter/scorers does not provide the UI-command for it.

If you write your own code for identifying ions the code in steppinaction or trackingaction,
the code of G4SDParticleFilter will be a good example, which identifies a ion by its Z and A numbers.
( Geant4 source code: source/digits_hits/scorer/src/G4SDParticleFilter.cc )

Best regards,

Hi,
thanks a lot for your reply.
I think it would be nice to add the command based scoring of ions as well in the future.
Meanwhile I’ll try to write my own code in steppingaction or tracking action following your suggestion.
Kind regards,
AB