Can we know which atom the deposited energy is deposited on

Incident particles will deposit energy in the target material. At each step, can we know which atom the deposited energy is deposited on? I don’t konw if it can achieve. I need your help.

Thank you for reading my question. Any advice will be helpful for me.

Wouldn’t the locations (x,y,z) at which interactions are happening will be helpful? If yes, I guess you can achieve that in the volume of interest and extract the coordinates of those steps in

@lvll98 I presume you’re asking about the target “atom type”, not position? Unfortunately, I don’t believe that’s available in a generic way. If the interaction was hadronic, then G4Isotope* G4HadronicProcess::GetTargetIsotope() or G4Nucleus* G4HadronicProcess::GetTargetNucleus() can get you this information.

Use code along the lines of (note the null pointer checks at each step)

  G4StepPoint* post = theStep->GetPostStepPoint();
  const G4VProcess* proc = (post ? post->GetProcessDefinedStep() : 0);
  const G4HadronicProcess* had = dynamic_cast<G4HadronicProcess*>(proc);

  G4Isotope* target = (had ? had->GetTargetIsotope() : 0);
  if (target) {
    G4cout << theStep->GetTrack()->GetParticleDefinition()->GetParticleName()
           << " interacted with " << target->GetName() << G4endl;

Thank you for your answer. I have tried that, but I don’t know what the corresponding target atom is at that position because I set up the mixture as the target material.

Thank you so much for your suggestion. That’s a good idea. I will try it.

That’s exactly right. Geant4 does not setup the material with a layout of the different kinds of atoms in specific locations. The material is treated as a perfect continuum. The position of interaction is chosen, and can have any coordinates at all. Then for EM interactions, the average material properties are used, while for hadronic interaction, some isotope from the material definition is picked at random and used.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.