Get Random Points following a given TF1 distribution

Please read tips for efficient and successful posting and posting code

ROOT Version: Latest as of 22/03/2021
Platform: Windows
Compiler: Not Provided

I have a TF1, where the x axis is a value and the y axis is the probability of getting that value. The higher f(x) is, the more likely it is to get that. How can I generate random numbers using this TF1 distribution?

Seems to me if you search “TF1” on this page you will get your answer.

Ah yes. Thank you