Message: Not random enough Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Not random enough 

Forum: Run Management
Date: 03 Jul, 2008
From: Yuri Burmistenko <Yuri Burmistenko>

My problem is that I get right result after too many histories. For example ti get flux tally of an isotropic source with no mateials and 40 cm between source and detector I need to make 3*10^7 histories. Too much, isn't it? In MCNP i get such a tally after 10^4 histories, or even less! I suppose somethig is wrong with my random numbers generator, but i set the seed. I wrote such a code:

void RunAction::BeginOfRunAction(const G4Run* aRun)
    long seeds[2];
    time_t systime = time(NULL);
    seeds[0] = (long) systime;
    seeds[1] = (long) (systime*G4UniformRand());
    // G4cout << "seed1: " << seeds[0] << "; seed2: " << seeds[1] << G4endl;

and also i tryed with code:


It doesn't help. It seems to me that I get the same random numbers all the time. Can any one help me, please?

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

1 Feedback: Re: Not random enough   (Gumplinger Peter - 03 Jul, 2008)
 Add Message Add Message
to: "Not random enough"

 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 ]