/*******************************************************************************
*         McStas instrument definition URL=http://mcstas.risoe.dk
*
* Instrument: ILL_H142_IN12
*
* %Identification
* Written by: FARHI Emmanuel (farhi@ill.fr)
* Date: April 7, 2004
* Origin:ILL
* %INSTRUMENT_SITE: ILL
*
* The H142 S-curved cold guide at the ILL feeding IN12 TAS spectrometer
*
* %Description
* The H142 beam is the only S-curved guide at the ILL. It is used here to feed
* the IN12 TAS spectrometer (classical configuration).
*
* %Example: KI=2.662 QM=1 Sqw_coh=V.lau Detector: D7_SC3_1D_I=8.5e+06
*
* %Parameters
* m: [1]        m-value of guide coating (H14/H142)
* KI: [Angs-1]  central wavevector for incoming neutrons
* QM: [Angs-1]  wavevector transfer modulus at the sample
* EN: [meV]     energy transfer at the sample
* verbose: []   verbose-mode toggle
* WM: [m]       Width of monochromator
* HM: [m]       Height of monochromator
* NHM: [1]      Number of vertical slabs composing the monochromator
* NVM: [1]      Number of horizontal slabs composing the monochromator
* RMV: [m]      Monochromator vertical curvature, 0 for flat, -1 for automatic setting
* WA: [m]       Width of analyzer
* HA: [m]       Height of analyzer
* NVA: [1]      Number of vertical slabs composing the analyzer
* NHA: [1]      Number of horizontal slabs composing the analyzer
* RAH: [m]      Analyzer horizontal curvature, 0 for flat, -1 for automatic setting
* L2: [m]       Monochromator-Sample distance. Contains 2nd Collimator
* L3: [m]       Sample-Analyzer distance. Contains 3rd Collimator
* L4: [m]       Analyzer-detector distance. Contains 4th Collimator
*
* %Link
* The <a href="http://www.ill.fr/in12">IN12 TAS</a> at the ILL
*
* %End
*******************************************************************************/
DEFINE INSTRUMENT ILL_H142_IN12(m=1, KI=2.662, QM=1.0, EN=0.0, verbose=1, WM=0.08, HM=0.12,    NHM=1, NVM=6, RMV=-1, WA=0.121, HA=0.118,  NHA=11, NVA=1, RAH=-1, L2=1.726, L3=1.300, L4=0.710)

INITIALIZE
%{
  lambda=2*PI/KI;
  dlambda=lambda*0.015;
  printf("%s: Incoming wavelength lambda=%g [Angs]\n", NAME_INSTRUMENT, lambda);
%}

TRACE

%include "ILL/ILL_H142/ILL_H142.instr"
%include "Templates/templateTAS/templateTAS.instr"

END
