Open knoepfel opened 2 years ago
Comment by @knoepfel on 2019-11-13 14:21:25
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 RandomNumberGenerator
service.
This feature will not be included in art version:3.04.00.
This issue has been migrated from https://cdcvs.fnal.gov/redmine/issues/23582 (FNAL account required) Originally created by @kutschke on 2019-11-12 18:42:11
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.
We would like to read in one event. Randomly choose a piece of the shower footprint that is the size of the Mu2e world