| Summary: | A problem in the management of random number | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Koichi Murakami <kmura> |
| Component: | global | Assignee: | Gabriele Cosmo <Gabriele.Cosmo> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | billh |
| Priority: | P1 | ||
| Version: | 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Koichi Murakami
2000-07-24 04:18:53 CEST
Thanks for reporting the problem. This is a known problem which has only recently been resolved in CLHEP 1.5 by providing alternative Gaussian random distribution algorithms. Concerning Geant4, we did not manage to migrate the code in time for release 2.0. We plan to make this available in a minor release or patch. All occurences of RandGauss have been replaced by G4RandGauss which in turns now invokes CLHEP's RandGaussQ, which being stateless assures reproducibility of gaussian random sequences (claimed to be also much faster, though less accurate). All occurences of RandFlat::shootBit() have been replaced by CLHEP's RandBit::shootBit(), a simpler but less efficient implementation for generating sequences of bits. Fixes will be available in the public patch to Geant4 2.0.
The CLHEP code now has provision for saving and restoring the state of the
random number generator, including the cached data from RandGauss and RandFlat,
by using the functions HepRandom::saveStaticRandomStates and
HepRandom::restoreStaticRandomStates.
To avoid problems for people that, not knowing about this issue, might use
RandGauss or RandFlat in their code, I suggest that the lines
G4Random::saveFullState(oss);
in G4RunManager should be changed to
G4Random::saveStaticRandomStates(oss);
~
~
~
~
|