I am creating Poisson distributions using random numbers with the standard Root method and RooFit. I thought that the distributions using both methods should be the same, but they are not. I am attaching the code and the plots so you can see this more clearly. I saw a similar problem in this other post that comment about an inconsistency between random and some algebras functions:
Trying to understand this issue I changed the random library from TRandom to TRandom3 in order to see the differences between them; with this study I realize that RooFit is invariant under the change of the random method (it seems that it have a predefined random).
Do you know why both methods don’t show the same distribution?
However, I have another thing to mention about the random tools. Unlike the Standard Root method, RooFit can use only TRandom library. There is a way to implement RooFit to use the other random methods: TRandom1, TRandom2 and TRandom3?
RooFit uses as random generator engine TRandom3 which is created in the constructor of the RooRandom singleton class. We would need to change RooRandom to have the possibility to uses alternative random engines
(e.g. TRandom1 or TRandom2)