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

Migrate Code to New Random Service Interface #2620

Merged
merged 1 commit into from Feb 25, 2014

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Feb 24, 2014

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.

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.
@cmsbuild
Copy link
Contributor

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
FastSimulation/PileUpProducer
FastSimulation/Utilities

@cmsbuild, @Degano, @giamman, @lveldere, @nclopezo can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@nclopezo, @ktf you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@lveldere
Copy link
Contributor

Hi again David

All looks sane, thanks a lot for your work!
There is just one thing that I'm wondering about:

RandomEngineAndDistribution random(lumi.index());

Does that mean that the lumi number is used as the seed for the random generator?
As far as I know, when events are generated, the luminumber in each simulation job is 0,
so the PU would be seeded identical in each simulation job. Do you know if my presumption is right?

Lukas

@wddgit
Copy link
Contributor Author

wddgit commented Feb 24, 2014

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.

@cmsbuild
Copy link
Contributor

@lveldere
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_1_X IBs unless changes (tests are also fine). @nclopezo, @ktf can you please take care of it?

nclopezo added a commit that referenced this pull request Feb 25, 2014
FastSimulation -- Migrate Code to New Random Service Interface
@nclopezo nclopezo merged commit 8370e06 into cms-sw:CMSSW_7_1_X Feb 25, 2014
@nclopezo nclopezo modified the milestones: CMSSW_7_1_0_pre5, CMSSW_7_1_0_pre4 Mar 10, 2014
@wddgit wddgit deleted the migrateToNewRandomService5 branch April 25, 2014 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants