/*******************************************************************************
*
* McStas, neutron ray-tracing package
*         Copyright (C) 1997-2008, All rights reserved
*         Risoe National Laboratory, Roskilde, Denmark
*         Institut Laue Langevin, Grenoble, France
*
* Instrument: ILL_H25
*
* %Identification
* Written by: <a href="mailto:farhi@ill.fr">Emmanuel Farhi</a>
* Date: 2006
* Origin: <a href="http://www.ill.fr">ILL (France)</a>
* %INSTRUMENT_SITE: ILL
*
* The H25 supermirror curved thermal guide at the ILL
*
* %Description
* The H25 supermirror curved thermal guide at the ILL feeding S18, D23 and IN22
*
* %Example: m=2 Detector: GuideOut_Phic_I=1.17e+09
*
* %Parameters
* m: [1]         m-value of whole guide coating. 0 absorbing, 1 for Ni, 1.2 for Ni58, 2-4 for SM
* lambda: [AA]   central wavelength
* dlambda: [AA]  wavelength half width. Use e.g. 0.8*lambda for white beam.
* mip: [1]       m-value of in-pile guide coating
*
* %End
*******************************************************************************/
DEFINE INSTRUMENT ILL_H25(m=2, lambda=4, dlambda=3.9, mip=2)

DECLARE
%{

  /* Thermal (H2x) source parameters */

  /* guide coating parameters */
  double gR0          = 1;
  double gQc          = 0.0219;
  double gAlpha       = 4.07;
  double gW           = 1.0/300.0;
  /* gaps and Al windows parameters */
  double Al_Thickness = 0.002;
  double gGap         = 0.001;
  /* guide curvatures */
  double gRh          = -8170; /* downwards */
  /* guide section parameters (total length/number of elements) 'Carter' indexing */
  double gH =0.2;
  double L_H25_1 =3.5  /4,  Rh_H25_1 =0;
  double L_H25_2 =2.5  /3,  Rh_H25_2 =0; /* end of C2=VS 148 mm */
  double L_H25_3 =9.5  /10, Rh_H25_3 =0;
  double L_H25_4 =7.0  /7,  Rh_H25_4 =0; /* end of C4=2 mm window */
  double L_H25_5 =4.75 /5,  Rh_H25_5 =0; /* end of C5=OT1 H25 109 mm */
  double L_H25_6 =10.0 /10, Rh_H25_6 =0;
  double L_H25_7 =10.0 /10, Rh_H25_7 =0;
  double L_H25_8 =5.0  /5,  Rh_H25_8 =0; /* end of C8=S18 Mono+OS S18 */
  double L_H25_9 =5.7  /6,  Rh_H25_9 =0; /* end of C9=D23 Mono +OS D23 */
  double L_H25_10=4.7  /5,  Rh_H25_10=0; /* end of C10=IN22 Mono +OS IN22, height 12 cm (top) */
%}
/* end of DECLARE */

INITIALIZE
%{

/* Element rotations = Element length / Curvature Radius * RAD2DEG */
	if (gRh) {
		Rh_H25_1  = L_H25_1 /gRh*RAD2DEG;
		Rh_H25_2  = L_H25_2 /gRh*RAD2DEG;
		Rh_H25_3  = L_H25_3 /gRh*RAD2DEG;
		Rh_H25_4  = L_H25_4 /gRh*RAD2DEG;
		Rh_H25_5  = L_H25_5 /gRh*RAD2DEG;
		Rh_H25_6  = L_H25_6 /gRh*RAD2DEG;
		Rh_H25_7  = L_H25_7 /gRh*RAD2DEG;
		Rh_H25_8  = L_H25_8 /gRh*RAD2DEG;
	}

	printf("Instrument: ILL_H25 (H25@ILL thermal guide).\n");

%}
/* end of INITIALIZE */

TRACE
/* Source description */
COMPONENT Origin = Progress_bar(percent=5)
  AT (0,0,0) ABSOLUTE

/* H25 Guide description */
COMPONENT Thermal = Source_gen(
  yheight  = 0.22,
  xwidth   = 0.14,
  dist     = 2.38+0.8,
  focus_xw = 0.038,
  focus_yh = 0.2,
  lambda0  = lambda,
  dlambda  = dlambda,
  T1=683.7,I1=0.5874e+13,T2=257.7,I2=2.5099e+13,T3=16.7 ,I3=1.0343e+12,
  verbose  = 1)
  AT (0, 0, 0) RELATIVE Origin

