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

Index

%include (McStas keyword), 1718

ABSORB (C macro, mcstas-r.h), 1719
adapt_tree-lib (library), 1732
Adaptive sampling, 76
ALLOW_BACKPROP (C macro, mcstas-r.h), 1720
Arm, 1738

box_intersect (C function, mccode-r.c), 1726
Bugs, 60, 202, 203, 420

C functions, 1718
Coherent and incoherent isotropic scatterer, 445
Component, 1738
    instance, 1738
Concentric components, 384, 445
Constants, 1734
Contrib, 1035
Conversion
    of units, 1734
Coordinate
    retrieval functions, 1720
    system, 47
coords_add (C function, mccode-r.c), 1723
coords_get (C function, mccode-r.c), 1723
coords_set (C function, mccode-r.c), 1723
cylinder_intersect (C function, mccode-r.c), 1726

Data files, 48
Definition parameter, 1738
DEG2RAD (constant), 1734
DETECTOR_OUT_0D (C macro, mccode-r.h), 1725
DETECTOR_OUT_1D (C macro, mccode-r.h), 1725
DETECTOR_OUT_2D (C macro, mccode-r.h), 1725
Diffraction, 384, 401, 418
Direction focusing, 71

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

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

GROUP (McStas keyword), 1720

HBAR (constant), 1734

Importance sampling
    direction focusing, 71
Incoherent elastic scattering, 358, 401
Incoherent inelastic scattering, 367
INDEX_CURRENT_COMP (C macro, mccode-r.h), 1721
Inelastic scattering, 425, 445
Input parameter, 1738
inside_rectangle (C function, mcstas-r.c), 1725
Instrument, 1738

K2V (constant), 1734
Kernel, 1738
Keyword
    EXTEND, 57, 86, 541
    OUTPUT PARAMETERS, 542

Library, 1718
    adapt_tree-lib, 1732
    Components
        contrib, 1035
        data, 50, 53, 54
        misc, 560
        monitors, 488
        obsolete, 1483
        optics, 146, 213, 267
        samples, 341
        sasmodels, 737
        sources, 86
        union, 585
    components
        data, 1730
        share, 1718
    mccode-r, 1718
    mcstas-r, 1718
    monitor_nd-lib, 1731
    pol-lib, 1665
    read_table-lib, 1728
    read_table-lib (Read_Table), 48
    Run-time
        MC_GETPAR, 542
    run-time, 1719
    vitess-lib, 1733

MC_GETPAR (C macro, mccode-r.h), 1720
mccode-r (library), 1718
MCDISPLAY (McStas keyword), 1720
MCNP, 140
MCSTAS (environment variable), 1718, 1730
McStas
    name, 1739
    pronunciation, 1739
mcstas-r (library), 1718
mcstas2vitess (McStas tool), 1733
MCViNE, 1381, 1433
MIN2RAD (constant), 1734
MNEUTRON (constant), 1734
monitor_nd-lib (library), 1731
Monitors, 488
    Adaptive importance sampling monitor, 126
    Banana shape, 539
    Beam analyzer, 579
    Capture flux, 534
    Custom monitoring (user variables, Monitor_nD), 540
    Divergence monitor, 508
    Divergence/position monitor, 512
    Energy monitor, 499
    Neutron parameter correlations, PreMonitor_nD, 542
    Number of neutron bounces in a guide, 542
    Position sensitive detector (PSD), 505
    Position sensitive monitor recording mean energy, 540
    The All-in-One monitor (Monitor_nD), 532
    Time-of-flight monitor, 492
    TOF2E monitor, 496
    Wavelength monitor, 502
Monte Carlo method, 66
    accuracy, 77
    adaptive sampling, 76
    direction focusing, 71
    stratified sampling, 76
Multiple scattering, 401, 445

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

Obsolete, 1483
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, 1739

PI (constant), 1734
Polarisation, 267, 1655
    field functions, 1667
    monitors, 548
    Monochromator_pol, 327
    precession algorithm, 1665
    SimpleNumMagnetPrecession, 1666
