Message: RE: Yet another random-seed question -- reproducing event #N Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None RE: Yet another random-seed question -- reproducing event #N 

Forum: Event and Track Management
Re: Question Yet another random-seed question -- reproducing event #N (Michael H. Kelsey)
Date: 24 Feb, 2010
From: Makoto Asai <Makoto Asai>

Hi Mike,

What you need to store is "random number engine status".
To store it:
     G4String fileN =3D "currentEvent.rndm";=20
     HepRandom::saveEngineStatus(fileN);
To retrive it:
     HepRandom::restoreEngineStatus(fileN);

Makoto

> -----Original Message-----
> From: Michael H. Kelsey [mailto:kelsey@slac.stanford.edu]
> Sent: Wednesday, February 24, 2010 4:41 PM
> To: eventtrackmanage-g4hn
> Subject: Yet another random-seed question -- reproducing event #N
>=20
>=20
> *** Discussion title: Event and Track Management
>=20
> I have a standalone executable that drives its own event loop,
directly
> calling <process>->PostStepDoIt() to exercise a particular chunk of
> GEANT4 code. In my development work, I've caused an abort() at event
> #632 (loop=3D=3D631) in this test job. I would really like to try to
> reproduce exactly that event (i.e., starting from the same random
seed)
> with the production version of GEANT4.9.3.
>=20
> I have tried doing "CLHEP::HepRandom::getTheSeed()" inside the event
> loop, but it reports exactly the same value on each event.
Consequently,
> I don't have any way to restart at a particular arbitrary event in the
> job.
>=20
> Is there a way to query the active random engine for the _current_
seed?
> And then to feed in that seed on another job to reproduce the
particular
> event of interest to me?
>=20
> Neither the ToolKit nor Application book seems to cover this issue.
>=20
>        -- Michael Kelsey
>=20
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or
> unsubscribe) at:
>
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/eventtrackmanage
/915.h
> tml

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

1 None: Re: Yet another random-seed question -- reproducing event #N   (Mike Kelsey - 24 Feb, 2010)
 Add Message Add Message
to: "RE: Yet another random-seed question -- reproducing event #N"

 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 ]