/*******************************************************************************
*
* McStas, neutron ray-tracing package
*         Copyright (C) 1997-2008, All rights reserved
*         Risoe National Laboratory, Roskilde, Denmark
*         Institut Laue Langevin, Grenoble, France
*
* Instrument: SNS_test
*
* %Identification
* Written by: G. Granroth
* Date: July 2004
* Origin: SNS Project Oak Ridge National Laboratory
* %INSTRUMENT_SITE:SNS
*
* Simple test instrument for the SNS_source component.
*
* %Description
* Simple test instrument for the SNS_source component.
* Refer to SNS <A href="http://neutrons.ornl.gov/instrument_systems/components/moderators.shtml">Source files.</A>
*
* %Example: filename="source_sct091_tu_02_1.dat" Detector: det_I=9.89304e+09
*
* %Parameters
* filename: [string] Source input file
*
* %Link
* Written by G. Granroth
* SNS_source component
* <A href="http://neutrons.ornl.gov/instrument_systems/components/moderators.shtml">Source files </A>
* %End
*******************************************************************************/

DEFINE INSTRUMENT SNS_test(string filename="source_sct091_tu_02_1.dat")

DECLARE %{
%}

INITIALIZE %{
%}

TRACE
COMPONENT mod=SNS_source(filename=filename,
  xwidth=0.1, yheight=0.12,
  dist=1, focus_xw=0.10, focus_yh=0.24,
  Emin=1.0,Emax=10.0)
AT(0,0,0) ABSOLUTE

COMPONENT dett=TOF_monitor(
  xmin = -.025, xmax = .025,
  ymin = -.06, ymax = .06,
  nt=500, dt=10,
  filename="tout.det")
At (0,0,1) RELATIVE mod

COMPONENT det=Monitor_nD(
  xwidth = 1, yheight = 1,
  options=" square x bins 100 limits=[-0.05 0.05]; y bins 100 limits=[-0.12 0.12]")
AT (0,0,1.0000000000001) RELATIVE mod
END

