Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random Number Seed #20

Closed
seamusriordan opened this issue Mar 8, 2017 · 3 comments
Closed

Random Number Seed #20

seamusriordan opened this issue Mar 8, 2017 · 3 comments

Comments

@seamusriordan
Copy link

Seed should be set through G4Random:: and not CLHEP::Random:: in remoll.cc

https://twiki.cern.ch/twiki/bin/view/Geant4/QuickMigrationGuideForGeant4V10#Random_numbers

@wdconinc
Copy link
Member

wdconinc commented Mar 8, 2017

If the goal is MT, then I can add that there's a lot more work to do than just changing the random generator. But at least it would be great if we could compile remoll against a geant4 installation compiled with GEANT4_BUILD_MULTITHREADED=ON... That's something this bug will hopefully fix, right? Or at least, I assume that's why you ran into it.

@seamusriordan
Copy link
Author

Yes, full MT would be nice, but this is necessary apparently in at least some installations. I ran across this as a problem on one of our local machines which wasn't making unique results.

@wdconinc
Copy link
Member

This bug could be related rather to use of drand48 in https://github.com/JeffersonLab/remoll/blob/master/src/remollMultScatt.cc#L540. Using a different random number generator in this one instance is probably going to generate different results even if you keep the G4Random seed the same. I'm going to change drand48 into G4UniformRand and commit to master.

wdconinc added a commit that referenced this issue Apr 29, 2017
This may fix issue #20, in particular comment 3.
wdconinc added a commit that referenced this issue Apr 29, 2017
This change is a requirement for multithreading to work (but don't get
your hopes up). This fixes issue #20.

The #defines like G4RandFlat are available as of geant4 version 9.4.p02,
so don't try to compile with version of geant4 older than 10 years
(though there are plenty of other reasons to upgrade).
cipriangal pushed a commit that referenced this issue Mar 28, 2023
…Collimator1

572 feature region between target&collimator1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants