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();


I guess @moneta can help.

See TH3::GetRandom3,


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