POS_A_COMP (C macro, mccode-r.h), 1721
POS_A_COMP_INDEX (C macro, mccode-r.h), 1721
POS_A_CURRENT_COMP (C macro, mccode-r.h), 1721
POS_R_COMP_INDEX (C macro, mccode-r.h), 1722
Preprocessor macros, 1718
PROP_DT (C macro, mcstas-r.h), 1719
PROP_GRAV_DT (C macro, mcstas-r.h), 1720
PROP_NO_G_DT (C macro, mcstas-r.h), 1720
PROP_NO_G_X0 (C macro, mcstas-r.h), 1720
PROP_NO_G_Y0 (C macro, mcstas-r.h), 1720
PROP_NO_G_Z0 (C macro, mcstas-r.h), 1720
PROP_Z0 (C macro, mcstas-r.h), 1719

RAD2DEG (constant), 1734
RAD2MIN (constant), 1734
rand01 (C function, mccode-r.c), 1726
randnorm (C function, mccode-r.c), 1726
randpm1 (C function, mccode-r.c), 1726
randtriangle (C function, mccode-r.c), 1726
randvec_target_circle (C function, mccode-r.c), 1727
randvec_target_rect (C function, mccode-r.c), 1727
randvec_target_rect_angular (C function, mccode-r.c), 1727
read_table-lib (library), 1728
Removed neutron events, 47, 457, 1720
RESTORE_NEUTRON (C macro, mcstas-r.h), 1722
RMS2FWHM (constant), 1734
ROT_A_COMP (C macro, mccode-r.h), 1721
ROT_A_CURRENT_COMP (C macro, mccode-r.h), 1721
rot_apply (C function, mccode-r.c), 1724
rot_copy (C function, mccode-r.c), 1723
rot_mul (C function, mccode-r.c), 1723
ROT_R_COMP (C macro, mccode-r.h), 1721
ROT_R_CURRENT_COMP (C macro, mccode-r.h), 1721
rot_set_rotation (C function, mccode-r.c), 1723
rot_transpose (C function, mccode-r.c), 1723
rotate (C macro, mccode-r.h), 1724
Run-time, 1739

Sample environments, 384, 445, 464
Samples, 341
    Coherent and incoherent isotropic scatterer, 445
    Dilute colloid medium, 418
    Incoherent inelastic scatterer, 367
    Incoherent isotropic scatterer (Vanadium), 358
    Phonon scattering, 425
    Powder, multiple diffraction line, 384
    Single crystal diffraction, 401
Sampling, 76
SANS, 349
SasView, 737
scalar_prod (C function, mccode-r.c), 1724
SCATTER (C macro, mcstas-r.h), 1720, 1722
SCATTERED (C macro, mccode-r.h), 1722
SE2V (constant), 1734
Setting parameter, 1739
SHARE (McStas keyword), 1718
Simulation progress bar, 578
Small angle scattering, 418
solve_2nd_order (C function, mccode-r.c), 1724
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, 1054
    Optimization location, see Sources/Optimizer
    Optimizer, 132
    Simple continuous source, 94
    Time of flight pulsed moderator, 115
sphere_intersect (C function, mccode-r.c), 1726
Spin-echo, 1674
Statistics
    uncertainty, 69
STORE_NEUTRON (C macro, mcstas-r.h), 1722
Stratified sampling, 76
Symbols, 47

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

Union, 585, 1681–1712
    algorithm, 1706
    conditionals, 1704
    exit volume, 1699
    geometry, 1693
    loggers, 1701
    masks, 1699
    master, 1700
    materials, 1693
    MCViNE, 1433, 1690
    processes, 1687
    surfaces, 1701
    tagging, 1704
    Union_init, 1687
    Union_stop, 1687
Units
    constants and conversions, 1734

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

Weight, 68
    statistical uncertainty, 69
    transformation, 71