Hello, I am interested in computing the optimal depth of a copper absorber for Sr-90 decay electrons. I want to find a way to simulate a beta decay spectrum in C++. Have you got any idea or possible documentation on where I could start?? Thank you!
With the Fermi function? It is a 1-dimensional, well-behaved function, drawing numbers from a uniform distribution and keeping them with a probability proportional to the Fermi function should work.
Just in case OP is not familiar with the hit or miss method: Do try to make the acceptance probability one for the peak of the Fermi function. Anything larger and your spectrum will not be correct, anything smaller and you will have a lower acceptance rate. An alternative is weighting the samples according to the Fermi function, but this will not give as dense sampling in the peak as you might like.