Skip to content

Conversation

@EricMEsch
Copy link
Contributor

I still need to write the actual validation page.

But this would produce plots like this for a bunch of isotopes in a setup containing liquid argon inside a steel cylinder inside a watertank. There is also a moderator with Gadolinium inside of the Argon.
image

image

The simulation should have a dual purpose:

  1. The neutron starts with 5 keV, meaning there is Geant4 neutron transport involved. The plots show the number of captures on each isotope. While we can not compare this to "literature values" we can compare between remage versions. If the number of neutron captures on a certain isotope visibly changes, then there were changes regarding the neutron transport or capture cross sections.
  2. The gamma spectrum after the neutron capture is shown. Also the Q-literature values according to the IAEA Nuclear Data section is shown. These gamma spectrums can then be compared to those of other publications. ( I have not added them directly, as first of all i do not know the rules of stealing gamma spectrums of other people and secondly that is way more work)

Both simulations use the same seed. But due to the different process the random engine gets out of sync almost immediately.

Are there any comments or proposals of what i might change?
Some of the isotopes will have a very low statistic. But there is not really more feasible in the CI. Their plots will still be generated, as the total Q-value is still meaningful. Theoretically i could also simulate each capture individually in a world only made of the volume, but i think overall that takes more time for less information.

@EricMEsch
Copy link
Contributor Author

Is the surface containment test still flaky? And is it expected that it fails for both versions simultaneously?

@ManuelHu
Copy link
Contributor

Is the surface containment test still flaky? And is it expected that it fails for both versions simultaneously?

yes, and yes... (today is your lucky day)

@gipert
Copy link
Member

gipert commented Jan 23, 2026

But there is not really more feasible in the CI

Since #532 we have now a dedicated 32-core runner that we will use to run the (more CPU intensive) validation suite. So we can do more than what we could realistically do just with the CI (still, we should really try to limit the computing time of each test to the minimum).

@gipert gipert added the validation Validation and tests label Jan 23, 2026
@gipert
Copy link
Member

gipert commented Jan 23, 2026

I like these plots. I think we should make a list of the key materials and neutron energy of interest for us and generate these plots for all of them. @MoritzNeuberger @EricMEsch

These gamma spectrums can then be compared to those of other publications. ( I have not added them directly, as first of all i do not know the rules of stealing gamma spectrums of other people and secondly that is way more work)

Yeah it would be nice to have but it would be also quite some work. Though if there are plots of the expected/theoretical distributions it could in principle be rather simple to digitize them and plot them? But I agree that the plots you made are already quite useful to spot differences between G4 versions.

@EricMEsch
Copy link
Contributor Author

EricMEsch commented Jan 23, 2026

I like these plots. I think we should make a list of the key materials and neutron energy of interest for us and generate these plots for all of them. @MoritzNeuberger @EricMEsch

So i made the geometry with that in mind. But it does not match exactly. Right now it is lacking Germanium and the steel is a little bit different from our legend steel (here i just use G4_Stainless_Steel). The steel should not really matter and i could also just add some germanium. Apart of that i think it should cover all of our relevant isotopes. ( I have not shown the plots for every isotope here obviously)

I added gadolinium, although it is not part of our design anymore because the gamma line intensities can be compared with a nice publication of peter grabmayr.

Though if there are plots of the expected/theoretical distributions it could in principle be rather simple to digitize them and plot them?

For the gadolinium i also have the data from peter grabmayr. So it should be easy to add, but then again that would just add a bloating file to remage containing that data. And it can always simply be added by a follow-up PR, so i would leave it out for now.

@MoritzNeuberger
Copy link
Contributor

MoritzNeuberger commented Jan 23, 2026

I agree with Eric that plots like the ones above are useful to see the differences between versions and as sanity checks. I would suggest the individual components of interest should be tested in different setups to avoid complexity. Here are some thoughts.

Neutron physics:

  • Regarding gamma cascade checks, maybe let's have a simple setup of a single large volume made of just the material/isotope and turn off all neutron interactions other than capture to make sure only captures occur at a specific energy. As above, the different G4 native models are of interest, including also NuDEX.
  • Regarding individual neutron cross-sections per isotopes, we can simply compare from the G4NDL files directly, so I don't see the need to test them in simulation directly. Maybe one could have a simple "beam setup" shooting neutrons.
  • Regarding the interplay of cross-sections between isotopes, I agree that a mockup as above is convenient. One could define expected number of captures per material. This should be tested for the different available evaluated nuclear data libraries (ENDL).

Muon physics:

  • Regarding radiative loss, have muons go through water and measure the deposited energy. The radiative loss should be a peak at lower energies. Stochastical loss should then be related to showers and should be at higher energies. This should be tested with different em and hadr physics lists.
  • Regarding muon-induced neutron yield, again have a simple setup as above and shoot muons at several energies and count the number of neutrons (ofc w/o double counting). Would have to be run till the end (i.e., capture or decay of neutrons), since secundary neutrons can be dominant such as in LAr. This should also be tested for several materials. This should be tested with different em and hadr physics lists, as well as different ENDL.

@EricMEsch
Copy link
Contributor Author

EricMEsch commented Jan 23, 2026

While i agree with you Moritz, i think the tests you have in mind might be computationally way more expensive. Although i am not sure, it might be that if you just isolate the respective process you are looking at it might also be way quicker.

To me what i implemented seemed like a nice all-in-one validation that exactly tests the neutrons in an environment as close to ours as possible. (and more or less reproduces our observables)

While of course it would be nice to isolate each part and have a validation for each singular part, i think it is still important to also have the validation for the "combined simulation".

For example the G4NDL cross sections could still be fine, but somehow there is a bug making the captures not occur on a certain isotope anymore. (something similar happened to the water gamma line intensity that you can see in the plot above is completely wrong)

@MoritzNeuberger
Copy link
Contributor

MoritzNeuberger commented Jan 23, 2026

Testing the individual points of interest separately gives us a lot more control since we precisely know what we expect. Having a simulation with several different components makes testing the individual processes difficult since you add a lot of correlations. I don't want to say that we should not have them, as I agree that testing these correlations is of interest (as I also mentioned above). I just think we can more easily spot issues when the processes are investigated individually rather than in a combined simulation.

Except for the muon simulations, I do not think the simulations are particularly expensive since the energies are usually <5MeV, meaning most hadronic physics can be ignored, and we can also kill all secundaries we are not interested in. True, the muon simulations are more expensive, but especially the neutron yield is of high interest for us, and it should be covered by the tests to see changes in the physics list and version. One would have to test how much statistics one can get away with.

@EricMEsch
Copy link
Contributor Author

Ahh, killing the secondaries afterwards is a good point to also speed up what i added here!

@EricMEsch
Copy link
Contributor Author

EricMEsch commented Jan 23, 2026

The gamma line for water is now at least validated with this to be solved in G4 11.4
neutron_capture_H_1 output

It also looks like Geant4 now always forces G4PhotonEvaporation? At least the Q-value seems to always be conserved. I observe huge changes from G4 11.3 to G4 11.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validation Validation and tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants