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
Migrate Code to New Random Service Interface #2620
Migrate Code to New Random Service Interface #2620
Conversation
Migrate FastSimulation code to use the new interface of the random number generator service designed to work with the multithreaded Framework. The main interface change is to require a StreamID or LuminosityBlockIndex argument to the getEngine function. These objects are only available during the event or beginLuminosityBlock method.
A new Pull Request was created by @wddgit (W. David Dagenhart) for CMSSW_7_1_X. Migrate Code to New Random Service Interface It involves the following packages: FastSimulation/MaterialEffects @cmsbuild, @Degano, @giamman, @lveldere, @nclopezo can you please review it and eventually sign? Thanks. |
Hi again David All looks sane, thanks a lot for your work! RandomEngineAndDistribution random(lumi.index()); Does that mean that the lumi number is used as the seed for the random generator? Lukas |
Hi Lukas, lumi.index() is a LuminosityBlockIndex. This is a new thing and not the same as the luminosity block number. In the Framework, this is a simple index that counts from 0 to one less than the number of LuminosityBlocks that can be processed concurrently. It is simply an index so the threaded Framework knows which currently active LuminosityBlock it is handling. The argument to that function is not a seed. The argument is an index the service uses to find the correct engine. The service has constructed an engine for each possible value of the index. If you look at the code for this, look in the 7_1_THREADED_X branch. The new service is not in 7_1_X yet, although it is coming there also soon. I hope that helps explain things, but ask again if not. |
+1 |
FastSimulation -- Migrate Code to New Random Service Interface
Migrate FastSimulation code to use the new interface
of the random number generator service designed to work
with the multithreaded Framework. The main interface
change is to require a StreamID or LuminosityBlockIndex
argument to the getEngine function. These objects are only
available during the event or beginLuminosityBlock method.