/******************************************************************************* * * McStas, the neutron ray-tracing package. * Maintained by Kristian Nielsen and Kim Lefmann, * Copyright 2000 Risoe National Laboratory, Roskilde, Denmark * * Component: Beamstop_rectangular * * %ID * * Written by: Kristian Nielsen * Date: January 2000 * Origin: McStas release * Version: $Revision: 1.1.1.1 $ * * Rectangular beam stop. * * %D * A simple rectangular beam stop. Infinitely thin and infinitely absorbing. * * %PAR * * INPUT PARAMETERS * * xmin: Lower x bound (m) * xmax: Upper x bound (m) * ymin: Lower y bound (m) * ymax: Upper y bound (m) * * %END *******************************************************************************/ DEFINE COMPONENT Beamstop_rectangular DEFINITION PARAMETERS () SETTING PARAMETERS (xmin, xmax, ymin, ymax) STATE PARAMETERS (x,y,z,vx,vy,vz,t,s1,s2,p) TRACE %{ PROP_Z0; if (!(xxmax || yymax)) ABSORB; %} MCDISPLAY %{ magnify("xy"); multiline(5, (double)xmin, (double)ymin, (double)xmin, (double)ymax, (double)xmax, (double)ymax, (double)xmax, (double)ymin, (double)xmin, (double)ymin); %} END