1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
  
     | 
    
      /*******************************************************************************
*         McStas instrument definition URL=http://www.mcstas.org
*
* Instrument: templateLaue
*
* %Identification
* Written by: K. Nielsen
* Date: June 2nd, 2010
* Origin: ILL
* Modified by: EF, 
* %INSTRUMENT_SITE: Templates
*
* A simple Laue diffractometer
*
* %Description
* A single crystal sample is illuminated with a white cold beam.
* Based on a Laue tutorial written by K. Nielsen, Feb 7, 2000.
*
* %Example: templateLaue reflections=YBaCuO.lau Detector: det_I=1.14351e+07
* %Example: templateLaue reflections=leucine.lau Detector: det_I=4.63548e+08
*
* %Parameters
* reflections: [string] Single crystal reflection list
*
* %End
*******************************************************************************/
/* Change name of instrument and input parameters with default values */
DEFINE INSTRUMENT templateLaue(string reflections="leucine.lau")
TRACE
COMPONENT Origin = Progress_bar()
  AT (0,0,0) ABSOLUTE
COMPONENT source = Source_simple(
  radius=0.02, focus_xw=0.01, focus_yh=0.01, 
  lambda0=7, dlambda=5, flux=1e12)
AT (0,0,0) ABSOLUTE
COMPONENT slit = Slit(
  xwidth=0.01, yheight=0.01)
AT (0,0,5) RELATIVE source
COMPONENT sample = Single_crystal(
          xwidth=0.01, yheight=0.01, zdepth=0.01,
          delta_d_d=1e-4, mosaic = 5, sigma_inc=0,
          reflections=reflections, order=1)
AT (0,0,0.10) RELATIVE slit
EXTEND %{
  if (!SCATTERED) ABSORB; /* perfect beam stop */
%}
COMPONENT det= PSD_monitor_4PI(radius=1, nx=360,ny=180,filename="psd")
AT (0,0,0) RELATIVE sample
END
 
     |