How the energy of optical photon determined?

Beg for help:

If i set

G4double PhotonEnergy[nEntries] = {2.0eV,3.0eV};
G4double ScinFast[nEntries] = {0.0,1.0};
MyMPT->AddProperty(“SCINTILLATIONCOMPONENT1”,PhotonEnergy, ScinFast);

Did the energy of produced photon have a linear distribution from 2ev to 3ev?
If i want to simulate a scintillator which has a spectra as below
image
How do I set the parameters ?

To answer your first question, it may not be a linear interpolation but rather a mean value interpolation (see “Peculiarities in the Simulation of Optical Physics with Geant4”, Erik Dietz-Laursonn, 2016, arXiv:1612.05162v1, page 2.) There have been many revisions in the intervening 6 years, so this may have changed, but if you have lots of closely spaced points in your energy and emission vectors (which you should), the difference will not matter.

To answer the second question, you need to convert the graphs of Intensity vs Wavelength (nm) into Intensity versus Energy (eV) with energy monotonically increasing. You’ll have to do that in an external program like Matlab, Root or whatever. You need enough points (nEntries) in energy to reproduce the digitized curves as accurately as you require. You can then build the two vectors PhotonEnergy[nEntries] and ScinFast[nEntries] by taking pairwise points from one of the digitized curves for a particular temperature.

You’ll need a different ScintFast vector for each temperature. (I am assuming that the curves are all digitized at the same intervals in energy. If not, you need a different PhotonEnergy vector for each temperature too.) If you want to do multiple temperatures, you’ll need to do multiple runs with a different ScintFast vector in each run.