Hi Shivam,
I don’t know what the intent of the code authors was. There is some discussion in HyperNews, linked from the Arxiv paper in your first post. There didn’t seem to be a consensus.
https://hypernews.slac.stanford.edu/HyperNews/geant4/get/opticalphotons/472.html
To me, it doesn’t seem like the complex index of refraction is meant to apply to dielectric_dielectric. There are several reasons:
- The manual says dielectric_metal
- There may be an implicit assumption \kappa_1 >> \kappa_2, where kappa are the imaginary parts of the index of refraction for materials 1 and 2. This won’t be generally valid for dielectric_dielectric.
- why define REALRINDEX when there is already RINDEX for a dielectric, which is presumably numerically the same
Nevertheless, as you note, the code doesn’t seem to prevent using a complex index of refraction with a dielectric_dielectric boundary. I don’t want to remove functionality that someone may be using.
If you want to try to use a complex index with dielectric_dielectric, I would recommend to note that this isn’t an advertised feature of Geant4, so carefully check the results. Be even more skeptical than usual. Let us know what you find.
I’m curious what your use case is.