Message: Re: Optical Photons Spectrum Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Optical Photons Spectrum 

Forum: Processes Involving Optical Photons
Re: Question Optical Photons Spectrum (Dragos Constantin)
Re: Feedback Re: Optical Photons Spectrum (Gumplinger Peter)
Re: More Re: Optical Photons Spectrum (Gumplinger Peter)
Re: More Re: Optical Photons Spectrum (Gumplinger Peter)
Date: 26 Jan, 2011
From: Dragos Constantin <Dragos Constantin>

Hi Peter,

Thank you for your messages. I wanted to reply right away but I wanted to investigate the issue at hand and draw a conclusion. I will report back my findings soon.

For now I am using a very fine sampled emission spectrum but I have observed that at small energies there are optical photons generated even if I have specified there should be none in those bins. Also, on the left side of the spectrum, in the last bin, the distribution gets smooth out instead of being a step function. You can actually see this on the distribution plot which I have attached to my original message. The last bin is "rounded" at its right end. I did not get into details yet but I intend to pinpoint what is causing this two issues.



On Fri, 21 Jan 2011 23:05:55 GMT, Gumplinger Peter wrote:

> I'll try to explain the photon energy sampling with words although a
> simple graph would explain it much better and easier.
> If you have a spectrum that is defined at discrete locations and you
> want to sample from this spectrum, you have the two simplest choices:
> (1) You can either brute force sample with the rejection method - slow -
> or (2) you can resort to the faster integral method. The integral method
> was chosen.
> This means that you need to first integrate the spectrum and make a new
> vector which is monotonically increasing and holds the integral of the
> spectrum to the left of the bin in question. The (linear) integral of a
> spectral bin F(x) is the width of the bin times the average y=f(x) at
> the bin's edges.
> During simulation a flat random number is taken from zero to the
> integral vector's largest entry: Y_max=F(x_max). For this number (Y) we
> now find the corresponding integral vector's left bin, x_i, then sample
> x above the bin's lower limit, x_i, by linearly interpolating the
> integral vector's entries at the bin edges, F(x_i) and F(x_i+1).
> If you think about it, what that produces is a flat spectrum in x (the
> photon energy) within the bin because the line connecting the bin's
> edges Y_i=F(x_i) and Y_i+1=F(x_i+1) is a straight line.

 Add Message Add Message
to: "Re: Optical Photons Spectrum"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews