How to set geometry with gradually worse ABSLENGTH

I am making geometry with optical photon absorption.
I want to add the absorption property depends on the position continuously.
Is it possible to get that feature working with Geant4?

No. What you could do is define your structure as a series of stacked volume layers, with thicknesses small compared to the absorption length. Define a set of materials, all copies of the true material you want, and then attach a different MaterialPropertiesVector to each of those materials, with a graded set of ABSLENGTH values.

1 Like

Thank you for quick reply!

I will try to multi layer geometry like your suggestion.