File: Test_Lens.instr

package info (click to toggle)
mccode 3.5.19%2Bds5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,113,256 kB
  • sloc: ansic: 40,697; python: 25,137; yacc: 8,438; sh: 5,405; javascript: 4,596; lex: 1,632; cpp: 742; perl: 296; lisp: 273; makefile: 226; fortran: 132
file content (158 lines) | stat: -rw-r--r-- 4,669 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/*****************************************************************************
*         McStas instrument definition URL=http://www.mcstas.org
*
* Instrument: Test_Lens
*
* %Identification
* Written by: E. Farhi/C. Monzat
* Date: Dec 2009.
* Origin: ILL
* %INSTRUMENT_SITE: Tests_optics
*
* Demonstrate focusing effect of refractive lenses
*
* %Example: lambda=10 position_PSD=8.2 Detector: Last_PSD_I=2.6829e-19
*
* %Description
*
* Very simple setup with 30 stacked lenses which focus a cold neutron,
* non diverging beam (ideal case). A set of PSD monitors is positioned
* around the focusing point to show the beam spot.
*
* %Parameters
* lambda: [Angs]     Source wavelength
* position_PSD: [m]  Distance from last lens to first monitor
*
* %Link
*
* %End
****************************************************************************/
DEFINE INSTRUMENT Test_Lens(lambda=10,position_PSD=8.2)

TRACE

COMPONENT base=Progress_bar() at (0,0,0) ABSOLUTE

COMPONENT source1 = Source_div(
  xwidth=0.026, yheight=0.026,
  focus_aw= 0.00001, focus_ah= 0.00001,
  lambda0=lambda, dlambda=0.00001,gauss=0)
AT (0,0,.001) relative PREVIOUS

COMPONENT L11=Lens(r1=0.025,r2=0.025,thickness=0.0005,
  density=3.148,weight=62.3018,sigma_coh=11.74,sigma_inc=0,sigma_abs=0,
  radius=0.025,p_interact=0.01,focus_aw=10,focus_ah=10)
AT (0,0,.20) RELATIVE PREVIOUS

COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS

COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS

COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS


COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS

COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS

COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS
COMPONENT COPY(L11) = COPY (L11)
   AT (0,0,0.0071987) RELATIVE PREVIOUS

COMPONENT PSD_mon = Monitor_nD(
    xwidth=0.01, yheight = 0.01, options="x y, per cm2",bins=100,restore_neutron=1)
  AT (0, 0, position_PSD) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT COPY(PSD_mon) = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

COMPONENT Last_PSD = COPY(PSD_mon)
AT (0, 0, 0.1) RELATIVE PREVIOUS

END