/******************************************************************************* * McStas instrument definition URL=http://www.mcstas.org * * Instrument:Ge(311) * %End *******************************************************************************/ /* Change name of instrument and input parameters with default values */ DEFINE INSTRUMENT RSND() /* The DECLARE section allows us to declare variables or small */ /* functions in C syntax. These may be used in the whole instrument. */ DECLARE %{ %} /* The INITIALIZE section is executed when the simulation starts */ /* (C code). You may use them as component parameter values. */ INITIALIZE %{ %} /* Here comes the TRACE section, where the actual */ /* instrument is defined as a sequence of components. */ TRACE COMPONENT Origin = Progress_bar() AT (0,0,0) ABSOLUTE COMPONENT source = Source_Maxwell_3( height = 0.11, width = 0.06, l_low = 1, l_high = 3, dist =4, xw = 0.08, yh = 0.13, T1 = 320, I1 = 9.87E12) AT (0, 0, 0) RELATIVE Origin COMPONENT TubeEntrance = Slit( width = 0.06, height = 0.11) AT (0, 0, 0) RELATIVE source COMPONENT TubeExit = Slit( width = 0.06, height = 0.11) AT (0, 0, 4.049) RELATIVE TubeEntrance COMPONENT guide = Guide( w1 = 0.06, h1 = 0.11, w2 = 0.06, h2 = 0.11, l = 5.65, m = 2) AT (0, 0, 0) RELATIVE TubeExit COMPONENT mono_craddle = Arm( ) AT (0, 0, 5.96) RELATIVE TubeExit ROTATED (0, 27.531, 0) RELATIVE Origin SPLIT COMPONENT monochromator = Monochromator_curved( gap = 0.0001, NH = 1, NV = 5, mosaich = 30, mosaicv = 30, r0 = 0.265, RV = 1.2663, DM = 1.7056, width = 0.3, height = 0.127) AT (0, 0, 0) RELATIVE mono_craddle COMPONENT mono_out = Arm( ) AT (0, 0, 0) RELATIVE mono_craddle ROTATED (0, 2*27.531, 0) RELATIVE Origin COMPONENT slit_in = Slit( width = 0.003, height = 0.003) AT (0, 0, 1.56) RELATIVE mono_out SPLIT COMPONENT sample = PowderN( reflections = "Fe.laz", d_phi = 15, radius = 0.002, yheight = 0.1) AT (0, 0, 0.04) RELATIVE slit_in COMPONENT sample_out = Arm( ) AT (0, 0, 0) RELATIVE sample ROTATED (0, -84, 0) RELATIVE sample COMPONENT slit_out = Slit( width = 0.003, height = 0.003) AT (0, 0, 0.04) RELATIVE sample_out COMPONENT SollerCollimator3 = Guide_channeled( w1 = 0.04, h1 = 0.1, w2 = 0.04, h2 = 0.1, l = 0.4, k = 23, d = 0.00005, mx = 0, my = 0) AT (0, 0, 0.34) RELATIVE slit_out COMPONENT PSD = PSD_monitor( filename = "PSDafterSample", restore_neutron = 1, xwidth = 0.1, yheight = 0.3) AT (0, 0, 0.42) RELATIVE SollerCollimator3 COMPONENT BananaTheta = Monitor_nD( options = "banana, theta limits=[-1 1], bins=400", xwidth = 1.6, yheight = 0.3) AT (0, 0, 0) RELATIVE sample_out /* This section is executed when the simulation ends (C code). Other */ /* optional sections are : SAVE */ FINALLY %{ %} /* The END token marks the instrument definition end */ END