1 gaskelld 1.1 tgt_field.txt Glen A. Warren Feb. 2000
2
3 This file documents some of the "features" of the code that handles
4 the optical transport of particles through a target field. Questions,
5 complaints and praise should be send to me, Glen Warren, at
6 gwarren@jlab.org.
7
8
9 INTRODUCTION
10
11 Let me first say that the code is not truly a general purpose code.
12 It is designed to handle the situation for the E93-026 experiment,
13 GeN. This means that the only configuration addressed is electrons in
14 HMS and the proton going into open space (i.e. using_P_arm_montecarlo
15 = .false.). In addition, the target field input assumes cylindrical
16 symmetry with the axis of symmetry arbitrarily oriented in the
17 horizontal plane. Despite thes restrictions, it would be relatively
18 easy for a motivated individual to follow the existing examples to
19 modify the code to handle different situations.
20
21 The second thing that I want to say is that Markus Muehlbauer
22 gaskelld 1.1 should get much of the credit for this work. I simply cobbled
23 together his code written for the engine to work in SIMC. This
24 information, however, is of little use because Markus has since left
25 physics.
26
27 The last introductory point that I want to make is that as of the
28 time of writting this file I am maintaining a web page that discusses
29 some of my findings. The address is
30
31 http://jazz.physik.unibas.ch/~warren/jlab/gen/targetfield.html
32
33 I can make no promises about the future maintaince of this page, but
34 it might provide some background info.
35
36
37 USAGE
38
39 There are five input variables related to the target field code:
40
41 targ.Bangle[real]: in beamandtargetinfo in the "extra" file. This is the
42 angle of the target field with respect to the beam. Zero degrees
43 gaskelld 1.1 means along the beam direction. Positive angle points in the
44 direction of the electron spectrometer.
45
46 using_tgt_field[0,1]: in simulate in the "extra" file. This turns
47 on/off the target field code. It is useful for doing checks on the
48 code for zero field. Clearly, if there is a target field, this
49 parameter must be 1.
50
51 tgt_field_file[string]: in simulate in the "extra" file. This is
52 the file name of the target field data file. There are two special
53 options. If tgt_field_file.eq.' ' then a test field of 5 T is used
54 over a -26<z<26cm and 0<r<16cm. If tgt_field_file.eq.'0', then the
55 field is set to zero. This is very useful for trivial debugging.
56 The current target field map file for GeN is 'trg_field_map.dat'.
57 This file should reside in the same directory as the simc
58 executable.
59
60 debug(6)[0,1]: in debug in the input file. This turns on/off
61 debugging information related to the target field code.
62
63 drift_to_ndet[real]: in simulate in the "extra" file. This is the
64 gaskelld 1.1 distance in cm from the target to the first plane of bars in the
65 neutron detector. It is used to reconstruct the proton "focal
66 plane" coordinates.
67
68
69 I made some changes in the proton coordinates in the ntuple to
70 accommodate aspects of the target field. Since there is no
71 spectrometer optics on the proton side, there is no need to worry
72 about proper reconstruction of the event to the target. The generated
73 proton vertex positions in the ntuple remain unchanged. The
74 "reconstructed" proton coordinates, however, are the "vertex"
75 coordinates seen outside of the target field region as if there was no
76 target field. That is, once the proton is outside of the target field
77 region, it is reconstructed to the vertex plane (defined by the raster
78 information) as if there was no target field. I refer to this type of
79 track as an image track. For this reason, the generated and
80 reconstructed vertical angles for the GeN measurement will be quite
81 different. The proton focal plane coordinates are the proton
82 coordinates transported to "drift_to_ndet" cm from the target.
83
84
85 gaskelld 1.1 ALGORITHMS
86
87 There are two distinct parts to the code: the tracking of the
88 generated event from the vertex to outside of the target field and the
89 reconstruction of the target coordinates from focal plane and raster
90 information considering the target field. The first part is relevant
91 to both the electron and the proton tracking. The second part is
92 relevant only to the electron tracking.
93
94 The tracking of the generated event through the target field toward
95 HMS is straight forward. The generated event is mapped from the
96 vertex through the target field to a field free region. Once outside
97 of the region, the track is traced back to z=0 as if there was target
98 field. This image track is then used as input in the HMS forward
99 optics.
100
101 The reconstruction of the target coordinates is not straight forward.
102 Here is an outline of the algorithm:
103
104 1) As a first approximation, map the focal plane coordinates to the
105 target (z=0), using the vertical beam position provided (this
106 gaskelld 1.1 could come from either the SEM or the slow raster) without
107 considering the target field. This is wrong for two reasons.
108 First, and most obvious, it does not consider the target field.
109 Second, the vertical position is wrong. The electromagnetic
110 interaction occurred somewhere along the beam line, which is
111 given by the vertical and horizontal beam positions. In general,
112 the intersection of the beam line and the particle's trajectory
113 do not occur at z=0. But as I said, and as the code says, this
114 is a first approximation.
115
116 2) Next, drift the above track back 100 cm (the z=100 cm plane) in
117 the direction of the spectrometer to get outside of the target
118 field region.
119
120 3) Map the above track through the target field to the "beam plane".
121 By beam plane, I mean the vertical plane determined by the
122 vertical and horizontal beam positions. This plane contains the
123 line of possible interaction vertices. Note that this track will
124 in general not have the proper vertical position even though we
125 are looking at the correct plane.
126
127 gaskelld 1.1 4A) Map the track from above to the z=0 plane.
128 4B) Modify the track above so that it has the known vertical
129 position at the beam plane and map to the z=0 plane.
130
131 5) Adjust the vertical position used in step 1) by the differences
132 of the final vertical position (x) in 4A) and 4B), and then
133 repeat from step 1) using the new vertical position. The process
134 is repeated until the difference in vertical position from 4A)
135 and 4B) is below a certain limit or a certain number of
136 iterations have been performed.
137
138 A fair question to ask is why is the code structured like this? The
139 problem is complicated by the need to using the existing HMS optics
140 coupled with the target field coupled with the need to specify the
141 vertical position. Actually, a similar process is used to determine
142 the target coordinates for the HMS without a target field when one
143 must specify the vertical position.
144
145 I hope this has provided some useful background. - GAW
146
|