Output File Sampler as Beam Distribution

Issue #259 resolved
Laurie Nevay created an issue

I propose we create a new beam distribution that will use a BDSIM output file and take the data from a sampler and use that information for the beam coordinates.

Use case: two different models with potentially different physics outcomes, but you want to use the same beam distribution generated by BDSIM in each.

If you set the seed for each model, that's fine, but the coordinates are only the same until the physics changes, so even after the 1st event they're different.

Currently, we have strong reproducibility by resetting the seed at every event from another file when recreate from another file, which ensure the same beam distribution is reproduced. So you could reproduce from a file from one, however, if they're different models, it's not useful to use recreate as this resets all options (minus executable ones) to those from the recreation file.

If we add a new bunch distribution, we can replay the same beam in a different model exactly. We could also start it somewhere else.

The default would be the primary 'sampler', but there's no reason why it can't be any other sampler.

Comments (2)

  1. Log in to comment