DEFINE INSTRUMENT MCRY_test(TTM, PHM, E, DWERT) /* test version 05/2004 */ /* */ DECLARE %{ double dist1 = 2.5; double dist2 = 2.5; double beam_width = 0.05; double beam_height = 0.05; double mos0 = 22.6; double ref0 = 0.7; %} INITIALIZE %{ %} TRACE COMPONENT a1 = Arm() AT (0,0,0) ABSOLUTE /* COMPONENT source = Source_div_lambda( width = 0.062, height = 0.122, hdiv = 1.0, vdiv = 1.0, //lambda_0 = 2.0, lambda_0 = LAMBDA, d_lambda = 0.1) AT (0,0,0) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 */ COMPONENT source = Source_div( width = 0.062, height = 0.122, hdiv = 1.0, vdiv = 1.0, E0 = E, dE = 0.1) AT (0,0,0) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 /* monitoring primary beam... */ COMPONENT sum1 = Monitor( xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1) AT(0, 0, dist1+0.0171) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 COMPONENT psd1 = PSD_monitor( xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1, nx = 41, ny = 41, filename = "NL1.psd") AT(0, 0, dist1+0.0172) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 COMPONENT div1 = Divergence_monitor( xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1, nh = 41, nv = 41, h_maxdiv = 2.0, v_maxdiv = 2.0, filename = "NL1.div") AT(0, 0, dist1+0.0173) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 /* end of monitoring primary beam... */ /********************************************************/ /* Monochromator */ /********************************************************/ /****************************************/ /* center crystal package - position 0 */ /****************************************/ COMPONENT mono0 = Arm() AT (0, 0, dist1+0.167+0) RELATIVE a1 ROTATED (0, PHM, 0) RELATIVE a1 COMPONENT m0 = Monochromator_flat( zmin = -0.011, zmax = +0.011, ymin = -0.003, ymax = +0.003, mosaich = mos0, mosaicv = mos0, r0 = ref0, DM = DWERT) AT (0, 0, 0) RELATIVE mono0 ROTATED (0, 0, 0) RELATIVE mono0 /* monitoring transmitted beam... */ COMPONENT psd2 = PSD_monitor( xmin = -beam_width, xmax = beam_width, ymin = -beam_height, ymax = beam_height, nx = 41, ny = 41, filename = "MatDet2.psd") AT(0, 0, dist1+.501) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 COMPONENT sum2 = Monitor( xmin = -beam_width, xmax = beam_width, ymin = -beam_height, ymax = beam_height) AT(0, 0, dist1+0.502) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 /* end of monitoring transmitted beam... */ /* Bragg reflected beam along a2 */ COMPONENT a2 = Arm() AT (0, 0, 0) RELATIVE mono0 ROTATED (0, TTM, 0) RELATIVE a1 /* monitoring Brag reflected beam... */ COMPONENT psd3 = PSD_monitor( xmin = -beam_width, xmax = beam_width, ymin = -beam_height, ymax = beam_height, nx = 41, ny = 41, filename = "MatDet3.psd") AT(0, 0, dist2+0.001) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 COMPONENT sum3 = Monitor( xmin = -beam_width, xmax = beam_width, ymin = -beam_height, ymax = beam_height) AT(0, 0, dist2+0.002) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 COMPONENT div3 = Divergence_monitor( xmin = -beam_width, xmax = beam_width, ymin = -beam_height, ymax = beam_height, nh = 41, nv = 41, h_maxdiv = 2.0, v_maxdiv = 2.0, filename = "MatDet3.div") AT(0, 0, dist2+0.004) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 /* end of monitoring Bragg reflected beam... */ END