Optical photons do not refract

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_11.3
_Operating System:_MacOS Sequoia
_Compiler/Version:_Apple clang version 16.0.0 (clang-1600.0.26.6)
_CMake Version:_cmake version 3.31.4

Hi

For the first time, I am attempting to use optical processes. The documentation says:

No surface defined

In the special case where no surface has been defined, but the two volumes defining the surface have the refractive index defined using the material property RINDEX, the surface is taken to be perfectly smooth, and both materials are taken to be dielectric. The photon can undergo total internal reflection, refraction or reflection, depending on the photon’s wavelength, angle of incidence, and the refractive indices on both sides of the boundary. Furthermore, reflection and transmission probabilities are sensitive to the state of linear polarization.

So, I defined

  auto world_mat  = nistManager->FindOrBuildMaterial("G4_AIR");
  auto world_mat_prop = new G4MaterialPropertiesTable;
  world_mat_prop->AddProperty("RINDEX", "Air");

and

  auto crystal_mat = new G4Material("LYSO",7.25*g/cm3,5);
  ...
  auto MT = new G4MaterialPropertiesTable();
  MT->AddProperty("RINDEX", "PMMA");
  crystal_mat->SetMaterialPropertiesTable(MT);

My gammas create some Cerenkov photons (via photoelectrons), but they always end on the crystal boundary. (Optical photons are white.)

Any thoughts anyone?

John

  1. The RINDEX property doesn’t take a string. It takes a numeric value, which is value of the index of refraction you want to use.

  2. Because RINDEX takes a single numeric value, you should use AddConstProperty.

Hi John, Mike,

In fact, there are a few pre-defined optical properties available, and they can be accessed as John is doing:
https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/TrackingAndPhysics/physicsProcess.html#pre-defined-properties

I’ll test it locally tomorrow. Meanwhile you could try defining RINDEX by hand, like

  std::vector<G4double> lxe_Energy = {7.0 * eV, 7.07 * eV, 7.14 * eV};
  std::vector<G4double> lxe_RIND = {1.59, 1.57, 1.54};
  fLXe_mt->AddProperty("RINDEX", lxe_Energy, lxe_RIND);

Make sure the energy range encompasses the energies of your photons. (Maybe that is what is going wrong in your first post).

In your code, I assume there is a

world_mat->SetMaterialPropertiesTable(world_mat_prop);

that just isn’t shown in your quoted code.

And yes, the optical photons should (do) propagate after the boundary as long as RINDEX is defined on both sides.

HI Darren

I think you hit it. Ooops, mea culpa :neutral_face: . I fixed that and it now runs without end!!! (I stopped it at 10 GB!), presumably because the optical photons keep internally reflecting for ever. I’ll try putting some absorption in. Or absorption on one face (a SiPM).

Thanks for your help.
John

Hi Darren and Mike

I added some absorption:

  std::vector<G4double> photon_energies = {0.6*eV, 6*eV};
  std::vector<G4double> absorption = {1.*cm, 1.*cm};
  MT->AddProperty("ABSLENGTH", photon_energies, absorption);

and made a little movie (Cerenkov photons in LYSO.mov - Google Drive). Nice.

Next jobs: scintillation and absorption in a SiPM.

Thanks again for your help. Sorry to trouble you.
John