Allow source modules to use random number engines from the RandomNumberGenerator service.
In the original design discussions for RandomNumberGenerator service we decided to restrict it's use to producer and analyzer modules; in particular source models could not use it.
Mu2e now has a use case to allow it. We run the CORSIKA cosmic ray air shower MC. It produces showers with a footprint many times larger than the Mu2e world. It is moderately expensive to run since it uses FLUKA to interact cosmic rays with the atmosphere and allow the shower to develop. We run CORSIKA in a stand alone job and write a CORSIKA binary format output file. Our source model reads the output file.
- On art event 1, read in one CORSIKA event from the input file.
- Choose a random part of the CORSIKA event footprint and map that onto the Mu2e world; run G4 and the rest of our workflow.
- On the next art event, do not read in a CORSIKA event. Choose another random part of the footprint and map it onto the Mu2e world; run G4 etc
- Repeat 3) until we have sampled the CORSIKA event enough; then read in a new CORSIKA event and continue.
We would like to read in one event. Randomly choose a piece of the shower footprint that is the size of the Mu2e world
#1 Updated by Kyle Knoepfel 5 months ago
- Status changed from New to Under Discussion
This feature request will require some discussion among the art developers. There are some issues related to capturing and restoring the state of the
RandomNumberGenerator that may be difficult to address if
createEngine is callable from sources/detail templates. For now, the best approach is to create your own CLHEP random number engine inside of the source, independent of art's
This feature will not be included in art 3.04.00.