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
Showing
- Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h 6 additions, 4 deletions...rk/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h
- Framework/Algorithms/src/MonteCarloAbsorption.cpp 43 additions, 20 deletionsFramework/Algorithms/src/MonteCarloAbsorption.cpp
- Framework/Algorithms/test/MonteCarloAbsorptionTest.h 16 additions, 11 deletionsFramework/Algorithms/test/MonteCarloAbsorptionTest.h
- Framework/Kernel/inc/MantidKernel/Material.h 6 additions, 0 deletionsFramework/Kernel/inc/MantidKernel/Material.h
- Framework/Kernel/src/Material.cpp 67 additions, 46 deletionsFramework/Kernel/src/Material.cpp
- Framework/Kernel/test/MaterialBuilderTest.h 1 addition, 1 deletionFramework/Kernel/test/MaterialBuilderTest.h
- Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShielding.py 1 addition, 9 deletions...s/algorithms/WorkflowAlgorithms/DirectILLSelfShielding.py
- Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShieldingTest.py 0 additions, 1 deletion...gorithms/WorkflowAlgorithms/DirectILLSelfShieldingTest.py
- Testing/SystemTests/tests/analysis/ILLDirectGeometryReductionTest.py 1 addition, 2 deletions...temTests/tests/analysis/ILLDirectGeometryReductionTest.py
- Testing/SystemTests/tests/analysis/complexShapeAbsorptionsTest.py 4 additions, 3 deletions...SystemTests/tests/analysis/complexShapeAbsorptionsTest.py
- Testing/SystemTests/tests/analysis/reference/ILL_IN4_SofQW.nxs.md5 1 addition, 1 deletion...ystemTests/tests/analysis/reference/ILL_IN4_SofQW.nxs.md5
Loading