This file is part of NCrystal (see https://mctools.github.io/ncrystal/).
Copyright 2015-2022 NCrystal developers
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. McStas, neutron ray-tracing package Copyright(C) 2007 Risoe National Laboratory.
Original header text for NCrystal_sample.comp: McStas sample component for the NCrystal scattering library. Find more information at <a href="https://github.com/mctools/ncrystal/wiki">the NCrystal wiki</a>. In particular, browse the available datafiles at <a href="https://github.com/mctools/ncrystal/wiki/Data-library">Data-library</a> and read about format of the configuration string expected in the "cfg" parameter at <a href="https://github.com/mctools/ncrystal/wiki/Using-NCrystal">Using-NCrystal</a>.
NCrystal is available under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>. Depending on the configuration choices, optional NCrystal modules under different licenses might be enabled - see <a href="https://github.com/mctools/ncrystal/wiki/About">About</a> for more details.
Author: NCrystal developers, converted to a Union component by Mads Bertelsen
Origin: NCrystal Developers (European Spallation Source ERIC and DTU Nutech)
Date: 20.08.15
This process uses the NCrystal library as a Union scattering process. It only provides physics; geometry and absorption are handled by the other Union components. Use Union_make_material to provide the absorption coefficient. Use Union_NCrystal_material for a complete material backed by one NCrystal configuration.
Part of the Union components, a set of components that work together and thus separates geometry and physics within McStas. The use of this component requires other components to be used:
1) One specifies a number of processes using process components like this one 2) These are gathered into material definitions using Union_make_material 3) Geometries are placed using Union_box / Union_cylinder, assigned a material 4) A Union_master component placed after all of the above
Only in step 4 will any simulation happen, and per default all geometries defined before the master, but after the previous will be simulated here.
There is a dedicated manual available for the Union_components.
Algorithm: Described elsewhere
Parameters in boldface are required; the others are optional.
|
Name |
Unit |
Description |
Default |
|
|
|||
|
cfg |
str |
NCrystal material configuration string (details <a href="https://github.com/mctools/ncrystal/wiki/Using-NCrystal">on this page</a>). |
"" |
|
interact_fraction |
1 |
How large a part of the scattering events should use this process 0-1 (sum of all processes in material = 1) |
-1 |
|
init |
string |
Deprecated and unused. Accepted so that instruments written for McStas/McXtrace 3.8.7 and earlier, which name the Union_init component here, still compile. |
"" |
|
|
|||
|
|
|||
|
|
|||
Component source code found in file NCrystal_process.comp.
CALCULATED PARAMETERS:
NCrystal_storage // Storage used to communicate with the probability and scattering function
*******************************************************************************/