Next, let us insert something more interesting. Remove the V_sample and PSD_monitor_4PI and insert a PowderN component with the following parameters:
COMPONENT sample = PowderN(radius=0.01,h=0.01, d_phi0=0.1, pack=0.5,
DW=0.9, frac=0.5, reflections="mylist.dat",
Vc=3.86*3.86*11.82, sigma_abs=0, sigma_inc=2, barns=1)
AT (0, 0, 0) RELATIVE \<name of arm at the sample position\>
You should also create a list of reflections and save it as mylist.dat. The list should have the following contents:
and make sure that the previously inserted beamstop is after the banana detector in the component list. Test that neutrons reach the detector by running a simulation.
Afterwards, choose trace instead of simulate in the Run simulation window and see the instrument, you have created. To see only the trace of the neutrons, which hit the detector, select the detector component in the list given in the Inspect component box. Also, insert the following after the sample component:
if (!SCATTERED) ABSORB;
This will insert a command in c-language into the compiled instrument file. The command says that if the simulated neutron does not scatter at the sample, it is absorbed. This removes the direct beam and should be used with caution.