DEFINE INSTRUMENT bogus(Gam, Nu, GamD) DECLARE %{ double xx; double yy; double zz; /* double xx1;*/ /* double yy1;*/ /* double zz1;*/ /* double xx2;*/ /* double yy2;*/ /* double zz2;*/ /* double xx3;*/ /* double yy3;*/ /* double zz3;*/ /* double xx4;*/ /* double yy4;*/ /* double zz4;*/ /* double xx5;*/ /* double yy5;*/ /* double zz5;*/ /* double xx6;*/ /* double yy6;*/ /* double zz6;*/ /* double xx7;*/ /* double yy7;*/ /* double zz7;*/ /* double xx8;*/ /* double yy8;*/ /* double zz8;*/ %} INITIALIZE %{ /* Central pixel */ xx = 0.720 * sin(Gam * DEG2RAD)/cos((Gam - GamD) * DEG2RAD); yy = 0.720 * tan(Nu * DEG2RAD)/cos((Gam - GamD) * DEG2RAD); zz = 0.720 * cos(Gam * DEG2RAD)/cos((Gam - GamD) * DEG2RAD); /* Pixel above central pixel */ /* xx1 = xx;*/ /* yy1 = yy + 0.003;*/ /* zz1 = zz;*/ /* Pixel below central pixel */ /* xx2 = xx;*/ /* yy2 = yy - 0.003;*/ /* zz2 = zz;*/ /* Pixel left of central pixel */ /* xx3 = xx;*/ /* yy3 = yy;*/ /* zz3 = zz - 0.003;*/ /* Pixel right of central pixel */ /* xx4 = xx;*/ /* yy4 = yy;*/ /* zz4 = zz + 0.003;*/ /* Pixel left and above central pixel */ /* xx5 = xx;*/ /* yy5 = yy + 0.003;*/ /* zz5 = zz - 0.003;*/ /* Pixel left and below central pixel */ /* xx6 = xx;*/ /* yy6 = yy - 0.003;*/ /* zz6 = zz - 0.003;*/ /* Pixel right and above central pixel */ /* xx7 = xx;*/ /* yy7 = yy + 0.003;*/ /* zz7 = zz + 0.003;*/ /* Pixel right and below central pixel */ /* xx8 = xx;*/ /* yy8 = yy - 0.003;*/ /* zz8 = zz + 0.003;*/ %} TRACE COMPONENT water = Source_flux_lambda( radius = 0.02, dist = 5, xw = 0.01, yh = 0.01, lambda_0 = 5.8, d_lambda = 0.1, flux = 1e16) AT (0,0,0) ABSOLUTE /*COMPONENT water = ESS_moderator_short(*/ /* size = .1, l_low = 0.200, l_high = 10.000, dist = 1, xw = .1,*/ /* yh = .1, T = 323, tau = 22e-6, tau1=0, tau2 = 7e-6, n = 5,*/ /* n2 = 5, chi2 = 2.5, I0 = 9e10, I2 = 4.6e10, branch1 = 1,*/ /* branch2 = .5)*/ /* AT (0, 0, 0) ABSOLUTE*/ /*COMPONENT water = SXD_moderator(*/ /* size = 0.10, l_low = 3.200, l_high = 4.500, dist = 1.0, xw = 0.1,*/ /* yh = 0.1, T = 320.0, tau = 18.4E-6, tau2 = 3.3E-6,*/ /* n = 3.0, n2 = 1.0, I0 = 0.077E10, I2 = 0.180E10 , branch1 = 1.92,*/ /* branch2 = 2.0)*/ /* AT (0, 0, 0) ABSOLUTE*/ /*COMPONENT water = SXD_moderator(*/ /* size = 0.10, l_low = 0.500, l_high = 10.000, dist = 1.0, xw = 0.1,*/ /* yh = 0.1, T = 27.1, tau = 33.7E-6, tau2 = 3.9E-6,*/ /* n = 1.6, n2 = 1.9, I0 = 0.097E10, I2 = 0.211E10 , branch1 = 0.90,*/ /* branch2 = 2.2)*/ /* AT (0, 0, 0) ABSOLUTE*/ COMPONENT final_slit = Slit( xmin = -.005, xmax = .005, ymin = -.005, ymax = .005) AT (0, 0, 49.50) RELATIVE water /*COMPONENT premonitor = Monitor_4PI(*/ /* ) /* AT (0,0,50.0) RELATIVE water*/ /* AT (0, 0, 0.1) RELATIVE final_slit*/ /*COMPONENT sample = Powder1(*/ /* radius = .005, h = .01, q = 10.0000, sigma_a = 0, d_phi0 = 0.5,*/ /* target_x = xx, target_y = yy,target_z = zz)*/ /* AT (0, 0, 8.3) RELATIVE water*/ COMPONENT sample = Single_crystal( xwidth = 0.01, yheight = 0.01, zthick = 0.01, delta_d_d = 1e-4, mosaic = 5, ax = 3.8186, ay = 0, az = 0, bx = 0, by = 3.8843, bz = 0, cx = 0, cy = 0, cz = 5.8388, reflections = "YBaCuO4.dat") AT (0, 0, 50.0) RELATIVE water /*cz=11.6777*/ /*COMPONENT monitor = Monitor_4PI(*/ /* )*/ /* AT (0, 0, 0) RELATIVE sample*/ COMPONENT sphere = PSD_monitor_4PI_log( nx = 360, ny = 180, filename = "det.txt", radius = 0.720) AT (0, 0, 0) RELATIVE sample /* ROTATED (0, -40, 0) RELATIVE sample*/ COMPONENT detector1 = TOF_monitor( nchan = 50000, filename = "bogus1.txt", xmin = -.015, xmax = .015, ymin = -.015, ymax = .015, dt = 2) AT (xx, yy, zz) RELATIVE sample ROTATED (0, GamD, 0) RELATIVE sample /*COMPONENT detector2 = TOF_monitor(*/ /* nchan = 50000, filename = "bogus2.txt", xmin = -.0015, xmax = .0015,*/ /* ymin = -.0015, ymax = .0015, dt = 2)*/ /* AT (xx1, yy1, zz1) RELATIVE sample*/ /* ROTATED (0, GamD, 0) RELATIVE sample*/ /*COMPONENT detector3 = TOF_monitor(*/ /* nchan = 50000, filename = "bogus3.txt", xmin = -.0015, xmax = .0015,*/ /* ymin = -.0015, ymax = .0015, dt = 2)*/ /* AT (xx2, yy2, zz2) RELATIVE sample*/ /* ROTATED (0, GamD, 0) RELATIVE sample*/ /*COMPONENT detector4 = TOF_monitor(*/ /* nchan = 50000, filename = "bogus4.txt", xmin = -.0015, xmax = .0015,*/ /* ymin = -.0015, ymax = .0015, dt = 2)*/ /* AT (xx3, yy3, zz3) RELATIVE sample*/ /* ROTATED (0, GamD, 0) RELATIVE sample*/ /*COMPONENT detector5 = TOF_monitor(*/ /* nchan = 50000, filename = "bogus5.txt", xmin = -.0015, xmax = .0015,*/ /* ymin = -.0015, ymax = .0015, dt = 2)*/ /* AT (xx4, yy4, zz4) RELATIVE sample*/ /* ROTATED (0, GamD, 0) RELATIVE sample*/ /*COMPONENT detector6 = TOF_monitor(*/ /* nchan = 50000, filename = "bogus6.txt", xmin = -.0015, xmax = .0015,*/ /* ymin = -.0015, ymax = .0015, dt = 2)*/ /* AT (xx5, yy5, zz5) RELATIVE sample*/ /* ROTATED (0, GamD, 0) RELATIVE sample*/ /*COMPONENT detector7 = TOF_monitor(*/ /* nchan = 50000, filename = "bogus7.txt", xmin = -.0015, xmax = .0015,*/ /* ymin = -.0015, ymax = .0015, dt = 2)*/ /* AT (xx6, yy6, zz6) RELATIVE sample*/ /* ROTATED (0, GamD, 0) RELATIVE sample*/ /*COMPONENT detector8 = TOF_monitor(*/ /* nchan = 50000, filename = "bogus8.txt", xmin = -.0015, xmax = .0015,*/ /* ymin = -.0015, ymax = .0015, dt = 2)*/ /* AT (xx7, yy7, zz7) RELATIVE sample*/ /* ROTATED (0, GamD, 0) RELATIVE sample*/ /*COMPONENT detector9 = TOF_monitor(*/ /* nchan = 50000, filename = "bogus9.txt", xmin = -.0015, xmax = .0015,*/ /* ymin = -.0015, ymax = .0015, dt = 2)*/ /* AT (xx8, yy8, zz8) RELATIVE sample*/ /* ROTATED (0, GamD, 0) RELATIVE sample*/ END