-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow generation of particles in energy range #29
Allow generation of particles in energy range #29
Conversation
Discussions on Slack identified a requirement for an event generator in flsimulate that the user could configure with: 1. Particle type 2. Lower bound on particle energy 3. Upper bound on particle energy Particle energies would be generated uniformly and randomly between the two bounds. Extend flsimulate's primary_events generators and variants with a new "uniform_energy_generator" generator and "if_uniform_energy" variant to meet this requirement. Use genbb's single particle generator to model the energy range, binding the particle type and min/max energies to variant parameters from if_uniform_energy. Implement simple run tests of flsimulate to check that the variant can be used and that known failure cases result in exceptions at flsimulate runtime.
PR29 review.
|
I've fixed the name suffix - just to confirm, this suffix is purely a convention of the file and not something specific to the variants syntax? |
Could you describe the method used for backward compatibility here please? The change is easy enough to do, albeit with many steps, so it's a good place to learn about the design and mechanism. |
Yes, the suffix is purely a convention of the file. Just to help people to understand what they are manipulating. It is obviously redundant with the |
Concerning "backward compatibility", I have to think more about it before to emit a valuable comment In some cases, modifying the variant grammar (definition of nested variant and parameter models) I think there is 2 cases to consider:
Here, we are in the second case. I agree the change/addon in variant models def file is not complex. However, the URN management part is more complex. For this part, I have to write recommendations. |
Copy changed files from version 1.2, updating internal links to 1.3 and re-using 1.2 where possible. Provide new "uniform_range_generator" and associated variants.
Copy files from version 2.1 needed to update primary_events to version 1.3. Otherwise reuse files from 2.1
Rerun script to regenerate resource list.
A pure hack as the structure of the DB and purpose is unclear. Completely copied from existing sections, just update numbers as required.
Make default simulation setup the new versino 2.2 URN. Remove explicit URN use in tests to ensure these always test against the default version.
The new commits should meet the list of additions in the review, though I am not 100% sure about the changes in the URN DB section. |
Hi there, |
Great - on the Falaise side, it's fine (and indeed needed in this case I think) to start a "WIP" Pull Request so that the proposed changes can be previewed. It's just the same as a "standard" PR, just add "[WIP]" at the start of the title! It would also help to see (and cross reference to) the work in Bayeux so that we can see where changes are going to affect Falaise. |
I guess this PR can be safely discarded fir new PR75 addresses the new requested functionalities |
Yes, once the release is finished and we do a sweep up. |
Closing as #75 fixes this issues |
Discussions on Slack identified a requirement for an event generator in flsimulate that the user could configure with:
Particle energies would be generated uniformly and randomly between the two bounds
Extend flsimulate's primary_events generators and variants with a new "uniform_energy_generator" generator and "if_uniform_energy" variant to meet this requirement. Use genbb's single particle
generator to model the energy range, binding the particle type and min/max energies to variant parameters from if_uniform_energy.
Implement simple run tests of flsimulate to check that the variant can be used and that known failure cases result in exceptions at flsimulate runtime.
One thing for review is that the new
uniform_energy_model
variant model reuses the existingpeg.generator.vspg.energy.PM
parameters for the energy. Though the parameter descriptions are set through, e.g.parameters.minimum_energy.description
, the GUI only does not display this string. Rather it reuses the description string from the linked model.