Message: CLHEP and PrimaryGeneratorAction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note CLHEP and PrimaryGeneratorAction 

Forum: Multithreading
Date: 07 Sep, 2016
From: Don Vernekohl <Don Vernekohl>

For Multithreading it is known that the G4Random and Randomize.hh should be used instead of the CLHEP libraries. I found that this is also valid for random number generators anywhere else in the code.

I used this generator in my PrimaryGeneratorAction:

"rndm_phi= CLHEP::RandFlat::shoot(0.,two_pi);"

Adding the #include "Randomize.hh" in the header and changing the line to:

"rndm_phi= G4RandFlat::shoot(0.,two_pi);"

fixed the problem.

Best, Don

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

1 Ok: Re: CLHEP and PrimaryGeneratorAction   (Andrea Dotti - 13 Dec, 2016)
 Add Message Add Message
to: "CLHEP and PrimaryGeneratorAction"

 Subscribe Subscribe

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