Open
Description
Assume to have a TH1D object, with non-uniform binning, representing some kind of differential quantity (for example, a particle flux as a function of the particle energy, dN/dE). The TH1D::GetRandom
method will return random numbers distributed according to the histogram bins height, rather than the histogram bins area.
The code attached here (a ROOT macro) reproduces this behavior (I attach it as a .txt file, since .C files are not supported)
test.txt