/******************************************************************************* * * McStas, the neutron ray-tracing package. * Maintained by Kristian Nielsen and Kim Lefmann, * Copyright 2000 Risoe National Laboratory, Roskilde, Denmark * * %I * Written by: Kristian Nielsen * Date: January 2000 * Version: $Revision: 1.1.1.1 $ * Origin: McStas release * * Circular beam stop. * * %D * A simple circular beam stop. Infinitely thin and infinitely absorbing. * * %P * INPUT PARAMETERS * * radius: radius of the beam stop (m) * * %E *******************************************************************************/ DEFINE COMPONENT Beamstop_circular DEFINITION PARAMETERS () SETTING PARAMETERS (radius) STATE PARAMETERS (x,y,z,vx,vy,vz,t,s1,s2,p) TRACE %{ PROP_Z0; if(x*x + y*y <= radius*radius) ABSORB; %} MCDISPLAY %{ magnify("xy"); circle("xy", 0, 0, 0, radius); %} END