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: Res_monitor Component

[ Identification | Description | Input parameters | Output parameters | Links ]

The Res_monitor Component

Monitor for resolution calculations


  • Author: Kristian Nielsen
  • Origin: Risoe
  • Date: 1999
  • Version:(Unknown)
  • Modification history:
    • EF, 16th Apr 2003: imported from Monitor_nD to enable many shapes


A single detector/monitor, used together with the Res_sample component to
compute instrument resolution functions. Outputs a list of neutron
scattering events in the sample along with their intensities in the
detector. The output file may be analyzed with the mcresplot front-end.

Example: Res_monitor(filename="Output.res", res_sample_comp=RSample, xmin=-0.1, xmax=0.1, ymin=-0.1, ymax=0.1)

Setting the monitor geometry.
  The optional parameter 'options' may be set as a string with the
  following keywords. Default is rectangular ('square'):
    box                       Box of size xwidth, yheight, zdepth
    cylinder                  To get a cylindrical monitor (diameter is xwidth, height is yheight).
    banana                    Same as cylinder, without top/bottom, on restricted angular area
    disk                      Disk flat xy monitor. diameter is xwidth.
    sphrere                   To get a spherical monitor (e.g. a 4PI) (diameter is xwidth).
    square                    Square flat xy monitor (xwidth, yheight)

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
res_sample_comp no quotes Name of Res_sample component in the instrument definition  
filename string Name of output file. If unset, use automatic name 0
options str String that specifies the geometry of the monitor 0
xwidth m Width/diameter of detector .1
yheight m Height of detector .1
zdepth m Thichness of detector 0
radius m Radius of sphere/cylinder monitor 0
xmin m Lower x bound of detector opening 0
xmax m Upper x bound of detector opening 0
ymin m Lower y bound of detector opening 0
ymax m Upper y bound of detector opening 0
zmin m Lower z bound of detector opening 0
zmax m Upper z bound of detector opening 0
bufsize 1 Number of events to store. Use 0 to store all 0
restore_neutron 1 If set, the monitor does not influence the neutron state 0

Output parameters

Name Unit Description Default
DEFS struct structure containing Monitor_nD Defines  
Vars struct structure containing Monitor_nD variables  
buffer_index long number of recorded events  


[ Identification | Description | Input parameters | Output parameters | Links ]

Generated automatically by McDoc, Peter Willendrup <> / Wed Jan 12 15:13:31 2022

Last Modified: Wednesday, 12-Jan-2022 16:13:31 CET
Search website mailinglist archive GitHub repos