/* L=3.3 m in 2 elements. 'Pink Carter'.  starts at about 2.5 m from core center */
COMPONENT PinkCarter = Guide_gravity(
  w1=0.038, h1=0.2, w2=0.032, h2=0.2, l=0.8,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=mip, W=gW)
AT (0,0,2.38) RELATIVE Thermal
/* core to glass SM elements=3.182 m */
COMPONENT PinkCarterSM = Guide_gravity(
  w1=0.038, h1=0.2, w2=0.032, h2=0.2, l=2.5,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=mip, W=gW)
AT (0,0,0.8+gGap) RELATIVE PREVIOUS

/* Lead Shutter */
COMPONENT LeadShutter = Guide_gravity(
  w1=0.031, h1=0.2, w2=0.031, h2=0.2, l=0.228,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,0.8+2.5+gGap) RELATIVE PinkCarter

/* ******************** swiming pool guide ******************** */

/* H25-1: L=3.5 m in 4 elements R horiz=-9000 m. start at 0 m from Lead Shutter */
COMPONENT H25_1_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.230) RELATIVE LeadShutter

COMPONENT H25_1 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_1,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_1,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_1) = COPY(H25_1)
AT (0,0,L_H25_1+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_1,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_1) = COPY(H25_1)
AT (0,0,L_H25_1+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_1,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_1) = COPY(H25_1)
AT (0,0,L_H25_1+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_1,0) RELATIVE PREVIOUS

COMPONENT H25_1_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_1+gGap) RELATIVE PREVIOUS

/* H25-2: L=2.5 m in 3 elements R horiz=-9000 m start at 3.5 m from Lead Shutter */
COMPONENT H25_2_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.03) RELATIVE PREVIOUS

COMPONENT H25_2 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_2,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_2,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_2) = COPY(H25_2)
AT (0,0,L_H25_2+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_2,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_2) = COPY(H25_2)
AT (0,0,L_H25_2+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_2,0) RELATIVE PREVIOUS

COMPONENT H25_2_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_2+gGap) RELATIVE PREVIOUS

/* gap 0.148 m (VS) */

/* H25-3: L=9.5 m in 10 elements Rh=-9000 m. start at 6 m from Lead Shutter */
COMPONENT H25_3_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.148) RELATIVE PREVIOUS

COMPONENT H25_3 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_3,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_3) = COPY(H25_3)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_3,0) RELATIVE PREVIOUS

COMPONENT H25_3_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_3+gGap) RELATIVE PREVIOUS

/* gap 0.03 m */

/* H25-4: L=7 m in 7 elements Rh=-9000 m. start at 15.5 m from Lead Shutter */
COMPONENT H25_4_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.03) RELATIVE PREVIOUS

COMPONENT H25_4 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_4,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_4,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_4) = COPY(H25_4)
AT (0,0,L_H25_4+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_4,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_4) = COPY(H25_4)
AT (0,0,L_H25_4+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_4,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_4) = COPY(H25_4)
AT (0,0,L_H25_4+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_4,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_4) = COPY(H25_4)
AT (0,0,L_H25_4+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_4,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_4) = COPY(H25_4)
AT (0,0,L_H25_4+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_4,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_4) = COPY(H25_4)
AT (0,0,L_H25_4+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_4,0) RELATIVE PREVIOUS

COMPONENT H25_4_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_4+gGap) RELATIVE PREVIOUS

/* gap 0.03 m */

/* H25-5: L=4.75 m in 5 elements Rh=-9000 m. start at 22.5 m from Lead Shutter */
COMPONENT H25_5_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.03) RELATIVE PREVIOUS

COMPONENT H25_5 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_5,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_5,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_5) = COPY(H25_5)
AT (0,0,L_H25_5+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_5,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_5) = COPY(H25_5)
AT (0,0,L_H25_5+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_5,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_5) = COPY(H25_5)
AT (0,0,L_H25_5+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_5,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_5) = COPY(H25_5)
AT (0,0,L_H25_5+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_5,0) RELATIVE PREVIOUS

COMPONENT H25_5_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_5+gGap) RELATIVE PREVIOUS

/* gap 0.109 mm OT1 H25 */

/* H25-6: L=10 m in 10 elements Rh=-9000 m. start at 27.25 m from Lead Shutter */
COMPONENT OT1_H25 = Al_window(thickness=Al_Thickness)
AT (0,0,0.109) RELATIVE PREVIOUS

COMPONENT H25_6 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_6,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_6) = COPY(H25_6)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_6,0) RELATIVE PREVIOUS

COMPONENT H25_6_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_6+gGap) RELATIVE PREVIOUS

