/******************************************************************************* * * McStas, the neutron ray-tracing package * Maintained by Kristian Nielsen and Kim Lefmann, * Copyright 1997-2000 Risoe National Laboratory, Roskilde, Denmark * * %I * Written by: KN * Date: August 1998 * Version: $Revision: 1.1.1.1 $ * Origin: McStas release * * Circular slit. * * %P * INPUT PARAMETERS * * radius: Radius of slit in the z=0 plane, centered at Origo (m) * * %E *******************************************************************************/ DEFINE COMPONENT Circular_slit 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