|Message: Re: Optical Photons Spectrum||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
By 'linearly interpolating between bins' I simply mean to say that the strength of the spectrum in a bin is the average of the strenghts you specify at the bin's edges; e.g. half way in between.
You see, the program needs to first decide in which bin the scintillation photon should be sampled. It does that by comparing the average strengths of each of the bins relative to each other. However, and that's confusing you, the photon energy within a bin is sampled random with no weighting as to the strength at the bin's edges and that's why you get a flat distribution of sampled photons within a bin. If that's not satisfactory in your situation you'll need to define your photon spectrum at finer intervals, e.g. at more points. Mind you that many optical properties like the index of refraction or the photo-cathode photon efficiencies aren't seep functions of photon energy.
But you do have a point in that the present code is rather rudimentary and should be replaced by a more clever routine that knows how to sample an empirical spectrum given at finite number of points so that the result is a smooth spectrum, linear or even spline fitted, and succeeds without a great penalty in performance.
There are other places in Geant4 where this is already done and there has been discussion replacing the 'first-hour' Geant4 code (G4MaterialPropertyVector and related classes) with this refined code.
|Inline Depth:||Outline Depth:||Add message:|