Component Manual for the Neutron Ray-Tracing Package McStas, version 3.9

Index

%include (McStas keyword), 1706

ABSORB (C macro, mcstas-r.h), 1707
adapt_tree-lib (library), 1720
Adaptive sampling, 76
ALLOW_BACKPROP (C macro, mcstas-r.h), 1708
Arm, 1726

box_intersect (C function, mccode-r.c), 1714
Bugs, 60, 202, 203, 419

C functions, 1706
Coherent and incoherent isotropic scatterer, 444
Component, 1726
    instance, 1726
Concentric components, 383, 444
Constants, 1722
Contrib, 1029
Conversion
    of units, 1722
Coordinate
    retrieval functions, 1708
    system, 47
coords_add (C function, mccode-r.c), 1711
coords_get (C function, mccode-r.c), 1711
coords_set (C function, mccode-r.c), 1711
cylinder_intersect (C function, mccode-r.c), 1714

Data files, 48
Definition parameter, 1726
DEG2RAD (constant), 1722
DETECTOR_OUT_0D (C macro, mccode-r.h), 1713
DETECTOR_OUT_1D (C macro, mccode-r.h), 1713
DETECTOR_OUT_2D (C macro, mccode-r.h), 1713
DETECTOR_OUT_3D (C macro, mccode-r.h), 1713
Diffraction, 383, 400, 417
Direction focusing, 71

Environment variable
    BROWSER, 58
    MCSTAS, 57
Environment variables
    MCSTAS, 1706, 1718
Error estimate, 69
EXTEND (McStas keyword), 1708

FLT_MAX (constant), 1722
Focusing
    importance sampling, 71
FWHM2RMS (constant), 1722

GROUP (McStas keyword), 1708

HBAR (constant), 1722

Importance sampling
    direction focusing, 71
Incoherent elastic scattering, 358, 400
Incoherent inelastic scattering, 366
INDEX_CURRENT_COMP (C macro, mccode-r.h), 1709
Inelastic scattering, 424, 444
Input parameter, 1726
inside_rectangle (C function, mcstas-r.c), 1714
Instrument, 1726

K2V (constant), 1722
Kernel, 1726
Keyword
    EXTEND, 57, 86, 540
    OUTPUT PARAMETERS, 541

Library, 1706
    adapt_tree-lib, 1720
    Components
        contrib, 1029
        data, 50, 53, 54
        misc, 559
        monitors, 487
        obsolete, 1477
        optics, 146, 213, 267
        samples, 341
        sasmodels, 731
        sources, 86
        union, 580
    components
        data, 1718
        share, 1706
    mccode-r, 1706
    mcstas-r, 1706
    monitor_nd-lib, 1719
    pol-lib, 1653
    read_table-lib, 1716
    read_table-lib (Read_Table), 48
    Run-time
        MC_GETPAR, 541
    run-time, 1707
    vitess-lib, 1721

MC_GETPAR (C macro, mccode-r.h), 1708
mccode-r (library), 1706
MCDISPLAY (McStas keyword), 1708
MCNP, 140
MCSTAS (environment variable), 1706, 1718
McStas
    name, 1727
    pronunciation, 1727
mcstas-r (library), 1706
mcstas2vitess (McStas tool), 1721
MCViNE, 1375, 1427
MIN2RAD (constant), 1722
MNEUTRON (constant), 1722
monitor_nd-lib (library), 1719
Monitors, 487
    Adaptive importance sampling monitor, 126
    Banana shape, 538
    Beam analyzer, 574
    Capture flux, 533
    Custom monitoring (user variables, Monitor_nD), 539
    Divergence monitor, 507
    Divergence/position monitor, 511
    Energy monitor, 498
    Neutron parameter correlations, PreMonitor_nD, 541
    Number of neutron bounces in a guide, 541
    Position sensitive detector (PSD), 504
    Position sensitive monitor recording mean energy, 539
    The All-in-One monitor (Monitor_nD), 531
    Time-of-flight monitor, 491
    TOF2E monitor, 495
    Wavelength monitor, 501
Monte Carlo method, 66
    accuracy, 77
    adaptive sampling, 76
    direction focusing, 71
    stratified sampling, 76
Multiple scattering, 400, 444

NAME_CURRENT_COMP (C macro, mccode-r.h), 1709
Neutron polarisation, see Polarisation
NORM (C macro, mccode-r.h), 1712
normal_vec (C function, mccode-r.c), 1712

Obsolete, 1477
Optics, 146, 183, 187, 213, 267
    Beam stop, 155
    Bender (non polarizing), 204
    Curved guides (polygonal model), 204
    Disc chopper, 216
    Fermi Chopper, 203, 228, 247
    Guide with channels (straight, non focusing), 201
    Guide with channels and gravitation handling (straight), 203
    Linear collimator, 169
    Mirror plane, 187
    Monochromator, 310
    Monochromator, curved, 323
    Monochromator, polarizing, 327
    Monochromator, thick, 334
    phase space transformer, 335
    Point in space (Arm, Optical bench), 148
    Radial collimator, 176
    Slit, 152
    Straight guide, 193
    Velocity selector, 257, 263
Optimization, 121, 126, 132, 138
Output parameter, 1727

