McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics NEXMAP


About McStas
 Conditions of use
 Project funding

 Other Downloads (share)

Mailing list

Search web/mailinglist

 Wiki (GitHub)
 McStas manual


Report bugs (GitHub)

Code-repository (GitHub)

McStas: Union_logger_3D_space

[ Identification | Description | Input parameters | Links ]

The Union_logger_3D_space Component

A sample component to separate geometry and phsysics


  • Site:
  • Author: Mads Bertelsen
  • Origin: University of Copenhagen
  • Date: 20.08.15


Part of the Union components, a set of components that work together and thus
sperates 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
2) These are gathered into material definitions using Union_make_material
3) Geometries are placed using Union_box/cylinder/sphere, 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 this master, but after the previous will be simulated here.

There is a dedicated manual available for the Union_components

This logger logs a 2D projection of the position of each scattering in the lab
frame. It does this in n3 space slices, so one can get a full 3D histogram of
scattering positions.

A logger will log something for scattering events happening to certain volumes,
which are specified in the target_geometry string. By leaving it blank, all
geometries are logged, even the ones not defined at this point in the
instrument file. If a list og target_geometries is selected, one can further
narrow the events logged by providing a list of process names in target_process
which need to correspond with names of defined Union_process components.

To use the logger_conditional_extend function, set it to some integer value n
and make and extend section to the master component that runs the geometry.
In this extend function, logger_conditional_extend[n] is 1 if the conditional
stack evaluated to true, 0 if not. This way one can check what rays is logged
using regular McStas monitors. Only works if a conditional is applied to this

Input parameters

Parameters in boldface are required; the others are optional.
target_geometrystringComma seperated list of geometry names that will be logged, leave empty for all volumes (even not defined yet)"NULL"
target_processstringComma seperated names of physical processes, if volumes are selected, one can select Union_process names"NULL"
D1_min1histogram boundery, min position value for first axis-1
D1_max1histogram boundery, max position value for first axis1
D2_min1histogram boundery, min position value for second axis-1
D2_max1histogram boundery, max position value for second axis1
D3_min1histogram boundery, min position value for third axis-1
D3_max1histogram boundery, max position value for third axis1
D_direction_1stringDirection for first axis ("x", "y" or "z")"x"
D_direction_2stringDirection for second axis ("x", "y" or "z")"z"
D_direction_3stringDirection for second axis ("x", "y" or "z")"z"
n11number of bins for first axis90
n21number of bins for second axis90
n31number of bins for third axis10
order_total1Only log rays that scatter for the n'th time, 0 for all orders0
order_volume1Only log rays that scatter for the n'th time in the same geometry0


[ Identification | Description | Input parameters | Links ]

Generated on 2024-01-03 11:47:43

Last Modified: Wednesday, 03-Jan-2024 19:59:11 CET
Search website mailinglist archive GitHub repos