1/*******************************************************************************
2*         McStas instrument definition URL=http://mcstas.risoe.dk
3*
4* Instrument: ILL_H5
5*
6* %Identification
7* Written by: FARHI Emmanuel (farhi@ill.fr)
8* Date: May, 2011
9* Origin:ILL
10* Release: McStas 2.0
11* Version: $Revision: 1.0 $
12* %INSTRUMENT_SITE: ILL
13*
14* The full H5 cold guide at the ILL, with IN14, D16, Super-Adam, IN15, D22
15* This is the geometry before the major H5 guide hall upgrade (up to 2013).
16*
17* %Description
18*
19* This model decribes the full H5 cold guide at the ILL, with IN14, IN16, D16,
20* Super-Adam, IN15, D22.
21*
22* The IN14 Cold neutron three-axis spectrometer IN14
23* The IN16 Cold neutron backscattering spectrometer IN16
24*   simulated down to the 2nd deflector, and does not include the full
25*   backscattering geometry.
26* The D16 Small momentum transfer diffractometer D16 is realistic
27* The SuperADAM reflectometer is used in low angle diffraction mode.
28* The IN15 Spin-echo spectrometer
29*   is simulated with an incoming polarized beam, but not with a full spin-echo
30*   description.
31* The D22 Large dynamic range small-angle diffractometer
32*   is fully simulated
33* The CryoEDM with its polarized beam
34
35* For each instrument, a sample can be specified (liquid/powder/amorphous),
36* with monitoring of the scattering in angular (diffraction) and energy modes
37* (for spectroscopy).
38*
39* %Parameters
40*      lambda:  central wavelength band for guide illumination [Angs]
41*     dlambda:  half width of guide wavelength band [Angs]
42* IN14_lambda:  IN14 monochromator setting wavelength. Usual 2.4 and 4.2 [Angs]
43* IN16_lambda:  IN16 monochromator setting wavelength. Usual 3.3 and 6.3 [Angs]
44*  D16_lambda:  D16  monochromator setting wavelength. Usual 4.7 and 5.6 [Angs]
45* SADAM_lambda: SuperADAM monochromator setting wavelength. Usual 4.4 [Angs]
46*  IN15_lambda: IN15 velocity selector setting wavelength [Angs]
47*   D22_lambda: D22  velocity selector setting wavelength [Angs]
48*  IN14_sample: IN14 liquid/powder/amorphous sample [string]
49*  IN16_sample: IN16 liquid/powder/amorphous sample [string]
50*   D16_sample: D16  liquid/powder/amorphous sample [string]
51* SADAM_sample: SuperADAM liquid/powder/amorphous sample [string]
52*   D22_sample: D22  liquid/powder/amorphous sample [string]
53* D22_collimation: D22 collimation length and sample-detector distance [m]
54*
55* %Link
56* The NoteDPT11 at the ILL
57* %L
58* Daily notes from K. Andersen about the H5 project
59* %L
60* Mirotron drawing MR-0656-000 for the IN15 V-mirror geometry
61* %End
62*******************************************************************************/
63
64/* Flux given at sample positions from <www.ill.fr>
65ILL_H5: IN14: A1=38.7506 [deg] RMV=2.02467 [m] lambda=4.2 [Angs] sample=Rb_liq_coh.sqw
66  Flux 1.6e7 (with Be filter) -- 2.6e8
67ILL_H5: IN16: A1=69.8672 [deg] RMV=2.01006 [m] lambda=6.3 [Angs] sample=Rb_liq_coh.sqw
68  Flux 5e4
69ILL_H5: D16:  A1=56.5716 [deg] RMV=3.02043 [m] lambda=5.6 [Angs] sample=H2O_liq.qSq
70  Flux 1e7 -- 4.6e7
71ILL_H5: SuperADAM: A1=40.9756 [deg] RMV=2.90659 [m] lambda=4.4 [Angs] sample=SiO2_quartza.laz
72  Flux 1.4e6 - 5e7
73ILL_H5: IN15: nu=21774.9 [rmp] lambda=6.5 [Angs] sample=Vanadium (polarized)
74  Flux ?
75ILL_H5: D22:  nu=23589.5 [rpm] lambda=4.5 [Angs] sample=H2O_liq.qSq
76  Flux 1.2e8 -- 7.1e7
77 */
78
79DEFINE INSTRUMENT ILL_H5(
80  lambda=5, dlambda=4.5,
81  IN14_lambda=4.2, IN16_lambda=6.3, D16_lambda=5.6,   SADAM_lambda=4.4,
82  IN15_lambda=6.5,    D22_lambda=4.5,   D22_collimation=2,
83  string IN14_sample="Rb_liq_coh.sqw", string  IN16_sample="Rb_liq_coh.sqw",
84  string D16_sample="H2O_liq.qSq",     string SADAM_sample="SiO2_quartza.laz",
85  string D22_sample="H2O_liq.qSq",
86  IN14_RMV=-1,IN16_RMV=-1,D16_RMV=-1,SADAM_RMV=-1)
87
88DECLARE %{
89
90  /* HCS (H5) source 'Measured' parameters */
91  double sT3=413.5,sI3=10.22e12;
92  double sT2=145.8,sI2=3.44e13;
93  double sT1=40.1 ,sI1=2.78e13;
94
95  /* guide coating parameters */
96  double gR0          = 1;
97  double gQc          = 0.0216;
98  double gAlpha       = 4.07;
99  double gW           = 1.0/300.0;
100
101  double Al_Thickness = 0.001;
102  double gGap         = 0.001;
103
104  double IN14_DM      = 3.355; /* PG002 */
105  double IN14_A1      = 0;
106  double IN14_L       = 2.12;
107
108  double IN16_DM      = 3.355; /* PG002 */
109  double IN16_A1      = 0;
110  double IN16_L       = 1.4;
111
112  double D16_DM       = 3.355; /* PG002 */
113  double D16_A1       = 0;
114  double D16_L        = 2.8;
115
116  double SADAM_DM     = 3.355; /* PG002 */
117  double SADAM_A1     = 0;
118  double SADAM_L      = 3.36;
119
120  double CryoEDM_L    = 0.3;
121
122  double IN15_L       = 3.7;
123  double IN15_nu      = 0;
124  double  D22_nu      = 0;
125
126  double flag         = 0;
127%}
128
129INITIALIZE %{
130  double L;
131  /* the effective guide divergence is 1.2*0.1*lambda*pi/180 for m=1.2 */
132  /* the effective inguide length for focusing is thus
133         (0.12/2)/(1.2*0.1*lambda*PI/180)
134
135  /* compute H53 parameters: IN14 */
136  IN14_A1  = asin(IN14_lambda/2/IN14_DM)*RAD2DEG;
137       L   = 1/(1/IN14_L+1/( (0.12/2)/(1.2*0.1*IN14_lambda*PI/180) ));
138  if (IN14_RMV<0)
139  IN14_RMV = 2*L*sin(DEG2RAD*fabs(IN14_A1));
140  printf("%s: IN14: A1=%g [deg] RMV=%g [m] lambda=%g [Angs] sample=%s\n",
141    NAME_CURRENT_COMP, IN14_A1, IN14_RMV, IN14_lambda, IN14_sample);
142
143
144  /* compute H53 parameters: IN16 */
145  IN16_A1  = asin(IN16_lambda/2/IN16_DM)*RAD2DEG;
146       L   = 1/(1/IN16_L+1/( (0.12/2)/(1.2*0.1*IN16_lambda*PI/180) ));
147  if (IN16_RMV<0)
148  IN16_RMV = 2*L*sin(DEG2RAD*fabs(IN16_A1));
149  printf("%s: IN16: A1=%g [deg] RMV=%g [m] lambda=%g [Angs] sample=%s\n",
150    NAME_CURRENT_COMP, IN16_A1, IN16_RMV, IN16_lambda, IN16_sample);
151
152  /* compute H53 parameters: D16 */
153  D16_A1   = asin(D16_lambda/2/D16_DM)*RAD2DEG;
154      L    = 1/(1/D16_L+1/( (0.12/2)/(1.2*0.1*D16_lambda*PI/180) ));
155  if (D16_RMV<0)
156  D16_RMV  = 2*L*sin(DEG2RAD*fabs(D16_A1));
157  printf("%s: D16:  A1=%g [deg] RMV=%g [m] lambda=%g [Angs] sample=%s\n",
158    NAME_CURRENT_COMP, D16_A1, D16_RMV, D16_lambda, D16_sample);
159
160  /* compute H53 parameters: SuperADAM */
161  SADAM_A1 = asin(SADAM_lambda/2/SADAM_DM)*RAD2DEG;
162        L  = 1/(1/SADAM_L+1/( (0.12/2)/(1.2*0.1*SADAM_lambda*PI/180) ));
163  if (SADAM_RMV<0)
164  SADAM_RMV= 2*L*sin(DEG2RAD*fabs(SADAM_A1));
165  printf("%s: SuperADAM: A1=%g [deg] RMV=%g [m] lambda=%g [Angs] sample=%s\n",
166    NAME_CURRENT_COMP, SADAM_A1, SADAM_RMV, SADAM_lambda, SADAM_sample);
167
168  /* compute H51 parameters: IN15 Velocity Selector */
169  IN15_nu  = 3956*64.4*DEG2RAD/2/PI/IN15_lambda/0.25;
170  printf("%s: IN15: nu=%g [rmp] lambda=%g [Angs] sample=%s\n",
171    NAME_CURRENT_COMP, IN15_nu*60, IN15_lambda, "Vanadium (polarized)");
172
173  /* compute H51 parameters: D22 Velocity Selector */
174  D22_nu   = 3956*48.3*DEG2RAD/2/PI/D22_lambda/0.25;
175  printf("%s: D22:  nu=%g [rpm] lambda=%g [Angs] sample=%s\n",
176    NAME_CURRENT_COMP, D22_nu*60, D22_lambda, D22_sample);
177
178%}
179
180TRACE
181
182/* ================================ H5 common =============================== */
183
184COMPONENT Origin = Progress_bar()
185AT(0,0,0) ABSOLUTE
186
187COMPONENT HCS = Source_gen(
188  radius   = 0.21/2,
189  zdepth   = 0.15,
190  dist     = 2.155,
191  focus_xw = 0.123,
192  focus_yh = 0.120,
193  lambda0     = lambda,
194  dlambda     = dlambda,
195  T1       = sT1,
196  I1       = sI1,
197  T2       = sT2,
198  I2       = sI2,
199  T3       = sT3,
200  I3       = sI3,
201  verbose  = 1)
202  AT (0, 0, 0) RELATIVE Origin
203
204COMPONENT HCS_Al  = PowderN(
205  reflections="Al.laz", xwidth=0.17, yheight=0.12, zdepth=Al_Thickness, p_interact=0.05, p_inc=0.005, p_transmit=0.9450, d_phi=10)
206AT (0,0,0.21) RELATIVE HCS
207
208COMPONENT COPY(HCS_Al) = COPY(HCS_Al)
209AT (0,0,0.61) RELATIVE HCS
210
211COMPONENT COPY(HCS_Al) = COPY(HCS_Al)
212AT (0,0,0.78) RELATIVE HCS
213
214COMPONENT COPY(HCS_Al) = COPY(HCS_Al)
215AT (0,0,0.92) RELATIVE HCS
216
217COMPONENT COPY(HCS_Al) = COPY(HCS_Al)
218AT (0,0,2.15) RELATIVE HCS
219
220/* Ni common guide: wide entry window for all guides */
221COMPONENT H5 = Monitor_nD(xwidth=0.04+0.004+0.015+0.004+0.06, yheight=0.12,
222  options="x y, slit", bins=50)
223AT(0,0,2.155) RELATIVE HCS
224
225/* distribute the beam along channels: we use monitors to define the beam sections+JUMP */
226COMPONENT H53_origin = COPY(H5)(options="dx limits=[-6 6] dy limits=[-6 6]", xwidth=0.06, restore_neutron=1)
227AT ((0.04+0.004+0.015+0.004+0.06)/2-0.06/2,0,0)             RELATIVE H5 ROTATED (0,1.1439,0) RELATIVE H5
228JUMP H53_Start WHEN SCATTERED
229
230COMPONENT H52_origin = COPY(H5)(options="dx limits=[-6 6] dy limits=[-6 6]", xwidth=0.015, restore_neutron=1)
231AT ((0.04+0.004+0.015+0.004+0.06)/2-0.06-0.004-0.015/2,0,0) RELATIVE H5 ROTATED (0,0.2065,0) RELATIVE H5
232JUMP H52_Start WHEN SCATTERED
233
234COMPONENT H51_origin = COPY(H5)(options="dx limits=[-6 6] dy limits=[-6 6]", xwidth=0.04, restore_neutron=1)
235AT (-(0.04+0.004+0.015+0.004+0.06)/2+0.04/2,0,0)            RELATIVE H5 ROTATED (0,-1.3269,0) RELATIVE H5
236JUMP H51_Start WHEN SCATTERED
237
238                       /* start of guide sections */
239
240/* ================================ H53 ===================================== */
241/* feeds: IN14, CryoEDM, D16, Super-Adam, Wasp */
242
243COMPONENT H53_Start = Arm()
244AT (0,0,0) RELATIVE H53_origin
245
246COMPONENT H53_inpile = Guide_gravity(h1=0.12,w1=0.06, m=1.2, l=2.775,
247  R0=gR0, Qc=gQc, alpha=gAlpha, m = 1.2, W=gW)
248AT (0,0,0) RELATIVE PREVIOUS
249
250COMPONENT H53_Al = COPY(HCS_Al)(xwidth=0.06)
251AT (0,0,2.775+0.005) RELATIVE PREVIOUS
252
253/* Gap 25 mm before BOG (barillet obturateur general). Carter BOG             */
254
255COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
256AT (0,0,0.015) RELATIVE PREVIOUS
257
258COMPONENT H53_Obt_1 = COPY(H53_inpile)(l=0.860)
259AT (0,0,2.775+0.025) RELATIVE H53_inpile
260
261COMPONENT H53_Obt_2 = COPY(H53_inpile)(l=1.440)
262AT (0,0,0.860+0.012) RELATIVE PREVIOUS
263
264COMPONENT H53_Obt_3 = COPY(H53_inpile)(l=0.740)
265AT (0,0,1.440+0.012) RELATIVE PREVIOUS
266
267COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
268AT (0,0,0.74+0.01) RELATIVE PREVIOUS
269
270/* Gap 75 mm after BOG (barillet obturateur general): VS */
271
272COMPONENT H53_Obt_Out = COPY(H5)(xwidth=0.06, restore_neutron=1)
273AT (0,0,0.06) RELATIVE PREVIOUS
274
275COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
276AT (0,0,0) RELATIVE PREVIOUS
277
278/* Sections 2,3,4 in NoteDPT11/H53 - straight. Length=10.5 m down to IN14     */
279/* Carter VS+Movable+Common+C1                                                */
280
281COMPONENT H53_VSComC1 = COPY(H53_inpile)(l=10.5,nelements=9)
282AT (0,0,0.74+0.075) RELATIVE H53_Obt_3
283
284COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
285AT (0,0,10.5+0.01) RELATIVE PREVIOUS
286
287                  /* Gap 450 mm: IN14 Monochromator */
288
289                              /* IN14 */
290
291COMPONENT H53_IN14_Monochromator_Cradle = COPY(H5)(xwidth=0.06, restore_neutron=1)
292AT (0,0,10.5+0.450/2) RELATIVE H53_VSComC1
293EXTEND %{
294  flag=0;
295%}
296
297/* IN14 monochromator PG002 w15*h12 7 blades vertically focusing. Sample at 2.12 m */
298COMPONENT H53_IN14_Monochromator = Monochromator_curved(
299  width  = 0.15, height = 0.12, NH=1, NV=7,
300  RV=IN14_RMV, RH=0, DM=IN14_DM, mosaich = 30, mosaicv = 30,
301  r0 = 1, reflect="HOPG.rfl", transmit="HOPG.trm")
302AT      (0,0,0)       RELATIVE H53_IN14_Monochromator_Cradle
303ROTATED (0,IN14_A1,0) RELATIVE H53_IN14_Monochromator_Cradle
304EXTEND %{
305  flag=SCATTERED;
306%}
307
308COMPONENT H53_IN14_Monochromator_Jumper = Arm()
309AT       (0,0,0)       RELATIVE H53_IN14_Monochromator_Cradle
310JUMP H53_IN14_Transmit WHEN !flag
311
312COMPONENT H53_IN14_Monochromator_Out = Arm()
313AT      (0,0,0)         RELATIVE H53_IN14_Monochromator_Cradle
314ROTATED (0,2*IN14_A1,0) RELATIVE H53_IN14_Monochromator_Cradle
315
316COMPONENT H53_IN14_Sample_Div = Monitor_nD(xwidth=0.05, yheight=0.05,
317  options="dx limits=[-2 2], dy limits=[-2 2]", bins=50, restore_neutron=1)
318AT (0,0,IN14_L) RELATIVE H53_IN14_Monochromator_Out
319
320COMPONENT H53_IN14_Sample_XY = Monitor_nD(xwidth=0.10, yheight=0.10,
321  options="x y", bins=50, restore_neutron=1)
322AT (0,0,IN14_L) RELATIVE H53_IN14_Monochromator_Out
323
324COMPONENT H53_IN14_Sample_L = Monitor_nD(xwidth=0.10, yheight=0.10,
325  options="lambda limits=[1 10]", bins=50, restore_neutron=1)
326AT (0,0,IN14_L) RELATIVE H53_IN14_Monochromator_Out
327
328COMPONENT H53_IN14_Sample = Isotropic_Sqw(radius=0.005,yheight=0.05,
329  Sqw_coh=IN14_sample, Sqw_inc=NULL, d_phi=30)
330AT (0,0,IN14_L) RELATIVE H53_IN14_Monochromator_Out
331EXTEND %{
332  if (!SCATTERED) ABSORB;
333%}
334
335COMPONENT H53_IN14_Spectrometer = Monitor_nD(radius=0.5, yheight=0.3,
336  options="angle limits=[-150 150] bins=50, energy limits=[0 30], banana", restore_neutron=1)
337AT (0,0,0) RELATIVE H53_IN14_Sample
338
339COMPONENT H53_IN14_Diffractometer = Monitor_nD(radius=1, yheight=0.3,options="theta bins=100 limits=[-150 150], y, banana")
340AT (0,0,0) RELATIVE H53_IN14_Sample
341EXTEND %{
342  ABSORB; /* neutron ends on the IN14 sample */
343%}
344
345/* For fun we add the IN14 2nd spectrometer */
346COMPONENT Sample_Out = Arm() /*        this is the sample-ana axis */
347  AT (0,0,0) RELATIVE H53_IN14_Sample
348  ROTATED (0, -42, 0) RELATIVE H53_IN14_Monochromator_Out
349
350COMPONENT SC3 =Collimator_linear(
351  xmin =-0.06/2, ymin =-0.12/2,
352  xmax = 0.06/2, ymax = 0.12/2,
353  length = 0.40)
354AT (0, 0, 0.5) RELATIVE Sample_Out
355
356COMPONENT Ana_Cradle = Arm()
357  AT (0, 0, 1.37) RELATIVE Sample_Out
358
359COMPONENT PG2Xtal = Monochromator_curved(
360  width  = .2, height = .1,
361  NH=11, NV=1, RV=0, RH=0,
362  DM=3.355, mosaich = 30, mosaicv = 30, r0 = 0.7)
363AT (0, 0, 0) RELATIVE Ana_Cradle
364ROTATED (0, 21, 0) RELATIVE Ana_Cradle
365
366COMPONENT Ana_Out = Arm() /*        this is the sample-ana axis */
367  AT (0,0,0) RELATIVE Ana_Cradle
368  ROTATED (0, 42, 0) RELATIVE Ana_Cradle
369
370COMPONENT SC4 =Collimator_linear(
371  xmin =-0.06/2, ymin =-0.12/2,
372  xmax = 0.06/2, ymax = 0.12/2,
373  length = 0.24)
374AT (0, 0, 0.25) RELATIVE Ana_Out
375
376/* vertical 3He Detector */
377COMPONENT He3H = Monitor(
378  xmin = -0.025400, xmax = 0.025400,
379  ymin = -0.042850, ymax = 0.042850)
380AT (0, 0, 0.7) RELATIVE Ana_Out
381
382                             /* end of IN14 */
383
384COMPONENT H53_IN14_Transmit = Arm()
385AT (0,0,0) RELATIVE H53_IN14_Monochromator_Cradle
386
387COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
388AT (0,0,0.450/2-0.01) RELATIVE H53_IN14_Transmit
389
390COMPONENT H53_C2_Start = Arm()
391AT (0,0,0.450/2)      RELATIVE H53_IN14_Transmit
392
393/* Section 5 in NoteDPT11 - curved guide l=12.488 R=4000 m - 10 elements      */
394/* Carter C2+Passage                                                          */
395COMPONENT H53_C2 = COPY(H53_inpile)(l=12.488/10)
396AT (0,0,0)                         RELATIVE H53_C2_Start
397ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE H53_C2_Start
398
399COMPONENT COPY(H53_C2) = COPY(H53_C2)
400AT (0,0,12.488/10)                 RELATIVE PREVIOUS
401ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
402
403COMPONENT COPY(H53_C2) = COPY(H53_C2)
404AT (0,0,12.488/10)                 RELATIVE PREVIOUS
405ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
406
407COMPONENT COPY(H53_C2) = COPY(H53_C2)
408AT (0,0,12.488/10)                 RELATIVE PREVIOUS
409ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
410
411COMPONENT COPY(H53_C2) = COPY(H53_C2)
412AT (0,0,12.488/10)                 RELATIVE PREVIOUS
413ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
414
415COMPONENT COPY(H53_C2) = COPY(H53_C2)
416AT (0,0,12.488/10)                 RELATIVE PREVIOUS
417ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
418
419COMPONENT COPY(H53_C2) = COPY(H53_C2)
420AT (0,0,12.488/10)                 RELATIVE PREVIOUS
421ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
422
423COMPONENT COPY(H53_C2) = COPY(H53_C2)
424AT (0,0,12.488/10)                 RELATIVE PREVIOUS
425ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
426
427COMPONENT COPY(H53_C2) = COPY(H53_C2)
428AT (0,0,12.488/10)                 RELATIVE PREVIOUS
429ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
430
431COMPONENT COPY(H53_C2) = COPY(H53_C2)
432AT (0,0,12.488/10)                 RELATIVE PREVIOUS
433ROTATED (0,12.488/10/4000*RAD2DEG,0) RELATIVE PREVIOUS
434
435COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
436AT (0,0,12.488/10+0.001) RELATIVE PREVIOUS
437
438/* VTE space+OT H53: 108 mm + 2 mm Al window */
439
440COMPONENT H53_VTE = COPY(H5)(xwidth=0.06, restore_neutron=1)
441AT (0,0,0.108/2-0.001) RELATIVE PREVIOUS
442
443COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(zdepth=0.002,xwidth=0.06)
444AT (0,0,0.108/2-0.05) RELATIVE PREVIOUS
445
446/* Section 6 in NoteDPT11 - curved guide l=25.465 R=4000 m - 19 elements      */
447/* Carter Poutre 1-4                                                          */
448
449COMPONENT H53_P14 = COPY(H53_inpile)(l=25.465/19)
450AT (0,0,0.05)                      RELATIVE PREVIOUS
451
452COMPONENT COPY(H53_P14) = COPY(H53_P14)
453AT (0,0,25.465/19)                 RELATIVE PREVIOUS
454ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
455
456COMPONENT COPY(H53_P14) = COPY(H53_P14)
457AT (0,0,25.465/19)                 RELATIVE PREVIOUS
458ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
459
460COMPONENT COPY(H53_P14) = COPY(H53_P14)
461AT (0,0,25.465/19)                 RELATIVE PREVIOUS
462ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
463
464COMPONENT COPY(H53_P14) = COPY(H53_P14)
465AT (0,0,25.465/19)                 RELATIVE PREVIOUS
466ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
467
468COMPONENT COPY(H53_P14) = COPY(H53_P14)
469AT (0,0,25.465/19)                 RELATIVE PREVIOUS
470ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
471
472COMPONENT COPY(H53_P14) = COPY(H53_P14)
473AT (0,0,25.465/19)                 RELATIVE PREVIOUS
474ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
475
476COMPONENT COPY(H53_P14) = COPY(H53_P14)
477AT (0,0,25.465/19)                 RELATIVE PREVIOUS
478ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
479
480COMPONENT COPY(H53_P14) = COPY(H53_P14)
481AT (0,0,25.465/19)                 RELATIVE PREVIOUS
482ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
483
484COMPONENT COPY(H53_P14) = COPY(H53_P14)
485AT (0,0,25.465/19)                 RELATIVE PREVIOUS
486ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
487
488COMPONENT COPY(H53_P14) = COPY(H53_P14)
489AT (0,0,25.465/19)                 RELATIVE PREVIOUS
490ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
491
492COMPONENT COPY(H53_P14) = COPY(H53_P14)
493AT (0,0,25.465/19)                 RELATIVE PREVIOUS
494ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
495
496COMPONENT COPY(H53_P14) = COPY(H53_P14)
497AT (0,0,25.465/19)                 RELATIVE PREVIOUS
498ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
499
500COMPONENT COPY(H53_P14) = COPY(H53_P14)
501AT (0,0,25.465/19)                 RELATIVE PREVIOUS
502ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
503
504COMPONENT COPY(H53_P14) = COPY(H53_P14)
505AT (0,0,25.465/19)                 RELATIVE PREVIOUS
506ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
507
508COMPONENT COPY(H53_P14) = COPY(H53_P14)
509AT (0,0,25.465/19)                 RELATIVE PREVIOUS
510ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
511
512COMPONENT COPY(H53_P14) = COPY(H53_P14)
513AT (0,0,25.465/19)                 RELATIVE PREVIOUS
514ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
515
516COMPONENT COPY(H53_P14) = COPY(H53_P14)
517AT (0,0,25.465/19)                 RELATIVE PREVIOUS
518ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
519
520COMPONENT COPY(H53_P14) = COPY(H53_P14)
521AT (0,0,25.465/19)                 RELATIVE PREVIOUS
522ROTATED (0,25.465/19/4000*RAD2DEG,0) RELATIVE PREVIOUS
523
524COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
525AT (0,0,25.465/19+0.001) RELATIVE PREVIOUS
526
527                  /* Gap 500 mm: IN16 Monochromator */
528
529                              /* IN16 */
530
531COMPONENT H53_IN16_Monochromator_Cradle = COPY(H5)(xwidth=0.06, restore_neutron=1)
532AT (0,0,0.500/2-0.001) RELATIVE PREVIOUS
533EXTEND %{
534  flag=0;
535%}
536
537/* IN16 Monochromator PG002 w11*h12 7 blades vertically focusing. 'Sample' at 1.4 m */
538COMPONENT H53_IN16_Monochromator = Monochromator_curved(
539  width  = 0.11, height = 0.12, NH=1, NV=7,
540  RV=IN16_RMV, RH=0, DM=IN16_DM, mosaich = 40, mosaicv = 40,
541  r0 = 1, reflect="HOPG.rfl")
542AT      (0,0,0)       RELATIVE H53_IN16_Monochromator_Cradle
543ROTATED (0,IN16_A1,0) RELATIVE H53_IN16_Monochromator_Cradle
544EXTEND %{
545  flag=SCATTERED;
546%}
547
548COMPONENT H53_IN16_Monochromator_Jumper = Arm()
549AT       (0,0,0)       RELATIVE H53_IN16_Monochromator_Cradle
550JUMP H53_IN16_Transmit WHEN !flag
551
552COMPONENT H53_IN16_Monochromator_Out = Arm()
553AT      (0,0,0)         RELATIVE H53_IN16_Monochromator_Cradle
554ROTATED (0,2*IN16_A1,0) RELATIVE H53_IN16_Monochromator_Cradle
555
556/* IN16 2nd deflector position (before the Doppler) at 1.4 m from in-guide Monochromator */
557/* in principle, a super-mirror focusing collimator and a Be filter are in between */
558COMPONENT H53_IN16_Sample_Div = Monitor_nD(xwidth=0.05, yheight=0.05,
559  options="dx limits=[-2 2], dy limits=[-2 2]", bins=50, restore_neutron=1)
560AT (0,0,IN16_L) RELATIVE H53_IN16_Monochromator_Out
561
562COMPONENT H53_IN16_Sample_XY = Monitor_nD(xwidth=0.1, yheight=0.1,
563  options="x y", bins=50, restore_neutron=1)
564AT (0,0,IN16_L) RELATIVE H53_IN16_Monochromator_Out
565
566COMPONENT H53_IN16_Sample_L = Monitor_nD(xwidth=0.1, yheight=0.1,
567  options="lambda limits=[1 10]", bins=50, restore_neutron=1)
568AT (0,0,IN16_L) RELATIVE H53_IN16_Monochromator_Out
569
570COMPONENT H53_IN16_Sample = Isotropic_Sqw(radius=0.005,yheight=0.05,
571  Sqw_coh=IN16_sample, Sqw_inc=NULL, d_phi=30)
572AT (0,0,IN16_L) RELATIVE H53_IN16_Monochromator_Out
573EXTEND %{
574  if (!SCATTERED) ABSORB;
575%}
576
577COMPONENT H53_IN16_Spectrometer = Monitor_nD(radius=0.5, yheight=0.3,
578  options="angle limits=[-150 150] bins=50, energy limits=[0 30], banana", restore_neutron=1)
579AT (0,0,0) RELATIVE H53_IN16_Sample
580
581COMPONENT H53_IN16_Diffractometer = Monitor_nD(radius=1, yheight=0.3,options="theta bins=100 limits=[-150 100], y, banana")
582AT (0,0,0) RELATIVE H53_IN16_Sample
583EXTEND %{
584  ABSORB; /* neutron ends on the IN16 2nd deflector */
585%}
586
587COMPONENT H53_IN16_Transmit = Arm()
588AT (0,0,0) RELATIVE H53_IN16_Monochromator_Cradle
589
590COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
591AT (0,0,0.500/2-0.01) RELATIVE H53_IN16_Transmit
592
593COMPONENT H53_P5_Start = Arm()
594AT (0,0,0.500/2)      RELATIVE H53_IN16_Transmit
595
596/* Section 7 in NoteDPT11 - straight guide l=5.460 - 6 elements      */
597/* Carter Poutre 5                                                           */
598COMPONENT H53_P5 = COPY(H53_inpile)(l=5.460, nelements=6)
599AT (0,0,0)            RELATIVE H53_P5_Start
600
601COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
602AT (0,0,5.460+0.001) RELATIVE PREVIOUS
603
604                  /* Gap 200 mm: D16 Monochromator */
605
606                              /* D16 */
607
608COMPONENT H53_D16_Monochromator_Cradle = COPY(H5)(xwidth=0.06, restore_neutron=1)
609AT (0,0,0.200/2-0.001) RELATIVE PREVIOUS
610EXTEND %{
611  flag=0;
612%}
613
614/* D16 Monochromator PG002 w6*h12 7 blades vertically focusing. 'Sample' at 2.8 m */
615COMPONENT H53_D16_Monochromator = Monochromator_curved(
616  width  = 0.06, height = 0.12, NH=1, NV=7,
617  RV=D16_RMV, RH=0, DM=D16_DM, mosaich = 40, mosaicv = 40,
618  r0 = 1, reflect="HOPG.rfl")
619AT      (0,0,0)      RELATIVE H53_D16_Monochromator_Cradle
620ROTATED (0,D16_A1,0) RELATIVE H53_D16_Monochromator_Cradle
621EXTEND %{
622  flag=SCATTERED;
623%}
624
625COMPONENT H53_D16_Monochromator_Jumper = Arm()
626AT       (0,0,0)       RELATIVE H53_D16_Monochromator_Cradle
627JUMP H53_D16_Transmit WHEN !flag
628
629COMPONENT H53_D16_Monochromator_Out = Arm()
630AT      (0,0,0)        RELATIVE H53_D16_Monochromator_Cradle
631ROTATED (0,2*D16_A1,0) RELATIVE H53_D16_Monochromator_Cradle
632
633COMPONENT H53_D16_Sample_Div = Monitor_nD(xwidth=0.05, yheight=0.05,
634  options="dx limits=[-2 2], dy limits=[-2 2]", bins=50, restore_neutron=1)
635AT (0,0,D16_L) RELATIVE H53_D16_Monochromator_Out
636
637COMPONENT H53_D16_Sample_XY = Monitor_nD(xwidth=0.1, yheight=0.1,
638  options="x y", bins=50, restore_neutron=1)
639AT (0,0,D16_L) RELATIVE H53_D16_Monochromator_Out
640
641COMPONENT H53_D16_Sample_L = Monitor_nD(xwidth=0.1, yheight=0.1,
642  options="lambda limits=[1 10]", bins=50, restore_neutron=1)
643AT (0,0,D16_L) RELATIVE H53_D16_Monochromator_Out
644
645COMPONENT H53_D16_Sample = Isotropic_Sqw(radius=0.005,yheight=0.05,
646  Sqw_coh=D16_sample, Sqw_inc=NULL, d_phi=30)
647AT (0,0,D16_L) RELATIVE H53_D16_Monochromator_Out
648EXTEND %{
649  if (!SCATTERED) ABSORB;
650%}
651
652COMPONENT H53_D16_Detector = Monitor_nD(
653  xwidth=0.32, yheight=0.32, options="x y", bins=50, restore_neutron=1)
654AT (0,0,1.1) RELATIVE H53_D16_Sample
655
656COMPONENT H53_D16_Spectrometer = Monitor_nD(radius=0.5, yheight=0.3,
657  options="angle limits=[-150 150] bins=50, energy limits=[0 30], banana", restore_neutron=1)
658AT (0,0,0) RELATIVE H53_D16_Sample
659
660COMPONENT H53_D16_Diffractometer = Monitor_nD(radius=1, yheight=0.3,options="theta bins=100 limits=[-150 150], y, banana")
661AT (0,0,0) RELATIVE H53_D16_Sample
662EXTEND %{
663  ABSORB; /* neutron ends on the D16 sample position */
664%}
665
666COMPONENT H53_D16_Transmit = Arm()
667AT (0,0,0) RELATIVE H53_D16_Monochromator_Cradle
668
669COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
670AT (0,0,0.200/2-0.01) RELATIVE H53_D16_Transmit
671
672COMPONENT H53_P6_Start = Arm()
673AT (0,0,0.200/2)      RELATIVE H53_D16_Transmit
674
675/* Section 8 in NoteDPT11 - straight guide l=4.295 - 5 elements      */
676/* Carter Poutre 6                                                           */
677COMPONENT H53_P6 = COPY(H53_inpile)(l=4.295, nelements=5)
678AT (0,0,0)            RELATIVE H53_P6_Start
679
680COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
681AT (0,0,4.295+0.001) RELATIVE PREVIOUS
682
683                  /* Gap 524 mm: SuperADAM Monochromator */
684
685                              /* SuperADAM */
686
687COMPONENT H53_SADAM_Monochromator_Cradle = COPY(H5)(xwidth=0.06, restore_neutron=1)
688AT (0,0,0.524/2-0.001) RELATIVE PREVIOUS
689EXTEND %{
690  flag=0;
691%}
692
693/* D16 Monochromator PG002 w6*h12 7 blades vertically focusing. 'Sample' at 2.8 m */
694COMPONENT H53_SADAM_Monochromator = Monochromator_curved(
695  width  = 0.06, height = 0.12, NH=1, NV=7,
696  RV=SADAM_RMV, RH=0, DM=SADAM_DM, mosaich = 40, mosaicv = 40,
697  r0 = 1, reflect="HOPG.rfl")
698AT      (0,0,0)      RELATIVE H53_SADAM_Monochromator_Cradle
699ROTATED (0,SADAM_A1,0) RELATIVE H53_SADAM_Monochromator_Cradle
700EXTEND %{
701  flag=SCATTERED;
702%}
703
704COMPONENT H53_SADAM_Monochromator_Jumper = Arm()
705AT       (0,0,0)       RELATIVE H53_SADAM_Monochromator_Cradle
706JUMP H53_SADAM_Transmit WHEN !flag
707
708COMPONENT H53_SADAM_Monochromator_Out = Arm()
709AT      (0,0,0)        RELATIVE H53_SADAM_Monochromator_Cradle
710ROTATED (0,2*SADAM_A1,0) RELATIVE H53_SADAM_Monochromator_Cradle
711
712COMPONENT H53_SADAM_Sample_Div = Monitor_nD(xwidth=0.05, yheight=0.05,
713  options="dx limits=[-2 2], dy limits=[-2 2]", bins=50, restore_neutron=1)
714AT (0,0,SADAM_L) RELATIVE H53_SADAM_Monochromator_Out
715
716COMPONENT H53_SADAM_Sample_XY = Monitor_nD(xwidth=0.1, yheight=0.1,
717  options="x y", bins=50, restore_neutron=1)
718AT (0,0,SADAM_L) RELATIVE H53_SADAM_Monochromator_Out
719
720COMPONENT H53_SADAM_Sample_L = Monitor_nD(xwidth=0.1, yheight=0.1,
721  options="lambda limits=[1 10]", bins=50, restore_neutron=1)
722AT (0,0,SADAM_L) RELATIVE H53_SADAM_Monochromator_Out
723
724COMPONENT H53_SADAM_Sample = Isotropic_Sqw(radius=0.005,yheight=0.05,
725  Sqw_coh=SADAM_sample, Sqw_inc=NULL, d_phi=30)
726AT (0,0,SADAM_L) RELATIVE H53_SADAM_Monochromator_Out
727EXTEND %{
728  if (!SCATTERED) ABSORB;
729%}
730
731COMPONENT H53_SADAM_Detector = Monitor_nD(
732  xwidth=0.32, yheight=0.32, options="x y", bins=50, restore_neutron=1)
733AT (0,0,1.1) RELATIVE H53_SADAM_Sample
734
735COMPONENT H53_SADAM_Spectrometer = Monitor_nD(radius=0.5, yheight=0.3,
736  options="angle limits=[-150 150] bins=50, energy limits=[0 30], banana", restore_neutron=1)
737AT (0,0,0) RELATIVE H53_SADAM_Sample
738
739COMPONENT H53_SADAM_Diffractometer = Monitor_nD(radius=1, yheight=0.3,options="theta bins=100 limits=[-150 150], y, banana")
740AT (0,0,0) RELATIVE H53_SADAM_Sample
741EXTEND %{
742  ABSORB; /* neutron ends on the SuperADAM sample position */
743%}
744
745COMPONENT H53_SADAM_Transmit = Arm()
746AT (0,0,0) RELATIVE H53_SADAM_Monochromator_Cradle
747
748COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
749AT (0,0,0.524/2-0.01) RELATIVE H53_SADAM_Transmit
750
751COMPONENT H53_P7_Start = Arm()
752AT (0,0,0.524/2)      RELATIVE H53_SADAM_Transmit
753
754/* Section 9 in NoteDPT11 - straight guide l=0.5 - 5 elements      */
755/* Carter Poutre 7                                                           */
756COMPONENT H53_P7 = COPY(H53_inpile)(l=0.5, nelements=5)
757AT (0,0,0)            RELATIVE H53_P7_Start
758
759COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.06)
760AT (0,0,0.5+0.001) RELATIVE PREVIOUS
761
762                              /* Cryo-EDM */
763
764COMPONENT H53_CryoEDM_In = Arm()
765AT (0,0,CryoEDM_L)         RELATIVE PREVIOUS
766
767COMPONENT H53_CryoEDM_In_L = Monitor_nD(xwidth=0.06, yheight=0.12,
768  options="lambda limits=[1 10]", bins=100, restore_neutron=1)
769AT (0,0,0) RELATIVE H53_CryoEDM_In
770
771COMPONENT H53_CryoEDM_mirror_center = Arm()
772AT (0,0,2.45/2) RELATIVE H53_CryoEDM_In
773
774COMPONENT H53_CryoEDM_polariser = Pol_mirror(zwidth = 2.45, yheight = 0.055,
775  rUpPar  ={1.0, 0.0219, 4.07, 3.2, 0.003},
776  rDownPar={0.1, 0.0219, 4.07, 3.2, 0.003}, p_reflect=0.95)
777AT (0, 0, 0) RELATIVE H53_CryoEDM_mirror_center
778ROTATED (0, 2, 0) RELATIVE H53_CryoEDM_mirror_center
779EXTEND %{
780  flag=SCATTERED;
781%}
782
783COMPONENT H53_CryoEDM_mirror_outdir = Arm()
784AT (0,0,0) RELATIVE H53_CryoEDM_mirror_center
785ROTATED (0, 4, 0) RELATIVE H53_CryoEDM_mirror_center
786
787COMPONENT H53_CryoEDM_mirror_ReflectXY = Monitor_nD(xwidth=0.04, restore_neutron=1, yheight=0.055, bins=50)
788WHEN flag==1
789AT (0,0,2.5/2)                  RELATIVE H53_CryoEDM_mirror_outdir
790
791COMPONENT H53_CryoEDM_mirror_TransmitXY = COPY(H53_CryoEDM_mirror_ReflectXY)
792WHEN flag==2
793AT (0,0,2.5/2)                  RELATIVE H53_CryoEDM_mirror_center
794EXTEND %{
795  if (flag == 2) ABSORB;
796%}
797
798COMPONENT H53_CryoEDM_Sample_L = Monitor_nD(xwidth=0.06, yheight=0.12,
799  options="lambda limits=[1 10]", bins=100, restore_neutron=1)
800AT (0,0,2.45/2+0.2) RELATIVE H53_CryoEDM_mirror_outdir
801
802COMPONENT H53_CryoEDM_Sample_Div = COPY(H53_CryoEDM_Sample_L)(options="dx limits=[-2 2], dy limits=[-2 2]")
803AT (0,0,0) RELATIVE H53_CryoEDM_Sample_L
804
805COMPONENT H53_CryoEDM_Sample_XY = COPY(H53_CryoEDM_Sample_L)(options="x y")
806AT (0,0,0) RELATIVE H53_CryoEDM_Sample_L
807EXTEND %{
808  ABSORB; /* end of H53 */
809%}
810
811
812/* ================================ H52 ===================================== */
813/* feeds: nothing (end prematurely) */
814
815COMPONENT H52_Start = Arm()
816AT (0,0,0) RELATIVE H52_origin
817
818COMPONENT H52_inpile = COPY(H53_inpile)(w1=0.015, m=1.2, l=2.775)
819AT (0,0,0) RELATIVE PREVIOUS
820
821/* Gap 25 mm before BOG (barillet obturateur general). Carter BOG             */
822
823COMPONENT H52_Obt_1 = COPY(PREVIOUS)(l=0.853)
824AT (0,0,2.775+0.025) RELATIVE PREVIOUS
825
826COMPONENT H52_Obt_2 = COPY(PREVIOUS)(l=1.460)
827AT (0,0,0.853+0.012) RELATIVE PREVIOUS
828
829COMPONENT H52_Obt_3 = COPY(PREVIOUS)(l=0.727)
830AT (0,0,1.460+0.012) RELATIVE PREVIOUS
831
832COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.015)
833AT (0,0,0.727+0.01) RELATIVE PREVIOUS
834
835COMPONENT H52_Obt_Out = COPY(H5)(xwidth=0.015, restore_neutron=1)
836AT (0,0,0.06) RELATIVE PREVIOUS
837EXTEND %{
838  ABSORB; /* beamstop */
839%}
840
841/* ================================ H51 ===================================== */
842/* feeds: IN15, D22 */
843
844COMPONENT H51_Start = Arm()
845AT (0,0,0) RELATIVE H51_origin
846
847COMPONENT H51_inpile = COPY(H53_inpile)(w1=0.04, m=1.2, l=2.775)
848AT (0,0,0) RELATIVE PREVIOUS
849
850/* Gap 25 mm before BOG (barillet obturateur general). Carter BOG             */
851
852COMPONENT H51_Obt_1 = COPY(PREVIOUS)(l=0.863)
853AT (0,0,2.775+0.025) RELATIVE PREVIOUS
854
855COMPONENT H51_Obt_2 = COPY(PREVIOUS)(l=1.433)
856AT (0,0,0.863+0.012) RELATIVE PREVIOUS
857
858COMPONENT H51_Obt_3 = COPY(PREVIOUS)(l=0.745)
859AT (0,0,1.433+0.012) RELATIVE PREVIOUS
860
861COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.04)
862AT (0,0,0.745+0.01) RELATIVE PREVIOUS
863
864/* Gap 75 mm after BOG (barillet obturateur general): VS */
865
866COMPONENT H51_Obt_Out = COPY(H5)(xwidth=0.04, restore_neutron=1)
867AT (0,0,0.06) RELATIVE PREVIOUS
868
869COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.04)
870AT (0,0,0) RELATIVE PREVIOUS
871
872/* Sections 2,3 in NoteDPT11/H51 - curved R=3000 m. Length=2.5 m down to splitter */
873/* Carter VS+Movable+Common                                                   */
874
875COMPONENT H51_S2 = COPY(H53_inpile)(w1=0.04, l=2.5/3, m=1.2)
876AT (0,0,0.05)                      RELATIVE PREVIOUS
877
878COMPONENT COPY(H51_S2) = COPY(H51_S2)
879AT (0,0,2.5/3)                    RELATIVE PREVIOUS
880ROTATED (0,-2.5/3/3000*RAD2DEG,0) RELATIVE PREVIOUS
881
882COMPONENT COPY(H51_S2) = COPY(H51_S2)
883AT (0,0,2.5/3)                    RELATIVE PREVIOUS
884ROTATED (0,-2.5/3/3000*RAD2DEG,0) RELATIVE PREVIOUS
885
886COMPONENT HCS_Al_H51 = COPY(HCS_Al)(xwidth=0.04)
887AT (0,0,2.5/3+0.01) RELATIVE PREVIOUS
888
889/* Splitter (polarising "Deviateur") H511/H512 L=1.5                          */
890/* D22 in transmission, IN15 in reflection: 79.70-76.45 = 3.25 deg angle      */
891/* bottom   part direct to d22 height=55mm                                    */
892/* top part part in reflection to in15 height=55mm: transmitted part lost     */
893
894/* split the beam to either D22 or IN15  (monitors)                           */
895COMPONENT H51_S2_Out = COPY(H5)(xwidth=0.04, yheight=0.12)
896AT (0,0,0.05) RELATIVE PREVIOUS
897
898COMPONENT H51_split_2 = COPY(H5)(xwidth=0.04, restore_neutron=1, yheight=0.055)
899AT (0,0.12/2-0.055/2,0)  RELATIVE H51_S2_Out
900JUMP H512_Start WHEN SCATTERED
901
902COMPONENT H51_split_1 = COPY(H5)(xwidth=0.04, restore_neutron=1, yheight=0.055)
903AT (0,-0.12/2+0.055/2,0)  RELATIVE H51_S2_Out
904JUMP H511_Start WHEN SCATTERED
905
906/* H511 bottom to IN15 ====================================================== */
907COMPONENT H511_Start = Arm()
908AT (0,0,0) RELATIVE H51_split_1
909
910COMPONENT H511_mirror_centre = Arm()
911AT (0,0,0.75) RELATIVE H511_Start
912EXTEND %{
913  flag=0;
914%}
915
916/* polarising splitter: an iterating assembly of polarising */
917/* The single polariser is enough and simpler to handle. We ignore the surrouding m=1.2 guide */
918COMPONENT IN15_polariser = Pol_mirror(zwidth = 1.5, yheight = 0.055,
919  rUpPar  ={1.0, 0.0219, 4.07, 3.2, 0.003},
920  rDownPar={0.1, 0.0219, 4.07, 3.2, 0.003}, p_reflect=0.95)
921AT (0, 0, 0) RELATIVE H511_mirror_centre ROTATED (0, -1.5, 0) RELATIVE H511_mirror_centre
922EXTEND %{
923  flag=SCATTERED;
924%}
925
926COMPONENT H511_mirror_outdir = Arm()
927AT (0,0,0) RELATIVE H511_mirror_centre ROTATED (0, -3, 0) RELATIVE H511_mirror_centre
928
929COMPONENT H511_mirror_ReflectXY = Monitor_nD(xwidth=0.04, restore_neutron=1, yheight=0.055, bins=50)
930WHEN flag==1
931AT (0,0,0.755)                  RELATIVE H511_mirror_outdir
932
933COMPONENT H511_mirror_TransmitXY = COPY(H511_mirror_ReflectXY)
934WHEN flag==2
935AT (0,0,0.755)                  RELATIVE H511_mirror_centre
936EXTEND %{
937  if (flag == 2) ABSORB;
938%}
939
940COMPONENT H511_mirror_outdXY = COPY(H511_mirror_ReflectXY)(options="dx limits=[-2 2], dy limits=[-2 2]")
941AT (0,0,0)                      RELATIVE H511_mirror_ReflectXY
942
943COMPONENT H511_S3 = COPY(H51_S2)(l=3, nelements=2, h1=0.055)
944AT (0,0,0.755)                      RELATIVE H511_mirror_outdir
945
946COMPONENT H511_S9 = COPY(H51_S2)(l=16.483-0.05, nelements=13, m=1, h1=0.055)
947AT (0,0,3.005)                      RELATIVE PREVIOUS
948
949COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.04)
950AT (0,0,16.483+0.001-0.05) RELATIVE PREVIOUS
951
952/* VTE space+OT H511: 108 mm + 2 mm Al window */
953
954COMPONENT H511_VTE = COPY(H5)(xwidth=0.06, restore_neutron=1)
955AT (0,0,0.108/2-0.001) RELATIVE PREVIOUS
956
957COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(zdepth=0.002,xwidth=0.04)
958AT (0,0,0.108/2-0.05) RELATIVE PREVIOUS
959
960COMPONENT H511_S10 = COPY(H51_S2)(l=1, m=1, h1=0.055)
961AT (0,0,0.05) RELATIVE PREVIOUS
962
963/* IN15 Velocity Selector EADS/Astrium NVS 024 in 60 cm gap */
964COMPONENT IN15_Vselector = V_selector(xwidth=0.04, yheight=0.055, zdepth=0.30, radius=0.12,
965  alpha=64.4, length=0.25, d=0.0004, nu=IN15_nu, nslit=36)
966AT (0,0,1+0.3) RELATIVE H511_S10
967
968/* H511/IN15 guide L=9.5 m, m=1 */
969COMPONENT H511_BeforeV = COPY(H511_S10)(l=9.5,nelements=6)
970AT (0,0,0.3) RELATIVE PREVIOUS
971
972/* IN15 polarising V-mirror                                       */
973COMPONENT IN15_Vpolariser = Pol_guide_vmirror(xwidth = 0.04, yheight = 0.055,
974		  length = 0.43,
975		  rPar    ={1, 1.0*0.0219, 4.07, 1, 0.003},
976		  rUpPar  ={1, 3.2*0.0219, 4.07, 1, 0.003},
977		  rDownPar={1, 0.4*0.0219, 4.07, 1, 0.003})
978AT (0,0,9.5+0.01) RELATIVE PREVIOUS
979
980COMPONENT H511_AfterV = COPY(H511_S10)(l=3, nelements=2)
981AT (0,0,0.44) RELATIVE PREVIOUS
982
983/* sample at 3.7 m */
984COMPONENT H511_IN15_Sample_Div = Monitor_nD(xwidth=0.02, yheight=0.05,
985  options="dx limits=[-2 2], dy limits=[-2 2]", bins=100, restore_neutron=1)
986AT (0,0,IN15_L) RELATIVE H511_AfterV
987
988COMPONENT H511_IN15_Sample_XY = Monitor_nD(xwidth=0.02, yheight=0.05,
989  options="x y", bins=50, restore_neutron=1)
990AT (0,0,IN15_L) RELATIVE H511_AfterV
991
992COMPONENT H511_IN15_Sample_L = Monitor_nD(xwidth=0.02, yheight=0.05,
993  options="lambda limits=[1 10]", bins=50, restore_neutron=1)
994AT (0,0,IN15_L) RELATIVE H511_AfterV
995
996COMPONENT H511_IN15_Sample = Incoherent(radius=0.005,yheight=0.05,
997  focus_aw=180, focus_ah=30, target_index=+1)
998AT (0,0,IN15_L) RELATIVE H511_AfterV
999EXTEND %{
1000  if (!SCATTERED) ABSORB;
1001%}
1002
1003COMPONENT H511_IN15_Detector = Monitor_nD(xwidth=0.32, yheight=0.32,
1004  options="x y", restore_neutron=1, bins=32)
1005AT (0,0,4.6) RELATIVE H511_IN15_Sample
1006
1007COMPONENT H511_IN15_Spectrometer = Monitor_nD(radius=0.5, yheight=0.3,
1008  options="angle limits=[-150 150] bins=50, energy limits=[0 5], banana", restore_neutron=1)
1009AT (0,0,0) RELATIVE H511_IN15_Sample
1010
1011COMPONENT H511_IN15_Diffractometer = Monitor_nD(radius=1,yheight=0.3, options="theta bins=100 limits=[-150 150], y, banana")
1012AT (0,0,0) RELATIVE H511_IN15_Sample
1013EXTEND %{
1014  ABSORB; /* neutron ends on the SuperADAM sample position */
1015%}
1016
1017/* H512 top to D22 ========================================================== */
1018COMPONENT H512_Start = Arm()
1019AT (0,0,0) RELATIVE H51_split_2
1020
1021/* Sections 3,4,5,6 in NoteDPT11/H51 - curved R=3000 m. Length=2.5 m down to VTE */
1022/* Carter C1-C4                                                               */
1023
1024COMPONENT H512_S36 = COPY(H53_inpile)(w1=0.04, l=20.85/16, h1=0.055, m=1.2)
1025AT (0,0,0.0)                      RELATIVE PREVIOUS
1026
1027COMPONENT COPY(H512_S36) = COPY(H512_S36)
1028AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1029ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1030
1031COMPONENT COPY(H512_S36) = COPY(H512_S36)
1032AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1033ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1034
1035COMPONENT COPY(H512_S36) = COPY(H512_S36)
1036AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1037ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1038
1039COMPONENT COPY(H512_S36) = COPY(H512_S36)
1040AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1041ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1042
1043COMPONENT COPY(H512_S36) = COPY(H512_S36)
1044AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1045ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1046
1047COMPONENT COPY(H512_S36) = COPY(H512_S36)
1048AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1049ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1050
1051COMPONENT COPY(H512_S36) = COPY(H512_S36)
1052AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1053ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1054
1055COMPONENT COPY(H512_S36) = COPY(H512_S36)
1056AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1057ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1058
1059COMPONENT COPY(H512_S36) = COPY(H512_S36)
1060AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1061ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1062
1063COMPONENT COPY(H512_S36) = COPY(H512_S36)
1064AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1065ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1066
1067COMPONENT COPY(H512_S36) = COPY(H512_S36)
1068AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1069ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1070
1071COMPONENT COPY(H512_S36) = COPY(H512_S36)
1072AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1073ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1074
1075COMPONENT COPY(H512_S36) = COPY(H512_S36)
1076AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1077ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1078
1079COMPONENT COPY(H512_S36) = COPY(H512_S36)
1080AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1081ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1082
1083COMPONENT COPY(H512_S36) = COPY(H512_S36)
1084AT (0,0,20.85/16)                    RELATIVE PREVIOUS
1085ROTATED (0,-20.85/16/3000*RAD2DEG,0) RELATIVE PREVIOUS
1086
1087COMPONENT HCS_Al_H512 = COPY(HCS_Al)(xwidth=0.04)
1088AT (0,0,20.85/16+0.01) RELATIVE PREVIOUS
1089
1090/* VTE space+OT H512: 108 mm + 2 mm Al window */
1091
1092COMPONENT H512_VTE = COPY(H5)(xwidth=0.06, restore_neutron=1)
1093AT (0,0,0.108/2-0.001) RELATIVE PREVIOUS
1094
1095COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(zdepth=0.002,xwidth=0.04)
1096AT (0,0,0.108/2-0.05) RELATIVE PREVIOUS
1097
1098COMPONENT H51_S78 = COPY(H53_inpile)(w1=0.04, l=6.0/4, h1=0.055, m=1.2)
1099AT (0,0,0.05)                      RELATIVE PREVIOUS
1100
1101COMPONENT COPY(H51_S78) = COPY(H51_S78)
1102AT (0,0,6.0/4)                    RELATIVE PREVIOUS
1103ROTATED (0,-6.0/4/3000*RAD2DEG,0) RELATIVE PREVIOUS
1104
1105COMPONENT COPY(H51_S78) = COPY(H51_S78)
1106AT (0,0,6.0/4)                    RELATIVE PREVIOUS
1107ROTATED (0,-6.0/4/3000*RAD2DEG,0) RELATIVE PREVIOUS
1108
1109COMPONENT COPY(H51_S78) = COPY(H51_S78)
1110AT (0,0,6.0/4)                    RELATIVE PREVIOUS
1111ROTATED (0,-6.0/4/3000*RAD2DEG,0) RELATIVE PREVIOUS
1112
1113COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(zdepth=0.002,xwidth=0.04)
1114AT (0,0,6.0/4+0.01) RELATIVE PREVIOUS
1115
1116/* 3 m to V selector, straight */
1117
1118COMPONENT H512_S11 = COPY(H53_inpile)(w1=0.04, l=3.0, nelements=2, h1=0.055, m=1.2)
1119AT (0,0,0.01)                      RELATIVE PREVIOUS
1120
1121COMPONENT COPY(HCS_Al) = COPY(HCS_Al)(xwidth=0.04)
1122AT (0,0,3+0.01) RELATIVE PREVIOUS
1123
1124COMPONENT D22_PreV = Monitor_nD(xwidth=0.04, yheight=0.05,
1125  options="x y", bins=50, restore_neutron=1)
1126AT (0,0,0.01) RELATIVE PREVIOUS
1127
1128/* D22 Velocity Selector: just like D11 EADS/Astrium NVS 023 in 60 cm gap */
1129COMPONENT D22_Vselector = V_selector(xwidth=0.04, yheight=0.05, zdepth=0.30, radius=0.12,
1130  alpha=48.3, length=0.25, d=0.0004, nu=D22_nu, nslit=72)
1131AT (0,0,3+0.01+0.3+0.01) RELATIVE H512_S11
1132
1133COMPONENT D22_Collimation = COPY(H53_inpile)(w1=0.04,
1134  l=20-D22_collimation, nelements=ceil(D22_collimation/1.5), m=1.2)
1135AT (0,0,0.3) RELATIVE D22_Vselector
1136
1137COMPONENT D22_Sample_Pos = Arm()
1138AT (0,0,20+0.3) RELATIVE D22_Vselector
1139
1140COMPONENT H51_D22_Sample_Div = Monitor_nD(xwidth=0.02, yheight=0.05,
1141  options="dx limits=[-2 2], dy limits=[-2 2]", bins=100, restore_neutron=1)
1142AT (0,0,0) RELATIVE D22_Sample_Pos
1143
1144COMPONENT H51_D22_Sample_XY = Monitor_nD(xwidth=0.02, yheight=0.05,
1145  options="x y", bins=50, restore_neutron=1)
1146AT (0,0,0) RELATIVE D22_Sample_Pos
1147
1148COMPONENT H51_D22_Sample_L = Monitor_nD(xwidth=0.02, yheight=0.05,
1149  options="lambda limits=[1 10]", bins=50, restore_neutron=1)
1150AT (0,0,0) RELATIVE D22_Sample_Pos
1151
1152COMPONENT H51_D22_Sample = Isotropic_Sqw(radius=0.005,yheight=0.05,
1153  Sqw_coh=D22_sample, Sqw_inc=NULL, d_phi=20)
1154AT (0,0,0) RELATIVE D22_Sample_Pos
1155EXTEND %{
1156  if (!SCATTERED) ABSORB;
1157%}
1158
1159COMPONENT D22_Detector = Monitor_nD(xwidth=1, yheight=1, options="x y", bins=128)
1160AT (0,0,D22_collimation) RELATIVE D22_Sample_Pos
1161EXTEND %{
1162  ABSORB; /* H512 end here */
1163%}
1164
1165COMPONENT D22_Detector_vessel = Shape(radius=1.5, yheight=20)
1166AT (0,0,11) RELATIVE D22_Sample_Pos ROTATED (90,0,0) RELATIVE D22_Sample_Pos
1167/* NOTE: wasp 75*120 V selector                                               */
1168
1169/* ========================= end of simulation ============================== */
1170
1171/* inactive components for rendering purposes */
1172
1173COMPONENT BOG = Shape(radius=0.735, yheight=0.3)
1174AT (0,0,6.55) RELATIVE HCS
1175
1176COMPONENT H53_IN14_Drum = Shape(radius=0.45, yheight=0.3)
1177AT (0,0,0) RELATIVE H53_IN14_Monochromator_Cradle
1178
1179COMPONENT H53_IN16_Drum = Shape(radius=0.2, yheight=0.3)
1180AT (0,0,0) RELATIVE H53_IN16_Monochromator_Cradle
1181
1182COMPONENT H53_D16_Drum = Shape(radius=0.2, yheight=0.3)
1183AT (0,0,0) RELATIVE H53_D16_Monochromator_Cradle
1184
1185COMPONENT H53_SADAM_Drum = Shape(radius=0.2, yheight=0.3)
1186AT (0,0,0) RELATIVE H53_SADAM_Monochromator_Cradle
1187
1188COMPONENT Traversee = Shape(xwidth=2, yheight=0.5)
1189AT (0,0,31.6) RELATIVE HCS
1190
1191/* core at 0.7 m, 44.8 deg */
1192COMPONENT Core_Centre = Arm()
1193AT (0,0,0) RELATIVE HCS ROTATED (0,44.8+180,0) RELATIVE HCS
1194
1195/* core radius=0.3 m */
1196COMPONENT Core = Shape (radius=0.3, yheight=0.7)
1197AT (0,0,0.7) RELATIVE Core_Centre ROTATED (0,0,0) RELATIVE Origin
1198
1199/* D2O vessel radius=1.25 m */
1200COMPONENT D2O_Vessel = Shape (radius=1.25, yheight=1)
1201AT (0,0,0) RELATIVE Core
1202
1203/* H2O vessel radius=1.25 m */
1204COMPONENT H2O_Vessel = Shape (radius=4.9, yheight=1.2)
1205AT (0,0,0) RELATIVE Core
1206
1207/* H20 radius=4.9 m, ILL5=707 pixels=31.5 m,
1208   D22 V at 40.54m from HCS
1209   D22 V to sample=20.85 m
1210   D22 det length = 20 m */
1211
1212END
1213
1214