=== templateSANS.instr ===

  • r=40Å
  • phi=0.01
  • Delta_rho = 1


/*******************************************************************************
*
* McStas, neutron ray-tracing package
* Copyright (C) 1997-2008, All rights reserved
* Risoe National Laboratory, Roskilde, Denmark
* Institut Laue Langevin, Grenoble, France
*
* Instrument: templateSANS
*
* %Identification
* Written by: <a href="mailto:kim.lefmann@risoe.dk">Kim Lefmann</a>
* Date: 19th Dec 2003.
* Origin: <a href="http://www.risoe.dk">Risoe</a>
* Release: McStas CVS_080624
* Version: $Revision: 4629 $
* %INSTRUMENT_SITE: Templates
*
* Test instrument for the Sans_spheres component. No guide / velocity selector
* etc. Will be developed further at later time.
*
* %Description
* Very simple test instrument for the Sans_spheres component
*
* %Example: lambda=6 Detector: detector_I=5.5587E-17
*
* %Parameters
* INPUT PARAMETERS:
* lambda: Mean wavelength of neutrons [AA]
* dlambda: Wavelength spread of neutrons [AA]
* r: Radius of scattering hard spheres [AA]
* PHI: Particle volume fraction [1]
* Delta_Rho: Excess scattering length density (fm/AA^3)
* sigma_abs: Absorption cross section at 2200 m/s [barns]
* Qmax: Maximum momentum transfer [AA^-1]
*
* %Link
* *
* %End
*******************************************************************************/
DEFINE INSTRUMENT templateSANS(lambda=5, dlambda=0.5, r=40, PHI=1e-2, Delta_Rho=0.1, sigma_abs=0.0)
TRACE
COMPONENT a1 = Progress_bar()
AT (0,0,0) ABSOLUTE
COMPONENT arm = Arm(
)
AT (0, 0, 0) ABSOLUTE
/*COMPONENT sourceMantid = Source_simple(
radius = 0.02, dist = 3, focus_xw = 0.01, focus_yh = 0.01,
lambda0 = lambda, dlambda = dlambda, flux = 1e18)
AT (0, 0, 0) RELATIVE arm
*/
COMPONENT sourceMantid = Source_Maxwell_3(
size = 0.01,
yheight = 0.01,
xwidth = 0.01,
Lmin = 0.5,
Lmax = 3.0,
dist = 3.0,
focus_xw =0.01 ,
focus_yh = 0.01,
T1 = 300.0,
T2 = 300.0,
T3 = 300.0,
I1 = 1.0E18,
I2 = 0.0,
I3 = 0.0)
AT (0,0,0) RELATIVE arm

COMPONENT coll1 = Slit(
radius = 0.005)
AT (0, 0, 3) RELATIVE arm

COMPONENT coll2 = Slit(
radius = 0.005)
AT (0, 0, 6) RELATIVE arm

COMPONENT Ldetector1 = L_monitor(
nL = 54, filename = "Edet1.dat", xmin = -0.005,
xmax = 0.005, ymin = -0.005, ymax = 0.005, Lmin = 0.4,
Lmax = 3.1,
restore_neutron = 1)
AT (0, 0, 0.19) RELATIVE coll2

COMPONENT detector1 = PSD_monitor(
nx = 128, ny = 128, filename = "PSD1.dat", xmin = -0.01,
xmax = 0.01, ymin = -0.01, ymax = 0.01,
restore_neutron = 1)
AT (0, 0, 0.19) RELATIVE coll2

//********************************
// HERE COMES THE SAMPLE
//********************************

COMPONENT sampleMantid = Sans_spheres(
R=r, Phi=PHI, Delta_rho=Delta_Rho, sigma_abs=sigma_abs,
xwidth=0.01, yheight=0.01, zdepth=0.005,focus_xw=1, focus_yh=1, target_index=1)
AT (0,0,0.2) RELATIVE coll2
EXTEND %{
if (!SCATTERED) ABSORB;
%}

COMPONENT nD_Mantid_1 = Monitor_nD(
options ="mantid square x limits=[-0.5 0.5] bins=192 y limits=[-0.5 0.5] bins=192, neutron pixel t, list all neutrons",
xmin = -0.5,
xmax = 0.5,
ymin = -0.5,
ymax = 0.5,
restore_neutron = 1,
filename = "bank01_events.dat")
AT (0, 0, 2.9) RELATIVE sampleMantid

COMPONENT QMonitor = SANSQMonitor(
RadiusDetector = 4.0,
DistanceFromSample = 2.9,
//LambdaMin = Lambda,
//Lambda0 = Lambda,
NumberOfBins = 10000,
restore_neutron = 1)
AT (0, 0,2.91) RELATIVE sampleMantid

COMPONENT detector2 = PSD_monitor(
nx = 128, ny = 128, filename = "PSD2.dat", xmin = -0.3,
xmax = 0.3, ymin = -0.3, ymax = 0.3,
restore_neutron = 1)
AT (0, 0, 3) RELATIVE sampleMantid

COMPONENT Ldetector2 = L_monitor(
nL = 10000, filename = "Edet2.dat", xmin = -0.3,
xmax = 0.3, ymin = -0.3, ymax = 0.3, Lmin = 0.5,
Lmax = 9.5,
restore_neutron = 1)
AT (0, 0, 3.01) RELATIVE sampleMantid

END
  • No labels