1 | \documentclass{article} |
---|
2 | \author{Jianfeng Nadolski \footnote{LAL, Orsay, France.Email: \href{mailto:zhangj@lal.in2p3.fr}{zhangj@lal.in2p3.fr}}} |
---|
3 | \title{Soltracy3 mannual for developpers} |
---|
4 | |
---|
5 | \usepackage{amsmath} |
---|
6 | \usepackage{amssymb} |
---|
7 | \usepackage{graphicx} |
---|
8 | \usepackage[colorlinks=true,urlcolor=magenta,citecolor=blue]{hyperref} |
---|
9 | \usepackage{color} |
---|
10 | \usepackage{setspace} |
---|
11 | |
---|
12 | |
---|
13 | %% auto center the sentence in the line |
---|
14 | \newenvironment{tightcenter}{% |
---|
15 | \vspace{0.02in} |
---|
16 | \setlength\topsep{0pt} |
---|
17 | \setlength\parskip{0pt} |
---|
18 | \begin{center} |
---|
19 | }{% |
---|
20 | \end{center} |
---|
21 | \vspace{0.02in} |
---|
22 | } |
---|
23 | |
---|
24 | %% auto wrap a long word |
---|
25 | \newcommand*\wrapletters[1]{\wr@pletters#1\@nil} |
---|
26 | \def\wr@pletters#1#2\@nil{#1\allowbreak\if&\else\wr@pletters#2\@nil\fi} |
---|
27 | |
---|
28 | % define the file path font |
---|
29 | \newcommand{\pathfont}[1]{\textit{\wrapletters{#1}}} |
---|
30 | % define the font and color of the Tracy command in Tracy file |
---|
31 | \newcommand{\tracycommand}[2]{\begin{tightcenter} |
---|
32 | \textsf{\textcolor{red}{#1}} \quad \textsf{\textcolor{blue}{#2}} |
---|
33 | \end{tightcenter}} |
---|
34 | \newcommand{\tracycomm}[1]{\textsf{\textcolor{red}{#1}}} |
---|
35 | \newcommand{\tracypara}[1]{\textsf{\textcolor{blue}{#1}}} |
---|
36 | |
---|
37 | % lattice element definition |
---|
38 | \newcommand{\latticedef}[3]{\begin{tightcenter} |
---|
39 | \textsf{\textcolor{black}{#1}} |
---|
40 | \textsf{\textcolor{red}{#2}} \quad \textsf{\textcolor{blue}{#3}} |
---|
41 | \end{tightcenter}} |
---|
42 | \newcommand{\elemname}[1]{\textsf{\textcolor{black}{#1}}} |
---|
43 | \newcommand{\elemkeyword}[1]{\textsf{\textcolor{red}{#1}}} |
---|
44 | \newcommand{\elempara}[1]{\textsf{\textcolor{blue}{#1}}} |
---|
45 | |
---|
46 | \newcommand{\notespace}[1]{\vspace{0.1in}\textbf{#1} \vspace{0.05in}} |
---|
47 | |
---|
48 | |
---|
49 | \begin{document} |
---|
50 | |
---|
51 | \maketitle |
---|
52 | \tableofcontents |
---|
53 | |
---|
54 | %\onehalfspacing |
---|
55 | |
---|
56 | \section{Log} |
---|
57 | |
---|
58 | \begin{itemize} |
---|
59 | \item[05/10/2012] Add the control flag to control the entrance and exit edge effects and fringe |
---|
60 | field of the dipole, with``edge\_effect1 = 1'' in the dipole definition in the lattice file, the |
---|
61 | entrance edge effect and fringe field of the dipole are turned on, with ``edge\_effect1 = 0'', |
---|
62 | this effects are turned off. These two effects at the exit of the dipole are controlled by |
---|
63 | ``edge\_effect2''. |
---|
64 | \end{itemize} |
---|
65 | |
---|
66 | \section{Introduction} |
---|
67 | Tracy is a code to do long term tracking, and is written in the mixture of c and c++. |
---|
68 | This code is kept on developing. Soleil version of Tracy 3 is a code with more flexibility and easy to use. User does not need to know the structure of the code, what they need to do is to write an input script, and then run the code. |
---|
69 | Based on the need, user can write the files to define multipole field errors, misalignment errors of the lattice elements, and vacuum chamber, and then provide the file name in the user input script, in order to set the field errors of the lattice elements and the vacuum limit for the different region of the lattice. |
---|
70 | Attention: |
---|
71 | In the user defined file, such as the user input script, the file to define multipole field errors or alignment errors, or the file to define vacuum chambers, the maximum numbers of column is 130 (Not including comment line which starts with symbol \#.), and the spaces between each parameters or variables canât contain âTABâ key, otherwise the code canât work properly. This is because the routine to read the user defined input file is written in C. These limits will be improved in the future development. |
---|
72 | Although the user can define the file name whatever they want, it is suggested to name the file which is used to define multipole field error with the extension â.feâ and name the file which is used to define the misalignment error with the extension â.aeâ. |
---|
73 | |
---|
74 | There are two versions of Tracy 3, non-parallel version and parallel version. Non-parallel version Tracy is for the single computer, parallel version of Tracy is for the the cluster. The user defined input script which can be used for both parallel and non-parallel version Tracy. The ascii file with any extension isacceptable for Tracy3, but the extension is suggested to be â.prmâ. |
---|
75 | |
---|
76 | \section{ Non-parallel version Tracy} |
---|
77 | \subsection {Compile} |
---|
78 | The make file of Tracy is generated by âautomakeâ. Based on the compilers used, |
---|
79 | user needs to update â\textsf{\wrapletters{make\_for\_gcc.sh}}â under |
---|
80 | path ``\pathfont{\$HOME/TracyIII/}'' |
---|
81 | or the ``Makefile.am'' under path ``\pathfont{\$HOME/TracyIII/tracy/tracy/src}'' |
---|
82 | and ``\pathfont{\$HOME/TracyIII/tracy/tools}''. The compilers used on the server |
---|
83 | ``metis'' of SOLEIL Synchrotron are ``gfortran'', and ``gcc''. |
---|
84 | |
---|
85 | To compile the code, run the command under the shell terminal: |
---|
86 | \begin{tightcenter} |
---|
87 | \textsf{make\_for\_gcc.sh} \qquad \textsf{opt} |
---|
88 | \end{tightcenter} |
---|
89 | Then the executive file ``soltracy'' is automatically |
---|
90 | generated under path ``\pathfont{\$HOME/TracyIII/tracy/tools}''. |
---|
91 | |
---|
92 | \subsection{Run} |
---|
93 | To execute Tracy, the user needs to define an input file with the |
---|
94 | the lattice file names and the related commands (section~\ref{}). |
---|
95 | The name of the input file can be any valid characters. Although |
---|
96 | there is no limitation to the extension of the file, the extension |
---|
97 | ``.prm'' is preferred. For example, To run the user defined input file |
---|
98 | ``Input\_test.prm'', user can type the command: |
---|
99 | \begin{tightcenter} |
---|
100 | \textsf{soltracy} \qquad \textsf{Input\_test.prm} |
---|
101 | \end{tightcenter} |
---|
102 | |
---|
103 | \section{ Parallel version Tracy} |
---|
104 | In order to reduce the tracking time, the parallel version Tracy can be used |
---|
105 | on the cluster. Until now, the following three features of Tracy are |
---|
106 | parallelized: |
---|
107 | \begin{itemize} |
---|
108 | \item |
---|
109 | Frequency map analysis for on momentum particle, command ``FmapFlag''. |
---|
110 | \item |
---|
111 | Frequency map analysis for off momentum particle, command ``FmapdpFlag''. |
---|
112 | \item |
---|
113 | Track momentum acceptance at lattice elements, command ``MomentumAccFlag''. |
---|
114 | \end{itemize} |
---|
115 | |
---|
116 | \subsection{Compile} |
---|
117 | The commonly used compilers for parallel computation are MPI 2, and Intel |
---|
118 | MPI which is based on MPI 2. For the cluster of SOLEIL Synchrotron, Intel |
---|
119 | MPI is installed. To get the parallel Tracy work, three files of the |
---|
120 | non-parallel version Tracy need to be modified. The details are shown in |
---|
121 | the following steps. |
---|
122 | \begin{enumerate} |
---|
123 | \item |
---|
124 | The path of included files of Intel MPI is added in ``Makefile.am'' under |
---|
125 | path ``\pathfont{\$HOME/TracyIII/tracy/tracy/src}'' (shown in BLUE color): |
---|
126 | |
---|
127 | \wrapletters{INCLUDES = -I../inc -I\$(NUM\_REC)/inc \quad |
---|
128 | -I/opt/intel/impi/3.2.2.006/include64} |
---|
129 | |
---|
130 | \item |
---|
131 | The execute file, source file, paths of included files and library of Intel |
---|
132 | MPI are modified in ``Makefile.am'' under path ``\pathfont{\$HOME/TracyIII/tracy/tools}'' |
---|
133 | (shown in BLUE color): |
---|
134 | |
---|
135 | bin\_PROGRAMS = psoltracy |
---|
136 | |
---|
137 | soltracy\_SOURCES = \texttt{soltracy.cc nrutil.c nrcheck.c } |
---|
138 | \texttt{ nrlinwww.c nrframe.c ../tracy/src/tracy\_lib.cc $\rightarrow$} |
---|
139 | |
---|
140 | psoltracy\_SOURCES = \texttt{psoltracy.cc nrutil.c nrcheck.c |
---|
141 | nrlinwww.c nrframe.c ../tracy/src/tracy\_lib.cc} |
---|
142 | |
---|
143 | LIBS = \texttt{\wrapletters{-L\$(NUM\_REC)/lib \quad |
---|
144 | -L/opt/intel/impi/3.2.2.006/lib64 \quad -L\$(LIBPATH) \quad |
---|
145 | -lrecipes\_c\_icc \quad -lstdc++ \quad -lgfortran \quad -lmpichcxx}} |
---|
146 | |
---|
147 | INCLUDES = \texttt{\wrapletters{-I\$(TRACY\_LIB)/tracy/inc \quad -I\$(NUM\_REC)/inc |
---|
148 | \quad -I/opt/intel/impi/3.2.2.006/include64}} |
---|
149 | |
---|
150 | \item |
---|
151 | The compilers used in the parallel computing are defined in the |
---|
152 | ``\wrapletters{make\_for\_psoltracy.sh}'' located in path ``\$HOME/TracyIII'' |
---|
153 | as (shown in BLUE color): |
---|
154 | |
---|
155 | CC = \texttt{mpiicc} |
---|
156 | |
---|
157 | CXX = \texttt{mpiicpc} |
---|
158 | |
---|
159 | F77 = \texttt{mpiifort} |
---|
160 | |
---|
161 | Depending on the compilers used to do parallel computation, user needs to |
---|
162 | update the compilers in ``make\_for\_psoltracy.sh'' and the paths of included |
---|
163 | files and library which are shown above with blue color. |
---|
164 | |
---|
165 | After updating compilers, paths of included files and library for parallel |
---|
166 | computation, user can run |
---|
167 | \begin{tightcenter} |
---|
168 | \textsf{make\_for\_psoltracy.sh} |
---|
169 | \end{tightcenter} |
---|
170 | under the shell script to compile the parallel Tracy. After compilation, |
---|
171 | the execute file ``psoltracy'' is automatically generated under the |
---|
172 | path ``\pathfont{\$HOME/TracyIII/tracy/tools}''. |
---|
173 | \end{enumerate} |
---|
174 | |
---|
175 | |
---|
176 | \subsection{Run} |
---|
177 | As the non-parallel version Tracy, user needs to write the commands in a |
---|
178 | script which must be with the file extension ``.prm''. The syntaxes to define |
---|
179 | the script ``*.prm'' are the same for both non-parallel and parallel |
---|
180 | Tracy. |
---|
181 | |
---|
182 | To run the parallel Tracy, user need to contact the administrator of their |
---|
183 | cluster to know how to run parallel programs on the cluster. For the cluster |
---|
184 | on Synchrotron SOLEIL, the nodes used to do parallel computation are assigned |
---|
185 | by PBS (Portable Batch System), so a script is need. For example, user define |
---|
186 | the input script \texttt{test.prm} to tell Tracy what jobs are need to be done on the |
---|
187 | cluster, define script \textsf{\wrapletters{lance\_tracy3\_parallel.sh}} to assign |
---|
188 | the numbers of CPUs to do |
---|
189 | parallel computation and lance job to the SOLEIL cluster; and then type the |
---|
190 | following command under the bash shell to submit the job and run the parallel |
---|
191 | Tracy on the cluster: |
---|
192 | \begin{tightcenter} |
---|
193 | \textsf{lance\_tracy3\_parallel.sh \qquad test.prm} |
---|
194 | \end{tightcenter} |
---|
195 | |
---|
196 | |
---|
197 | \section{ User input script} |
---|
198 | There are two types of keywords in the user input script. The first type is |
---|
199 | to set the file, the file names, and define parameters for the related |
---|
200 | calculations; the key words for such definitions are ended with the |
---|
201 | characters ``Flag''. The second type is to define Boolean commands with or |
---|
202 | without parameters to do different calculations. The rules of the definition |
---|
203 | of input scripts are: |
---|
204 | \begin{itemize} |
---|
205 | \item |
---|
206 | The blank lines and lines starting with ``\#'' (comment line) are ignored |
---|
207 | by the code. |
---|
208 | \item |
---|
209 | Keywords without ``Flag'' as the final 4 characters are NOT executed according |
---|
210 | to the defined sequence in user input script. If the same command keywords |
---|
211 | are defined many times in the user script, only the last defined keyword is |
---|
212 | executed. |
---|
213 | \item |
---|
214 | The commands with the last 4 characters as ``Flag'' are executed according |
---|
215 | to the sequence in the code. |
---|
216 | \item |
---|
217 | The definition of lattice file at the beginning of the user script is mandatory. |
---|
218 | \item |
---|
219 | If the horizontal correctors, or vertical correctors, or girders, Beam Position |
---|
220 | Monitors, or skew quadrupoles are defined in the lattice file, user must |
---|
221 | declare the element name at the beginning of Tracy input file. |
---|
222 | \item |
---|
223 | One keyword command uses one line. User can not define more than one command |
---|
224 | at the same line. |
---|
225 | \item |
---|
226 | Except explanation, all commands with Boolean flag are the generic commands, |
---|
227 | that is, the commands are not machine dependent. |
---|
228 | \end{itemize} |
---|
229 | |
---|
230 | \subsection{File path} |
---|
231 | In the user input script, user can specify the name of the files which are used |
---|
232 | in the calculation, such as the lattice file, multipole field error file, |
---|
233 | misalignment error file, vacuum chamber file. When specifying the file name without |
---|
234 | file path in the Tracy input file, Tracy will look for the file in the current |
---|
235 | work path. Otherwise, user need to provide the absolute path of the file which is |
---|
236 | not located at the current path, such as: ``\texttt{\wrapletters{/home/physmach/Tracy3/tracy/soleil.lat}}''. |
---|
237 | Another method is to provide the filename without absolute path, but put all the |
---|
238 | called external files at a certain directory, and this directory is defined in the |
---|
239 | Tracy input file using the command: |
---|
240 | \tracycommand{in\_dir}{user\_defined\_path} |
---|
241 | For example, |
---|
242 | \tracycommand{in\_dir}{/home/zhang/codes/TracyIII/lattice/} |
---|
243 | This example tells the code all the files defined with absolute file path in the Tracy |
---|
244 | input file are located |
---|
245 | at the directory \pathfont{/home/zhang/codes/TracyIII/lattice/}. If user declares the files |
---|
246 | without absolute path and does not set the directory through command \textsf{in\_dir}; or |
---|
247 | the files specified in the script are not found at the current working path, |
---|
248 | the code will give an error message and stop running. |
---|
249 | |
---|
250 | \section{File names} |
---|
251 | |
---|
252 | \subsection{Lattice file name} |
---|
253 | In the input script, user must define the lattice name, this is mandatory. |
---|
254 | The command is: |
---|
255 | |
---|
256 | \tracycommand{lat\_file}{lattice\_file\_name} |
---|
257 | |
---|
258 | Here \tracypara{lattice\_file\_name} is the lattice file name without the extension ``.lat''. |
---|
259 | For example, the following command sets the lattice file of SOLEIL ring: |
---|
260 | \tracycommand{lat\_file}{solamor2} |
---|
261 | |
---|
262 | n Tracy 3, after reading the lattice, Twiss parameters are automatically printed to the |
---|
263 | file \textsl{linlat.out}. |
---|
264 | |
---|
265 | If one of these elements (Horizontal/vertical correctors or beam position monitors, or |
---|
266 | girders, or skew quadrupoles.) are defined in the lattice file, for example to read |
---|
267 | the misalignment errors of the lattice element and then do orbit correction, to read multipole |
---|
268 | field errors (SOLEIL lattice), etc.; user MUST specify the names of these elements using the |
---|
269 | corresponding commands in the Tracy input file: |
---|
270 | \tracycommand{h\_corr}{HCM} |
---|
271 | \tracycommand{v\_corr}{VCM} |
---|
272 | \tracycommand{gs}{GS} |
---|
273 | \tracycommand{ge}{GE} |
---|
274 | \tracycommand{bpm\_name}{BPM} |
---|
275 | \tracycommand{qt}{QT} |
---|
276 | Here \tracypara{HCM} is the name of horizontal correctors for horizontal orbit correction, |
---|
277 | or the horizontal correctors on which the multipole field errors are added in SOLEIL lattice; |
---|
278 | \tracypara{VCM} is the name of vertical correctors used for vertical orbit correction, or |
---|
279 | the vertical correctors on which the multipole field errors are added in SOLEIL lattice; |
---|
280 | \tracypara{GS} is the name of the start girder; \tracypara{GE} is the name of the end girder; |
---|
281 | \tracypara{BPM} is the name of beam position monitors defined in the lattice file; |
---|
282 | \tracypara{QT} is the name of the skew quadrupoles defined in the lattice. Generally, |
---|
283 | user needs to define horizontal, vertical correctors and BPMs when reading the misalignment |
---|
284 | errors or correcting closed orbit distortion. |
---|
285 | |
---|
286 | \subsection{Multipole field error file name (SOLEIL lattice)} |
---|
287 | User can read the multipole field errors on SOLEIL lattice from an external file; |
---|
288 | the file is specified in the user script using the following command: |
---|
289 | \tracycommand{multipole\_file}{multipole\_file\_name} |
---|
290 | Here \tracypara{multipole\_file\_name} is the user defined multipole field error file, |
---|
291 | the format of this file is given in section~\ref{}. |
---|
292 | |
---|
293 | If the multipole field errors of horizontal, vertical correctors and skew quadrupoles |
---|
294 | are defined in the \tracypara{multipole\_file}, user MUST specify the names of these |
---|
295 | lattice elements in the Tracy input file as the following example: |
---|
296 | \tracycommand{h\_corr}{CH} |
---|
297 | \tracycommand{v\_corr}{CV} |
---|
298 | \tracycommand{qt}{QT} |
---|
299 | Here \tracypara{CH}, \tracypara{CV} and \tracypara{QT} are the names of horizontal, |
---|
300 | vertical correctors, and skew quadrupoles respectively which are defined in the lattice file. |
---|
301 | |
---|
302 | \subsection{Files of multipole field errors of correctors and skew quadrupoles (SOLEIL lattice)} |
---|
303 | Horizontal, vertical correctors and skew quadrupoles are integrated with the sextupole quadrupoles |
---|
304 | on SOLEIL storage ring. To define the multipole field errors on these elements, user need to define the orders and relative strengths of multipole field errors in the multipole field error file (section Error: Reference source not found) and specify the file name in the user input script â*.prmâ (section Multipole field error file name), then specify the file names as the following example: |
---|
305 | \tracycommand{fic\_hcorr}{corh.txt} |
---|
306 | \tracycommand{fic\_vcorr}{corv.txt} |
---|
307 | \tracycommand{fic\_skew}{corqt.txt} |
---|
308 | Here \tracypara{corh.txt} and \tracypara{corv.txt} are the files with measured current values corh, |
---|
309 | corv, corqt (with unit [Ampere]) for the horizontal, vertical correctors and skew quadrupoles |
---|
310 | respectively. Based on the measured current values, user can get the integrated field strength as:\\ |
---|
311 | \vspace{0.02in} |
---|
312 | \texttt{Hcorr\_strength [T.m] = corh *\_convHcorr /brho; (horizontal correctors) \\} |
---|
313 | \vspace{0.02in} |
---|
314 | \texttt{Vcorr\_strength [T.m] = corv *\_convVcorr /brho; (vertical correctors)} \\ |
---|
315 | \vspace{0.02in} |
---|
316 | \texttt{Qt\_strength [T.m] = corqt *\_convQt /brho; (skew quadrupoles)} \\ |
---|
317 | \vspace{0.02in} |
---|
318 | |
---|
319 | Here brho is the momentum rigidity, and the conversion constants between current and field are \texttt{\_convHcorr} = 8.14e-4, \texttt{\_convVcorr} = 4.642e-4, \texttt{\_convQt} = 93.83e-4. |
---|
320 | |
---|
321 | For SOLEIL lattice, the SAME ORDER of multipole field errors on the same elements are added together, |
---|
322 | so the SAME ORDER of horizontal/vertical, skew quadrupoles, and sextupoles are added together since |
---|
323 | these elements are integrated at the same magnets. |
---|
324 | |
---|
325 | \subsection{ File to define field strength of virtual coupling source elements (SOLEIL lattice)} |
---|
326 | On SOLEIL storage ring, the coupling is thought to come from the rotation of quadrupoles |
---|
327 | and vertical displacements of sextupoles. The strengths of these coupling sources are |
---|
328 | written in a file, then read by the following command: |
---|
329 | \tracycommand{virtualskewquad\_file}{virtual\_skew\_quad\_currents.txt} |
---|
330 | |
---|
331 | Here \tracypara{virtual\_skew\_quad\_currents.txt} is the user defined file with strength |
---|
332 | of vertical coupling source. |
---|
333 | |
---|
334 | In order to use this command to read the virtual sources of coupling, user needs to define |
---|
335 | the virtual coupling element as a skew quadrupole in the lattice file: |
---|
336 | \latticedef{SQ:}{quadrupole,}{tilt=45.0, K= 0.0, method=4, N=1;} |
---|
337 | and this virtual coupling element MUST be with the name âSQâ. Now there 152 elements defined as the virtual coupling sources in the SOLEIL lattice. The syntaxs to define skew quadrupole are explained in section . |
---|
338 | The measured current value qtcorr[i] of the ith coupling source is converted to the corresponding integrated skew quadrupole field strength corr\_strength as |
---|
339 | corr\_strength [m-1] = qtcorr[i]*conv/brho; |
---|
340 | here brho is momentum rigidity, and the conversion constant conv is 93.88e-4 [A-1.T]. |
---|
341 | |
---|
342 | \subsection{Cut off value} |
---|
343 | Set the cut off value of all random distribution (Gaussian distribution) to ânâ times of the RMS value sigma: |
---|
344 | normalcut n |
---|
345 | |
---|
346 | \section{Physics: Hamiltionian} |
---|
347 | The dynamic motion of a conserved system can be described by a Hamiltonian. For an accelerator system without radiation |
---|
348 | damping (energy loss) and RF cavities (energy gain), the motion of a single electron in the magnetic field can be described using the |
---|
349 | following Hamitonian in the curvilinear coordinate system (Merz...) |
---|
350 | \begin{eqnarray} |
---|
351 | H (x,P_x; y, P_y; -t, \delta; s) &=& L + V \\ |
---|
352 | &=& -(1+h_{\mathrm{ref}}x)[\sqrt(P^2 - (P_x - eA_x)^2 - (P_y - eA_y)^2 ) + eA_z(x,P_x; y, P_y,s)] \\ |
---|
353 | P^2 & =& P_x^2 + P_y^2 + P_z^2 |
---|
354 | \end{eqnarray} |
---|
355 | $h_{\mathrm{ref}}$ is the curvature of reference orbit inside the dipole. |
---|
356 | The $(x,P_x; y, P_y; -t, \delta)$ are the canonical cooridinates of the $H$, and $P_x, P_y, P-z$ are respectively the |
---|
357 | horizontal, vertical, and longitudinal mechanical momentums. A more convienent way is to expand the electron motion |
---|
358 | around the motion of a reference particle with total momentum $P_0$, so |
---|
359 | \begin{eqnarray} |
---|
360 | \frac{1}{P_0}H (x,P_x; y, P_y; -t, \delta; s) &=& \\ |
---|
361 | H (x,p_x; y, p_y; -t, \delta; s) &=& -(1+h_{\mathrm{ref}}x)\sqrt((1+\delta)^2 - (p_x - \frac{e}{P_0}A_x)^2 - (p_y - \frac{e}{P_0}A_y)^2 ) + \frac{e}{P_0}A_z(x,p_x; y, p_y,s) \\ |
---|
362 | &=& -(1+h_{\mathrm{ref}}x)\sqrt((1+\delta)^2 - (p_x - \frac{1}{B \rho}A_x)^2 - (p_y - \frac{1}{B \rho}A_y)^2 ) + \frac{1}{B \rho}A_z(x,p_x; y, p_y,s) |
---|
363 | \end{eqnarray} |
---|
364 | with |
---|
365 | \begin{eqnarray} |
---|
366 | p_x &=& \frac{P_x}{P_0} \\ |
---|
367 | p_y &=& \frac{P_y}{P_0} \\ |
---|
368 | p &=& \frac{P}{P_0} = \frac{\Delta P + P_0}{P_0} = (1+\delta) \\ |
---|
369 | \delta &=& \frac{\Delta P}{P_0} \\ |
---|
370 | B \rho &=& \frac{P_0}{e} (magnetic rigidity) |
---|
371 | \end{eqnarray} |
---|
372 | |
---|
373 | With some operations (J. Bengtsson's linear transverse dynamics for sotrage ring with applications to the low energy antiproton ring (LEAR) at CERN; Tracy 2 manual.), |
---|
374 | the Hamitonian can be expressed with the canonical coordinates $(x,p_x; y, p_y; -ct, \delta; s)$ (Tracy-2 Manual, J. Bengtsson) |
---|
375 | |
---|
376 | \begin{align*} |
---|
377 | %\label{Tracy:Exact:H} |
---|
378 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
379 | &=-(1+h_{\mathrm{ref}}x)(\sqrt{(1+\delta)^2 - (p_x - \frac{A_x}{B \rho})^2 - (p_y - \frac{A_y}{B \rho})^2} + \frac{A_z}{B \rho}) + \delta \\ |
---|
380 | &= -(1+h_{\mathrm{ref}}x)(\sqrt{(1+\delta)^2 - (p_x - \frac{A_x}{B \rho})^2 - (p_y - \frac{A_y}{B \rho})^2 }) + h_{\mathrm{ref}} x \frac{A_z}{B \rho} \\ |
---|
381 | & + \frac{A_z}{B \rho} + \delta \\ |
---|
382 | &= \underbrace{-(1+h_{\mathrm{ref}}x)\sqrt{(1+\delta)^2 - (p_x - \frac{A_x}{B \rho})^2 - (p_y - \frac{A_y}{B \rho})^2 )}}_\text{kinetic energy} \\ |
---|
383 | & + \underbrace{\frac{x}{\rho} +\frac{x}{2\rho^2}}_\text{Gemometic components due to the curvilinear coordinate inside the dipole}\\ |
---|
384 | & +\underbrace{\frac{A_z}{B \rho}}_\text{magnet contribution} \\ |
---|
385 | & +\underbrace{\delta}_\text{due to the canonical coordinate $-ct$ instead of $-t$}\\ |
---|
386 | A_z & =A_z(x,p_x; y, p_y,s) |
---|
387 | \end{align*} |
---|
388 | |
---|
389 | The equation is the exact Hamitonian used in Tracy. The $A_x$ are due to the longidutinal fringe field, this is an natural results due to the Maxwell Equation; $h_{\mathrm{ref}}$ is not zero only inside the dipoles. |
---|
390 | |
---|
391 | For the system without fringe field of the magnet, or only consider the field inside the body of the magnet, $A_x = 0$ and $A_y = 0$, |
---|
392 | so the Hamiltonian is |
---|
393 | \begin{align} |
---|
394 | \label{eqn:exact:H:NoFF} |
---|
395 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
396 | &= \underbrace{-(1+h_{\mathrm{ref}}x)\sqrt{(1+\delta)^2 - p_x^2 - p_y^2)}}_\text{kinetic energy} \\ |
---|
397 | & + \underbrace{\frac{x}{\rho} +\frac{x}{2\rho^2}}_\text{Gemometic components due to the curvilinear coordinate inside the dipole}\\ |
---|
398 | & +\underbrace{\frac{A_z}{B \rho}}_\text{magnet contribution} \\ |
---|
399 | & +\underbrace{\delta}_\text{due to the canonical coordinate $-ct$ instead of $-t$}\\ |
---|
400 | \end{align} |
---|
401 | |
---|
402 | From eqn.~\ref{eqn:exact:H:NoFF}, it is easy to get the map of the particle inside different lattice elements. |
---|
403 | |
---|
404 | |
---|
405 | \subsection{Map of drift} |
---|
406 | \label{H:drift} |
---|
407 | |
---|
408 | In the drift, $A_z = 0$, and $h_{\mathrm{ref}}$ = 0, from eqn.~\ref{eqn:exact:H:NoFF}, we can get the Hamiltonian |
---|
409 | inside a drift is |
---|
410 | \begin{align} |
---|
411 | \label{eqn:H:exact:drift} |
---|
412 | H (x,p_x; y, p_y; -ct, \delta; s) = -\sqrt{(1+\delta)^2 - p_x^2 - p_y^2)} + \delta |
---|
413 | \end{align} |
---|
414 | |
---|
415 | In large ring, in order to increase the tracking speed, we can expand the sqare root in |
---|
416 | eqn.~\ref{eqn:H:exact:drift} to get the approximate Hamitonian. |
---|
417 | That is, |
---|
418 | \begin{align} |
---|
419 | \label{eqn:H:approxi:drift} |
---|
420 | H (x,p_x; y, p_y; -ct, \delta; s) &= -(1+\delta) \left[ 1 - \frac{p_x^2 + p_y^2}{2 (1+\delta)^2} \right] + \delta\\ |
---|
421 | &= \frac{p_x^2 + p_y^2}{2(1+\delta)} |
---|
422 | \end{align} |
---|
423 | |
---|
424 | |
---|
425 | From eqn.~\ref{eqn:H:exact:drift}, it is easy to get the map inside the drift for the |
---|
426 | \textbf{small ring}: |
---|
427 | \begin{align} |
---|
428 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = \frac{p_{x0}}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
429 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= \frac{p_{y0}}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
430 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} =-\frac{1+\delta_0}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}}+1 \\ |
---|
431 | or \\ |
---|
432 | (ct)^{'} = \frac{1+\delta_0}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}}-1 \\ |
---|
433 | p_x = p_{x0} \\ |
---|
434 | p_y = p_{y0} \\ |
---|
435 | \delta = \delta_0 |
---|
436 | \end{align} |
---|
437 | |
---|
438 | From eqn.~\ref{eqn:H:approxi:drift}, it is easy to get the map inside the drift for the |
---|
439 | \textbf{big ring}: |
---|
440 | \begin{align} |
---|
441 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = \frac{p_{x0}}{1+\delta_0} \\ |
---|
442 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= \frac{p_{y0}}{1+\delta_0} \\ |
---|
443 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} =-\frac{p_{x0^2}+p_{y0}^2}{2(1+\delta_0)} \\ |
---|
444 | or \\ |
---|
445 | (ct)^{'} = \frac{p_{x0^2}+p_{y0}^2}{2(1+\delta_0)} \\ |
---|
446 | p_x = p_{x0} \\ |
---|
447 | p_y = p_{y0} \\ |
---|
448 | \delta = \delta_0 |
---|
449 | \end{align} |
---|
450 | |
---|
451 | \subsection{Map of mutipoles} |
---|
452 | From eqn.~\ref{eqn:exact:H:NoFF}, we can get the Hamiltonian |
---|
453 | inside a multipole without fringe field is |
---|
454 | \begin{align} |
---|
455 | \label{eqn:H:exact} |
---|
456 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
457 | =& \underbrace{-\sqrt{(1+\delta)^2 - p_x^2 - p_y^2}+\delta}_\text{H drift} \\ |
---|
458 | & \underbrace{-h_{\mathrm{ref}}x \sqrt{(1+\delta)^2 - p_x^2 - p_y^2}}_\text{H kick} \\ |
---|
459 | & + \underbrace{\frac{x}{\rho} +\frac{x}{2\rho^2}-\frac{A_z}{B \rho}}_\text{H kick} |
---|
460 | \end{align} |
---|
461 | |
---|
462 | In eqn.~\ref{eqn:H:exact}, the Hamiltonian is decomposed into two part, one is the Hamiltonian |
---|
463 | of the drift which is due to the kinetic energy of the system (section~\ref{H:drift}), another part is the kick |
---|
464 | due to the multipoles which will give the kick to the particle. |
---|
465 | Now we only need to focus on the Hamiltonian of the multipoles which induces the kick map: |
---|
466 | \begin{align} |
---|
467 | \label{eqn:H:exact:multipole} |
---|
468 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
469 | &=-h_{\mathrm{ref}}x \sqrt{(1+\delta)^2 - p_x^2 - p_y^2} \\ |
---|
470 | & +\frac{x}{\rho} +\frac{x}{2\rho^2}-\frac{A_z}{B \rho} |
---|
471 | \end{align} |
---|
472 | |
---|
473 | Similarly, by expand the sqare root in eqn.~\ref{eqn:H:exact}, we can get the approximate Hamiltonian |
---|
474 | of the multipole as |
---|
475 | \begin{align} |
---|
476 | \label{eqn:H:approxi:multipole} |
---|
477 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
478 | &=-h_{\mathrm{ref}}x \sqrt{(1+\delta)^2 - p_x^2 - p_y^2} \\ |
---|
479 | & +\frac{x}{\rho} +\frac{x}{2\rho^2}-\frac{A_z}{B \rho} \\ |
---|
480 | &=-h_{\mathrm{ref}} x \delta + \frac{1}{2}h_{\mathrm{ref}} h_{B} x^2 - \frac{A_z}{B \rho}+(h_B - h_{\mathrm{ref}})x |
---|
481 | \end{align} |
---|
482 | where $h_{\mathrm{ref}}$ is the curvature due to the curlininear coordinates inside the dipole, |
---|
483 | $h_{\mathrm{ref}} = 1/\rho_{ref}$; |
---|
484 | $h_{\mathrm{bend}}$ is due to the bending curvature of the dipole which is determined by the dipole |
---|
485 | field, $h_{\mathrm{bend}} = 1/ \rho_{bend}$. $h_{\mathrm{ref}} \neq 0$ only inside dipoles. |
---|
486 | |
---|
487 | In the dipole, $A_z \neq 0$, and $h_{\mathrm{ref}} \neq $ 0, so |
---|
488 | from eqn.~\ref{eqn:H:exact:multipole}, we can get the kick map due to the dipole |
---|
489 | in the \textbf{small ring} which use the exact Hamiltonian: |
---|
490 | \begin{align} |
---|
491 | \label{eqn:kickmap:exact} |
---|
492 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = h_{\mathrm{ref}} x_0 \frac{p_{x0}}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
493 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= h_{\mathrm{ref}} x_0 \frac{p_{y0}}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
494 | p_x^{'} = -\frac{\partial H}{\partial y_0} = h_{\mathrm{ref}} \sqrt{(1+\delta_0)^2 - p_{x0}^2 - p_{y0}^2} - h_{\mathrm{bend}} - h_{\mathrm{ref}}h_{\mathrm{bend}}x - \frac{B_y}{B \rho}\\ |
---|
495 | p_y^{'} = -\frac{\partial H}{\partial y_0} = \frac{1}{B \rho} \frac{\partial A_z}{\partial y_0} = \frac{B_x}{B \rho}\\ |
---|
496 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} =-h_{\mathrm{ref}} x_0 \frac{1+\delta_0}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
497 | or \\ |
---|
498 | (ct)^{'} = h_{\mathrm{ref}} x_0 \frac{1+\delta_0}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
499 | \delta = \delta_0 \\ |
---|
500 | B \rho = \frac{p_0}{e} |
---|
501 | \end{align} |
---|
502 | where |
---|
503 | \begin{align} |
---|
504 | \frac{\partial A_z}{\partial x} = - B_y \\ |
---|
505 | \frac{\partial A_z}{\partial y} = B_x |
---|
506 | \end{align} |
---|
507 | since |
---|
508 | \begin{align} |
---|
509 | A_x = 0 \\ |
---|
510 | A_y =0 |
---|
511 | \end{align} |
---|
512 | inside the body of the multipoles, and |
---|
513 | \begin{align*} |
---|
514 | \vec{B} = \Delta \times \vec{A} \\ |
---|
515 | \hat{x} & \hat{y} & \hat{z} \\ |
---|
516 | \frac{\partial}{x} & \frac{\partial}{y} & \frac{\partial}{z} \\ |
---|
517 | A_x & A_y & A_z \\ |
---|
518 | \end{align*} |
---|
519 | |
---|
520 | |
---|
521 | In the dipole, $A_z \neq 0$, and $h_{\mathrm{ref}} \neq $ 0, so |
---|
522 | from eqn.~\ref{eqn:H:approxi:multipole}, we can get the kick map due to the dipole |
---|
523 | in the \textbf{big ring} which use the exact Hamiltonian: |
---|
524 | \begin{align} |
---|
525 | \label{eqn:kickmap:approxi} |
---|
526 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = h_{\mathrm{ref}} x_0 \frac{p_{x0}}{1+\delta_0} \\ |
---|
527 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= h_{\mathrm{ref}} x_0 \frac{p_{y0}}{1+\delta_0} \\ |
---|
528 | p_x^{'} = -\frac{\partial H}{\partial y_0} = h_{\mathrm{ref}} \delta_0 - (h_{\mathrm{bend}} - h_{\mathrm{ref}}) - h_{\mathrm{ref}}h_{\mathrm{bend}}x - \frac{B_y}{B \rho}\\ |
---|
529 | p_y^{'} = -\frac{\partial H}{\partial y_0} = \frac{1}{B \rho} \frac{\partial A_z}{\partial y_0} = \frac{B_x}{B \rho}\\ |
---|
530 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} =\frac{-h_{\mathrm{ref}} x_0}{1+\delta_0} \frac{-(p_{x0}^2+p_{y0}^2)}{2(1+\delta_0)} \\ |
---|
531 | or \\ |
---|
532 | (ct)^{'} =-\frac{h_{\mathrm{ref}} x_0}{1+\delta_0} \frac{(p_{x0}^2+p_{y0}^2)}{2(1+\delta_0)} \\ |
---|
533 | \delta^{'} = 0 |
---|
534 | \end{align} |
---|
535 | |
---|
536 | For other multipoles (quadrupoles, sextupole, decapole, octupole, etc), the curvilinear coordinate is |
---|
537 | the cartesian coordinates, that is $h_{ref}$ = 0, so from eqn.~\ref{eqn:kickmap:exact}, the kick map for |
---|
538 | these multipoles in the small ring is: |
---|
539 | \begin{align} |
---|
540 | \label{eqn:kickmap:exact:multipole} |
---|
541 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = 0 \\ |
---|
542 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= 0 \\ |
---|
543 | p_x^{'} = -\frac{\partial H}{\partial y_0} = - (h_{\mathrm{bend}} + \frac{B_y}{B \rho})\\ |
---|
544 | p_y^{'} = -\frac{\partial H}{\partial y_0} = \frac{1}{B \rho} \frac{\partial A_z}{\partial y_0} = \frac{B_x}{B \rho}\\ |
---|
545 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} = 0\\ |
---|
546 | or \\ |
---|
547 | (ct)^{'} = 0 \\ |
---|
548 | \delta^{'} = 0 |
---|
549 | \end{align} |
---|
550 | |
---|
551 | With $h_{ref} = 0$, from eqn:~\ref{eqn:kickmap:approxi}, the kick map for these |
---|
552 | multipoles (quadrupoles, sextupole, decapole, octupole, etc) in the big ring is: |
---|
553 | \begin{align} |
---|
554 | \label{eqn:kickmap:approxi:multipole} |
---|
555 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = 0 \\ |
---|
556 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= 0 \\ |
---|
557 | p_x^{'} = -\frac{\partial H}{\partial y_0} = - (h_{\mathrm{bend}} + \frac{B_y}{B \rho})\\ |
---|
558 | p_y^{'} = -\frac{\partial H}{\partial y_0} = \frac{1}{B \rho} \frac{\partial A_z}{\partial y_0} = \frac{B_x}{B \rho}\\ |
---|
559 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} = 0\\ |
---|
560 | or \\ |
---|
561 | (ct)^{'} = 0 \\ |
---|
562 | \delta^{'} = 0 |
---|
563 | \end{align} |
---|
564 | |
---|
565 | From the eqn~\ref{eqn:kickmap:exact} to eqn.~\ref{eqn:kickmap:approxi:multipole}, it's clear |
---|
566 | that the kick map from the main body of dipoles are different in the small ring and big ring; |
---|
567 | while the kick map from the main body of other type of multipoles are the same in small |
---|
568 | rings and big rings. |
---|
569 | |
---|
570 | |
---|
571 | |
---|
572 | |
---|
573 | |
---|
574 | |
---|
575 | |
---|
576 | |
---|
577 | \section{Magnetic field} |
---|
578 | |
---|
579 | A. Dragt ....(Lie methods for acceleator........) |
---|
580 | |
---|
581 | \section{FF of dipole} |
---|
582 | \subsection{kick map} |
---|
583 | E. Forest ........... |
---|
584 | |
---|
585 | \section{FF of quadrupole} |
---|
586 | \subsection{kick map} |
---|
587 | |
---|
588 | |
---|
589 | \section{ Lattice file} |
---|
590 | In the lattice, RF cavity with the correct harmonic number must be defined!!! |
---|
591 | Otherwise Tracy will give the error message: |
---|
592 | \textcolor{red}{Elem\_GetPos: there are no kids in family 0 ()}. This obigatory is for the |
---|
593 | correct calculation of positive/negtive momentum compaction factor. |
---|
594 | To deactive the RF cavity, the cavity voltage can be defined as 0. |
---|
595 | |
---|
596 | |
---|
597 | The followings are the rules to define a lattice file used in Tracy 3. The curvelinear coordinates are |
---|
598 | used. \textbf{The ideal particle or design particle sees the perfect magnetic field in all magnets, and its} |
---|
599 | \textbf{orbit is used as the reference orbit and base of the curvilinear coordinate}. Since the reference orbit |
---|
600 | is a curve inside the dipoles and a straight line in other lattice elements (drifts and the magnets except |
---|
601 | dipoles), so the length of the dipole is the the path length of the reference particle inside the dipole |
---|
602 | which is equal to $\rho*\theta$ where $\rho$ is the bending radius of the dipole and $theta$ is the bending angle |
---|
603 | with unit [rad], and all the other magnet lengths are the straight length of the magnets. |
---|
604 | |
---|
605 | Due to the same reason, the curvature of the curvilinear cooridnates h = 1/$\rho$ is not zero only inside dipole; |
---|
606 | in other magnets and drift h = 0, and the curvilinear coordinates goes to cartesian cooridnates. |
---|
607 | As a result, the independent variable $s$ inside the dipole harmitonian is the arc length, while the staight |
---|
608 | length in other lattice elements. |
---|
609 | |
---|
610 | \subsection{Lattice} |
---|
611 | The $n^{th}$ field component of the lattice element is defined as in Tracy (n = 1, 2, 3, 4 ...): |
---|
612 | \begin{eqnarray*} |
---|
613 | b_n & = & \frac{1}{B \rho} \frac{1}{(n-1)!} \frac{\partial^{n-1} B_y }{\partial x ^{n-1}}|_{x=0,y=0} \\ |
---|
614 | a_n & = & \frac{1}{B \rho} \frac{1}{(n-1)!} \frac{\partial^{n-1} B_x }{\partial x ^{n-1}}|_{x=0,y=0} \\ |
---|
615 | B \rho & = & \frac{p_0}{e} |
---|
616 | \end{eqnarray*} |
---|
617 | $B \rho$ is the magnetic rigidity, $p_0$ is the design beam momentum, $e$ is the electric charge. |
---|
618 | For example, for sextupole, n = 3, so $b_3$ and $a_3$ are defined as |
---|
619 | \begin{eqnarray*} |
---|
620 | b_3 & = & \frac{1}{B \rho} \frac{1}{2} \frac{\partial^{2} B_y }{\partial x ^{2}}|_{x=0,y=0} \\ |
---|
621 | a_3 & = & \frac{1}{B \rho} \frac{1}{2} \frac{\partial^{2} B_x }{\partial x ^{2}}|_{x=0,y=0} |
---|
622 | \end{eqnarray*}. |
---|
623 | |
---|
624 | \notespace{NOTES:} |
---|
625 | In \textbf{AT} (Accelerator Toolbox) and \textbf{BETA} code, the definition of are the same as in \textbf{Tracy}. |
---|
626 | While In \textbf{MAD8}, \textbf{MADX} and \textbf{ELEGANT}, the order of the field compoent start from 0, that is |
---|
627 | n = 0, 1, 2, 3, ..., and the $n^{th}$ field strength components of the lattice element $b_n$ and $a_n$ are defined as |
---|
628 | \begin{eqnarray*} |
---|
629 | b_n & = & \frac{1}{B \rho} \frac{\partial^{n} B_y }{\partial x ^{n}}|_{x=0,y=0} \\ |
---|
630 | a_n & = & \frac{1}{B \rho} \frac{\partial^{n} B_x }{\partial x ^{n}}|_{x=0,y=0} \\ |
---|
631 | B \rho & = & \frac{p_0}{e} |
---|
632 | \end{eqnarray*} |
---|
633 | For example, for sextupole, n = 3, its field component $b_2$ and $a_2$ are defined as |
---|
634 | \begin{eqnarray*} |
---|
635 | b_2 & = & \frac{1}{B \rho} \frac{\partial^{2} B_y }{\partial x ^{2}}|_{x=0,y=0} \\ |
---|
636 | a_2 & = & \frac{1}{B \rho} \frac{\partial^{2} B_x }{\partial x ^{2}}|_{x=0,y=0} |
---|
637 | \end{eqnarray*}. |
---|
638 | |
---|
639 | |
---|
640 | |
---|
641 | \subsection{Syntax} |
---|
642 | Every line embraced by â{}â is comment line. For example: |
---|
643 | |
---|
644 | {*****drift space *****} |
---|
645 | |
---|
646 | Each sentence is ended by â;â or no punctuation. |
---|
647 | Tracy is not sensitive to capital/small letters in the lattice. |
---|
648 | User can define any lattice element with any valid name (but must start with a character) they want, but the element type is fixed. |
---|
649 | For the lattice of the ring, the definition of RF cavity is mandatory, and the harmonic number of the RF cavity is also mandatory; for the lattice of the linac, the definition of the RF cavity is optional. |
---|
650 | |
---|
651 | \subsection{Variables} |
---|
652 | User can define the variables in the lattice file. For example: |
---|
653 | \begin{tightcenter} |
---|
654 | \textsf{Intmeth = 4}; |
---|
655 | \end{tightcenter} |
---|
656 | Then when the code is running, the variable \textsf{intmeth} in the lattice |
---|
657 | file will be replaced by \textsf{4}. |
---|
658 | |
---|
659 | Tracy accept math operation. For example, |
---|
660 | \latticedef{DL1: }{drift,}{L = 0.1*2 + 0.1-0.01;} |
---|
661 | |
---|
662 | \subsection{Start line} |
---|
663 | The lattice file must begin with the sentence: |
---|
664 | \begin{tightcenter} |
---|
665 | \textsf{define} \quad \textsf{lattice}; |
---|
666 | \end{tightcenter} |
---|
667 | This definition is mandatory. |
---|
668 | |
---|
669 | \subsection{Global variables} |
---|
670 | After define the ring, user needs to define the system parameters of the lattice: |
---|
671 | Energy, the beam energy with unit [GeV]. |
---|
672 | dP, the relative momentum offset of the particle. |
---|
673 | CODeps, the convergence for the algorism to find the closed orbit. |
---|
674 | For example: |
---|
675 | Energy = 2.739; |
---|
676 | dP = 1.0d-10; |
---|
677 | CODeps= 1.0d-15; |
---|
678 | These definitions are mandatory. |
---|
679 | |
---|
680 | \subsection{DRIFT} |
---|
681 | |
---|
682 | \latticedef{Name:}{drift,}{L = $\langle \dots \rangle$;} |
---|
683 | |
---|
684 | \begin{table}[htbp] |
---|
685 | \centering |
---|
686 | \caption{Parameters of dipole in the lattice file.} |
---|
687 | \label{tab:dipole-para} |
---|
688 | %\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.1\linewidth} | p{0.6\linewidth} |} |
---|
689 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
690 | \hline |
---|
691 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
692 | \hline |
---|
693 | \textbf{L} & [m] & 0.0 & Length. \\ |
---|
694 | \hline |
---|
695 | \end{tabular} |
---|
696 | \end{table} |
---|
697 | The definition of the length of a drift is mandatory. |
---|
698 | |
---|
699 | \vspace{0.05in} |
---|
700 | \textit{Example:} |
---|
701 | \latticedef{SD1a:}{drift,}{L= 0.900000;} |
---|
702 | |
---|
703 | \subsection{DIPOLE} |
---|
704 | |
---|
705 | \latticedef{Element\_name:}{bending,}{L = $\langle \dots \rangle$, T = $\langle \dots \rangle$, |
---|
706 | \textbf{T1} = $\langle \dots \rangle$, \textbf{T2}=$\langle \dots \rangle$, |
---|
707 | \textbf{H1} = $\lbrack \dots \rbrack$, \textbf{H2}= $\lbrack \dots \rbrack$, |
---|
708 | \textbf{gap} = $\lbrack \dots \rbrack$, \textbf{edge\_effect1} = $\lbrack \dots \rbrack$, |
---|
709 | \textbf{edge\_effect2} = $\lbrack \dots \rbrack$, \textbf{K} =$\lbrack \dots \rbrack$, |
---|
710 | \textbf{method} = $\langle \dots \rangle$, \textbf{N} = $\langle \dots \rangle$;} |
---|
711 | |
---|
712 | |
---|
713 | |
---|
714 | \begin{table}[tbp] |
---|
715 | \centering |
---|
716 | \caption{Parameters of dipole in the lattice file.} |
---|
717 | \label{tab:dipole-para} |
---|
718 | %% \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|l|c|c|p{0.4\linewidth}|} |
---|
719 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
720 | \hline |
---|
721 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
722 | \hline |
---|
723 | \textbf{L} & [m] & 0.0 & Curved path length of |
---|
724 | the design particle inside the dipole. L = $\rho * \theta$, where $\rho$ is the |
---|
725 | bending radius of the dipole, and $\theta$ is the bending angle of the dipole. \\ |
---|
726 | \hline |
---|
727 | \textbf{T} &[degree] & 0.0 & Total bending angle \\ |
---|
728 | \hline |
---|
729 | \textbf{T1} &[degree] & 0.0 & Entrance angle \\ |
---|
730 | \hline |
---|
731 | \textbf{T2} &[degree] & 0.0 & Exit Angle \\ |
---|
732 | \hline |
---|
733 | \textbf{K} & L $\neq$ 0, m$^{-2}$. \newline L = 0, m$^{-1}$. & 0.0 |
---|
734 | & L $\neq$ 0, quadrupole field strength; \newline L = 0, integrated field strength. \\ |
---|
735 | \hline |
---|
736 | \textbf{Method} & - & 4 & 1,2,4. Symplectic integration method. The |
---|
737 | value ``1'' means $1^{\mathrm{st}}$ order, ``2'' means $2^{\mathrm{nd}}$ order, |
---|
738 | and ``4'' means $4^{\mathrm{th}}$ order. \\ |
---|
739 | \hline |
---|
740 | \textbf{Gap} &[m] & 0.0 & Distance between two poles of the dipole, |
---|
741 | the gap size determine the fringe field. If the gap size is 0, then the dipole has |
---|
742 | no fringe field (\textcolor{red}{??????}). \\ |
---|
743 | \hline |
---|
744 | \textbf{edge\_effect1} & - & 0 & 1/0. |
---|
745 | ``1'' to turn on the edge focusing effect and the fringe field at the entrance of |
---|
746 | the dipole. ``0'' to turn off the two effects. \\ |
---|
747 | \hline |
---|
748 | \textbf{edge\_effect2} & - & 0 & 1/0. ``1'' to turn on the edge focusing effect and the |
---|
749 | fringe field at the exit of the dipole. ``0'' to turn off the two effects. \\ |
---|
750 | \hline |
---|
751 | \textbf{N} & - & 1 & number of cut slices. \\ |
---|
752 | \hline |
---|
753 | \end{tabular} |
---|
754 | \end{table} |
---|
755 | |
---|
756 | \vspace{0.05in} |
---|
757 | For example:\\ |
---|
758 | \vspace{0.05in} |
---|
759 | \textsf{beta\_gap=37e-3; tracy\_gap=beta\_gap*2*0.724;} |
---|
760 | \latticedef{BEND1 :}{ \textbf{bending},}{ \textbf{L} = 1.05243, \textbf{T} = 11.25, \textbf{T1} = 5.5906, |
---|
761 | \textbf{T2} = 5.67658, \textbf{K} = 0.00204,gap=tracy\_gap, |
---|
762 | \textbf{edge\_effect1} = 1, \textbf{edge\_effect2} = 1, \textbf{N} = 4, |
---|
763 | \textbf{method} = intmeth;} |
---|
764 | |
---|
765 | The parameters of ``bending'' are optional, the default values for the missing parameters are 0, |
---|
766 | and the default value for ``method'' is also 0. |
---|
767 | |
---|
768 | |
---|
769 | \vspace{0.05in} |
---|
770 | \textbf{Attention:} |
---|
771 | \begin{itemize} |
---|
772 | \item |
---|
773 | The bending magnet in Tracy is a symplectic element. |
---|
774 | The independent variable $s$ inside the dipole harmitonian is the arc length, |
---|
775 | so the length of the dipole is defined the curved path length of the design |
---|
776 | particle inside the dipole. |
---|
777 | \item |
---|
778 | One can refer to the definition of $T1$,$T2$, $H1$, $H2$ on page 116 of SLAC-75 for more |
---|
779 | information. |
---|
780 | \item |
---|
781 | In the lattice files of ELEGANT, MADX and BETA, the dipole angles are defined with the unit [rad]. |
---|
782 | But in TRACY, the unit is [degree]. |
---|
783 | \item |
---|
784 | BETA dipole gap is the Elegant gap; but Tracy dipole gap is different from |
---|
785 | the definition in both BETA and Elegant. |
---|
786 | Tracy definition of dipole with fringe field: \\ |
---|
787 | \textsf{ |
---|
788 | beta\_gap=0.04; |
---|
789 | {tracy\_gap=beta\_gap*2*1/6;} |
---|
790 | {Due to the Tanh-like fringe field, K1=0.2, and tracy\_gap = beta\_gap *2* FINT (K brown para.)} |
---|
791 | tracy\_gap = beta\_gap*2*0.348;} |
---|
792 | |
---|
793 | |
---|
794 | \latticedef{DIP:}{bending,}{L=0.27646,T= 45, T1=0, T2=0,gap=tracy\_gap,edge\_effect1=1,edge\_effect2=1,method=intmeth,N=4;} |
---|
795 | |
---|
796 | Elegant definition of dipole with dipole fringe field: \\ |
---|
797 | \textsf{DIP: csbend,N\_KICKS=100,INTEGRATION\_ORDER=4,L=0.27646,angle= 0.785398, E1=0, E2=0,hgap=0.02,Fint=0.348,nonlinear=1,edge1\_effects=2,edge2\_effects=2,edge\_order=2;} |
---|
798 | \end{itemize} |
---|
799 | |
---|
800 | \subsection{QUADRUPOLE} |
---|
801 | \textbf{Definition:} \\ |
---|
802 | \latticedef{Element\_Name:}{ quadrupole,}{ L = $\lbrack \dots \rbrack$, tilt = $\lbrack \dots \rbrack$, |
---|
803 | K =$\lbrack \dots \rbrack$, FF1 = $\lbrack \dots \rbrack$, |
---|
804 | FF2= $\lbrack \dots \rbrack$, FFscaling = $\lbrack \dots \rbrack$, |
---|
805 | method = $\lbrack \dots \rbrack$, N= $\langle \dots \rangle$;} |
---|
806 | |
---|
807 | \begin{table}[htbp] |
---|
808 | \centering |
---|
809 | \caption{Parameters of quadrupoles in the lattice file.} |
---|
810 | \label{tab:quad-para} |
---|
811 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
812 | \hline |
---|
813 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
814 | \hline |
---|
815 | L & [m] & 0.0 & Length of the quadrupole \\ |
---|
816 | \hline |
---|
817 | Tilt & [degree] & 0.0 & tilt angle of the quadrupole. |
---|
818 | If âtiltâ is non-zero, then the |
---|
819 | quadrupole is a skew quadruple. \\ |
---|
820 | \hline |
---|
821 | K & L $\neq$ 0, [m$^{-2}$]. \newline L = 0, [m$^{-1}$]. & 0.0 & L $\neq$ 0, Gradient |
---|
822 | $\frac{\frac{\partial B_y }{\partial x}}{B \rho}$; \newline L = 0, integrated field strength |
---|
823 | $\frac{\frac{\partial B_y }{\partial x} L }{B \rho}$. \\ |
---|
824 | \hline |
---|
825 | FF1 & - & 0 & 1 or 0. \newline |
---|
826 | 1: to avtive fringe field at the left edge. \textsf{QuadFringeOnFlag} |
---|
827 | should be set in the Tracy input file. 0: left fringe field off. \\ |
---|
828 | \hline |
---|
829 | FF2 & - & 0 & 1 or 0. \newline |
---|
830 | 1: to avtive fringe field at the right edge. \textsf{QuadFringeOnFlag} |
---|
831 | should be set in the Tracy input file. 0: right fringe field off. \\ |
---|
832 | \hline |
---|
833 | FFscaling & - & 1 & Scaling factor of the dipole fringe field. \\ |
---|
834 | \hline |
---|
835 | Method & - & 4 & 1,2,4. Order of symplectic integration method. |
---|
836 | Value ``1'' means 1st order, ``2'' means 2nd order, and ``4'' means 4th order. \\ |
---|
837 | \hline |
---|
838 | N & - & 1 & Pieces of the quadrupole to be cut when it is treated in the code. \\ |
---|
839 | \hline |
---|
840 | \end{tabular} |
---|
841 | \end{table} |
---|
842 | |
---|
843 | |
---|
844 | |
---|
845 | Example: \\ |
---|
846 | |
---|
847 | \textsf{Nq=8/2; dgsurg=1.00; dgsurgL=1.00; quadfringe=1.0; LQC=0.3602;} |
---|
848 | \latticedef{QP1a:}{quadrupole,}{ L=LQC/2, K= -1.073038*dgsurg, FF1=quadfringe, FF2=0, |
---|
849 | FFscaling =1, method=intmeth, N=Nq;} |
---|
850 | |
---|
851 | The parameters of âquadrupoleâ are optional, the default value for âmethodâ is 4, the default value for âFFscalingâ is 1, the default value for the other parameters are 0. |
---|
852 | |
---|
853 | \subsection{SKEW QUADRUPOLE} |
---|
854 | |
---|
855 | The skew quadrupole is a quadrupole with a 45 [degree] tilt angle. For example: |
---|
856 | \latticedef{QT:}{quadrupole,}{tilt=45.0, K= 0.0, method=intmeth, N=1;} |
---|
857 | |
---|
858 | \notespace{NOTES:} |
---|
859 | If skew quadrupoles are defined in the lattice file with a name \tracypara{skewquad}, |
---|
860 | User must specify the name of skew quadrupole in the tracy input file using |
---|
861 | the commands: |
---|
862 | \tracycommand{qt}{skewquad} |
---|
863 | |
---|
864 | \subsection{SEXTUPOLE} |
---|
865 | |
---|
866 | \latticedef{Element\_Name:}{sextupole,}{L = $\lbrack \dots \rbrack$, K = $\lbrack \dots \rbrack$, |
---|
867 | FF1 = $\lbrack \dots \rbrack$, FF2=$\lbrack \dots \rbrack$,method = $\lbrack \dots \rbrack$, |
---|
868 | N=$\lbrack \dots \rbrack$;} |
---|
869 | |
---|
870 | |
---|
871 | \begin{table}[htpb] |
---|
872 | \centering |
---|
873 | \caption{Parameters of sextupoles in the lattice file.} |
---|
874 | \label{tab:sext-para} |
---|
875 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
876 | \hline |
---|
877 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
878 | \hline |
---|
879 | \textbf{L} [m] & & 0.0 & Length\\ |
---|
880 | \hline |
---|
881 | \textbf{K} &L $\neq$ 0, [m$^{-3}$]. \newline L = 0, [m$^{-2}$]. & 0.0 & |
---|
882 | If L $\neq$ 0, |
---|
883 | $K = \frac{1}{2} \frac{1}{B \rho} \frac{\partial^{2} B_y }{\partial x ^{2}}|_{x=0,y=0}$, |
---|
884 | $B \rho$ is the magnetic rigidity, $p_0$ is the design beam momentum, |
---|
885 | $e$ is the electric charge. If L = 0, K is the integrated field |
---|
886 | strength $L\frac{1}{2} \frac{1}{B \rho} \frac{\partial^{2} B_y }{\partial x ^{2}}|_{x=0,y=0}$ \\ |
---|
887 | \hline |
---|
888 | \textbf{FF1} & - & 0 & \textbf{1} or \textbf{0}. \textbf{1}: tringe on the fringe field at the |
---|
889 | left edge. \textbf{0}: tringe off the fringe field at the |
---|
890 | left edge.\\ |
---|
891 | \hline |
---|
892 | \textbf{FF2} & - & 0 & \textbf{1} or \textbf{0}. \textbf{1}: tringe on the fringe field at the |
---|
893 | right edge. \textbf{0}: tringe off the fringe field at the |
---|
894 | right edge.\\ |
---|
895 | \hline |
---|
896 | \textbf{Method} & - & 4 & \textbf{1},\textbf{2},\textbf{4}. Order of symplectic integration method. |
---|
897 | \textbf{1}: 1st order; \textbf{2}: 2nd order; \textbf{4} 4th order. \\ |
---|
898 | \hline |
---|
899 | \textbf{N} & - & 1 & Pieces of this element to be cut, used in the symplectic |
---|
900 | integration. \\ |
---|
901 | |
---|
902 | \hline |
---|
903 | \end{tabular} |
---|
904 | \end{table} |
---|
905 | |
---|
906 | |
---|
907 | |
---|
908 | \textit{Example:} \\ |
---|
909 | \textsf{NqSx=1; coef=1.0/0.16; method4sextu = 4; sextfringe = 0;} |
---|
910 | \latticedef{SX1:}{sextupole,}{ L=0.16, K = 1.719190*coef, method=method4sextu, N = NqSx, |
---|
911 | FF1=sextfringe, FF2=sextfringe;} |
---|
912 | |
---|
913 | The parameters of âsextupoleâ are optional, the default value for âmethodâ is 4, |
---|
914 | the default value for the other parameters is 0. |
---|
915 | |
---|
916 | |
---|
917 | \notespace{NOTES:} |
---|
918 | |
---|
919 | In \textbf{AT} (Accelerator Toolbox) and \textbf{BETA} code, the european notation of |
---|
920 | the order of magnetic field is used. That is n = 1, 2, 3, ...n; and the definition of |
---|
921 | K are the same as in \textbf{Tracy}. |
---|
922 | While In \textbf{MAD8}, \textbf{MADX} and \textbf{ELEGANT}, the U.S. notation of the |
---|
923 | order order of the field is used, that is n = 0, 1, 2, 3, ..n. For sextupole, n = 2, |
---|
924 | and its gradient is defined as |
---|
925 | \begin{equation*} |
---|
926 | K_2 = \frac{1}{B \rho} \frac{\partial^{2} B_y }{\partial x ^{2}}|_{x=0,y=0} |
---|
927 | \end{equation*} |
---|
928 | |
---|
929 | \subsection{MULTIPOLE} |
---|
930 | |
---|
931 | \latticedef{Element\_Name:}{Multipole,}{L= $\lbrack \dots \rbrack$, T =$\lbrack \dots \rbrack$, |
---|
932 | T1=$\lbrack \dots \rbrack$, T2=$\lbrack \dots \rbrack$, |
---|
933 | tilt=$\lbrack \dots \rbrack$, HOM = (i, $\langle$ $b_i$ $\rangle$, $\langle$ $a_i$ $\rangle$, |
---|
934 | j, $\langle$ $b_j$ $\rangle$, $\langle$ $a_j$ $\rangle$,âŠ.$n$, $\langle$ $b_n$ $\rangle$, $\langle$ |
---|
935 | $a_n$ $\rangle$), $N$ =$\lbrack \dots \rbrack$$\langle$, method =$\lbrack \dots \rbrack$;} |
---|
936 | |
---|
937 | \begin{table}[htpb] |
---|
938 | \centering |
---|
939 | \caption{Parameters of the multipoles.} |
---|
940 | \label{tab:mult-para} |
---|
941 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
942 | \hline |
---|
943 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
944 | \hline |
---|
945 | \textbf{L} & [m] & 0.0 & Length \\ |
---|
946 | \hline |
---|
947 | \textbf{T} & [degree] & 0.0 & Total bending angle \\ |
---|
948 | \hline |
---|
949 | \textbf{T1} & [degree] & 0.0 & Entrance angle \\ |
---|
950 | \hline |
---|
951 | \textbf{T2} & [degree] & 0.0 & Exit Angle \\ |
---|
952 | \hline |
---|
953 | \textbf{Tilt} & [degree] & 0.0 & Rotation angle of the quadrupole; if \tracypara{Tilt} |
---|
954 | is non-zero, then the quadrupole is a skew quadruple.???? \\ |
---|
955 | \hline |
---|
956 | \textbf{HOM} & - & (0, 0, 0) & Multipole field components of the element. The format |
---|
957 | is \textit{n}, \textit{$b_{n}$}, \textit{$a_n$}, etc. \newline |
---|
958 | \textit{n} is order of the multipole |
---|
959 | field in U.S. notation (?????), n=1 (dipole field), |
---|
960 | n=2 (quadrupole field), n=3 (sextupole field), |
---|
961 | n=4 (octuple field), n=5 (decuple field). |
---|
962 | \textit{$b_n$} is $n^{\mathrm{th}}$ component of the upright multipole |
---|
963 | field with the unit [$\frac{1}{m^{-n}}$]; |
---|
964 | \textit{$a_n$} is $n^{\mathrm{th}}$ component |
---|
965 | of the skew multipole field with the |
---|
966 | unit [$\frac{1}{m^-n}$]. \\ |
---|
967 | \hline |
---|
968 | \textbf{N} & - & 1 & Pieces of this element to be cut \\ |
---|
969 | \hline |
---|
970 | \textbf{Method} & - & 4 & 1,2,4. Symplectic integration method. |
---|
971 | 1 is $1^{\mathrm{st}}$ order, 2 is $2^{\mathrm{nd}}$ order, 4 is |
---|
972 | $4\mathrm{th}$ order. \\ |
---|
973 | \hline |
---|
974 | \end{tabular} |
---|
975 | \end{table} |
---|
976 | |
---|
977 | The multipole field components $a_n$ and $b_n$ are defined as |
---|
978 | \begin{eqnarray} |
---|
979 | b_n & = & \frac{1}{B \rho} \frac{1}{(n-1)!} \frac{\partial^{n-1} B_y }{\partial x ^{n-1}}|_{x=0,y=0} \\ |
---|
980 | a_n & = & \frac{1}{B \rho} \frac{1}{(n-1)!} \frac{\partial^{n-1} B_x }{\partial x ^{n-1}}|_{x=0,y=0} \\ |
---|
981 | B \rho & = & \frac{p_0}{e} |
---|
982 | \end{eqnarray} |
---|
983 | $B \rho$ is the magnetic rigidity, $p_0$ is the design beam momentum, $e$ is the electric charge. |
---|
984 | |
---|
985 | If the magnetic field $\vec{B^{tip}}$ is measured at the location with the radius $r_0$, then |
---|
986 | $b_n$ and $a_n$ are defined as |
---|
987 | \begin{eqnarray*} |
---|
988 | b_n & = & \frac{1}{B \rho} \frac{B_y^{tip}}{r_0^{n-1}}\\ |
---|
989 | a_n & = & \frac{1}{B \rho} \frac{B_x^{tip}}{r_0^{n-1}} \\ |
---|
990 | \vec{B^{tip}} & = & B_y^{tip} \hat{y} + B_x^{tip} \hat{x} |
---|
991 | \end{eqnarray*} |
---|
992 | |
---|
993 | The $n^{th}$ order magnetic field is |
---|
994 | \begin{equation} |
---|
995 | B_y^n + i * B_x^n = (b_n + i*a_n) * (x + i*y)^n |
---|
996 | \end{equation} |
---|
997 | The total magnetic field with $1^{st}$ to $n^{th}$ order field components can be calculated using |
---|
998 | \begin{eqnarray} |
---|
999 | \label{eqn:total:field} |
---|
1000 | B_y + i * B_x & = & (b_n + i*a_n) * (x+i*y)*(x + i*y)^{n-1} + O(n-1) \\ |
---|
1001 | & = & [(b_n*x - a_n*y) + b_{n-1} + i*(a_n*x + b_n*y + a_{n-1})]*(x+i*y)^{n-1} + O(n-2) \\ |
---|
1002 | & ...& |
---|
1003 | \end{eqnarray} |
---|
1004 | |
---|
1005 | The eqn.~\ref{eqn:total:field} is used in Tracy3 to calculate the effective fields of the |
---|
1006 | magnet. This equation clearly shows that, all the field errors gives the same effect the |
---|
1007 | beam: horizontal focusing and vertical decusing. But since the field strength of the |
---|
1008 | $n^{th}$ order magnet is proportial to the $n^{th}$ order of $x/y$ and $x/y$ at the |
---|
1009 | entrance of the magnet is small, so the higher $n$ is, the weak of the $n^{th}$ order |
---|
1010 | multipole field is. |
---|
1011 | |
---|
1012 | \vspace{0.05in} |
---|
1013 | \textit{Example 1: } |
---|
1014 | |
---|
1015 | \latticedef{B:}{multipole,}{L=0.70, T=10.0, T1=5.0, T2=5.0, HOM = (1, -1.0, 0), N=8, Method=2;} |
---|
1016 | |
---|
1017 | In this example, the multipole is a dipole with field component $b_1$ = -1.0, or the |
---|
1018 | field strength is $B_{y0}$, and the field direction is down. This field gives a horizontal |
---|
1019 | focusing to the electron. |
---|
1020 | |
---|
1021 | \vspace{0.05in} |
---|
1022 | \textit{Example 2:} |
---|
1023 | |
---|
1024 | \latticedef{QF:}{multipole,}{L=0.70, HOM = (1, 2.50, 0.0, 4, 1.01e7, 0.0), N=8, Method=4;} |
---|
1025 | |
---|
1026 | In this example, the multipole is a dipole with $4^{th}$ order upright multipole filed errors (octupole), |
---|
1027 | and $b_4$ = 1.01e7. |
---|
1028 | |
---|
1029 | To add multipole errors in the defined lattice files, user can also define the multipoles |
---|
1030 | inside an external file (Section~\ref{sec:mult:field:error}) (???? To be checked, can this |
---|
1031 | routine mesured with the general one???). |
---|
1032 | |
---|
1033 | \notespace{NOTES:} \\ |
---|
1034 | In \textbf{AT} (Accelerator Toolbox) and \textbf{BETA} code, the definition of are the same |
---|
1035 | as in \textbf{Tracy}. While In \textbf{MAD8}, \textbf{MADX} and \textbf{ELEGANT}, the order |
---|
1036 | of the field compoent start from 0, that is n = 0, 1, 2, 3, ..., and the $n^{th}$ field |
---|
1037 | strength components of the lattice element $b_n$ and $a_n$ are defined as |
---|
1038 | \begin{eqnarray*} |
---|
1039 | b_n & = & \frac{1}{B \rho} \frac{\partial^{n} B_y }{\partial x ^{n}}|_{x=0,y=0} \\ |
---|
1040 | a_n & = & \frac{1}{B \rho} \frac{\partial^{n} B_x }{\partial x ^{n}}|_{x=0,y=0} \\ |
---|
1041 | B \rho & = & \frac{p_0}{e} |
---|
1042 | \end{eqnarray*} |
---|
1043 | |
---|
1044 | \subsection{ wiggler (To be updated.)} |
---|
1045 | |
---|
1046 | \latticedef{Element\_Name:}{Wiggler,}{L = $\langle$ length $\rangle$,BoBrhoV = $\langle$ B/Brho $\rangle$, |
---|
1047 | BoBrhoH = $\langle$ B/Brho $\rangle$, Lambda = $\langle$ period $\rangle$,kxV= $\langle$ [m] $\rangle$,kxH = $\langle$ [m] $\rangle$,phi = $\langle$ phase $\rangle$, |
---|
1048 | harm(n, kxV, BoBrhoV, kxH, BoBrhoH, phi), N = $\langle$ no of integration steps $\rangle$, |
---|
1049 | Method = $\langle$ method $\rangle$;} |
---|
1050 | |
---|
1051 | |
---|
1052 | \begin{table}[htbp] |
---|
1053 | \centering |
---|
1054 | \caption{The parameters of wigglers in a lattice file.} |
---|
1055 | \label{tab:wiggler-para} |
---|
1056 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
1057 | \hline |
---|
1058 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
1059 | \textbf{L} & [m] & 0.0 & Length \\ \hline |
---|
1060 | \textbf{BoBrhoV} & ??? & ??? & the normalized vertical field \\ \hline |
---|
1061 | \textbf{BoBrhoH} & ??? & ??? & the normalized horizontal field \\ \hline |
---|
1062 | \textbf{Labmda} & [m] & ??? & period length \\ \hline |
---|
1063 | \textbf{kxV} & [m] & ??? & ??? \\ \hline |
---|
1064 | \textbf{kxH} & [m] & ??? & ??? \\ \hline |
---|
1065 | \textbf{phi} & [degree] & ??? & ??? \\ \hline |
---|
1066 | \textbf{harm} & ??? & ??? & ??? \\ \hline |
---|
1067 | \textbf{N} & - & - & No of integration steps \\ \hline |
---|
1068 | \textbf{Method} & - & - & Symplectic integration method. |
---|
1069 | 1 is 1st order, 2 is 2nd order, 4 is 4th order.\\ |
---|
1070 | \hline |
---|
1071 | \end{tabular} |
---|
1072 | \end{table} |
---|
1073 | |
---|
1074 | \vspace{0.05in} |
---|
1075 | \textit{ Example 1:} |
---|
1076 | \latticedef{U143:}{wiggler,}{L=4.80, K=0.5, Lambda=0.15, N=20, Method=0;} |
---|
1077 | |
---|
1078 | \vspace{0.05in} |
---|
1079 | \textit{Example 2:} |
---|
1080 | \latticedef{EPU:}{wiggler,}{L=4.80, Lambda=0.15, N=20, Method=0, |
---|
1081 | harm=(3, kxV\_3, BoBrhoV\_3, kxH\_3, BoBrhoH\_3, phi\_3);} |
---|
1082 | |
---|
1083 | \subsection{FIELD MAP (To be updatedâŠâŠ..)} |
---|
1084 | |
---|
1085 | \latticedef{Element\_Name:}{Fieldmap,}{L = $\langle$ length [m] $\rangle$, N = $\langle$ |
---|
1086 | no of integration steps $\rangle$, file1 = $\langle$ file name (lower case) $\rangle$}; |
---|
1087 | |
---|
1088 | \begin{table}[htbp] |
---|
1089 | \centering |
---|
1090 | \caption{Parameters of field map in the lattice file.} |
---|
1091 | \label{tab:fieldmap-para} |
---|
1092 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
1093 | \hline |
---|
1094 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
1095 | \hline |
---|
1096 | \textbf{L} & [m] & 0.0 & Length \\ \hline |
---|
1097 | \textbf{L} & [m] & 0.0 & Length of the field map \\ |
---|
1098 | \hline |
---|
1099 | \textbf{N} & - & ??? & the number of integration steps \\ |
---|
1100 | \hline |
---|
1101 | \textbf{file1} & - & ??? & field map file \\ |
---|
1102 | \hline |
---|
1103 | \end{tabular} |
---|
1104 | \end{table} |
---|
1105 | |
---|
1106 | \vspace{0.05in} |
---|
1107 | \textit{Example:} |
---|
1108 | \latticedef{FM:}{Fieldmap,}{L = 1.0, N = 20, file1 = "U19\_Bxyz.dat";} |
---|
1109 | |
---|
1110 | |
---|
1111 | \subsection{INSERTION DEVICE} |
---|
1112 | |
---|
1113 | \latticedef{Element\_Name:}{insertion,}{scaling1 = 1/0, scaling2=1/0,method = interpolation\_method, |
---|
1114 | N=Number of slice, file1 = name of the file with 1st order radia map, |
---|
1115 | file2 = name of the file with 2nd order radia map;} |
---|
1116 | |
---|
1117 | \begin{table}[htbp] |
---|
1118 | \centering |
---|
1119 | \caption{Parameters of the insertion devices.} |
---|
1120 | \label{tab:insertiondevice-para} |
---|
1121 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
1122 | \hline |
---|
1123 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
1124 | \textbf{scaling1} & - & ??? & scaling factor for the 1st order field map \\ |
---|
1125 | \hline |
---|
1126 | \textbf{scaling2} & - & ??? & scaling factor for the 2rd order field map \\ |
---|
1127 | \hline |
---|
1128 | \textbf{method} & - & ??? & 1, 3. The order of symplectic interpolation method. 1 is linear |
---|
1129 | interpolation, 3 is spline interpolation.\\ |
---|
1130 | \hline |
---|
1131 | \textbf{N} & - & ??? & pieces of this element is cut when it is treated in the code \\ |
---|
1132 | \hline |
---|
1133 | \textbf{file1} & - & ??? & The 1st order of insertion device field are read from the |
---|
1134 | files generated by RADIA. If user does not specify the file name with the file path, |
---|
1135 | then the code will look for the files in the current working directory. The path of |
---|
1136 | the Radia map file must be in small letters, otherwise the code canât find the file. \\ |
---|
1137 | \hline |
---|
1138 | \textbf{file2} & - & ??? & |
---|
1139 | The 2nd order of insertion device field are read from the files generated by RADIA. |
---|
1140 | If user does not specify the file name with the file path, then the code will look |
---|
1141 | for the files in the current working directory. The path of the Radia map file must |
---|
1142 | be in small letters, otherwise the code canât find the file. \\ |
---|
1143 | \hline |
---|
1144 | \end{tabular} |
---|
1145 | \end{table} |
---|
1146 | |
---|
1147 | \vspace{0.05in} |
---|
1148 | \textit{Example:} |
---|
1149 | \latticedef{WIGSLIC:}{insertion,}{N = 10, scaling1=1.0, scaling2=1.0, method=2, file1="/home/sources/physmach/tracy2.7/w150g11pole60\_oppose\_radia\_pour\_tracy.txt", file2= "/home/sources/physmach/brunelle/tracy-2.7/w150g11pole20\_fin.dat";} |
---|
1150 | |
---|
1151 | All the parameters for âinsertionâ is optional, the default value for scaling1 and scaling2 are 1, |
---|
1152 | the default âmethodâ is 3 which means spline interpolation, the default âNâ is 1, the default |
---|
1153 | values for all the other parameters are 0. |
---|
1154 | |
---|
1155 | \subsection{RF CAVITY} |
---|
1156 | |
---|
1157 | \latticedef{Element\_Name}{cavity,}{Frequency = RF frequency, Voltage = RF voltage, Phase = synchrotron |
---|
1158 | Phase, harnum = harmonic number of the RF cavity;} |
---|
1159 | |
---|
1160 | |
---|
1161 | \begin{table}[htbp] |
---|
1162 | \centering |
---|
1163 | \caption{Parameters of RF cacity.} |
---|
1164 | \label{tab:RFCavity-para} |
---|
1165 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
1166 | \hline |
---|
1167 | \textbf{Parameter Name} & \textbf{Units} &\textbf{Default} & \textbf{Description} \\ |
---|
1168 | \hline |
---|
1169 | \textbf{frequency} & [Hz] & ??? & RF frequency \\ |
---|
1170 | \hline |
---|
1171 | \textbf{voltage} & [Volt] & ??? & RF voltage \\ |
---|
1172 | \hline |
---|
1173 | \textbf{phase} & [degree] & ??? & synchrotron phase \\ |
---|
1174 | \hline |
---|
1175 | \textbf{harnum} & - & ??? & harmonic number \\ |
---|
1176 | \hline |
---|
1177 | \end{tabular} |
---|
1178 | \end{table} |
---|
1179 | |
---|
1180 | |
---|
1181 | \vspace{0.05in} |
---|
1182 | \textit{Example:} |
---|
1183 | \latticedef{CAV:}{Cavity,}{Frequency = 499.95e6, Voltage=1.22e6, phase = 30, harnum=328;} |
---|
1184 | |
---|
1185 | The harmonic number of the RF cavity is mandatory, and the other parameters of âcavityâ are |
---|
1186 | optional, the default values are 0. |
---|
1187 | |
---|
1188 | \subsection{CORRECTOR} |
---|
1189 | |
---|
1190 | \latticedef{Element\_Name:}{corrector,}{horizontal/vertical, method = integrated method;} |
---|
1191 | |
---|
1192 | \begin{table}[htbp] |
---|
1193 | \centering |
---|
1194 | \caption{Parameters of correctors.} |
---|
1195 | \label{tab:corrector-para} |
---|
1196 | \begin{tabular}{| p{0.2\linewidth} | p{0.2\linewidth} | p{0.1\linewidth} | p{0.4\linewidth} |} |
---|
1197 | \hline |
---|
1198 | \textbf{Horizontal / vertical} & - & ??? & âhorizontalâ: horizontal corrector; âverticalâ: vertical |
---|
1199 | corrector \\ |
---|
1200 | \hline |
---|
1201 | \textbf{method} & - & ??? & 1, 2, 4. Order of symplectic integration method. |
---|
1202 | Value â1â means 1st order, â2â means 2nd order, and â4â means 4th order \\ |
---|
1203 | \hline |
---|
1204 | \end{tabular} |
---|
1205 | \end{table} |
---|
1206 | |
---|
1207 | |
---|
1208 | \vspace{0.05in} |
---|
1209 | \textit{Example 1:} |
---|
1210 | \latticedef{CH:}{corrector,}{horizontal, method=intmeth;} |
---|
1211 | It defines a horizontal corrector. |
---|
1212 | |
---|
1213 | \vspace{0.05in} |
---|
1214 | \textit{Example 2:} |
---|
1215 | \latticedef{CV:}{corrector,}{vertical, method=intmeth;} |
---|
1216 | It defines a vertical corrector. |
---|
1217 | |
---|
1218 | The parameters of âcorrectorâ are optional, the default value for âmethodâ is 0. |
---|
1219 | |
---|
1220 | \notespace{NOTES:} |
---|
1221 | For a lattice with correctors, user must specify the name of corrector in the Tracy |
---|
1222 | input file with the commands: |
---|
1223 | \tracycommand{h\_corr}{HCM} |
---|
1224 | or |
---|
1225 | \tracycommand{v\_corr}{VCM} |
---|
1226 | Here \tracypara{HCM} is the name of the corrector defined in the lattice for horizontal |
---|
1227 | orbit correction (????); \tracypara{VCM} is the name of the corrector defined in the |
---|
1228 | lattice for vertical orbit correction. |
---|
1229 | |
---|
1230 | |
---|
1231 | \subsection{MARKER} |
---|
1232 | |
---|
1233 | \latticedef{Element\_Name:}{marker;}{} |
---|
1234 | |
---|
1235 | \subsection{BEAM POSITION MONITOR (To be updated)} |
---|
1236 | BPM is a special marker in the lattice; the âsymbolâ name must be âBPMâ (???). User can |
---|
1237 | define the BPM as:???? |
---|
1238 | \latticedef{BPM:}{type;}{} |
---|
1239 | |
---|
1240 | Normally Its type is defined as âMarkerâ type, but in order to include the misalignment |
---|
1241 | error of BPM into the lattice, it must be defined as âBeam Position Monitorâ type |
---|
1242 | which is in fact multipole type, since only the element with multipole type is saved |
---|
1243 | with displacement error, field error, etc. |
---|
1244 | |
---|
1245 | \notespace{NOTES:} |
---|
1246 | For lattice with BPMs, user must specify the name of BPM in the Tracy input file |
---|
1247 | with the command: |
---|
1248 | \latticedef{bpm}{beaPosMonitor} |
---|
1249 | Here âbeaPosMonitorâ is the name of the BPMs defined in the lattice. |
---|
1250 | |
---|
1251 | \subsection{GIRDER} |
---|
1252 | Girder is a special element, itâs the girder used in the real machine to support the magnetic elements and other elements. It is defined as: |
---|
1253 | Symbol: type; |
---|
1254 | |
---|
1255 | Normally Its type is defined as âMarkerâ type, but in order to include the misalignment error of girder into the lattice, it must be defined as âmultipoleâ type, since only the element with multipole type is saved with displacement error, field error, etc. |
---|
1256 | For convenience, itâs better to define the beginning of the girder and also the end of the girder, and the elements between the beginning and end of the girders are the elements who are put on the girder in the real machine. |
---|
1257 | |
---|
1258 | Notice: |
---|
1259 | For lattice with girders, |
---|
1260 | User must specify the name of girder in the input file â*.prmâ with the commands: |
---|
1261 | gs Girder\_Start |
---|
1262 | ge Girder\_End |
---|
1263 | |
---|
1264 | Here âGirder\_Startâ is the name of the start of girder defined in the lattice; âGirder\_Endâ is the name of the end of girder defined in the lattice. |
---|
1265 | |
---|
1266 | \subsection{SOLENOID...TO BE UPDATED...} |
---|
1267 | |
---|
1268 | |
---|
1269 | \subsection{ELEMENT BLOCK} |
---|
1270 | To construct the element block, use the following format: |
---|
1271 | Symbol: elem1, elem2,âŠ., block1,block2; |
---|
1272 | Here âSymbolâ is the name of the element block, and âelem1â, âelem2â, âblock1â, âblock2â are the element or sub element blocks in this element block. |
---|
1273 | If there are N the same element/block subsequently, user can use âN*element/blockâ to simply the definition. For example: |
---|
1274 | SINJ: SD1a, ssep, 3*SEP,esep,SD1c,eHU600,SD1d; |
---|
1275 | In this example element block, there are 9 elements/blocks, and 3 elements/blocks âSEPâ subsequently. |
---|
1276 | |
---|
1277 | \subsection{LINE} |
---|
1278 | User can define the cell structure using the command: |
---|
1279 | |
---|
1280 | CELL : $\langle$ block name $\rangle$, SYMMETRY=$\langle$ symmetry $\rangle$; |
---|
1281 | |
---|
1282 | $\langle$ block name $\rangle$ is the name of a block; $\langle$ symmetry $\rangle$ is the number of super symmetry or the number of the block in the ring. |
---|
1283 | |
---|
1284 | Example: |
---|
1285 | |
---|
1286 | CELL: BL1, Symmetry=12; |
---|
1287 | |
---|
1288 | This example defines the cell with block âBL1â, and the number of super symmetry is 12. The output of the Tracy3 with symmetry large than 1 will give the |
---|
1289 | tunes and chromaticities in one symmetric period. |
---|
1290 | |
---|
1291 | \subsection{RING} |
---|
1292 | To define the ring, use the command: |
---|
1293 | RING: elem, blockâŠ. |
---|
1294 | Itâs similar to define an element block, but must with the fixed symbol name âRINGâ. For example: |
---|
1295 | RING: DEBUT,SUP1,SUP2,SUP3,SUP4,CAV,FIN; |
---|
1296 | 5.1.23 End line |
---|
1297 | To end the lattice file, user needs to use the following command at the end of the lattice file: |
---|
1298 | End; |
---|
1299 | This command is mandatory. |
---|
1300 | |
---|
1301 | |
---|
1302 | \section{Commands} |
---|
1303 | The following commands turn on the boolean flags in the code to set the machine parameters and carry on different calculations. All these commands are optional; user can choose whichever they need. If user wants to use the flag, they can write the flag in the script, if they do not want to use it, they can delete or comment out (add â\#â at the beginning of command line) the flag. The Boolean flags in the user input script have the following features: |
---|
1304 | If the flags are not active, then the default values for all the boolean commands are false. |
---|
1305 | The code will execute the command according to the sequence defined in the input script â*.prmâ. For example, |
---|
1306 | FitTune4Flag    qp7a qp7b qp9a qp9b 18.18 10.28 |
---|
1307 | ReadMultipoleFlag |
---|
1308 | FitTune4Flag    qp7a qp7b qp9a qp9b 18.202 10.317 |
---|
1309 | The code will fit tunes to the target tunes (18.18 10.28), and then read multipole field errors into the lattice, then fit the tunes to a new set of values (18.202 10.317). |
---|
1310 | User can define the same Boolean commands as often as they want in the same input script; but user can only define maximum 500 commands in one input script. |
---|
1311 | The user defined script can be used both for the non-parallel and parallel version Tracy; the output files are the same for both versions. |
---|
1312 | |
---|
1313 | \subsection{QuadFringeOnFlag } |
---|
1314 | To activate quadrupole fringe field, use the command:\\ |
---|
1315 | QuadFringeOnFlag\\ |
---|
1316 | in the â*.prmâ script. With this command, user can define the fringe field at the entrance or exit of the quadrupole together with the command FF1 = 1 or FF2 = 1 of the quadrupoles which are defined in the lattice file; if FF1 or FF2 not equals to 1, then there is no fringe field at the entrance or exit of the quadrupoles even if QuadFringeOnFlag is active in the â*.prmâ file. |
---|
1317 | This flag is a global flag, if user set this flag in the input script, it will always have effects until this flag is reset. |
---|
1318 | |
---|
1319 | \subsection{QuadFringeOffFlag } |
---|
1320 | To deactivate quadrupole fringe field, use the command: |
---|
1321 | QuadFringeOffFlag |
---|
1322 | With this command, user can deactivate the fringe field at the entrance and exit of the quadrupole, even if FF1 = 1 or FF2 = 1 for the quadrupole in the lattice file. |
---|
1323 | This flag is a global flag, if user set this flag in the input script, it will always have effects until this flag is reset. |
---|
1324 | |
---|
1325 | \subsection{RFvoltageFlag} |
---|
1326 | User can reset the RF voltage by setting âRFvoltageFlagâ to replace the value of RF voltage which is defined in the lattice. For example: |
---|
1327 | RFvoltageFlag 3000000 |
---|
1328 | Here âRFvoltageFlagâ is the name of the keyword command, â3000000â is the value of RF voltage with the unit [volt]. |
---|
1329 | If the ring has more than one RF cavities, the related parameters are defined as the total values for one RF cavity. |
---|
1330 | |
---|
1331 | \subsection{PrintTrackFlag} |
---|
1332 | To print the coordinates tracked around COD at each element to a file, use the command: |
---|
1333 | PrintTrackFlag track\_file x px y py delta ctau nturn |
---|
1334 | |
---|
1335 | For example: |
---|
1336 | PrintTrackFlag track.out 0.001 0.0 0.0 0.0 0.0 0.0 50 |
---|
1337 | |
---|
1338 | The parameters and the default values of âPrintTrackFlagâ are shown in Table . |
---|
1339 | |
---|
1340 | \begin{table}[h] |
---|
1341 | \centering |
---|
1342 | \caption{} |
---|
1343 | \label{} |
---|
1344 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1345 | \hline |
---|
1346 | \hline |
---|
1347 | \end{tabular*} |
---|
1348 | \end{table} |
---|
1349 | |
---|
1350 | Table Parameters of command "PrintTrackFlag". |
---|
1351 | Name |
---|
1352 | Description |
---|
1353 | Default value |
---|
1354 | Unit |
---|
1355 | track\_file |
---|
1356 | File to save the tracked coordinates around each lattice element |
---|
1357 | track.out |
---|
1358 | - |
---|
1359 | x |
---|
1360 | Start tracking horizontal coordinate |
---|
1361 | 0.001 |
---|
1362 | [m] |
---|
1363 | px |
---|
1364 | Start tracking horizontal canonical momentum px normalized by reference momentum p0, that is: px = px/p0. Normally px is approximate as horizontal deviation with unit [rad]. |
---|
1365 | 0.0 |
---|
1366 | |
---|
1367 | - |
---|
1368 | y |
---|
1369 | Start tracking vertical coordinate |
---|
1370 | 0.0 |
---|
1371 | [m] |
---|
1372 | py |
---|
1373 | Start tracking vertical canonical momentum py normalized by reference momentum p0, that is: py = py/p0. Normally px is approximate as vertical deviation with unit [rad]. |
---|
1374 | 0.0 |
---|
1375 | |
---|
1376 | - |
---|
1377 | delta |
---|
1378 | Start tracking relative energy offset |
---|
1379 | 0.0 |
---|
1380 | - |
---|
1381 | ctau |
---|
1382 | Start tracking longitudinal coordinate |
---|
1383 | 0.0 |
---|
1384 | [m] |
---|
1385 | nturn |
---|
1386 | Number of turn for tracking |
---|
1387 | 50 |
---|
1388 | - |
---|
1389 | |
---|
1390 | \subsection{PrintTrackElemFlag} |
---|
1391 | To print the coordinates tracked (NOT around COD) at a certain element to a file, use the command: |
---|
1392 | PrintTrackFlag track\_file x px y py delta ctau nelem1 nelem2 |
---|
1393 | |
---|
1394 | For example: |
---|
1395 | PrintTrackFlag track.out 0.001 0.0 0.0 0.0 0.0 0.0 50 1 2 |
---|
1396 | |
---|
1397 | The parameters and the default values of âPrintTrackElemFlagâ are shown in Table . |
---|
1398 | |
---|
1399 | \begin{table}[h] |
---|
1400 | \centering |
---|
1401 | \caption{} |
---|
1402 | \label{} |
---|
1403 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1404 | \hline |
---|
1405 | \hline |
---|
1406 | \end{tabular*} |
---|
1407 | \end{table} |
---|
1408 | |
---|
1409 | Table Parameters of command "PrintTrackElemFlag". |
---|
1410 | Name |
---|
1411 | Description |
---|
1412 | Default value |
---|
1413 | Unit |
---|
1414 | track\_file |
---|
1415 | File to save the tracked coordinates around each lattice element |
---|
1416 | track.out |
---|
1417 | - |
---|
1418 | x |
---|
1419 | Start tracking horizontal coordinate |
---|
1420 | 0.001 |
---|
1421 | [m] |
---|
1422 | px |
---|
1423 | Start tracking horizontal canonical momentum px normalized by reference momentum p0, that is: px = px/p0. Normally px is approximate as horizontal deviation with unit [rad]. |
---|
1424 | 0.0 |
---|
1425 | |
---|
1426 | - |
---|
1427 | y |
---|
1428 | Start tracking vertical coordinate |
---|
1429 | 0.0 |
---|
1430 | [m] |
---|
1431 | py |
---|
1432 | Start tracking vertical canonical momentum py normalized by reference momentum p0, that is: py = py/p0. Normally px is approximate as vertical deviation with unit [rad]. |
---|
1433 | 0.0 |
---|
1434 | |
---|
1435 | - |
---|
1436 | delta |
---|
1437 | Start tracking relative energy offset |
---|
1438 | 0.0 |
---|
1439 | - |
---|
1440 | ctau |
---|
1441 | Start tracking longitudinal coordinate |
---|
1442 | 0.0 |
---|
1443 | [m] |
---|
1444 | nelem1 |
---|
1445 | index of start lattice element for tracking |
---|
1446 | |
---|
1447 | nelem2 |
---|
1448 | index of end lattice element for tracking |
---|
1449 | |
---|
1450 | \subsection{PrintTwissFlag} |
---|
1451 | |
---|
1452 | Print Twiss parameters to a user defined file \\ |
---|
1453 | |
---|
1454 | With the command âPrintTwissFlagâ, Tracy 3 will print the Twiss parameters to a user defined file. The format is: |
---|
1455 | PrintTwissFlag user\_defined\_file |
---|
1456 | |
---|
1457 | If user use the command PrintTwissFlag but without define the file name, then the code will print the Twiss parameters to a default file âtwiss.outâ. |
---|
1458 | |
---|
1459 | \subsection{PrintCODFlag} |
---|
1460 | Print COD (Close Orbit Distortion) to a user defined file\\ |
---|
1461 | |
---|
1462 | With the command âPrintCODFlagâ, the code will print the close orbit distortion to a user defined file. The format is: |
---|
1463 | PrintCODFlag user\_defined\_file |
---|
1464 | If user use the command PrintCODFlag but without defining the file name, then the closed orbit will be printed to the default file âprintcod.outâ. |
---|
1465 | In Tracy 3, close orbit file âcod.outâ is automatically generated after reading the lattice. |
---|
1466 | In the outuput file of the command PrintCODFlag, the data is saved in the following format: |
---|
1467 | \# i name s code betax nux betay nuy xcod ycod dSx dSy dipx dipy |
---|
1468 | \# [m] [m] [m] [mm] [mm] [mm] [mm] [mrad] [mrad] |
---|
1469 | \# |
---|
1470 | Where â\#â denotes the command line, the meanings of the above parameters are shown in Table . |
---|
1471 | |
---|
1472 | \begin{table}[h] |
---|
1473 | \centering |
---|
1474 | \caption{} |
---|
1475 | \label{} |
---|
1476 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1477 | \hline |
---|
1478 | \hline |
---|
1479 | \end{tabular*} |
---|
1480 | \end{table} |
---|
1481 | |
---|
1482 | Table Parameters in the output file of close orbit. |
---|
1483 | Name |
---|
1484 | Description |
---|
1485 | Unit |
---|
1486 | i |
---|
1487 | Number of the element |
---|
1488 | - |
---|
1489 | name |
---|
1490 | Element name defined in lattice |
---|
1491 | - |
---|
1492 | s |
---|
1493 | Longitudinal length |
---|
1494 | [m] |
---|
1495 | code |
---|
1496 | Symbol for the element: |
---|
1497 | 0.5 dipole |
---|
1498 | -1.0 defocusing quadrupole |
---|
1499 | 1.0 focusing quadrupole |
---|
1500 | -1.5 defocusing sextupole |
---|
1501 | 1.5 focusing sextupole |
---|
1502 | 0 other element |
---|
1503 | |
---|
1504 | |
---|
1505 | |
---|
1506 | - |
---|
1507 | betax |
---|
1508 | Horizontal beta function |
---|
1509 | [m] |
---|
1510 | nux |
---|
1511 | Horizontal tune |
---|
1512 | - |
---|
1513 | betay |
---|
1514 | Vertical beta function |
---|
1515 | [m] |
---|
1516 | nuy |
---|
1517 | Vertical tune |
---|
1518 | - |
---|
1519 | xcod |
---|
1520 | Horizontal closed orbit distortion |
---|
1521 | [mm] |
---|
1522 | ycod |
---|
1523 | Vertical closed orbit distortion |
---|
1524 | [mm] |
---|
1525 | dSx |
---|
1526 | Horizontal displacement of the element |
---|
1527 | [mm] |
---|
1528 | dSy |
---|
1529 | vertical displacement of the element |
---|
1530 | [mm[ |
---|
1531 | dipx |
---|
1532 | Horizontal dipole strength of the element |
---|
1533 | [mrad] |
---|
1534 | dipy |
---|
1535 | vertical dipole strength of the element |
---|
1536 | [mrad] |
---|
1537 | |
---|
1538 | \subsection{ReadChamberFlag} |
---|
1539 | Read vacuum chamber setting from an external file \\ |
---|
1540 | |
---|
1541 | To read the vacuum chamber from the user defined chamber file, use the command: |
---|
1542 | ReadChamberFlag Chamber\_example.dat |
---|
1543 | In the file âChamber\_example.datâ, user can specify the vacuum limit at the different region of the lattice; the format of the chamber file is given in section . |
---|
1544 | |
---|
1545 | \subsection{ReadfefileFlag} |
---|
1546 | Read lattice element multipole field errors from an external file \\ |
---|
1547 | |
---|
1548 | To read the multipole field errors of the lattice elements from the user defined file, use the command: |
---|
1549 | ReadfefileFlag dip.fe |
---|
1550 | Tracy will read the systematic and random multipole field errors of the lattice elements defined in the file âdip.feâ, and then replace the corresponding field components of the elements with the new field errors. The formats to specify the systematic and random multipole field errors in a file are given in section Error: Reference source not found. |
---|
1551 | |
---|
1552 | \subsection{ReadaefileFlag} |
---|
1553 | Read lattice element misalignment errors from a file \\ |
---|
1554 | |
---|
1555 | To read the misalignment error of the lattice elements from the user defined file, use the command: |
---|
1556 | ReadaefileFlag dip.ae |
---|
1557 | Tracy will read the systematic and random misalignment errors of the lattice elements from the file âdip.feâ, and replace the misalignment errors of the corresponding components of the elements. The formats to define the systematic and random misalignment errors of the lattice elements in a file are given in section . |
---|
1558 | |
---|
1559 | \subsection{CODCorrectFlag} |
---|
1560 | Closed orbit (COD) correction \\ |
---|
1561 | |
---|
1562 | The orbit distortion is corrected using SVD (Singular Value Decomposition) method in Tracy 3. In order to do orbit correction, user needs to call the command |
---|
1563 | CODCorrectFlag |
---|
1564 | and then specify the following parameters in the user defined â*.prmâ file. |
---|
1565 | Specify the element names of horizontal, vertical correctors, and beam position monitors used in the orbit correction as the following examples: |
---|
1566 | h\_corr HC |
---|
1567 | v\_corr VC |
---|
1568 | BPM bpm |
---|
1569 | User also need to specify the states of the correctors to trigger on/off the correction using the following parameters: |
---|
1570 | hcorr\_file hcorr\_56nom.state |
---|
1571 | vcorr\_file vcorr\_56nom.state |
---|
1572 | In the file âhcorr\_56nom.stateâ, a list of numbers (1 or 0) are given to the horizontal correctors, according to the sequence in the lattice; â1â means the corresponding corrector is used for horizontal orbit correction, â0â means this corrector is not used in the horizontal orbit correction. The definition rules of vertical corrector states in âvcorr\_56nom.stateâ are the same as âvcorr\_56nom.stateâ. |
---|
1573 | |
---|
1574 | This parameter defines number of iterations to correct the orbit distortion, this value should be an integer number not smaller than 1. |
---|
1575 | n\_orbit 3 |
---|
1576 | This parameter defines number of singular values in H-plane, must be not larger than the number of correctors used for orbit correction |
---|
1577 | nwh 60 |
---|
1578 | This defines number of singular values in V-plane, must be not larger than the number of correctors used for orbit correction |
---|
1579 | nwv 60 |
---|
1580 | |
---|
1581 | In Tracy 3, during the closed orbit correction: |
---|
1582 | 1) Beam response matrices between beam position monitors and horizontal/vertical correctors are calculated and written to the files âsvdh.outâ/ âsvdv.outâ, respectively. The maximum number of horizontal/vertical correctors used for orbit correction is 250. |
---|
1583 | 2) The code corrects the closed orbit distortion. |
---|
1584 | 3) Horizontal and vertical orbits at the locations of all beam position monitors during the correction are saved to the files âhorbit.outâ and âvorbit.outâ, respectively. |
---|
1585 | 4) A file âOrScanFile.outâ will be saved with the summaries of the mean and RMS values of the orbits before and after correction. |
---|
1586 | 5) Finally, Twiss parameters, closed orbit distortion at the lattice elements are saved to a summary file âsummary\_miserr\_codcorr.outâ, the format of this file is explained in Table . |
---|
1587 | |
---|
1588 | \subsection{TuneTracFlag} |
---|
1589 | |
---|
1590 | Get tunes by tracking \\ |
---|
1591 | |
---|
1592 | To get tunes by tracking, use command: |
---|
1593 | TuneTracFlag |
---|
1594 | The tunes obtained by tracking are printed on the screen. |
---|
1595 | |
---|
1596 | \subsection{ChromTracFlag} |
---|
1597 | Get chromaticities by tracking \\ |
---|
1598 | |
---|
1599 | To get chromaticity by tracking, use command: |
---|
1600 | ChromTracFlag |
---|
1601 | The chromaticities obtained by tracking are printed on the screen. |
---|
1602 | |
---|
1603 | \subsection{AmplitudeTuneShiftFlag} |
---|
1604 | |
---|
1605 | Tune shift with amplitude \\ |
---|
1606 | |
---|
1607 | |
---|
1608 | To calculate tune shift with amplitude, one needs to use the following command: |
---|
1609 | AmplitudeTuneShiftFlag nudx\_file nudz\_file nxpoint nypoint nturn xmax ymax delta |
---|
1610 | For example: |
---|
1611 | AmplitudeTuneShiftFlag nudx.out nudz.out 50 30 516 0.035 0.02 0.0 |
---|
1612 | |
---|
1613 | The meanings of parameters and default values of command âAmplitudeTuneShiftFlagâ are shown in Table . If user uses the command AmplitudeTuneShiftFlag without parameters, then the code will use all the default values. |
---|
1614 | |
---|
1615 | \begin{table}[h] |
---|
1616 | \centering |
---|
1617 | \caption{} |
---|
1618 | \label{} |
---|
1619 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1620 | \hline |
---|
1621 | \hline |
---|
1622 | \end{tabular*} |
---|
1623 | \end{table} |
---|
1624 | |
---|
1625 | Table Parameters of the command to calculate tune shift with amplitude |
---|
1626 | Parameters |
---|
1627 | Meaning |
---|
1628 | Default values |
---|
1629 | nudx\_file |
---|
1630 | File to save the calculated tune shift with horizontal amplitude |
---|
1631 | nudx.out |
---|
1632 | nudz\_file |
---|
1633 | File to save the calculated tune shift with vertical amplitude |
---|
1634 | nudz.out |
---|
1635 | nxpoint |
---|
1636 | Number of points in horizontal direction |
---|
1637 | 31 |
---|
1638 | nypoint |
---|
1639 | Number of points in vertical direction |
---|
1640 | 21 |
---|
1641 | nturn |
---|
1642 | Number of turns to track tune |
---|
1643 | 516 |
---|
1644 | xmax |
---|
1645 | Maximum amplitude of x with the unit [m] |
---|
1646 | 0.025 |
---|
1647 | ymax |
---|
1648 | Maximum amplitude of y with the unit [m] |
---|
1649 | 0.005 |
---|
1650 | delta |
---|
1651 | Energy offset of the particle |
---|
1652 | 0.0 |
---|
1653 | |
---|
1654 | \subsection{EnergyTuneShiftFlag} |
---|
1655 | Tune shift with energy \\ |
---|
1656 | |
---|
1657 | |
---|
1658 | To calculate tune shift with energy, one needs to use the command: |
---|
1659 | EnergyTuneShiftFlag nudp\_file npoint nturn deltamax |
---|
1660 | For example: |
---|
1661 | EnergyTuneShiftFlag nudptest.out 31 1026 0.06 |
---|
1662 | The meaning of parameters and default values of this command are shown in Table . |
---|
1663 | If user uses command EnergyTuneShiftFlag without parameters, then the code will use all the default values. |
---|
1664 | |
---|
1665 | \begin{table}[h] |
---|
1666 | \centering |
---|
1667 | \caption{} |
---|
1668 | \label{} |
---|
1669 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1670 | \hline |
---|
1671 | \hline |
---|
1672 | \end{tabular*} |
---|
1673 | \end{table} |
---|
1674 | |
---|
1675 | Table Parameters of the command to calculate tune shift with energy |
---|
1676 | parameter |
---|
1677 | meaning |
---|
1678 | default value |
---|
1679 | nudp\_file |
---|
1680 | File to save the calculated tune shift with energy |
---|
1681 | nudp.out |
---|
1682 | npoint |
---|
1683 | Number of points |
---|
1684 | 31 |
---|
1685 | nturn |
---|
1686 | Number of turns for tracking |
---|
1687 | 516 |
---|
1688 | deltamax |
---|
1689 | Maximum energy offset of the particle |
---|
1690 | 0.06 |
---|
1691 | |
---|
1692 | \subsection{FmapFlag} |
---|
1693 | Frequency map analysis for on momentum particle. |
---|
1694 | Track the coordinates (x, px, y, py, delta, ctau) of the particle, |
---|
1695 | the coordinates (x, px, y, py) are tracked around the closed orbit; |
---|
1696 | while (delta, ctau) is tracked around the zero orbit. |
---|
1697 | |
---|
1698 | The grid of the particle is x= 1e-6 + xcod ~ xmax + xcod, with the |
---|
1699 | step size xmax/nturn, |
---|
1700 | z= 1e-6 + zcod ~ zmax + zcod, with the |
---|
1701 | step size ymax/nturn; px = 0 + pxcod; pz = 0 + pzcod; |
---|
1702 | ctau = 0; delta = set value. |
---|
1703 | |
---|
1704 | To do frequency map analysis for the on momentum particle, use the command: |
---|
1705 | FmapFlag fmap\_file nxpoint nypoint nturn xmax ymax delta diffusion \\ |
---|
1706 | or |
---|
1707 | FmapFlag fmap\_file nxpoint nypoint nturn xmax ymax delta diffusion printloss \\ |
---|
1708 | |
---|
1709 | For example: |
---|
1710 | FmapFlag fmap.out 31 21 516 0.025 0.005 0.0 true |
---|
1711 | or |
---|
1712 | FmapFlag fmap.out 31 21 516 0.025 0.005 0.0 true true |
---|
1713 | |
---|
1714 | |
---|
1715 | The meaning of parameters and default values of this command are shown in Table . If user uses command FmapFlag without parameters, then the code will use all the default values. |
---|
1716 | |
---|
1717 | \begin{table}[h] |
---|
1718 | \centering |
---|
1719 | \caption{} |
---|
1720 | \label{} |
---|
1721 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1722 | \hline |
---|
1723 | \hline |
---|
1724 | \end{tabular*} |
---|
1725 | \end{table} |
---|
1726 | |
---|
1727 | Table Parameters of the command to do frequency map analysis for on momentum particle. |
---|
1728 | Parameters |
---|
1729 | meaning |
---|
1730 | Default values |
---|
1731 | fmap\_file |
---|
1732 | File to save the calculated frequency map analysis |
---|
1733 | fmap.out |
---|
1734 | nxpoint |
---|
1735 | Number of points in the horizontal direction |
---|
1736 | 31 |
---|
1737 | nypoint |
---|
1738 | Number of points in the vertical direction |
---|
1739 | 21 |
---|
1740 | nturn |
---|
1741 | Number of turns for tracking; if ``diffusion'' is |
---|
1742 | true, then the tunes will calculated in the first Nturn |
---|
1743 | and then the second Nturn, and the tune difference |
---|
1744 | between these two tunes is the tune diffusion. |
---|
1745 | 516 |
---|
1746 | xmax |
---|
1747 | Maximum amplitude in the horizontal direction with the unit [m] |
---|
1748 | 0.025 |
---|
1749 | ymax |
---|
1750 | Maximum amplitude in the vertical direction with the unit [m] |
---|
1751 | 0.005 |
---|
1752 | delta |
---|
1753 | Energy offset of the particle |
---|
1754 | 0.0 |
---|
1755 | diffusion |
---|
1756 | Boolean flag, true/false; to compute tune diffusion at the first N turns and second N turns. |
---|
1757 | true |
---|
1758 | |
---|
1759 | printloss (optional) |
---|
1760 | Boolean flag, true/flase; print out the last information of the tracked particleto and external file? If true, the output file is ``fmap\_file.loss''. |
---|
1761 | \subsection{FmapdpFlag} |
---|
1762 | Frequency map analysis for off momentum particle \\ |
---|
1763 | |
---|
1764 | To do frequency map analysis for the off momentum particle, use the command: |
---|
1765 | FmapdpFlag fmapdp\_file nxpoint nepoint nturn xmax emax y diffusion |
---|
1766 | or |
---|
1767 | FmapdpFlag fmapdp\_file nxpoint nepoint nturn xmax emax y diffusion printloss |
---|
1768 | |
---|
1769 | The meaning of parameters and default values are shown in Table . If user only uses the command FmapdpFlag but without defining all the parameters, then the code uses the default values. |
---|
1770 | |
---|
1771 | \begin{table}[h] |
---|
1772 | \centering |
---|
1773 | \caption{} |
---|
1774 | \label{} |
---|
1775 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1776 | \hline |
---|
1777 | \hline |
---|
1778 | \end{tabular*} |
---|
1779 | \end{table} |
---|
1780 | |
---|
1781 | Table Parameters of the command âFmapdpFlagâ. |
---|
1782 | parameters |
---|
1783 | meaning |
---|
1784 | default value |
---|
1785 | fmapdp\_file |
---|
1786 | File to save the calculated frequency map analysis |
---|
1787 | fmapdp.out |
---|
1788 | nxpoint |
---|
1789 | Number of points in the horizontal direction |
---|
1790 | 31 |
---|
1791 | nepoint |
---|
1792 | Number of points for the energy |
---|
1793 | 21 |
---|
1794 | nturn |
---|
1795 | Number of turns for tracking |
---|
1796 | 516 |
---|
1797 | xmax |
---|
1798 | Maximum amplitude in the horizontal direction with the unit [m] |
---|
1799 | 0.025 |
---|
1800 | emax |
---|
1801 | Maximum energy offset of the particle |
---|
1802 | 0.005 |
---|
1803 | y |
---|
1804 | Amplitude in the vertical direction with the unit [m] |
---|
1805 | 0.0 |
---|
1806 | diffusion |
---|
1807 | Boolean flag to compute tune diffusion |
---|
1808 | true |
---|
1809 | |
---|
1810 | printloss (optional) |
---|
1811 | Boolean flag, true/flase; print out the last information of the tracked particleto and external file? If true, the output file is ``fmapdp\_file.loss''. |
---|
1812 | |
---|
1813 | |
---|
1814 | \subsection{ErrorCouplingFlag} |
---|
1815 | Add coupling by the random rotation of the full quadrupoles \\ |
---|
1816 | |
---|
1817 | To simulate coupling in the lattice, use can add the random rotation error to all the full quadrupole, using the command as the following example: |
---|
1818 | ErrorCouplingFlag 0 0.0007 |
---|
1819 | In this example, â0â is the random seed number; â0.0007â is the RMS value of the rotation angles of all the quadrupoles with the unit [rad]. |
---|
1820 | After setting the rotation error in the lattice, the code will generate a file with the file name âflat\_file\_errcoupling\_full.datâ at the current working directory, user can check the error setting of quadrupoles in this file; then the coupling will be calculated and Twiss parameters after adding the random rotation errors will be saved to the file âlinlat\_errcoupling.outâ. |
---|
1821 | |
---|
1822 | \subsection{ErrorCoupling2Flag} |
---|
1823 | Add coupling by random rotation of the half quadrupoles \\ |
---|
1824 | |
---|
1825 | In order to get the beam parameters in the middle of the quadrupoles, each quadrupole in the lattice can be cut into two parts. In such case, the coupling of the lattice can be generated by random rotation of all the half quadrupoles in the lattice, using the command as the following example: |
---|
1826 | ErrorCoupling2Flag 0 0.0007 |
---|
1827 | In this example, â0â is the random seed number; â0.0007â is the RMS value of the rotation angle of the quadrupole with the unit [rad]. |
---|
1828 | After setting the errors in the lattice, the code will generate a file at the current working directory with the file name âflat\_file\_errcoupling\_half.datâ, user can check the error setting of quadrupoles in this file. After adding the random rotation errors, the coupling will be calculated and Twiss parameters will be saved to the file âlinlat\_errcoupling2.outâ. |
---|
1829 | This command is dedicated for Soleil lattice in which each quadrupole is cut into two half quadrupoles. |
---|
1830 | |
---|
1831 | \subsection{CouplingFlag} |
---|
1832 | Calculate coupling and emittance \\ |
---|
1833 | |
---|
1834 | To calculate coupling and emittance, use command: |
---|
1835 | CouplingFlag |
---|
1836 | After calculation, the coupling and the emittance will be printed on the screen, and the Twiss parameters will be automatically saved to the file âlinlat\_coupling.outâ. |
---|
1837 | |
---|
1838 | \subsection{MomentumAccFlag} |
---|
1839 | Calculate momentum acceptance by tracking \\ |
---|
1840 | |
---|
1841 | The following command calculate momentum acceptance at a predefined lattice region by tracking: |
---|
1842 | MomentumAccFlag MomAccFile TrackDim istart istop deltaminp |
---|
1843 | Deltamaxp nstepp deltaminn deltamaxn nstepn turns zinitial |
---|
1844 | For example: |
---|
1845 | MomentumAccFlag momacc.out 4D 1 209 0.01 0.05 100 -0.01 |
---|
1846 | -0.05 100 1026 0.0001 |
---|
1847 | The meaning of parameters and default values are shown in Table . If user uses MomentumAccFlag without parameters, then the code will use the default values. |
---|
1848 | |
---|
1849 | \begin{table}[h] |
---|
1850 | \centering |
---|
1851 | \caption{} |
---|
1852 | \label{} |
---|
1853 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1854 | \hline |
---|
1855 | \hline |
---|
1856 | \end{tabular*} |
---|
1857 | \end{table} |
---|
1858 | |
---|
1859 | Table Parameters of the command to calculate momentum acceptance |
---|
1860 | parameter |
---|
1861 | meaning |
---|
1862 | Default value |
---|
1863 | MomAccFile |
---|
1864 | File to save the tracked momentum acceptance at each element; saved in the current directory. |
---|
1865 | momentumacceptance.out |
---|
1866 | TrackDim |
---|
1867 | 4D/6D tracking to get the momentum acceptance |
---|
1868 | 6D |
---|
1869 | istart |
---|
1870 | Start element in the lattice for the tracking |
---|
1871 | 1 |
---|
1872 | istop |
---|
1873 | End element in the lattice for tracking |
---|
1874 | 108 |
---|
1875 | nstepp |
---|
1876 | Number of steps to do tracking in the positive energy range |
---|
1877 | 100 |
---|
1878 | nstepn |
---|
1879 | Number of steps to do tracking in the negative energy range |
---|
1880 | 100 |
---|
1881 | Deltaminp |
---|
1882 | Positive start energy of the tracking |
---|
1883 | 0.01 |
---|
1884 | Deltamaxp |
---|
1885 | Positive end energy of the tracking |
---|
1886 | 0.05 |
---|
1887 | Deltaminn |
---|
1888 | Negative start energy of the tracking |
---|
1889 | -0.01 |
---|
1890 | Deltamaxn |
---|
1891 | Negative end energy of the tracking |
---|
1892 | -0.05 |
---|
1893 | nturns |
---|
1894 | Number of turn |
---|
1895 | 1026 |
---|
1896 | zinitial |
---|
1897 | The initial vertical coordinate which is used to search for 6D closed orbit. This value should be a small value. |
---|
1898 | 0.0003 [m] |
---|
1899 | |
---|
1900 | |
---|
1901 | \subsection{ReadMultipoleFlag} |
---|
1902 | Read multipole field error from a file (SOLEIL lattice) \\ |
---|
1903 | |
---|
1904 | |
---|
1905 | After defining the file names of multipole field errors on SOLEIL storage ring (section and ), use the command: |
---|
1906 | ReadMultipoleFlag |
---|
1907 | to read multipole field errors and set the corresponding values to SOLEIL lattice. The multipole field errors of correctors and skew quadrupoles are added on the thick sextupoles which are integrated at the same magnets. The format of multipole errors file is given in section . |
---|
1908 | |
---|
1909 | After setting the multipole field errors in the lattice, the code will generate a file at the current working directory, and the file name is âflat\_file\_errmultipole.datâ, user can check the field components of the lattice elements in this file to verify the multipole field errors. |
---|
1910 | |
---|
1911 | \subsection{ReadVirtualSkewquadFlag} |
---|
1912 | Read the sources of coupling from a file (SOLEIL lattice) \\ |
---|
1913 | |
---|
1914 | The sources of coupling on SOLEIL storage ring can be read from an external file. Use the command: |
---|
1915 | ReadVirtualSkewquadFlag |
---|
1916 | to read and set the field strength to the virtual skew quadrupoles. Currently this command only works for Soleil lattice. |
---|
1917 | The coupling sources MUST be defined as the skew quadrupoles with the name âSQâ, the rules and related information are explained in section. |
---|
1918 | |
---|
1919 | \subsection{FitTuneFlag} |
---|
1920 | Fit tunes for the lattice with full quadrupole \\ |
---|
1921 | |
---|
1922 | Betatron tunes can be fit using two families of quadrupoles. The command is: |
---|
1923 | FitTuneFlag Quad1 Quad2 nux nuz |
---|
1924 | For example: |
---|
1925 | FitTuneFlag q7 q9 18.202 10.317 |
---|
1926 | The parameters of this command are shown in Table . |
---|
1927 | Table Parameters of the command âFitTuneFlagâ. |
---|
1928 | Parameters |
---|
1929 | Meaning |
---|
1930 | Default values |
---|
1931 | Quad1 |
---|
1932 | Quadrupole family used to fit the tunes |
---|
1933 | - |
---|
1934 | Quad2 |
---|
1935 | Quadrupole family used to fit the tunes |
---|
1936 | - |
---|
1937 | nux |
---|
1938 | Target horizontal tune |
---|
1939 | 0.0 |
---|
1940 | nuz |
---|
1941 | Target vertical tune |
---|
1942 | 0.0 |
---|
1943 | |
---|
1944 | After fitting the tunes, field strengths of the fitted quadrupoles before and after the fitting are printed to the screen; user can copy the new quadrupole field strengths to the lattice file for further analysis. |
---|
1945 | FitTuneFlag is a generic command; it works for the lattices with full qudrupoles. |
---|
1946 | |
---|
1947 | \subsection{FitTune4Flag} |
---|
1948 | Fit tunes for the lattice with half quadrupoles \\ |
---|
1949 | |
---|
1950 | For the lattice with each quadrupole cut into two pieces, betatron tunes can be fit using two families of quadrupoles. The command is: |
---|
1951 | FitTune4Flag Q1a Q1b Q2a Q2b nux nuz |
---|
1952 | The parameters of this command are shown in Table . |
---|
1953 | |
---|
1954 | \begin{table}[h] |
---|
1955 | \centering |
---|
1956 | \caption{} |
---|
1957 | \label{} |
---|
1958 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
1959 | \hline |
---|
1960 | \hline |
---|
1961 | \end{tabular*} |
---|
1962 | \end{table} |
---|
1963 | |
---|
1964 | Table Parameters of the command âFitTune4Flagâ. |
---|
1965 | Parameters |
---|
1966 | Meaning |
---|
1967 | Default values |
---|
1968 | Q1a |
---|
1969 | First half of the quadrupole family used to fit the tunes |
---|
1970 | - |
---|
1971 | Q1b |
---|
1972 | Second half of the quadrupole family used to fit the tunes |
---|
1973 | - |
---|
1974 | Q2a |
---|
1975 | First half of the quadrupole family used to fit the tunes |
---|
1976 | - |
---|
1977 | Q2b |
---|
1978 | Second half of the quadrupole family used to fit the tunes |
---|
1979 | - |
---|
1980 | nux |
---|
1981 | Target horizontal tune |
---|
1982 | 0.0 |
---|
1983 | nuz |
---|
1984 | Target vertical tune |
---|
1985 | 0.0 |
---|
1986 | |
---|
1987 | For example: |
---|
1988 | FitTune4Flag qp7a qp7b qp9a qp9b 18.202 10.317 |
---|
1989 | In this example, all the variables have the same meaning as the ones in the command âFitTuneFlagâ, except âqp7aâ and âqp7bâ are the two half pieces of the full quadrupole âqp7â, and âqp9aâ and âqp9bâ are the two half pieces of the full quadrupole 'qp9'. |
---|
1990 | After fitting the tunes, the field strengths of fitted quadrupole before and after the fitting are printed to the screen; user can copy the new field strengths of quadrupoles to the lattice file for further analysis. |
---|
1991 | FitTune4Flag is a command that works for the lattices in which each quadrupole are cut into two halves. |
---|
1992 | |
---|
1993 | \subsection{FitChromFlag} |
---|
1994 | Fit chromaticity \\ |
---|
1995 | |
---|
1996 | Chromaticities can be fit using two families of sextupoles, the command is: |
---|
1997 | FitChromFlag SX1 SX2 epsilon\_x epsilon\_z |
---|
1998 | The parameters of this command are shown in Table . |
---|
1999 | |
---|
2000 | \begin{table}[h] |
---|
2001 | \centering |
---|
2002 | \caption{} |
---|
2003 | \label{} |
---|
2004 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
2005 | \hline |
---|
2006 | \hline |
---|
2007 | \end{tabular*} |
---|
2008 | \end{table} |
---|
2009 | |
---|
2010 | Table Parameters of the command âFitChromFlagâ. |
---|
2011 | Parameters |
---|
2012 | Meaning |
---|
2013 | Default values |
---|
2014 | SX1 |
---|
2015 | First sextupole family used to fit the chromaticities |
---|
2016 | - |
---|
2017 | SX2 |
---|
2018 | Second sextupole family used to fit the chromaticities |
---|
2019 | - |
---|
2020 | epsilon\_x |
---|
2021 | Target horizontal chromaticity |
---|
2022 | 0.0 |
---|
2023 | epsilon\_z |
---|
2024 | Target vertical chromaticity |
---|
2025 | 0.0 |
---|
2026 | |
---|
2027 | For example: |
---|
2028 | FitChromFlag sx9 sx10 2.0 2.6 |
---|
2029 | After fitting the chromaticites, the field strengths of fitted sextupoles before and after the fitting are printed to the screen; user can copy the new field strengths of sextupoles to the lattice file for further analysis. |
---|
2030 | |
---|
2031 | \subsection{TouschekFlag (TO BE UPDATED)} |
---|
2032 | Touschek lifetime determined by RF acceptance \\ |
---|
2033 | |
---|
2034 | To calculate Touschek lifetime, use the following command: |
---|
2035 | TouschekFlag |
---|
2036 | Here the momentum acceptance is limited by the RF acceptance. |
---|
2037 | |
---|
2038 | \subsection{IBSFlag (TO BE UPDATED)} |
---|
2039 | Intra Beam Scattering (IBS) \\ |
---|
2040 | |
---|
2041 | |
---|
2042 | To calculate Intra Beam Scattering, use the command: |
---|
2043 | IBSFlag |
---|
2044 | |
---|
2045 | \subsection{TousTrackFlag (TO BE UPDATED)} |
---|
2046 | Touschek lifetime determined by the minimum value of RF acceptance and momentum acceptance \\ |
---|
2047 | |
---|
2048 | Touschek lifetime can be calculated by |
---|
2049 | TousTrackFlag |
---|
2050 | In this case, the energy acceptance at each lattice element is limited by the minimum value of RF acceptance and momentum acceptance obtained by tracking, and the chamber file MUST be defined in the user script. |
---|
2051 | |
---|
2052 | \subsection{PhaseSpaceFlag} |
---|
2053 | Obtain phase space by tracking \\ |
---|
2054 | |
---|
2055 | To calculate phase space, use the command: \\ |
---|
2056 | \textbf{PhaseSpaceFlag} Phase\_phase\_file Phase\_Dim Phase\_X Phase\_Px |
---|
2057 | Phase\_Y Phase\_Py Phase\_delta Phase\_ctau |
---|
2058 | Phase\_nturn damping\_flag |
---|
2059 | |
---|
2060 | For example: |
---|
2061 | \textbf{PhaseSpaceFlag} phasespace.out 6D 1e-6 0.0 1e-6 0.0 0.012 0.0 1000 false |
---|
2062 | |
---|
2063 | The meanings of parameters and defaults values of PhaseSpaceFlag are shown in Table \ref{tab:phasespace-para}. |
---|
2064 | If user uses PhaseSpaceFlag without parameters, then the code will use the default values. |
---|
2065 | |
---|
2066 | \begin{table}[h] |
---|
2067 | \centering |
---|
2068 | \caption{Parameters of the command \textbf{PhaseSpaceFlag} to calculate phase space.} |
---|
2069 | \label{tab:phasespace-para} |
---|
2070 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} p{0.2\linewidth} p{0.5\linewidth} p{0.15\linewidth} } |
---|
2071 | \hline |
---|
2072 | \hline |
---|
2073 | \textbf{Symbol} & \textbf{Units} & \textbf{Parameter} \\ |
---|
2074 | \hline |
---|
2075 | \textbf{Phase\_phase\_file} & File to save tracked phase space; |
---|
2076 | saved in the current directory. & phase.out \\ |
---|
2077 | \textbf{Phase\_Dim} & 4D~/~6D tracking & 4D \\ |
---|
2078 | \textbf{Phase\_X} & Horizontal coordinate at the start |
---|
2079 | point of tracking. & 0.0 \\ |
---|
2080 | \textbf{Phase\_Px} & Horizontal canonical momentum~/~derivative |
---|
2081 | at the start point of tracking. & 0.0 \\ |
---|
2082 | \textbf{Phase\_Y} & Vertical coordinate at the start point |
---|
2083 | of tracking. & 0.0 \\ |
---|
2084 | \textbf{Phase\_Py} & Vertical canonical momentum~/~derivative |
---|
2085 | at the start point of tracking. & 0.0 \\ |
---|
2086 | \textbf{Phase\_delta}& Energy at the start point of tracking & 0.0 \\ |
---|
2087 | \textbf{Phase\_ctau} & Longitudinal position at the start point |
---|
2088 | of tracking. & 0.0 \\ |
---|
2089 | \textbf{Phase\_nturn}& Number of turns for tracking & 512 \\ |
---|
2090 | \textbf{Damping\_flag}& Boolean flag to turn on~/~off the radiation |
---|
2091 | damping during the tracking. & false \\ |
---|
2092 | \hline |
---|
2093 | \hline |
---|
2094 | \end{tabular*} |
---|
2095 | \end{table} |
---|
2096 | |
---|
2097 | |
---|
2098 | \subsection{IDCorrFlag (Tested for TaiWan light source; TO BE CONTINUE DEVELOPPED.)} |
---|
2099 | Insertion device (ID) compensation \\ |
---|
2100 | |
---|
2101 | To compensate the beta beat introduced by the insertion devices, several families of Quadruoples can be used. Defining the following command in the â*.prmâ can active this action: |
---|
2102 | IDCorrFlag |
---|
2103 | User also needs to define the following parameters used for the compensation of insertion device: |
---|
2104 | N\_calls 1 |
---|
2105 | N\_steps 1 |
---|
2106 | N\_Fam 11 |
---|
2107 | IDCquads qs1 qs2 qs3 qs4 qs5 ql1 ql2 ql3 q1 q2 q3 |
---|
2108 | scl\_dbetax 5e-1 |
---|
2109 | scl\_dbetay 5e-1 |
---|
2110 | scl\_dnux 0.1 |
---|
2111 | scl\_dnuy 0.1 |
---|
2112 | scl\_nux 1e1 |
---|
2113 | scl\_nuy 1e1 |
---|
2114 | ID\_step 0.7 |
---|
2115 | |
---|
2116 | The meanings of the above commands and the default values used to do ID compensation using quadrupoles are shown in Table . |
---|
2117 | |
---|
2118 | \begin{table}[h] |
---|
2119 | \centering |
---|
2120 | \caption{} |
---|
2121 | \label{} |
---|
2122 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
2123 | \hline |
---|
2124 | \hline |
---|
2125 | \end{tabular*} |
---|
2126 | \end{table} |
---|
2127 | |
---|
2128 | Table Parameters of commands to do ID compensation using quadrupoles. |
---|
2129 | Parameters |
---|
2130 | Meanings |
---|
2131 | Default values |
---|
2132 | N\_calls |
---|
2133 | Number of calls to do ID compensation |
---|
2134 | 1 |
---|
2135 | N\_steps |
---|
2136 | Number of steps. |
---|
2137 | 1 |
---|
2138 | N\_Fam |
---|
2139 | Number of quadrupole families used to do ID correction. |
---|
2140 | 15 |
---|
2141 | IDCquads |
---|
2142 | Name of quadrupole families used to do ID correction. |
---|
2143 | - |
---|
2144 | scl\_dbetax |
---|
2145 | Scaling weight factor of the change step of horizontal beta function during the ID correction. |
---|
2146 | 1 |
---|
2147 | scl\_dbetay |
---|
2148 | Scaling weight factor of the change step of vertical beta function during the ID correction. |
---|
2149 | 1 |
---|
2150 | scl\_dnux |
---|
2151 | |
---|
2152 | Scaling weight factor of the change step of horizontal tune during the ID correction. |
---|
2153 | 0.1 |
---|
2154 | scl\_dnuy |
---|
2155 | Scaling weight factor of the change step of vertical tune during the ID correction. |
---|
2156 | 0.1 |
---|
2157 | scl\_nux |
---|
2158 | |
---|
2159 | Scaling weight factor of horizontal tune during the ID correction. |
---|
2160 | 100 |
---|
2161 | scl\_nuy |
---|
2162 | |
---|
2163 | Scaling weight factor of vertical tune during the ID correction. |
---|
2164 | 100 |
---|
2165 | ID\_step |
---|
2166 | |
---|
2167 | |
---|
2168 | 0.7 |
---|
2169 | |
---|
2170 | |
---|
2171 | |
---|
2172 | |
---|
2173 | |
---|
2174 | |
---|
2175 | |
---|
2176 | |
---|
2177 | |
---|
2178 | Frequency map analysis for on momentum particle, command ``FmapFlag''. |
---|
2179 | \begin{itemize} |
---|
2180 | \item |
---|
2181 | Frequency map analysis for off momentum particle, command ``FmapdpFlag''. |
---|
2182 | \item |
---|
2183 | Track momentum acceptance at lattice elements, command ``MomentumAccFlag''. |
---|
2184 | \end{itemize} |
---|
2185 | |
---|
2186 | \subsection{Compile} |
---|
2187 | The commonly used compilers for parallel computation are MPI 2, and Intel MPI which is based on MPI 2. For the cluster of SOLEIL Synchrotron, Intel MPI is installed. To get the parallel Tracy work, three files of the non-parallel version Tracy need to be modified. |
---|
2188 | The details are shown in the following steps. |
---|
2189 | \begin{enumerate} |
---|
2190 | \item |
---|
2191 | The path of included files of Intel MPI is added in ``Makefile.am'' under |
---|
2192 | path ``\$HOME/TracyIII/tracy/tracy/src'' (shown in BLUE color): |
---|
2193 | |
---|
2194 | INCLUDES = -I../inc -I\$(NUM\_REC)/inc |
---|
2195 | -I/opt/intel/impi/3.2.2.006/include64 |
---|
2196 | \item |
---|
2197 | The execute file, source file, paths of included files and library of Intel |
---|
2198 | MPI are modified in ``Makefile.am'' under path ``\$HOME/TracyIII/tracy/tools'' |
---|
2199 | (shown in BLUE color): |
---|
2200 | |
---|
2201 | bin\_PROGRAMS = psoltracy |
---|
2202 | |
---|
2203 | soltracy\_SOURCES = soltracy.cc nrutil.c nrcheck.c |
---|
2204 | nrlinwww.c nrframe.c ../tracy/src/tracy\_lib.cc -> |
---|
2205 | psoltracy\_SOURCES = psoltracy.cc nrutil.c nrcheck.c |
---|
2206 | nrlinwww.c nrframe.c ../tracy/src/tracy\_lib.cc |
---|
2207 | |
---|
2208 | LIBS = -L\$(NUM\_REC)/lib |
---|
2209 | -L/opt/intel/impi/3.2.2.006/lib64 -L\$(LIBPATH) |
---|
2210 | -lrecipes\_c\_icc -lstdc++ -lgfortran -lmpichcxx |
---|
2211 | |
---|
2212 | INCLUDES = -I\$(TRACY\_LIB)/tracy/inc -I\$(NUM\_REC)/inc |
---|
2213 | -I/opt/intel/impi/3.2.2.006/include64 |
---|
2214 | \item |
---|
2215 | The compilers used in the parallel computing are defined in the ``make\_for\_psoltracy.sh'' located in path ``\$HOME/TracyIII'' as (shown in BLUE color): |
---|
2216 | |
---|
2217 | CC = mpiicc |
---|
2218 | |
---|
2219 | CXX = mpiicpc |
---|
2220 | |
---|
2221 | F77 = mpiifort |
---|
2222 | |
---|
2223 | Depending on the compilers used to do parallel computation, user needs to |
---|
2224 | update the compilers in ``make\_for\_psoltracy.sh'' and the paths of included |
---|
2225 | files and library which are shown above with blue color. |
---|
2226 | |
---|
2227 | After updating compilers, paths of included files and library for parallel |
---|
2228 | computation, user can run |
---|
2229 | |
---|
2230 | make\_for\_psoltracy.sh |
---|
2231 | |
---|
2232 | under the shell script to compile the parallel Tracy. After compilation, |
---|
2233 | the execute file ``psoltracy'' is automatically generated under the |
---|
2234 | path ``\$HOME/TracyIII/tracy/tools''. |
---|
2235 | |
---|
2236 | |
---|
2237 | \end{enumerate} |
---|
2238 | |
---|
2239 | \subsection{Run} |
---|
2240 | As the non-parallel version Tracy, user needs to write the commands in a script which must be with the file extension â.prmâ. The syntaxes to define the script â*.prmâ are the same for both non-parallel and parallel Tracy. |
---|
2241 | To run the parallel Tracy, user need to contact the administrator of their cluster to know how to run parallel programs on the cluster. For the cluster on Synchrotron SOLEIL, the nodes used to do parallel computation are assigned by PBS (Portable Batch System), so a script is need. For example, user define the input script âtest.prmâ to tell Tracy what jobs are need to be done on the cluster, define script âlance\_tracy3\_parallel.shâ to assign the numbers of CPUs to do parallel computation and lance job to the SOLEIL cluster. and then type the following command under the bash shell to submit the job and run the parallel Tracy on the cluster: |
---|
2242 | |
---|
2243 | lance\_tracy3\_parallel.sh test.prm |
---|
2244 | |
---|
2245 | \section{ User input script} |
---|
2246 | There are two types of keywords in the user input script. The first type is to set the file, the file names, and define parameters for the related calculations; the key words for such definitions are ended with the characters âFlagâ. The second type is to define Boolean commands with or without parameters to do different calculations. The rules of the definition of input scripts are: |
---|
2247 | The blank lines and lines starting with "\#" (comment line) are ignored by the code. |
---|
2248 | Keywords without âFlagâ as the final 4 characters are NOT executed according to the defined sequence in user input script. If the same command keywords are defined many times in the user script, only the last defined keyword is executed. |
---|
2249 | The commands with the last 4 characters as âFlagâ are executed according to the sequence in the code. |
---|
2250 | The definition of lattice file at the beginning of the user script is mandatory. If the lattice file is with any of the following elements: horizontal correctors, vertical correctors, girders, BPM, skew quadrupoles, user must declare the element name at the beginning of input script. |
---|
2251 | One keyword command uses one line. User can not define more than one command at the same line. |
---|
2252 | Except explanation, all commands with Boolean flag are the generic commands, and can be used on all the lattice of the ring. |
---|
2253 | \subsection{ File path} |
---|
2254 | In the user input script, user can specify the name of the files which are used in the calculation, such as the lattice file, multipole field error file, misalignment error file, vacuum chamber file. When specifying the file name, user can provide the absolute path for the file which is not located at the current path, such as: â/home/physmach/Tracy3/tracy/soleil.latâ; or for convenience, user provides the filename without absolute path, but put the files at a certain directory and then specific this directory using the command: |
---|
2255 | in\_dir user\_defined\_path |
---|
2256 | For example: |
---|
2257 | in\_dir /home/zhang/codes/TracyIII/lattice/ |
---|
2258 | |
---|
2259 | This command tells the code all the files specified in the script are located at the directory â/home/zhang/codes/TracyIII/lattice/â. If user declares the files without absolute path and does not set the directory through command in\_dir; or the files specified in the script are not found at the current working path, the code will give an error message and stop running. |
---|
2260 | |
---|
2261 | \section{ File names} |
---|
2262 | |
---|
2263 | \subsection{Lattice file name} |
---|
2264 | In the input script, user must define the lattice name, this is mandatory. The command is: |
---|
2265 | lat\_file lattice\_file\_name |
---|
2266 | Here âlattice\_file\_nameâ is the lattice file name without â.latâ extension. For example, the following command sets the lattice file of SOLEIL ring: |
---|
2267 | lat\_file solamor2\_reglage\_focalisation\_chcvqt\_thicksextu\_LQPintermediaire\_QFF |
---|
2268 | In Tracy 3, after reading the lattice, Twiss parameters are automatically printed to the file âlinlat.outâ. |
---|
2269 | If one of these elements (Horizontal/vertical correctors or beam position monitors, or girders, or skew quadrupoles.) are defined in the lattice file, for example to read the misalignment errors of the lattice element and then do orbit correction, to read multipole field errors (SOLEIL lattice), etc.; user MUST specify the names of these elements using the corresponding commands in the â*.prmâ script: |
---|
2270 | h\_corr HCM |
---|
2271 | v\_corr VCM |
---|
2272 | gs GS |
---|
2273 | ge GE |
---|
2274 | bpm\_name BPM |
---|
2275 | qt QT |
---|
2276 | Here âHCMâ is the name of horizontal correctors used for horizontal orbit correction, or the horizontal correctors on which the multipole field errors are added in SOLEIL lattice; âVCMâ is the name of vertical correctors used for vertical orbit correction, or the vertical correctors on which the multipole field errors are added in SOLEIL lattice; âGSâ is the name of the start girder; âGEâ is the name of the end girder; âBPMâ is the name of beam position monitors defined in the lattice file; âQTâ is the name of the skew quadrupoles defined in the lattice. Generally, user needs to define horizontal, vertical correctors and BPMs when reading the misalignment errors or correcting closed orbit distortion |
---|
2277 | |
---|
2278 | \subsection{Multipole field error file name (SOLEIL lattice)} |
---|
2279 | User can read the multipole field errors on SOLEIL lattice from an external file; the file is specified in the user script using the following command: |
---|
2280 | multipole\_file multipole\_file\_name |
---|
2281 | Here âmultipole\_file\_nameâ is the user defined multipole field error file, the format of this file is given in section Error: Reference source not found. |
---|
2282 | |
---|
2283 | If the multipole field errors of horizontal, vertical correctors and skew quadrupoles are defined in the âmultipole\_fileâ, user MUST specify the names of these lattice elements in the â*.prmâ file as the following example: |
---|
2284 | h\_corr CH |
---|
2285 | v\_corr CV |
---|
2286 | qt QT |
---|
2287 | Here âCHâ, âCVâ and âQTâ are the names of horizontal, vertical correctors, and skew quadrupoles respectively which are defined in the lattice file. |
---|
2288 | |
---|
2289 | \subsection{Files of multipole field errors of correctors and skew quadrupoles (SOLEIL lattice)} |
---|
2290 | Horizontal, vertical correctors and skew quadrupoles are integrated with the sextupole quadrupoles on SOLEIL storage ring. To define the multipole field errors on these elements, user need to define the orders and relative strengths of multipole field errors in the multipole field error file (section Error: Reference source not found) and specify the file name in the user input script â*.prmâ (section Multipole field error file name), then specify the file names as the following example: |
---|
2291 | fic\_hcorr corh.txt |
---|
2292 | fic\_vcorr corv.txt |
---|
2293 | fic\_skew corqt.txt |
---|
2294 | Here âcorh.txtâ and âcorv.txtâ are the files with measured current values corh, corv, corqt (with unit [Ampere]) for the horizontal, vertical correctors and skew quadrupoles respectively. Based on the measured current values, user can get the integrated field strength as: |
---|
2295 | Hcorr\_strength [T.m] = corh *\_convHcorr /brho; (horizontal correctors) |
---|
2296 | Vcorr\_strength [T.m] = corv *\_convVcorr /brho; (vertical correctors) |
---|
2297 | Qt\_strength [T.m] = corqt *\_convQt /brho; (skew quadrupoles) |
---|
2298 | here brho is the momentum rigidity, and the conversion constants between current and field are \_convHcorr = 8.14e-4, \_convVcorr = 4.642e-4, \_convQt = 93.83e-4. |
---|
2299 | For SOLEIL lattice, the SAME ORDER of multipole field errors on the same elements are added together, so the SAME ORDER of horizontal/vertical, skew quadrupoles, and sextupoles are added together since these elements are integrated at the same magnets. |
---|
2300 | |
---|
2301 | \subsection{ File to define field strength of virtual coupling source elements (SOLEIL lattice)} |
---|
2302 | On SOLEIL storage ring, the coupling is thought to come from the rotation of quadrupoles and vertical displacements of sextupoles. The strengths of these coupling sources are written in a file, then read by the following command: |
---|
2303 | virtualskewquad\_file virtual\_skew\_quad\_currents.txt |
---|
2304 | |
---|
2305 | Here âvirtual\_skew\_quad\_currents.txtâ is the user defined file with strength of vertical coupling source. |
---|
2306 | In order to use this command to read the virtual sources of coupling, user needs to define the virtual coupling element as a skew quadrupole in the lattice file: |
---|
2307 | SQ: quadrupole, tilt=45.0, K= 0.0, method=4, N=1; |
---|
2308 | and this virtual coupling element MUST be with the name âSQâ. Now there 152 elements defined as the virtual coupling sources in the SOLEIL lattice. The syntaxs to define skew quadrupole are explained in section . |
---|
2309 | The measured current value qtcorr[i] of the ith coupling source is converted to the corresponding integrated skew quadrupole field strength corr\_strength as |
---|
2310 | corr\_strength [m-1] = qtcorr[i]*conv/brho; |
---|
2311 | here brho is momentum rigidity, and the conversion constant conv is 93.88e-4 [A-1.T]. |
---|
2312 | |
---|
2313 | \subsection{Cut off value} |
---|
2314 | Set the cut off value of all random distribution (Gaussian distribution) to ânâ times of the RMS value sigma: |
---|
2315 | normalcut n |
---|
2316 | |
---|
2317 | \section{Physics: Hamiltionian} |
---|
2318 | The dynamic motion of a conserved system can be described by a Hamiltonian. For an accelerator system without radiation |
---|
2319 | damping (energy loss) and RF cavities (energy gain), the motion of a single electron in the magnetic field can be described using the |
---|
2320 | following Hamitonian in the curvilinear coordinate system (Merz...) |
---|
2321 | \begin{eqnarray} |
---|
2322 | H (x,P_x; y, P_y; -t, \delta; s) &=& L + V \\ |
---|
2323 | &=& -(1+h_{\mathrm{ref}}x)[\sqrt(P^2 - (P_x - eA_x)^2 - (P_y - eA_y)^2 ) + eA_z(x,P_x; y, P_y,s)] \\ |
---|
2324 | P^2 & =& P_x^2 + P_y^2 + P_z^2 |
---|
2325 | \end{eqnarray} |
---|
2326 | $h_{\mathrm{ref}}$ is the curvature of reference orbit inside the dipole. |
---|
2327 | The $(x,P_x; y, P_y; -t, \delta)$ are the canonical cooridinates of the $H$, and $P_x, P_y, P-z$ are respectively the |
---|
2328 | horizontal, vertical, and longitudinal mechanical momentums. A more convienent way is to expand the electron motion |
---|
2329 | around the motion of a reference particle with total momentum $P_0$, so |
---|
2330 | \begin{eqnarray} |
---|
2331 | \frac{1}{P_0}H (x,P_x; y, P_y; -t, \delta; s) &=& \\ |
---|
2332 | H (x,p_x; y, p_y; -t, \delta; s) &=& -(1+h_{\mathrm{ref}}x)\sqrt((1+\delta)^2 - (p_x - \frac{e}{P_0}A_x)^2 - (p_y - \frac{e}{P_0}A_y)^2 ) + \frac{e}{P_0}A_z(x,p_x; y, p_y,s) \\ |
---|
2333 | &=& -(1+h_{\mathrm{ref}}x)\sqrt((1+\delta)^2 - (p_x - \frac{1}{B \rho}A_x)^2 - (p_y - \frac{1}{B \rho}A_y)^2 ) + \frac{1}{B \rho}A_z(x,p_x; y, p_y,s) |
---|
2334 | \end{eqnarray} |
---|
2335 | with |
---|
2336 | \begin{eqnarray} |
---|
2337 | p_x &=& \frac{P_x}{P_0} \\ |
---|
2338 | p_y &=& \frac{P_y}{P_0} \\ |
---|
2339 | p &=& \frac{P}{P_0} = \frac{\Delta P + P_0}{P_0} = (1+\delta) \\ |
---|
2340 | \delta &=& \frac{\Delta P}{P_0} \\ |
---|
2341 | B \rho &=& \frac{P_0}{e} (magnetic rigidity) |
---|
2342 | \end{eqnarray} |
---|
2343 | |
---|
2344 | With some operations (J. Bengtsson's linear transverse dynamics for sotrage ring with applications to the low energy antiproton ring (LEAR) at CERN; Tracy 2 manual.), |
---|
2345 | the Hamitonian can be expressed with the canonical coordinates $(x,p_x; y, p_y; -ct, \delta; s)$ (Tracy-2 Manual, J. Bengtsson) |
---|
2346 | |
---|
2347 | \begin{align*} |
---|
2348 | %\label{Tracy:Exact:H} |
---|
2349 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
2350 | &=-(1+h_{\mathrm{ref}}x)(\sqrt{(1+\delta)^2 - (p_x - \frac{A_x}{B \rho})^2 - (p_y - \frac{A_y}{B \rho})^2} + \frac{A_z}{B \rho}) + \delta \\ |
---|
2351 | &= -(1+h_{\mathrm{ref}}x)(\sqrt{(1+\delta)^2 - (p_x - \frac{A_x}{B \rho})^2 - (p_y - \frac{A_y}{B \rho})^2 }) + h_{\mathrm{ref}} x \frac{A_z}{B \rho} \\ |
---|
2352 | & + \frac{A_z}{B \rho} + \delta \\ |
---|
2353 | &= \underbrace{-(1+h_{\mathrm{ref}}x)\sqrt{(1+\delta)^2 - (p_x - \frac{A_x}{B \rho})^2 - (p_y - \frac{A_y}{B \rho})^2 )}}_\text{kinetic energy} \\ |
---|
2354 | & + \underbrace{\frac{x}{\rho} +\frac{x}{2\rho^2}}_\text{Gemometic components due to the curvilinear coordinate inside the dipole}\\ |
---|
2355 | & +\underbrace{\frac{A_z}{B \rho}}_\text{magnet contribution} \\ |
---|
2356 | & +\underbrace{\delta}_\text{due to the canonical coordinate $-ct$ instead of $-t$}\\ |
---|
2357 | A_z & =A_z(x,p_x; y, p_y,s) |
---|
2358 | \end{align*} |
---|
2359 | |
---|
2360 | The equation is the exact Hamitonian used in Tracy. The $A_x$ are due to the longidutinal fringe field, this is an natural results due to the Maxwell Equation; $h_{\mathrm{ref}}$ is not zero only inside the dipoles. |
---|
2361 | |
---|
2362 | For the system without fringe field of the magnet, or only consider the field inside the body of the magnet, $A_x = 0$ and $A_y = 0$, |
---|
2363 | so the Hamiltonian is |
---|
2364 | \begin{align} |
---|
2365 | \label{eqn:exact:H:NoFF} |
---|
2366 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
2367 | &= \underbrace{-(1+h_{\mathrm{ref}}x)\sqrt{(1+\delta)^2 - p_x^2 - p_y^2)}}_\text{kinetic energy} \\ |
---|
2368 | & + \underbrace{\frac{x}{\rho} +\frac{x}{2\rho^2}}_\text{Gemometic components due to the curvilinear coordinate inside the dipole}\\ |
---|
2369 | & +\underbrace{\frac{A_z}{B \rho}}_\text{magnet contribution} \\ |
---|
2370 | & +\underbrace{\delta}_\text{due to the canonical coordinate $-ct$ instead of $-t$}\\ |
---|
2371 | \end{align} |
---|
2372 | |
---|
2373 | From eqn.~\ref{eqn:exact:H:NoFF}, it is easy to get the map of the particle inside different lattice elements. |
---|
2374 | |
---|
2375 | |
---|
2376 | \subsection{Map of drift} |
---|
2377 | \label{H:drift} |
---|
2378 | |
---|
2379 | In the drift, $A_z = 0$, and $h_{\mathrm{ref}}$ = 0, from eqn.~\ref{eqn:exact:H:NoFF}, we can get the Hamiltonian |
---|
2380 | inside a drift is |
---|
2381 | \begin{align} |
---|
2382 | \label{eqn:H:exact:drift} |
---|
2383 | H (x,p_x; y, p_y; -ct, \delta; s) = -\sqrt{(1+\delta)^2 - p_x^2 - p_y^2)} + \delta |
---|
2384 | \end{align} |
---|
2385 | |
---|
2386 | In large ring, in order to increase the tracking speed, we can expand the sqare root in |
---|
2387 | eqn.~\ref{eqn:H:exact:drift} to get the approximate Hamitonian. |
---|
2388 | That is, |
---|
2389 | \begin{align} |
---|
2390 | \label{eqn:H:approxi:drift} |
---|
2391 | H (x,p_x; y, p_y; -ct, \delta; s) &= -(1+\delta) \left[ 1 - \frac{p_x^2 + p_y^2}{2 (1+\delta)^2} \right] + \delta\\ |
---|
2392 | &= \frac{p_x^2 + p_y^2}{2(1+\delta)} |
---|
2393 | \end{align} |
---|
2394 | |
---|
2395 | |
---|
2396 | From eqn.~\ref{eqn:H:exact:drift}, it is easy to get the map inside the drift for the |
---|
2397 | \textbf{small ring}: |
---|
2398 | \begin{align} |
---|
2399 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = \frac{p_{x0}}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
2400 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= \frac{p_{y0}}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
2401 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} =-\frac{1+\delta_0}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}}+1 \\ |
---|
2402 | or \\ |
---|
2403 | (ct)^{'} = \frac{1+\delta_0}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}}-1 \\ |
---|
2404 | p_x = p_{x0} \\ |
---|
2405 | p_y = p_{y0} \\ |
---|
2406 | \delta = \delta_0 |
---|
2407 | \end{align} |
---|
2408 | |
---|
2409 | From eqn.~\ref{eqn:H:approxi:drift}, it is easy to get the map inside the drift for the |
---|
2410 | \textbf{big ring}: |
---|
2411 | \begin{align} |
---|
2412 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = \frac{p_{x0}}{1+\delta_0} \\ |
---|
2413 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= \frac{p_{y0}}{1+\delta_0} \\ |
---|
2414 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} =-\frac{p_{x0^2}+p_{y0}^2}{2(1+\delta_0)} \\ |
---|
2415 | or \\ |
---|
2416 | (ct)^{'} = \frac{p_{x0^2}+p_{y0}^2}{2(1+\delta_0)} \\ |
---|
2417 | p_x = p_{x0} \\ |
---|
2418 | p_y = p_{y0} \\ |
---|
2419 | \delta = \delta_0 |
---|
2420 | \end{align} |
---|
2421 | |
---|
2422 | \subsection{Map of mutipoles} |
---|
2423 | From eqn.~\ref{eqn:exact:H:NoFF}, we can get the Hamiltonian |
---|
2424 | inside a multipole without fringe field is |
---|
2425 | \begin{align} |
---|
2426 | \label{eqn:H:exact} |
---|
2427 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
2428 | =& \underbrace{-\sqrt{(1+\delta)^2 - p_x^2 - p_y^2}+\delta}_\text{H drift} \\ |
---|
2429 | & \underbrace{-h_{\mathrm{ref}}x \sqrt{(1+\delta)^2 - p_x^2 - p_y^2}}_\text{H kick} \\ |
---|
2430 | & + \underbrace{\frac{x}{\rho} +\frac{x}{2\rho^2}-\frac{A_z}{B \rho}}_\text{H kick} |
---|
2431 | \end{align} |
---|
2432 | |
---|
2433 | In eqn.~\ref{eqn:H:exact}, the Hamiltonian is decomposed into two part, one is the Hamiltonian |
---|
2434 | of the drift which is due to the kinetic energy of the system (section~\ref{H:drift}), another part is the kick |
---|
2435 | due to the multipoles which will give the kick to the particle. |
---|
2436 | Now we only need to focus on the Hamiltonian of the multipoles which induces the kick map: |
---|
2437 | \begin{align} |
---|
2438 | \label{eqn:H:exact:multipole} |
---|
2439 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
2440 | &=-h_{\mathrm{ref}}x \sqrt{(1+\delta)^2 - p_x^2 - p_y^2} \\ |
---|
2441 | & +\frac{x}{\rho} +\frac{x}{2\rho^2}-\frac{A_z}{B \rho} |
---|
2442 | \end{align} |
---|
2443 | |
---|
2444 | Similarly, by expand the sqare root in eqn.~\ref{eqn:H:exact}, we can get the approximate Hamiltonian |
---|
2445 | of the multipole as |
---|
2446 | \begin{align} |
---|
2447 | \label{eqn:H:approxi:multipole} |
---|
2448 | H (x,p_x; y, p_y; -ct, \delta; s) \\ |
---|
2449 | &=-h_{\mathrm{ref}}x \sqrt{(1+\delta)^2 - p_x^2 - p_y^2} \\ |
---|
2450 | & +\frac{x}{\rho} +\frac{x}{2\rho^2}-\frac{A_z}{B \rho} \\ |
---|
2451 | &=-h_{\mathrm{ref}} x \delta + \frac{1}{2}h_{\mathrm{ref}} h_{B} x^2 - \frac{A_z}{B \rho}+(h_B - h_{\mathrm{ref}})x |
---|
2452 | \end{align} |
---|
2453 | where $h_{\mathrm{ref}}$ is the curvature due to the curlininear coordinates inside the dipole, |
---|
2454 | $h_{\mathrm{ref}} = 1/\rho_{ref}$; |
---|
2455 | $h_{\mathrm{bend}}$ is due to the bending curvature of the dipole which is determined by the dipole |
---|
2456 | field, $h_{\mathrm{bend}} = 1/ \rho_{bend}$. $h_{\mathrm{ref}} \neq 0$ only inside dipoles. |
---|
2457 | |
---|
2458 | In the dipole, $A_z \neq 0$, and $h_{\mathrm{ref}} \neq $ 0, so |
---|
2459 | from eqn.~\ref{eqn:H:exact:multipole}, we can get the kick map due to the dipole |
---|
2460 | in the \textbf{small ring} which use the exact Hamiltonian: |
---|
2461 | \begin{align} |
---|
2462 | \label{eqn:kickmap:exact} |
---|
2463 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = h_{\mathrm{ref}} x_0 \frac{p_{x0}}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
2464 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= h_{\mathrm{ref}} x_0 \frac{p_{y0}}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
2465 | p_x^{'} = -\frac{\partial H}{\partial y_0} = h_{\mathrm{ref}} \sqrt{(1+\delta_0)^2 - p_{x0}^2 - p_{y0}^2} - h_{\mathrm{bend}} - h_{\mathrm{ref}}h_{\mathrm{bend}}x - \frac{B_y}{B \rho}\\ |
---|
2466 | p_y^{'} = -\frac{\partial H}{\partial y_0} = \frac{1}{B \rho} \frac{\partial A_z}{\partial y_0} = \frac{B_x}{B \rho}\\ |
---|
2467 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} =-h_{\mathrm{ref}} x_0 \frac{1+\delta_0}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
2468 | or \\ |
---|
2469 | (ct)^{'} = h_{\mathrm{ref}} x_0 \frac{1+\delta_0}{\sqrt{(1+\delta_0)^2 -(p_{x0}^2+p_{y0}^2)}} \\ |
---|
2470 | \delta = \delta_0 \\ |
---|
2471 | B \rho = \frac{p_0}{e} |
---|
2472 | \end{align} |
---|
2473 | where |
---|
2474 | \begin{align} |
---|
2475 | \frac{\partial A_z}{\partial x} = - B_y \\ |
---|
2476 | \frac{\partial A_z}{\partial y} = B_x |
---|
2477 | \end{align} |
---|
2478 | since |
---|
2479 | \begin{align} |
---|
2480 | A_x = 0 \\ |
---|
2481 | A_y =0 |
---|
2482 | \end{align} |
---|
2483 | inside the body of the multipoles, and |
---|
2484 | \begin{align*} |
---|
2485 | \vec{B} = \Delta \times \vec{A} \\ |
---|
2486 | \hat{x} & \hat{y} & \hat{z} \\ |
---|
2487 | \frac{\partial}{x} & \frac{\partial}{y} & \frac{\partial}{z} \\ |
---|
2488 | A_x & A_y & A_z \\ |
---|
2489 | \end{align*} |
---|
2490 | |
---|
2491 | |
---|
2492 | In the dipole, $A_z \neq 0$, and $h_{\mathrm{ref}} \neq $ 0, so |
---|
2493 | from eqn.~\ref{eqn:H:approxi:multipole}, we can get the kick map due to the dipole |
---|
2494 | in the \textbf{big ring} which use the exact Hamiltonian: |
---|
2495 | \begin{align} |
---|
2496 | \label{eqn:kickmap:approxi} |
---|
2497 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = h_{\mathrm{ref}} x_0 \frac{p_{x0}}{1+\delta_0} \\ |
---|
2498 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= h_{\mathrm{ref}} x_0 \frac{p_{y0}}{1+\delta_0} \\ |
---|
2499 | p_x^{'} = -\frac{\partial H}{\partial y_0} = h_{\mathrm{ref}} \delta_0 - (h_{\mathrm{bend}} - h_{\mathrm{ref}}) - h_{\mathrm{ref}}h_{\mathrm{bend}}x - \frac{B_y}{B \rho}\\ |
---|
2500 | p_y^{'} = -\frac{\partial H}{\partial y_0} = \frac{1}{B \rho} \frac{\partial A_z}{\partial y_0} = \frac{B_x}{B \rho}\\ |
---|
2501 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} =\frac{-h_{\mathrm{ref}} x_0}{1+\delta_0} \frac{-(p_{x0}^2+p_{y0}^2)}{2(1+\delta_0)} \\ |
---|
2502 | or \\ |
---|
2503 | (ct)^{'} =-\frac{h_{\mathrm{ref}} x_0}{1+\delta_0} \frac{(p_{x0}^2+p_{y0}^2)}{2(1+\delta_0)} \\ |
---|
2504 | \delta^{'} = 0 |
---|
2505 | \end{align} |
---|
2506 | |
---|
2507 | For other multipoles (quadrupoles, sextupole, decapole, octupole, etc), the curvilinear coordinate is |
---|
2508 | the cartesian coordinates, that is $h_{ref}$ = 0, so from eqn.~\ref{eqn:kickmap:exact}, the kick map for |
---|
2509 | these multipoles in the small ring is: |
---|
2510 | \begin{align} |
---|
2511 | \label{eqn:kickmap:exact:multipole} |
---|
2512 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = 0 \\ |
---|
2513 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= 0 \\ |
---|
2514 | p_x^{'} = -\frac{\partial H}{\partial y_0} = - (h_{\mathrm{bend}} + \frac{B_y}{B \rho})\\ |
---|
2515 | p_y^{'} = -\frac{\partial H}{\partial y_0} = \frac{1}{B \rho} \frac{\partial A_z}{\partial y_0} = \frac{B_x}{B \rho}\\ |
---|
2516 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} = 0\\ |
---|
2517 | or \\ |
---|
2518 | (ct)^{'} = 0 \\ |
---|
2519 | \delta^{'} = 0 |
---|
2520 | \end{align} |
---|
2521 | |
---|
2522 | With $h_{ref} = 0$, from eqn:~\ref{eqn:kickmap:approxi}, the kick map for these |
---|
2523 | multipoles (quadrupoles, sextupole, decapole, octupole, etc) in the big ring is: |
---|
2524 | \begin{align} |
---|
2525 | \label{eqn:kickmap:approxi:multipole} |
---|
2526 | x^{'} = \frac{dx}{ds} = \frac{\partial H}{\partial p_{x0}} = 0 \\ |
---|
2527 | y^{'} = \frac{dy}{ds} = \frac{\partial H}{\partial p_{y0}}= 0 \\ |
---|
2528 | p_x^{'} = -\frac{\partial H}{\partial y_0} = - (h_{\mathrm{bend}} + \frac{B_y}{B \rho})\\ |
---|
2529 | p_y^{'} = -\frac{\partial H}{\partial y_0} = \frac{1}{B \rho} \frac{\partial A_z}{\partial y_0} = \frac{B_x}{B \rho}\\ |
---|
2530 | (-ct)^{'} = \frac{d(-ct)}{ds} = \frac{\partial H}{\partial \delta_0} = 0\\ |
---|
2531 | or \\ |
---|
2532 | (ct)^{'} = 0 \\ |
---|
2533 | \delta^{'} = 0 |
---|
2534 | \end{align} |
---|
2535 | |
---|
2536 | From the eqn~\ref{eqn:kickmap:exact} to eqn.~\ref{eqn:kickmap:approxi:multipole}, it's clear |
---|
2537 | that the kick map from the main body of dipoles are different in the small ring and big ring; |
---|
2538 | while the kick map from the main body of other type of multipoles are the same in small |
---|
2539 | rings and big rings. |
---|
2540 | |
---|
2541 | |
---|
2542 | |
---|
2543 | |
---|
2544 | |
---|
2545 | |
---|
2546 | |
---|
2547 | |
---|
2548 | \section{Magnetic field} |
---|
2549 | |
---|
2550 | A. Dragt ....(Lie methods for acceleator........) |
---|
2551 | |
---|
2552 | \section{FF of dipole} |
---|
2553 | \subsection{kick map} |
---|
2554 | E. Forest ........... |
---|
2555 | |
---|
2556 | \section{FF of quadrupole} |
---|
2557 | \subsection{kick map} |
---|
2558 | |
---|
2559 | |
---|
2560 | \section{ Lattice file} |
---|
2561 | In the lattice, RF cavity must be defined!!! Otherwise Tracy will give the error message: |
---|
2562 | \textcolor{red}{Elem\_GetPos: there are no kids in family 0 ()}. This obigatory is for the |
---|
2563 | correct calculation of positive/negtive momentum compaction factor. |
---|
2564 | |
---|
2565 | |
---|
2566 | |
---|
2567 | The followings are the rules to define a lattice file used in Tracy 3. The curvelinear coordinates are |
---|
2568 | used. \textbf{The ideal particle or design particle sees the perfect magnetic field in all magnets, and its} |
---|
2569 | \textbf{orbit is used as the reference orbit and base of the curvilinear coordinate}. Since the reference orbit |
---|
2570 | is a curve inside the dipoles and a straight line in other lattice elements (drifts and the magnets except |
---|
2571 | dipoles), so the length of the dipole is the the path length of the reference particle inside the dipole |
---|
2572 | which is equal to $\rho*\theta$ where $\rho$ is the bending radius of the dipole and $theta$ is the bending angle |
---|
2573 | with unit [rad], and all the other magnet lengths are the straight length of the magnets. |
---|
2574 | |
---|
2575 | Due to the same reason, the curvature of the curvilinear cooridnates h = 1/$\rho$ is not zero only inside dipole; |
---|
2576 | in other magnets and drift h = 0, and the curvilinear coordinates goes to cartesian cooridnates. |
---|
2577 | As a result, the independent variable $s$ inside the dipole harmitonian is the arc length, while the staight |
---|
2578 | length in other lattice elements. |
---|
2579 | |
---|
2580 | \subsection{Lattice} |
---|
2581 | The $n^{th}$ field component of the lattice element is defined as in Tracy (n = 1, 2, 3, 4 ...): |
---|
2582 | \begin{eqnarray*} |
---|
2583 | b_n & = & \frac{1}{B \rho} \frac{1}{(n-1)!} \frac{\partial^{n-1} B_y }{\partial x ^{n-1}}|_{x=0,y=0} \\ |
---|
2584 | a_n & = & \frac{1}{B \rho} \frac{1}{(n-1)!} \frac{\partial^{n-1} B_x }{\partial x ^{n-1}}|_{x=0,y=0} \\ |
---|
2585 | B \rho & = & \frac{p_0}{e} |
---|
2586 | \end{eqnarray*} |
---|
2587 | $B \rho$ is the magnetic rigidity, $p_0$ is the design beam momentum, $e$ is the electric charge. |
---|
2588 | For example, for sextupole, n = 3, so $b_3$ and $a_3$ are defined as |
---|
2589 | \begin{eqnarray*} |
---|
2590 | b_3 & = & \frac{1}{B \rho} \frac{1}{2} \frac{\partial^{2} B_y }{\partial x ^{2}}|_{x=0,y=0} \\ |
---|
2591 | a_3 & = & \frac{1}{B \rho} \frac{1}{2} \frac{\partial^{2} B_x }{\partial x ^{2}}|_{x=0,y=0} |
---|
2592 | \end{eqnarray*}. |
---|
2593 | |
---|
2594 | \textbf{Notes:} |
---|
2595 | In \textbf{AT} (Accelerator Toolbox) and \textbf{BETA} code, the definition of are the same as in \textbf{Tracy}. |
---|
2596 | While In \textbf{MAD8}, \textbf{MADX} and \textbf{ELEGANT}, the order of the field compoent start from 0, that is |
---|
2597 | n = 0, 1, 2, 3, ..., and the $n^{th}$ field strength components of the lattice element $b_n$ and $a_n$ are defined as |
---|
2598 | \begin{eqnarray*} |
---|
2599 | b_n & = & \frac{1}{B \rho} \frac{\partial^{n} B_y }{\partial x ^{n}}|_{x=0,y=0} \\ |
---|
2600 | a_n & = & \frac{1}{B \rho} \frac{\partial^{n} B_x }{\partial x ^{n}}|_{x=0,y=0} \\ |
---|
2601 | B \rho & = & \frac{p_0}{e} |
---|
2602 | \end{eqnarray*} |
---|
2603 | For example, for sextupole, n = 3, its field component $b_2$ and $a_2$ are defined as |
---|
2604 | \begin{eqnarray*} |
---|
2605 | b_2 & = & \frac{1}{B \rho} \frac{\partial^{2} B_y }{\partial x ^{2}}|_{x=0,y=0} \\ |
---|
2606 | a_2 & = & \frac{1}{B \rho} \frac{\partial^{2} B_x }{\partial x ^{2}}|_{x=0,y=0} |
---|
2607 | \end{eqnarray*}. |
---|
2608 | |
---|
2609 | |
---|
2610 | |
---|
2611 | \subsection{Syntax} |
---|
2612 | Every line embraced by â{}â is comment line. For example: |
---|
2613 | |
---|
2614 | {*****drift space *****} |
---|
2615 | |
---|
2616 | Each sentence is ended by â;â or no punctuation. |
---|
2617 | Tracy is not sensitive to capital/small letters in the lattice. |
---|
2618 | User can define any lattice element with any valid name (but must start with a character) they want, but the element type is fixed. |
---|
2619 | For the lattice of the ring, the definition of RF cavity is mandatory, and the harmonic number of the RF cavity is also mandatory; for the lattice of the linac, the definition of the RF cavity is optional. |
---|
2620 | |
---|
2621 | \subsection{Variables} |
---|
2622 | User can define the variables in the lattice file. For example: |
---|
2623 | Intmeth = 4; |
---|
2624 | so when the code is running, each âintmethâ in the lattice file will be replaced by â4â. |
---|
2625 | |
---|
2626 | \subsection{Start line} |
---|
2627 | The lattice file must begin with the sentence: |
---|
2628 | define lattice; |
---|
2629 | This definition is mandatory. |
---|
2630 | |
---|
2631 | \subsection{Global variables} |
---|
2632 | After define the ring, user needs to define the system parameters of the lattice: |
---|
2633 | Energy, the beam energy with unit [GeV]. |
---|
2634 | dP, the relative momentum offset of the particle. |
---|
2635 | CODeps, the convergence for the algorism to find the closed orbit. |
---|
2636 | For example: |
---|
2637 | Energy = 2.739; |
---|
2638 | dP = 1.0d-10; |
---|
2639 | CODeps= 1.0d-15; |
---|
2640 | These definitions are mandatory. |
---|
2641 | |
---|
2642 | \section{Multipole field error file} |
---|
2643 | \label{sec:mult:field:error} |
---|
2644 | The multipole field errors of the lattice elements can be defined in a file, and then the file is read into the lattice. User can define the systematic or random multipole field error of the lattice elements. |
---|
2645 | There are two ways to define the multipole field errors, one way is to define the errors for all the families with the same type, for example, the error for all the quadrupoles; another way is to define the error for each family, for example, the âQ1â family of the quadrupoles. |
---|
2646 | |
---|
2647 | \subsection{Systematic errors} |
---|
2648 | To define the systematic multipole field error of the element, the user just need to follow the rules as below. |
---|
2649 | This command is commonly used to add the mangets design errors in the lattice. |
---|
2650 | Input format of multipole error: |
---|
2651 | keywords/name sys $r0$(radius where the multipole field error is measured. If $r0$ = 0, then the An and Bn are the integrated |
---|
2652 | multipole field strength at the position $x$ = $z$ = 0). |
---|
2653 | $n$(order of multipole field error, in US. notation. Dip errors is 1, quadrupole error is 2, sextupole field error is 3, decaper field error is 4, octoper field error is 5, etc.), |
---|
2654 | $Bn$($n^{\mathrm{th}}$ integrated upright component of the |
---|
2655 | multipole field) An($n^{\mathrm{th}}$ integrated skew component of the multipole field) |
---|
2656 | m, Bm, Am,...... |
---|
2657 | The "keywords" means one type of lattice elements or the family name; the keywords of the type of lattice elements are: |
---|
2658 | dip dipole \\ |
---|
2659 | quad quadrupole \\ |
---|
2660 | sext sextupole \\ |
---|
2661 | hcorr horizontal corrector \\ |
---|
2662 | vcorr vorizontal corrector \\ |
---|
2663 | qt skew quadrupole \\ |
---|
2664 | |
---|
2665 | âsysâ is a keyword to denote that user are setting the systematic multipole error. |
---|
2666 | Bn defines the upright component of the magnetic field, then for the component of a skew quadrupole or a vertical corrector, Bn = 0 |
---|
2667 | An defines the skew component of the magnetic field, then for the component of a dipole or upright quadrupole, An = 0. |
---|
2668 | The line start with â\#â is a comment line. |
---|
2669 | The blank lines in the multipole definition file are neglected by the code. |
---|
2670 | |
---|
2671 | There are two ways to define the multipole field errors strength, one is to define the measured field errors at the pole tip location $r_0$, |
---|
2672 | then $b_n$ and $a_n$ are respectively the scale coefficient of the main magnetic field coeffeicient. For example, to define the decupole field |
---|
2673 | errors inside a horizontal bending dipole with coefficient $b_1$, we define the normal scale coefficience as $c_5$ and skew scale coefficience |
---|
2674 | as $d_5$, then the $b_5$ component of this decupole is $c_5$ * $b_1$ and the skew coefficience $a_5$ is $d_5$ * $b_1$; that is |
---|
2675 | \begin{eqnarray*} |
---|
2676 | b_5 &=& \frac{1}{B \rho} \frac{c_5 * B_0}{r_0^5} \\ |
---|
2677 | a_5 &=& \frac{1}{B \rho} \frac{d_5 * B_0}{r_0^5} \\ |
---|
2678 | \end{eqnarray*} |
---|
2679 | where |
---|
2680 | \begin{equation} |
---|
2681 | b_1 = \frac{1}{B \rho} B_0. |
---|
2682 | \end{equation} |
---|
2683 | This method is the simplest way to define the multipole errors inside a lattice element. The default scaling factors $c_n$ and $d_n$ are 1. |
---|
2684 | |
---|
2685 | Another way is to direct define the multipole field coefficiences $b_n$ and $a_n$, that is, set $r_0 = 0$. |
---|
2686 | If the multipole field $\vec{B^{tip}}$ are measured at the tips with radius $r_0$, then $b_n$ and $a_n$ can |
---|
2687 | be calculated using |
---|
2688 | \begin{eqnarray*} |
---|
2689 | b_n & = & \frac{1}{B \rho} \frac{1}{(n-1)!} \frac{\partial^{n-1} B_y }{\partial x ^{n-1}}|_{x=0,y=0} = \frac{1}{B \rho} \frac{B_y^{tip}}{r_0^{n-1}} \\ |
---|
2690 | a_n & = & \frac{1}{B \rho} \frac{1}{(n-1)!} \frac{\partial^{n-1} B_x }{\partial x ^{n-1}}|_{x=0,y=0} = \frac{1}{B \rho} \frac{B_x^{tip}}{r_0^{n-1}} \\ |
---|
2691 | \vec{B^{tip}} & = & B_x^{tip} \hat{x} + B_y^{tip} \hat{y} |
---|
2692 | \end{eqnarray*} |
---|
2693 | |
---|
2694 | The assigned multipoles errors will be added to the corresponding $n^{th}$ order multipole errors of the lattice element. |
---|
2695 | |
---|
2696 | |
---|
2697 | For the soleil lattice, the use can define the multipole errors for the type or each family. But to define the multipole error for all the quadrupoles, user can NOT define the multipole errors by the type. There are two choice: one is to define the multipole errors for each quadrupole family; second is to define the field errors by quadrupole type, and then define the multipole errors on Q2 and Q7 families (the lattice with full quadrupoles) or QP2a, QP2b, QP7a and QP7b families (lattice with quadrupoles which are cut into two halves). This is due to that Q2/QP2a/QP2b and Q7/QP7a/QP7b are the quadrupoles which have lengths larger than other quadrupoles in the lattice, and the multipole errors on them are different from the ones on the other short quadrupoles. |
---|
2698 | |
---|
2699 | The following is an example file to define systematic multipole errors on Soleil lattice: |
---|
2700 | |
---|
2701 | \#dipole |
---|
2702 | |
---|
2703 | dip sys 20e-3 2 2.2e-40 0.0 3 -3.0e-4 0.0 4 2.0e-5 0.0 5 -1.0e-4 0.0 6 -6.0e-5 0.0 7 -1.0e-4 0.0 |
---|
2704 | |
---|
2705 | \#quadrupole |
---|
2706 | |
---|
2707 | |
---|
2708 | \#for all short quadrupoles |
---|
2709 | |
---|
2710 | |
---|
2711 | quad sys 30e-3 6 2.4e-4 0.0 10 0.7e-4 0.0 14 0.9e-4 0.0 |
---|
2712 | |
---|
2713 | \#for all long quadrupoles qp2 and qp7 |
---|
2714 | |
---|
2715 | qp2a sys 30e-3 6 0.7e-4 0.0 10 1.9e-4 0.0 14 1.0e-4 0.0 |
---|
2716 | qp2b sys 30e-3 6 0.7e-4 0.0 10 1.9e-4 0.0 14 1.0e-4 0.0 |
---|
2717 | qp7a sys 30e-3 6 0.7e-4 0.0 10 1.9e-4 0.0 14 1.0e-4 0.0 |
---|
2718 | qp7b sys 30e-3 6 0.7e-4 0.0 10 1.9e-4 0.0 14 1.0e-4 0.0 |
---|
2719 | |
---|
2720 | \#for all short quadrupoles,sextupole mesure quadrupoles longs |
---|
2721 | |
---|
2722 | quad sys 30e-3 3 -1.6e-4 0.0 4 -3.4e-4 0.0 |
---|
2723 | |
---|
2724 | \#for long quadrupoles qp2 and qp7 |
---|
2725 | |
---|
2726 | qp2a sys 30e-3 3 2.9e-4 0.0 4 -8.6e-4 0.0 |
---|
2727 | |
---|
2728 | qp2b sys 30e-3 3 2.9e-4 0.0 4 -8.6e-4 0.0 |
---|
2729 | |
---|
2730 | qp7a sys 30e-3 3 2.9e-4 0.0 4 -8.6e-4 0.0 |
---|
2731 | |
---|
2732 | qp7b sys 30e-3 3 2.9e-4 0.0 4 -8.6e-4 0.0 |
---|
2733 | |
---|
2734 | |
---|
2735 | \# for sextupoles |
---|
2736 | |
---|
2737 | sext sys 32e-3 5 5.4e-4 0.0 7 3.3e-4 0.0 9 -4.7e-4 0.0 15 -9.0e-4 0.0 21 -20.9e-4 0.0 27 0.8e-4 0.0 |
---|
2738 | |
---|
2739 | |
---|
2740 | \# for horizontal correctors, all An=0 |
---|
2741 | hcorr sys 35e-3 5 0.430 0.0 7 0.063 0.0 11 -0.037 0.0 |
---|
2742 | |
---|
2743 | \# for vertical correctors, all Bn=0 |
---|
2744 | |
---|
2745 | vcorr sys 35e-3 5 0.0 -0.430 7 0.0 0.063 11 0.0 0.037 |
---|
2746 | |
---|
2747 | |
---|
2748 | \# for sextupole associated skew quadrupole, all Bn=0 |
---|
2749 | |
---|
2750 | \# qt sys 35e-3 4 0.0 -0.0 |
---|
2751 | |
---|
2752 | qt sys 35e-3 4 0.0 -0.680 |
---|
2753 | |
---|
2754 | \subsection{Ramdom error} |
---|
2755 | To define random multipole field errors on the lattice elements, user needs to define the seed of the random errors, and then follow the same rule as the ones to define systematic multipole error except replacing âsysâ by ârmsâ. For example: |
---|
2756 | seed seed\_number |
---|
2757 | quad rms 30e-3 6 2.4e-4 0.0 10 0.7e-4 0.0 14 0.9e-4 0.0 |
---|
2758 | |
---|
2759 | The random multipole error is multiplied by the random scale factor; the new value is added to the corresponding components of the magnetic field. The random scale factor is generated by a random function which follows the normal distribution (mean value is 0 and standard deviation is 1). The cut off value for the normal distribution function is 2 times of the RMS value. If user does not define seed for the random function before the setting of errors, then the code will stop and give an error message. |
---|
2760 | |
---|
2761 | Here is example file to define random multipole error in the lattice: |
---|
2762 | |
---|
2763 | \#define seed for the ramdom multipole error |
---|
2764 | seed 1000000 |
---|
2765 | |
---|
2766 | \#dipole |
---|
2767 | \# dip 20e-3 2 2.2e-4 0.0 3 -3.0e-4 0.0 4 2.0e-5 0.0 5 -1.0e-4 0.0 6 -6.0e-5 0.0 7 -1.0e-4 0.0 |
---|
2768 | dip rms 20e-3 2 2.2e-40 0.0 3 -3.0e-4 0.0 4 2.0e-5 0.0 5 -1.0e-4 0.0 6 -6.0e-5 0.0 7 -1.0e-4 0.0 |
---|
2769 | |
---|
2770 | \#quadrupole |
---|
2771 | quad rms 30e-3 3 -1.6e-4 0.0 4 -3.4e-4 0.0 6 2.4e-4 0.0 10 0.7e-4 0.0 14 0.9e-4 0.0 |
---|
2772 | |
---|
2773 | Q2 rms 30e-3 3 2.9e-4 0.0 4 -8.6e-4 0.0 6 0.7e-4 0.0 10 1.9e-4 0.0 14 1.0e-4 0.0 |
---|
2774 | Q7 rms 30e-3 3 2.9e-4 0.0 4 -8.6e-4 0.0 6 0.7e-4 0.0 10 1.9e-4 0.0 14 1.0e-4 0.0 |
---|
2775 | |
---|
2776 | \section{ Misalignment error file} |
---|
2777 | The misalignment error of the lattice elements can be defined in a file, and then the file is read into the lattice. User can define the systematic or random misalignment error of the lattice elements. |
---|
2778 | There are two ways to define the misalignment error, one way is to define the error for all the families in one type, for example, the error for all the quadrupoles; another way is to define the error for each family, for example, the âQ1â family of the quadrupoles. |
---|
2779 | The systermatic misalignment error file works for the lattices with full or half quadrupoles; the random misalignment error file only works for lattice with full quadrupoles. |
---|
2780 | |
---|
2781 | \subsection{Systematic errors} |
---|
2782 | To define the systematic misalignment error of the element, user just needs to follow the rules as below. |
---|
2783 | input format of misalignment error: |
---|
2784 | type/family name sys dx dy dr |
---|
2785 | |
---|
2786 | The "keywords" means one type of lattice elements or the name of the family, and keywords of the type of lattice elements are: |
---|
2787 | All all the elements in the lattice |
---|
2788 | girder girder |
---|
2789 | dipole dipole |
---|
2790 | quad quadrupole |
---|
2791 | sext sextupole |
---|
2792 | bpm beam position monitor |
---|
2793 | family name family name of the elements |
---|
2794 | âsysâ is a keyword to denote that user are setting the systematic displacement error. |
---|
2795 | dx defines the displacement in x direction with unit [m]. |
---|
2796 | dy defines the displacement in y direction with unit [m]. |
---|
2797 | dr defines the rotation angle with unit [rad]). |
---|
2798 | The line start with â\#â is comment line. |
---|
2799 | The blank line in the misalignment error file is neglected by the code. |
---|
2800 | |
---|
2801 | The following is an example file to define systematic multipole error on Soleil lattice: |
---|
2802 | |
---|
2803 | \#----------------------------------------------------------------------- |
---|
2804 | \# systematic alignment error for SOLEIL |
---|
2805 | \# name x(m) y(m) r (rad) |
---|
2806 | \#----------------------------------------------------------------------- |
---|
2807 | \begin{table}[h] |
---|
2808 | \centering |
---|
2809 | \caption{} |
---|
2810 | \label{} |
---|
2811 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
2812 | \hline |
---|
2813 | \hline |
---|
2814 | \end{tabular*} |
---|
2815 | \end{table} |
---|
2816 | |
---|
2817 | girder sys 100.0e-6 100.0e-6 0.5e-03 |
---|
2818 | quad sys 30.0e-6 30.0e-6 80.0e-06 |
---|
2819 | sext sys 30.0e-6 30.0e-6 100.0e-06 |
---|
2820 | dipole sys 500.0e-6 500.0e-6 0.2e-03 |
---|
2821 | |
---|
2822 | \subsection{Random errors} |
---|
2823 | To define random misalignment errors on the lattice elements, user need to follow the same rule as the ones to define systematic misalignment error except replacing âsysâ by ârmsâ. That is: |
---|
2824 | input format of misalignment error: |
---|
2825 | seed seed\_number |
---|
2826 | type/family name rms dx dy dr |
---|
2827 | The random misalignment error is multiplied by the random scale factor; the new value is added to the corresponding components of the misalignment components. The random scale factor is generated by a random function which follows the normal distribution (mean value is 0 and standard deviation is 1), the cut off value for the normal distribution function is 2 times of the RMS value. |
---|
2828 | If user does not define seed for the random function before the setting of errors, then the code will stop and give an error message. |
---|
2829 | Here is example file to define random misalignment error in the lattice: |
---|
2830 | \#----------------------------------------------------------------------- |
---|
2831 | \# random alignment error for SOLEIL |
---|
2832 | \# name x(m) y(m) r (rad) |
---|
2833 | \#----------------------------------------------------------------------- |
---|
2834 | \begin{table}[h] |
---|
2835 | \centering |
---|
2836 | \caption{} |
---|
2837 | \label{} |
---|
2838 | \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}|p{0.2\linewidth} |p{0.5\linewidth} | p{0.15\linewidth} |} |
---|
2839 | \hline |
---|
2840 | \hline |
---|
2841 | \end{tabular*} |
---|
2842 | \end{table} |
---|
2843 | |
---|
2844 | girder rms 100.0e-6 100.0e-6 0.5e-03 |
---|
2845 | quad rms 30.0e-6 30.0e-6 80.0e-06 |
---|
2846 | sext rms 30.0e-6 30.0e-6 100.0e-06 |
---|
2847 | dipole rms 500.0e-6 500.0e-6 0.2e-03 |
---|
2848 | 5.4 Vacuum chamber file |
---|
2849 | User can define the script to set the vacuum chamber limitation around the ring. The characteristic for the vacuum chamber script are: |
---|
2850 | Lines start with â\#â are comment. |
---|
2851 | The format of the vacuum chamber definition is |
---|
2852 | MK1, MK2, minimum x, maximum x, minimum y, maximum y. |
---|
2853 | To set the vacuum chamber, it is needed to add two markers in the lattice, such as MK1 and MK2, MK1 is before the first element and MK2 is after the end element of the vacuum chamber region. |
---|
2854 | The numbers of MK1 and MK2 are the same in the lattice. |
---|
2855 | The units are [meter] for minimum x, maximum x, minimum y, maximum y. |
---|
2856 | The first line is to define the global vacuum chamber limit around the ring, and the key words should be "Start","All". |
---|
2857 | |
---|
2858 | |
---|
2859 | The following is one example of the user vacuum chamber script: |
---|
2860 | |
---|
2861 | \#********************************************* |
---|
2862 | \# Script to set the vacuum chamber |
---|
2863 | \# |
---|
2864 | \#********************************************** |
---|
2865 | \# MK1 MK2 dxmin dxmax dymin dymax (Apertures in meter) |
---|
2866 | Start All -35e-3 35e-3 -12.5e-3 12.5e-3 |
---|
2867 | \#sdm1 esdm -21e-3 21e-3 -5e-3 5e-3 |
---|
2868 | debut ehu600 -35e-3 35e-3 -7e-3 7e-3 |
---|
2869 | ssep esep -20e-3 35e-3 -7e-3 7e-3 |
---|
2870 | ssdm esdm -21e-3 21e-3 -5e-3 5e-3 |
---|
2871 | ssdac esdac -35e-3 25e-3 -2.5e-3 2.5e-3 |
---|
2872 | |
---|
2873 | \end{document} |
---|
2874 | |
---|
2875 | |
---|
2876 | |
---|