mctools / simplebuild-dgcode

dgcode: the Geant4-based simulation framework of the ESS Detector Group. Provided as simple-build-system bundles.
https://mctools.github.io/simplebuild-dgcode/
Other
2 stars 1 forks source link

MCPLGen's skip_events int parameter imposes a 2^31 event limit for processing MCPL files #18

Open MilanKlausz opened 1 year ago

MilanKlausz commented 1 year ago

MCPL files containing more that 2^31 events are difficult to processes due to the skip_events parameter of the MCPL generator being an integer.

The issue occurs when I run a McStas simulation to produce an MCPL file - containing neutrons scattered on a sample - that I want to use a source of particles for the subsequent Geant4 simulation of the detection process. I use the _ess_dmscutilssubmit tool to submit a lot of simulation jobs with 1e5 events in each, using the skip_events parameter in accordance with the job id, but that stops working when it reaches the 2^31 integer limit.

My current solution is splitting the large MCPL files, and processing them separately, but it would be nice to avoid that extra manual step (which is also a potential source of errors).

tkittel commented 1 year ago

Right. The underlying mcpl interface uses 64 bit integers though, so the fix should not be so hard. But of course, might require changes in all projects, which is annoying. Perhaps the sinplest is to add a new integer64 parameter type in dgcode?

tkittel commented 1 year ago

Or perhaps simply as a short term workaround use a string parameter?