PI (constant), 1722
Polarisation, 267, 1643
    field functions, 1655
    monitors, 547
    Monochromator_pol, 327
    precession algorithm, 1653
    SimpleNumMagnetPrecession, 1654
POS_A_COMP (C macro, mccode-r.h), 1709
POS_A_COMP_INDEX (C macro, mccode-r.h), 1709
POS_A_CURRENT_COMP (C macro, mccode-r.h), 1709
POS_R_COMP_INDEX (C macro, mccode-r.h), 1710
Preprocessor macros, 1706
PROP_DT (C macro, mcstas-r.h), 1707
PROP_GRAV_DT (C macro, mcstas-r.h), 1708
PROP_NO_G_DT (C macro, mcstas-r.h), 1708
PROP_NO_G_X0 (C macro, mcstas-r.h), 1708
PROP_NO_G_Y0 (C macro, mcstas-r.h), 1708
PROP_NO_G_Z0 (C macro, mcstas-r.h), 1708
PROP_Z0 (C macro, mcstas-r.h), 1707

RAD2DEG (constant), 1722
RAD2MIN (constant), 1722
rand01 (C function, mccode-r.c), 1714
randnorm (C function, mccode-r.c), 1714
randpm1 (C function, mccode-r.c), 1714
randtriangle (C function, mccode-r.c), 1715
randvec_target_circle (C function, mccode-r.c), 1715
randvec_target_rect (C function, mccode-r.c), 1715
randvec_target_rect_angular (C function, mccode-r.c), 1715
read_table-lib (library), 1716
Removed neutron events, 47, 456, 1708
RESTORE_NEUTRON (C macro, mcstas-r.h), 1710
RMS2FWHM (constant), 1722
ROT_A_COMP (C macro, mccode-r.h), 1709
ROT_A_CURRENT_COMP (C macro, mccode-r.h), 1709
rot_apply (C function, mccode-r.c), 1712
rot_copy (C function, mccode-r.c), 1711
rot_mul (C function, mccode-r.c), 1711
ROT_R_COMP (C macro, mccode-r.h), 1709
ROT_R_CURRENT_COMP (C macro, mccode-r.h), 1709
rot_set_rotation (C function, mccode-r.c), 1711
rot_transpose (C function, mccode-r.c), 1711
rotate (C macro, mccode-r.h), 1712
Run-time, 1727

Sample environments, 383, 444, 463
Samples, 341
    Coherent and incoherent isotropic scatterer, 444
    Dilute colloid medium, 417
    Incoherent inelastic scatterer, 366
    Incoherent isotropic scatterer (Vanadium), 358
    Phonon scattering, 424
    Powder, multiple diffraction line, 383
    Single crystal diffraction, 400
Sampling, 76
SANS, 349
SasView, 731
scalar_prod (C function, mccode-r.c), 1712
SCATTER (C macro, mcstas-r.h), 1708, 1710
SCATTERED (C macro, mccode-r.h), 1710
SE2V (constant), 1722
Setting parameter, 1727
SHARE (McStas keyword), 1706
Simulation progress bar, 573
Small angle scattering, 417
solve_2nd_order (C function, mccode-r.c), 1712
Sources, 86
    Adaptive importance sampling monitor, 126
    Adaptive source, 121
    Continuous source with a Maxwellian spectrum, 100
    Continuous source with specified divergence, 97
    General continuous source, 107
    ISIS pulsed moderators, 1048
    Optimization location, see Sources/Optimizer
    Optimizer, 132
    Simple continuous source, 94
    Time of flight pulsed moderator, 115
sphere_intersect (C function, mccode-r.c), 1714
Spin-echo, 1662
Statistics
    uncertainty, 69
STORE_NEUTRON (C macro, mcstas-r.h), 1710
Stratified sampling, 76
Symbols, 47

Table_Free (C function, read_table-lib.c), 1717
Table_Free_Array (C function, read_table-lib.c), 1717
Table_Index (C function, read_table-lib.c), 1717
Table_Info (C function, read_table-lib.c), 1717
Table_Info_Array (C function, read_table-lib.c), 1717
Table_Init (C function, read_table-lib.c), 1716
Table_Read (C function, read_table-lib.c), 1716
Table_Read_Array (C function, read_table-lib.c), 1717
Table_Read_Offset (C function, read_table-lib.c), 1716
Table_Read_Offset_Binary (C function, read_table-lib.c), 1716
Table_Rebin (C function, read_table-lib.c), 1717
Table_Value (C function, read_table-lib.c), 1717
Table_Value2d (C function, read_table-lib.c), 1717
Tools
    mcdoc, 58
Tripoli, 140

Union, 580, 1669–1700
    algorithm, 1694
    conditionals, 1692
    exit volume, 1687
    geometry, 1681
    loggers, 1689
    masks, 1687
    master, 1688
    materials, 1681
    MCViNE, 1427, 1678
    processes, 1675
    surfaces, 1689
    tagging, 1692
    Union_init, 1675
    Union_stop, 1675
Units
    constants and conversions, 1722

V2K (constant), 1722
Variance, 69
Variance reduction, 76
vec_prod (C function, mccode-r.c), 1712
Virtual sources, 76
Vitess, 140
vitess-lib (library), 1721
VS2E (constant), 1722

Weight, 68
    statistical uncertainty, 69
    transformation, 71