File: ISIS_HET.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 (115 lines) | stat: -rw-r--r-- 3,393 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
/*******************************************************************************
*
* McStas, neutron ray-tracing package
*         Copyright (C) 1997-2008, All rights reserved
*         Risoe National Laboratory, Roskilde, Denmark
*         Institut Laue Langevin, Grenoble, France
*
* Instrument: ISIS_HET
*
* %Identification
* Written by: <a href="mailto:d.champion@rl.ac.uk">Dickon Champion</a>
* Date: 22nd Jan 2004.
* Origin: <a href="http://www.isis.rl.ac.uk">ISIS (UK)</a>
* %INSTRUMENT_SITE: ISIS
*
* HET: High Energy Transfer Chopper Spectrometer
*
* %Description
* This instrument is a simple model of the HET spectrometer at the ISIS neutron
* facility. The input arguments are hardwired so that the Fermi chopper position
* is 10 metres from the moderator. This instrument uses the FC module written by
* Andrew Garret which comes with no guarantees as to its accuracy in modelling the
* Fermi Chopper.
*
* %Example: Emin=443 Detector: cyl_I=235837
*
* %Parameters
* Emin:   [meV] lowest energy sampled      
* Emax:   [meV] highest energy sampled     
* nu_chop: [Hz] frequency of chopper rotation 
* type:     [ ] chopper package - sloppy chopper = 1, B chopper = 2
*
* %End
********************************************************************************/
DEFINE INSTRUMENT ISIS_HET(Emin=443.0,Emax=470.0,nu_chop=600.0,int type=2)
DECLARE
%{
/* chopper variables to compute according to "type" input */
double c_h,roc, chan_w;
int nslits;
%}

INITIALIZE
%{
/*  type=1 sloppy chopper
  type=2 B chopper
*/
if (type==1)
  {c_h=0.064;
   roc=-1.3;
   nslits=16;
   chan_w=0.00283;
   fprintf(stderr,"sloppy chopper selected");
  }
if (type==2)
  {c_h=0.052;
   roc=-0.92;
   nslits=24;
   chan_w=0.00184;
   fprintf(stderr,"250mev chopper selected");
  }

%}
TRACE
COMPONENT a1 = Progress_bar()
  AT (0,0,0) ABSOLUTE

COMPONENT ts1_mod = ISIS_moderator(
    Face ="Water", Emin = Emin, Emax = Emax, dist = 9.85, focus_xw = 0.045,
    focus_yh = 0.045, xwidth = 0.074, yheight = 0.074, CAngle = 0.0, SAC=1)
  AT (0, 0, 0) RELATIVE a1

COMPONENT monFC = Monitor_nD(
    options = "square t limits=[1.03e-3 1.16e-3] bins=100",
    filename = "FC_mon2.dat", xwidth=0.2, yheight = 0.2)
  AT (0, 0, 9.8) RELATIVE a1

COMPONENT FC = FermiChopper(
  radius=0.05, nu=nu_chop, yheight=c_h,
  w=chan_w, nslit=nslits, curvature=1.0/roc, verbose=1, zero_time=2)
AT (0,0,10) RELATIVE ts1_mod

COMPONENT FCslit1 = Slit(
    xmin = -0.0225, xmax = 0.0225, ymin = -0.0225, ymax = 0.0225)
  AT (0, 0, 0.15) RELATIVE FC

COMPONENT monT = Monitor_nD(
    options = "square t limits=[1.07e-3 1.13e-3] bins=100",
    filename = "FC_mon.dat", xwidth=0.2, yheight = 0.2)
  AT (0, 0, 0.035) RELATIVE FCslit1

COMPONENT postFCslit = Slit(
    xmin = -0.0225, xmax = 0.0225, ymin = -0.0225, ymax = 0.0225)
  AT (0, 0, 0.2) RELATIVE FC

COMPONENT presampslit = Slit(
    xmin = -0.0225, xmax = 0.0225, ymin = -0.0225, ymax = 0.0225)
  AT (0, 0, 1.4) RELATIVE postFCslit

COMPONENT target = Incoherent(
  xwidth=0.04,yheight=0.04,zdepth=0.002,
  focus_aw=19.38,focus_ah=3.435,
  pack = 1,
  target_index=2)
  AT (0,0,0.2) RELATIVE presampslit

COMPONENT a2=Arm()
AT (0,0,0) RELATIVE target

COMPONENT cyl = Monitor_nD(
    options = "banana, t limits=[1.505e-3 1.575e-3] bins=100  , theta limits[9.31 28.69] bins=1",
    filename = "det_out.dat",   xwidth=5.0,   yheight = 0.3)
  AT (0, 0, 0) RELATIVE a2

END