I am writing a GEANT4 application using GDML that will require optical photon tracking. I am able to define my own materials, set properties such as indices of refraction and absorption lengths, and everything seems to work fine.
However, what if I want to use built in GEANT4 materials and change optical properties? For example, if I assign G4_AIR or G4_TEFLON to a material, photons are stopped and killed at the volume boundaries, presumably because no index of refraction has been set.
Will I have to re-define any G4 materials I would like to use, or is there a way to add optical parameters to existing materials? Or, perhaps a way to add optical parameters to volumes regardless of the material definition?
Hi, you can add optical properties to existing materials in the same way that you do for materials you define. This is done in the optical examples, eg extended/optical/OpNovice2.
Hi, thanks your your response. I am aware of how to add properties to existing materials in hard code. Perhaps I was unclear: One can add optical properties to materials in GDML, but only (as far as I know) to custom made materials within the GDML file, and not to existing, built-in G4 materials. Is there a way to add material properties to existing built in materials using GDML?
Hi, the only way to add optical properties to built-in NIST materials in GDML is that you dump first (export) a sample GDML description where you define your NIST materials, then use the generated material descriptions from the generated GDML file and add the properties. Hope it helps!
OK, that helps. Thank you for clarifying!