Skip to content
Snippets Groups Projects
Commit d48169a8 authored by Danny Hindson's avatar Danny Hindson
Browse files

Only use NumberOfWavelengthPoints if resimulating tracks

A new boolean parameter SimulateTracksForEachWavelength has been added to
the MonteCarloAbsorption algorithm. This exposes a switch on the MCAbsorptionStrategy
that was present before this change but was hardcoded to False.

The parameter NumberOfWavelengthPoints is only required if SimulateTracksForEachWavelength
is set to True. This change means that an attenuation factor is calculated for all wavelength
bins if SimulateTracksForEachWavelength=false. To facilitate this a performance enhancement
has been made to the Material class to calculate the total scatter cross section and the
absorption cross section once when the Material rather than every time these cross sections
are retrieved by the MonteCarloAbsorption calculation.

This change required some unit and system tests to be updated eg ILLDirectGeometryReductionTest
has been changed to remove the NumberOfWavelengthPoints parameter and the reference file to be
updated. To make this test more robust I have increased the number of scenarios used in the MC
simulation from 5000 to 20000
parent 8dd12a73
No related branches found
No related tags found
No related merge requests found
Showing
with 146 additions and 98 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment