GetRandom from 3dh

Dear all,
in simulations, I generate particles according to a given distribution in a 1D histogram. for example: Double_t eta = Eta->GetRandom(); where Eta is a pseudorapidity distribution.
Is it possible to generate a particle according to a 3D histogram?
say Th3F *h3d … , then something like the following;
vector or array: Arr(eta, pt, phi) = h3d->GetRandom();

thanks,
tariq

I guess @moneta can help.

See TH3::GetRandom3,

https://root.cern.ch/doc/master/classTH3.html#ab6204be4e391cdc8ad83bbefe1a3b836

thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.