Message: Re: How do I know the event random numbers are not repeated? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: How do I know the event random numbers are not repeated? 

Forum: Run Management
Re: Question How do I know the event random numbers are not repeated? (Huagang Yan)
Re: None Re: How do I know the event random numbers are not repeated? (michel maire)
Re: None Re: How do I know the event random numbers are not repeated? (michel maire)
Re: Sad Re: How do I know the event random numbers are not repeated? (Huagang Yan)
Date: Dec 23, 06:57
From: Tom Roberts <Tom Roberts>

On Sun, 23 Dec 2018 14:33:31 GMT, Huagang Yan wrote:
> [...] I have to save every random
> number for every event

You only need to save the first random number for each event, because it is a PSEUDO-random number generator. Note, however, that finding duplicates this way does not ensure that the sequences of random numbers were the same, because any good generator has a larger internal state. Finding no duplicates does ensure no duplicate events.

A different approach is to seed the random number generator with the event number, at the beginning of each event. This has several advantages: a) you can re-run any given event, so if you find an outlier in some histogram and can determine its event number, you can re-run it with visualization on; b) unless you explicitly run duplicate event numbers, you know that no events are duplicated.

This last is much simpler than saving all those numbers and then searching for duplicates.

 Add Message Add Message
to: "Re: How do I know the event random numbers are not repeated?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]