If you mean that the random generation takes a lot of time, it is possible. ROOT cannot optimize the generation of random numbers for every possible distribution. You can think about simplifying your distribution or think to a customised random generation if the performance achieved is not sufficient.
Problem is that though it’s working seperately, when inserted into a event by event data analysis program, it freezes… Maybe because of calculating for too many events… e.g. 1,00,0000 events…
As @Danilo suggested I tried with a general C function. It is working but for that many events it freezes…
When I run this function in ROOT 6.32.02, Ubuntu 24.04.1 LTS, gcc (conda-forge gcc 13.3.0-1) 13.3.0
I find this error:
cling::DynamicLibraryManager::loadLibrary(): libgsl.so.25: cannot open shared object file: No such file or directory
Error in TInterpreter::TCling::AutoLoad: failure loading library libMathMore.so for ROOT::Math::GSLIntegrator
cling::DynamicLibraryManager::loadLibrary(): libgsl.so.25: cannot open shared object file: No such file or directory