Message: Re: G4RandFlat::shoot(0,..) gives negative number in G4Cons::GetPointOnSurface() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: G4RandFlat::shoot(0,..) gives negative number in G4Cons::GetPointOnSurface() 

Forum: Run Management
Re: Question G4RandFlat::shoot(0,..) gives negative number in G4Cons::GetPointOnSurface() (Stefan E. Mueller)
Date: 22 Mar, 2018
From: Stefan E. Mueller <Stefan E. Mueller>

OK,

apparently the problem was created by an incorrect seeding of the random number generator, using "setSeeds(...)" instead of "setSeed(...)".

"setSeeds(const long * seeds, int lux=1)" needs a zero terminated array of seeds, and the array which was passed didn't contain a zero to terminate it.

Using "setSeed(seed,1)" solves the problem.

Sorry for the confusion.

Stefan

PS: Gabriele, yes, the cylinder was defined as a cone already in the GDML-file.

 Add Message Add Message
to: "Re: G4RandFlat::shoot(0,..) gives negative number in G4Cons::GetPointOnSurface()"

 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 ]