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

 Linux Install (deb/rpm)
 Mac OS X Install
 Unix Install (src code)
 Windows Install
 Other Downloads (share)

Mailing list

Search web/mailinglist

 McStas manual
 Known problems
 C Compilers




Report bugs


McStas Ubuntu live-dvd

McStas: Pol_mirror Component

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

The Pol_mirror Component

Polarising mirror.


  • Author: Peter Christiansen
  • Origin: RISOE
  • Date: July 2006
  • Version:(Unknown)


This component models a rectangular infinitely thin mirror.
For an unrotated component, the mirror surface lies in the Y-Z
plane (ie. parallel to the beam).
It relies on similar physics as the Monochromator_pol.
The reflectivity function (see e.g. share/ref-lib for examples) and parameters
are passed to this component to give a bigger freedom.
The up direction is hardcoded to be along the y-axis (0, 1, 0)
For now we assume:
P(Transmit|Q) = 1 - P(Reflect|Q)

The component can both reflect and transmit neutrons with a respective proportion
depending on the p_reflect parameter:
  p_reflect=-1 Reflect and transmit (proportions given from reflectivity) [default]
  p_reflect=1 Only handle reflected events
  p_reflect=0 Only handle transmitted events (reduce weight)
  p_reflect=0-1 Both transmit and reflect with fixed statistics proportions

The parameters can either be
double pointer initializations (e.g. {R0, Qc, alpha, m, W})
or table names (e.g."supermirror_m2.rfl" AND useTables=1).
NB! This might cause warnings by the compiler that can be ignored.

Reflection function parametrization
Pol_mirror(zwidth = 0.40, yheight = 0.40, rUpFunc=StdReflecFunc, rUpPar={1.0, 0.0219, 6.07, 2.0, 0.003})

Table function
Pol_mirror(zwidth = 0.40, yheight = 0.40, rUpFunc=TableReflecFunc, rUpPar="supermirror_m2.rfl", rDownFunc=TableReflecFunc, rDownPar="supermirror_m3.rfl", useTables=1)

See also the example instrument Test_Pol_Mirror (under tests).



Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
rUpFunc q, *par, *r [1] Reflection function for spin up StdReflecFunc
rDownFunc q, *par, *r [1] Reflection function for spin down rUpFunc
rUpPar 1 Parameters for rUpFunc {0.99
rDownPar 1 Parameters for rDownFunc rUpPar
useTables 1 Parameters are 0: Values, 1: Table names 0
zwidth m Width of the mirror  
yheight m Height of the mirror  
p_reflect 1 Proportion of reflected events. Use 0 to only get the transmitted beam, and 1 to get only the reflected beam. Use -1 to use the mirror reflectivity. This value is purely computational and is not related to the actual reflectivity -1

Output parameters

Name Unit Description Default


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

Generated automatically by McDoc, Peter Willendrup <> / Mon Jun 26 12:27:17 2017

Last Modified: Monday, 26-Jun-2017 14:27:17 CEST
Search website mailinglist archive GitHub repos