Any mechanism to model spatially varying material composition?

Geant4 Version: 10.07.p04 or 11.x


As part of the G4CMP Consortium, we are investigating how to model heterostructure which are of interest for both particle detectors and quantum-information devices. Some kinds of devices apparently utilize a “gradient substrate” layer of SiGe alloy, Si(1-x) Ge(x), where x varies smoothly along the Z axis.

Is this something that anyone has done with Geant4? It’s clear that G4Material itself cannot be sensibly subclassed – all of the accessor functions are non-virtual, so I could not define a G4GradientMaterial where, e.g., something like the Ge number fraction could be returned as a function of position.

Does this sound like something that G4ExtendedMaterial (specifically, a G4VMaterialExtension subclass) could handle? I have some ideas for how to deal with the compositional gradient outside of G4Material, but not for things like “a cosmic ray makes a hit at position X, what’s the Ge vs. Si fraction there to decide on cross-sections?”

Hi @mkelsey

Thanks for your question. Do you think a Parametrized volume [1] can do the job?

Best,
Alvaro
[1] Physical Volumes — Book For Application Developers 11.4 documentation

A parametrized volume certainly simplifies the construction, but I think it puts me in effectively the same position. Even with ComputeMaterial(), I’d still need to have a set of N separate G4Material* objects, corresponding to steps in the composition gradient.

There is also the complication (which I hadn’t thought of initially) that each of the “layer volumes” implies that we have a set of N boundary crossings for any particle that traverses the volume (including just ordinary G4 background particles). In real life, that wouldn’t be the case: a cosmic ray muon would just traverse the volume leaving dE/dx behind it (although of course the dx part would vary with composition).

I am not sure if Geant4 physics tables can be interpolated to model the material mix gradient you mention. My understanding is that Geant4 was designed to maintain a one-to-one correspondence between a G4Material and its associated physics tables. Perhaps a more experienced member of the community could clarify this point.

That’s exactly right, Alvaro. As I read things, G4Material by design has a fixed composition, and all of the conmpositional accessor functions are non-virtual, so that cannot be changed via subclassing.

1 Like

I confirm that there is no mechanism for a material to vary within a volume. It is not something that was ever a requirement.

As a first step you could have different particle types seeing a different geometry by using an envelope volume in which either a parameterisation, or better TrackingManager (derived from G4VTrackingManager) the newest capability, to takes over the simulation of some particle types. Only the particles which need the varying material composition can see additional boundaries.

But a more comprehensive solution could use a custom TrackingManagerbe to transport some type(s) of particles within a “step-like” varying material composition that ‘jumps’ the particles forward to the sampled location of a potential interaction, determins the material there and chooses whether there is a true interaction or a ‘fictitious’ non-interaction (depending on the ratio of the cross section to is maximum). This would be similar to the approach for Woodcock tracking of photons created by Mihaly Novak in ATLAS [1] and used in voxelised geometries in GATE [2].

This second approach would still require a set of discrete materials, but could avoid introducing geometry boundaries to achieve it (what I called ‘step-like’ variation of materials above.)

[1] ATLAS Collaboration. Software and computing for Run 3 of the ATLAS experiment at the LHC. Eur. Phys. J. C 85, 234 (2025). Software and computing for Run 3 of the ATLAS experiment at the LHC | The European Physical Journal C

[2] Niklas S Rehfeld et al 2009 Phys. Med. Biol. 54 2163DOI 10.1088/0031-9155/54/7/021

1 Like

Thanks, John! The major purpose of this GeSi gradient is with G4CMP, where we’re dealing with phonon and charge transport. I suspect that for general Geant4 particles (cosmic ray muons, or neutron backgrounds), defining a simple “average composition” material is plenty good enough.

Within G4CMP, we can register the compositional gradient and deal with how the phonon- and charge-specific properties change in our own code, probably doing something the way you describe, where a custom TrackingManager enforces maximum steps in the gradient direction.

1 Like

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