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: TOFRes_sample

[ Identification | Description | Input parameters | Links ]

The TOFRes_sample Component

Sample for TOF resolution function calculation.


  • Site:
  • Author: KL, 10 October 2004
  • Origin: Risoe
  • Date: 1999


An inelastic sample with completely uniform scattering in both solid angle
and energy. This sample is used together with the TOFRes_monitor component
and (optionally) the mcresplot front-end to compute the resolution
function of all time-of-flight instruments.
The method of time focusing is used to optimize the simulations.

The shape of the sample is either a hollow cylinder or a rectangular box. The
hollow cylinder shape is specified with an inner and outer radius.
The box is specified with dimensions xwidth, yheight, zdepth.

The scattered neutrons will have directions towards a given target and
energies between E0-dE and E0+dE, where E0 is calculated from the position
and width of the time bin.
This target area is default disk shaped, but may also be rectangular
if specified focus_xw and focus_yh
or focus_aw and focus_ah, respectively in meters and degrees.
The target itself is either situated according to given coordinates (x,y,z),
or setting the relative target_index of the component to focus at
(next is +1). This target position will be set to its AT position.
When targeting to centered components, such as spheres or cylinders,
define an Arm component where to focus at.

Example: TOFRes_sample(thickness=0.001, radius=0.01, yheight=0.04, focus_xw=0.025, focus_yh=0.025, E0=14.6,dE=2, target_x=0, target_y=0, target_z=1)

Input parameters

Parameters in boldface are required; the others are optional.
thicknessmThickness of hollow cylinder in (x,z) plane0
radiusmOuter radius of hollow cylinder0.01
yheightmvert. dimension of sample, as a height0.05
focus_rmRadius of sphere containing target0.05
time_binusposition of time bin20000
time_widthuswidth of time bin10
target_ymposition of target to focus at0
focus_xwmhoriz. dimension of a rectangular area0
focus_yhmvert. dimension of a rectangular area0
focus_awdeghoriz. angular dimension of a rectangular area0
focus_ahdegvert. angular dimension of a rectangular area0
xwidthmhoriz. dimension of sample, as a width0
zdepthmdepth of sample0
target_index1relative index of component to focus at, e.g. next is +10


[ 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