/* gap 0.03 m */

/* H25-7: L=10 m in 10 elements Rh=-9000 m. start at 37.25 m from Lead Shutter */
COMPONENT H25_7_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.03) RELATIVE PREVIOUS

COMPONENT H25_7 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_7,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_7) = COPY(H25_7)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_7,0) RELATIVE PREVIOUS

COMPONENT H25_7_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_7+gGap) RELATIVE PREVIOUS

/* H25-8: L=5.0 m in 5 elements Rh=-9000 m. start at 47.25 m from Lead Shutter */
COMPONENT H25_8_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.03) RELATIVE PREVIOUS

COMPONENT H25_8 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_8,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_8,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_8) = COPY(H25_8)
AT (0,0,L_H25_8+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_8,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_8) = COPY(H25_8)
AT (0,0,L_H25_8+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_8,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_8) = COPY(H25_8)
AT (0,0,L_H25_8+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_8,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_8) = COPY(H25_8)
AT (0,0,L_H25_8+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_8,0) RELATIVE PREVIOUS

COMPONENT H25_8_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_8+gGap) RELATIVE PREVIOUS

/* Mono S18 + OS S18 only on lower part (80 mm) */

/* H25-9: L=5.7 m in 6 elements Rh=-9000 m. start at 52.25 m from Lead Shutter */
COMPONENT H25_9_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.03) RELATIVE PREVIOUS

COMPONENT H25_9 = Guide_gravity(
  w1=0.03, h1=0.2, w2=0.03, h2=0.2, l=L_H25_9,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_9,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_9) = COPY(H25_9)
AT (0,0,L_H25_9+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_9,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_9) = COPY(H25_9)
AT (0,0,L_H25_9+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_9,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_9) = COPY(H25_9)
AT (0,0,L_H25_9+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_9,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_9) = COPY(H25_9)
AT (0,0,L_H25_9+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_9,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_9) = COPY(H25_9)
AT (0,0,L_H25_9+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_9,0) RELATIVE PREVIOUS

COMPONENT H25_9_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_9+gGap) RELATIVE PREVIOUS

/* Mono D23 + OS D23 only on lower part (80 mm) + beam stop */

/* H25-10: L=4.7 m in 5 elements Rh=-9000 m. start at 58 m from Lead Shutter */
COMPONENT H25_10_In = Al_window(thickness=Al_Thickness)
AT (0,0,0.03) RELATIVE PREVIOUS

COMPONENT H25_10 = Guide_gravity(
  w1=0.03, h1=0.12, w2=0.03, h2=0.12, l=L_H25_10,
  R0=gR0, Qc=gQc, alpha=gAlpha, m=m, W=gW)
AT (0,0.04,Al_Thickness+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_10,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_10) = COPY(H25_10)
AT (0,0,L_H25_10+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_10,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_10) = COPY(H25_10)
AT (0,0,L_H25_10+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_10,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_10) = COPY(H25_10)
AT (0,0,L_H25_10+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_10,0) RELATIVE PREVIOUS

COMPONENT COPY(H25_10) = COPY(H25_10)
AT (0,0,L_H25_10+gGap) RELATIVE PREVIOUS ROTATED (0,Rh_H25_10,0) RELATIVE PREVIOUS

COMPONENT H25_10_Out = Al_window(thickness=Al_Thickness)
AT (0,0,L_H25_10+gGap) RELATIVE PREVIOUS

/* gap 0.3 m */

COMPONENT GuideOut = Arm() AT (0,0,0.01) RELATIVE PREVIOUS

COMPONENT GuideOut_xy = Monitor_nD(
  xwidth=0.06, yheight=0.2, restore_neutron=1,
  options="x y, per cm2, slit")
AT (0,0,0.1) RELATIVE PREVIOUS

COMPONENT GuideOut_dxdy = Monitor_nD(
  xwidth=0.06, yheight=0.2, restore_neutron=1,
  options="dx dy, all auto, per cm2, slit")
AT (0,0,0) RELATIVE PREVIOUS

COMPONENT GuideOut_Phic = Monitor_nD(
  xwidth=0.06, yheight=0.2, restore_neutron=1,
  options="per cm2, capture, slit")
AT (0,0,0) RELATIVE PREVIOUS

COMPONENT GuideOut_L = Monitor_nD(
  xwidth=0.06, yheight=0.2, restore_neutron=1,
  options="lambda, limits=[1 21] bins=20, per cm2, slit")
AT (0,0,0) RELATIVE PREVIOUS

END
