How to get information about the atom on which ionization occurs

hi
everyone. Now I’m studying about heavy ions acrossing in olivine crytal in geant4.And I want to know how to get information about the atom on which ionization occurs.
with best regards,
Than Naing Soe

Hello,
If you work with “standard” PhysicsLists (not DNA), then ionisation is coplicate process responsible for continues energy loss and delta-electron production. If you have interest to delta-electron production, then step of interest should be limited by the ionisation process.
Inside G4UserSteppingAction you may have:

G4StepPoint* postStep = step->GetPostStepPoint();
const G4ionIonisationptr = (G4ionIonisation) postStep->GeProcessDefinedStep();

if ptr is not nullptr, this means that the delta-electron is produced by ion ionisation, in that case:

const G4Element* elm = ptr->GetCurrentElement();

VI

hello
Dear Vladimir Ivantchenko

       Thanks for your advices sir. I'll try.

with best regards,
TNS

hello
Dear Vladimir Ivantchenko

I already done what you said but i have some problem.


and my problem is show in below.
May be version of geant4 .Now i’m using geant4.10.01. please give me some advice sir. with best regards,
TNS

You need to cast to (G4ionIoniziation*), or better, to (const G4ionIonization*). As written, you’re trying to cast a pointer to an object.

1 Like

Hello,

in your code it is possible , that ptr==nullptr, because not all steps are limited by the G4ionIonisation process. You have to protect against such situation. You need also fix compilation warnings due to not correct use of “elm”.

VI

Hello,

we had a discussion with Rostislav. He explained the reason of your interest to type of element on which ionisation is taken place. We also agreed, that Geant4 standard ionisation models does not use atomic level information, except mean ionisation potential. Moreover, GetCurrentElement() for ionisation models is not defined.

VI

hello
Dear Vladimir Ivantchenko

Thanks alot your reply sir. So which Model can I use to know current element in which occur ionization.

with best wishes,
TNS