Hi Alessio,
Sorry for the delayed reply!
I tested your source routine and I’m getting different theta values for all primary particles.
Maybe you forgot to recompile your executable, and you were running a version where the theta value was fixed?
Cheers,
David