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

# The `Res_monitor` Component

Monitor for resolution calculations

## Identification

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

## Description

    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, zthick
        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. radius 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
--- | --- | --- | ---
filename | string | Name of output file. If unset, use automatic name | 0
options | str | String that specifies the geometry of the monitor | 0
res_sample_comp | no quotes | Name of Res_sample component in the instrument definition |
xwidth | m | Width/diameter of detector (x) | .1
yheight | m | Height of detector (y) | .1
zthick | m | Thichness of detector (z) | 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 | 10000

## 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 |

## Links

- Source code for `Res_monitor.comp`.

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