|
12 | 12 | * |
13 | 13 | * %INSTRUMENT_SITE: FZ_Juelich |
14 | 14 | * |
| 15 | +* Test instrument for the H Frielinghaus SANS_benchmark2 component. |
| 16 | +* |
| 17 | +* The below test uses defaults of the instrument (SANS_benchmark2 modnum=11) |
| 18 | +* %Example: -y Detector: PSDnear_I=8000 |
| 19 | +* |
15 | 20 | * %Parameters |
16 | 21 | * cnum: [] Set to 0.0 for no polarizer as for benchmarking the normal SANS samples, to 2.0 for two cavities, keep default values as much as possible |
17 | 22 | * lbdmin: [] |
@@ -53,6 +58,13 @@ bandwidth for detector distances: |
53 | 58 | DECLARE |
54 | 59 | %{ |
55 | 60 | %} |
| 61 | + |
| 62 | +USERVARS |
| 63 | +%{ |
| 64 | + int BS1; // Flag to signal if below radius of "virtual beamstop 1" |
| 65 | + int BS2; // Flag to signal if below radius of "virtual beamstop 2" |
| 66 | +%} |
| 67 | + |
56 | 68 | INITIALIZE |
57 | 69 | %{ |
58 | 70 | %} |
@@ -178,17 +190,42 @@ COMPONENT det = TOFSANSdet( plength=0.003163, ssdist=22.0124+2.0*bendL+PolTot |
178 | 190 | AT (0,0,20.0100) RELATIVE guide2 |
179 | 191 | ROTATED (0,0,0) RELATIVE vorpl |
180 | 192 |
|
181 | | -/* |
182 | | -COMPONENT det1 = Monitor_nD_mod(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, xytr=0.1, |
| 193 | +COMPONENT Virtual_Beamstop_near = Arm() |
| 194 | + AT (0,0,Clen*0.2-0.001) RELATIVE sample |
| 195 | +EXTEND %{ |
| 196 | + PROP_Z0; |
| 197 | + double r2=x*x + y*y; |
| 198 | + if ( r2 < 0.1*0.1 || r2 > 0.5*0.5 ) { |
| 199 | + BS1=1; |
| 200 | + } |
| 201 | +%} |
| 202 | + |
| 203 | +COMPONENT PSDnear = PSD_monitor(xwidth=1, yheight=1, restore_neutron=1, nx=300, ny=300) |
| 204 | + WHEN !BS1 AT (0,0,Clen*0.2) RELATIVE sample |
| 205 | + |
| 206 | +COMPONENT det1 = Monitor_nD(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, |
183 | 207 | options ="kxy bins=300 limits=[0.0025,0.80]", filename ="short_dist.txt") |
184 | | - AT (0,0, Clen*0.2) RELATIVE sample |
| 208 | + WHEN !BS1 AT (0,0, Clen*0.2) RELATIVE sample |
185 | 209 | ROTATED (0,0,0) RELATIVE vorpl |
186 | 210 |
|
187 | | -COMPONENT det2 = Monitor_nD_mod(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, xytr=0.02, |
| 211 | +COMPONENT Virtual_Beamstop_far = Arm() |
| 212 | + AT (0,0,Clen-0.001) RELATIVE sample |
| 213 | +EXTEND %{ |
| 214 | + PROP_Z0; |
| 215 | + double r2=x*x + y*y; |
| 216 | + if ( r2 < 0.02*0.02 || r2 > 0.5*0.5 ) { |
| 217 | + BS2=1; |
| 218 | + } |
| 219 | +%} |
| 220 | + |
| 221 | +COMPONENT PSDfar = PSD_monitor(xwidth=1, yheight=1, restore_neutron=1, nx=300, ny=300) |
| 222 | + WHEN !BS2 AT (0,0,Clen) RELATIVE sample |
| 223 | + |
| 224 | +COMPONENT det2 = Monitor_nD(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, |
188 | 225 | options ="kxy bins=300 limits=[0.0005,0.16]", filename ="long__dist.txt") |
189 | | - AT (0,0, Clen ) RELATIVE sample |
| 226 | + WHEN !BS2 AT (0,0, Clen ) RELATIVE sample |
190 | 227 | ROTATED (0,0,0) RELATIVE vorpl |
191 | | -*/ |
| 228 | + |
192 | 229 |
|
193 | 230 | FINALLY |
194 | 231 | %{ |
|
0 commit comments