Message: Re: Saving Random numbers to reproduce rare events Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Saving Random numbers to reproduce rare events 

Forum: Event and Track Management
Re: Question Saving Random numbers to reproduce rare events (Steve Quillin)
Date: 13 Oct, 2017
From: Tom Roberts <Tom Roberts>

A simple approach used in G4beamline: at the beginning of each event, seed the 
random number generator with the event number. Now all you need to do to 
re-simulate an event is know its event number; there's nothing to save.

The HepJames generator used by default in Geant4 guarantees independent 
performance for seeds from 0 thru 900,000,000.

Note that any change in the geometry or simulation parameters can make the 
re-simulation be different.

Tom Roberts

On 10/13/17 10/13/17 4:17 AM, Steve Quillin wrote:
> *** Discussion title: Event and Track Management
> Hello
> I'm running Geant4.10.3.1 and attempting to follow the simple method
> outlined in thread /eventtrackmanage/1099 to save random numbers from
> rare, but interesting events to reproduce later. I do the following in
> EventAction::EndOfEventAction():-
> if(keepme){
>        G4RunManager::GetRunManager()->SetRandomNumberStore(true);
>        G4RunManager::GetRunManager()->rndmSaveThisEvent();
> }
> As I understand the code, G4RunManager::rndmSaveThisEvent() should copy
> the file "currentEvent.rndm" containing the event random number status
> to an event specific filename. However, when triggered it generates
> messages such as:-
>       cp: cannot stat './currentEvent.rndm': No such file or directory
> The working directory actually contains files similar to
> "G4Worker9_currentEvent.rndm" , but not "currentEvent.rndm" hence the
> warnings. The stored random number files are overwritten by subsequent
> events and lost.
> Has G4RunManager not been updated to account for changes made elsewhere
> as part of updates for MT or am I missing a step some where? Is there a
> better way to save these rare events?
> Thanks
> Steve Quillin
> -------------------------------------------------------------
> Visit this GEANT4 at message (to reply or unsubscribe) at:

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Question: Re: Saving Random numbers to reproduce rare events   (Steve Quillin - 13 Oct, 2017)
(_ None: Re: Saving Random numbers to reproduce rare events   (Tom Roberts - 13 Oct, 2017)
 Add Message Add Message
to: "Re: Saving Random numbers to reproduce rare events"

 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 ]