Hi,
I am not sure I have understood your problem. gRandom->Gaus(m, s) returns a random number distributed with a Gaussian distribution with mean =m and sigma=s. Depending on m and s values you have for sure negative values.
Thanks for your reply. But we know that Gaussian distribution gives probability which can not be negative. Essentially first and third lines in my code are needless. But when we compare random number from Gauss distribution in the second line, result is unexpected.
As I said before we are talking about Gaussian distributed number (those returned by gRandom->Gaus) and not distribution values (those evaluated by TMath::Gaus).
For example:
for (int i = 0; i < 10; ++i) cout << gRandom->Gaus(0,1) << endl;