Hello everyone.
My issue is the following. I am trying to generate random numbers for a physics simulation. I need to simulate at least 1 million events. But the random numbers have to be distributed according to the following expression:
((1+z)*sqrt((1+z)^{3}*0.3 + 0.7))^{-1}
So, I tried this:
TF1 *f1 = new TF1("f1","1./((1+x)*sqrt((1+x)*(1+x)*(1+x)*0.3 + 0.7))",zmin, zmax);
double Zini = f1->GetRandom();
On doing this, the programs halts at around 8*10^{5} events and the computer needs to be restarted, because it freezes. I would thank any piece of advice on what I am doing wrong.
Thanks in advance.