Is a changing concentration of element in material possible?

Is there a G4 Class to change the concentration of an element in a material as a function of distance when constructing a detector? i.e. a depth profile.

Example being a block of metal where hydrogen has diffused through from 1 side.

You want to have a look at parameterised volumes:

https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Detector/Geometry/geomPhysical.html#advanced-parameterisations-for-nested-parameterised-volumes

You will need to override the ComputeMaterial method such that the concentration depends on the copy id (an integer) of the daughter material.

It is not the most straight-forward of tasks, but you have a few examples using this approach. Good luck!

1 Like