-
Notifications
You must be signed in to change notification settings - Fork 1
/
ptc-track.tex
588 lines (474 loc) · 23.7 KB
/
ptc-track.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
%%\title{Thick-Lens Tracking Module (PTC-TRACK Module)}
% Created by: Valery KAPIN, 06-Apr-2006
% Changed by: ____________, ___________
\chapter{Thick-Lens Tracking Module}
\label{chap:ptc-track}
The \texttt{PTC-TRACK} module \cite{kapin2006,schmidt2005} is the
symplectic thick-lens tracking facility in \madx. It is based on \ptc
library \cite{forest2002} written by E.~Forest. The commands of this
module are described below, optional parameters are denoted by square
brackets ([]).
Prior to using this module the active beam line must be selected by
means of a \hyperref[sec:use]{USE} command.
The general \hyperref[chap:ptc-setup]{PTC environment} must
also be initialized.
\textbf{Examples}\\
Several examples can be found on the web at
\href{http://cern.ch/frs/mad-X_examples/ptc_track}{http:\/\/cern.ch\/frs\/mad-X\_examples\/ptc\_track}.
\section{Synopsis}
\label{sec:ptc-track-synopsis}
A typical tracking job in \ptc requires a number of commands to be issued:
\madxmp{
xxxx\= \kill
PTC\_CREATE\_UNIVERSE; \\
PTC\_CREATE\_LAYOUT, MODEL=integer, METHOD=integer, NST=integer, [EXACT];\\
\>\ldots\\
\>PTC\_START, X=real, PX=real, Y=real, PY=real, T=real, PT=real;\\
\>PTC\_START, FX=real,PHIX=real, FY=real,PHIY=real, FT=real,PHIT=real;\\
\>\ldots\\
\>PTC\_OBSERVE, PLACE=string; \\
\>\ldots\\
\>PTC\_TRACK, \ldots ;\\
\>\ldots\\
\>PTC\_TRACKLINE, \ldots ;\\
\>\ldots \\
\>PTC\_TRACK\_END;\\
\>\ldots\\
PTC\_END;
}
\section{PTC\_START}
\label{sec:ptc-start}
To start particle tracking, a series of initial trajectory coordinates
must be given with the \texttt{PTC\_START} command; and as many
commands as initial trajectories can be given.
\texttt{PTC\_START} commands must appear before the
\hyperref[sec:ptc-track]{\texttt{PTC\_TRACK}} command.
\madbox{
PTC\_START, \=X=real, PX=real, Y=real, PY=real, T=real, PT=real,\\
\>FX=real, PHIX=real, FY=real, PHIY=real, FT=real, PHIT=real;
}
The coordinates can be
\begin{madlist}
\ttitem{X, PX, Y, PY, T, PT} i.e. the standard canonical
coordinates. \\ (Default: 0.0)
\ttitem{FX, PHIX, FY, PHIY, FT, PHIT} i.e. the action-angle
coordinates which are expressed by the normalized amplitude, $F_z$ and
the phase, $\Phi_z$ for the \textit{z}-th mode plane
(\textit{z = x, y, t}).
The actions are computed with the values of the emittances,
$F_z$, which must be specified in a preceding
\hyperref[sec:beam]{\texttt{BEAM}} command. $F_z$ are expressed in number
of r.m.s. beam sizes and $\Phi_z$ are expressed in
radians.\\ (Default: 0.0)
\end{madlist}
\textbf{Remarks} \\
In the uncoupled case, the canonical and the action-angle
variables are related with equations
\begin{equation}
z = F_z (E_z)^{1/2} cos(\Phi_z) \qquad p_z = F_z (E_z)^{1/2} sin(\Phi_z)
\end{equation}
If both the canonical and the action-angle coordinates are
given in the \texttt{PTC\_START} command, they are summed after conversion
of the action-angle coordinates to canonical coordinates.
The use of the action-angle coordinates requires the option
\hyperref[opt:closed-orbit]{\texttt{CLOSED\_ORBIT}} in the
\hyperref[sec:ptc-track]{\texttt{PTC\_TRACK}} command.
If the option
\hyperref[opt:closed-orbit]{\texttt{CLOSED\_ORBIT}} in the
\hyperref[sec:ptc-track]{\texttt{PTC\_TRACK}} command is active
(see above) all coordinates are specified with respect to the actual
closed orbit (possibly off-momentum with magnet errors) and NOT with
respect to the reference orbit.
If the option \hyperref[opt:closed-orbit]{\texttt{CLOSED\_ORBIT}} is absent,
then coordinates are specified with respect to the reference orbit.
\section{PTC\_OBSERVE}
\label{sec:ptc-observe}
Besides the beginning of the beam-line, one can define an additional
observation points along the machine. Subsequent \texttt{PTC\_TRACK}
command will then record the tracking data on all these observation
points.
\madbox{
PTC\_OBSERVE, PLACE=string;
}
The only attribute is
\begin{madlist}
\ttitem{PLACE} the name of observation point. \\ (Default: NULL)
\end{madlist}
\textbf{Remarks}\\
The first observation point at the beginning of the beam-line is marked
as \textbf{"start"}.
It is {\em strongly} recommended to specify markers as observation points.
The data at observation points other than \textbf{"start"} can be produced
in two different ways:
\begin{enumerate}
\item traditional element-by-element tracking. (See
\hyperref[chap:thintrack]{\madx thin tracking}) which
requires the option
\hyperref[opt:element-by-element]{\texttt{ELEMENT\_BY\_ELEMENT}} of
\hyperref[sec:ptc-track]{\texttt{PTC\_TRACK}} to be active.
\item coordinate transformation from \textbf{"start"} to the
respective observation points using high-order \ptc transfer
maps, which requires the option
\hyperref[opt:closed-orbit]{\texttt{CLOSED\_ORBIT}} of
\hyperref[sec:ptc-track]{\texttt{PTC\_TRACK}} to be active, and the
options \hyperref[opt:radiation]{\texttt{RADIATION}}
and \hyperref[opt:element-by-element]{\texttt{ELEMENT\_BY\_ELEMENT}} of
\hyperref[sec:ptc-track]{\texttt{PTC\_TRACK}} to be inactive.
\end{enumerate}
\section{PTC\_TRACK}
\label{sec:ptc-track}
The \texttt{PTC\_TRACK} command initiates trajectory tracking by
entering the thick-lens tracking module.
The tracking can be done "element-by-element" or "turn-by-turn".
In the first case particle coordinates are tracked from element to element,
and if an element is an observation point than the coordinates are saved in a table.
In the second case particle coordinates are always tracked over full turn (from start to start)
and afterwards these coordinates are transformed using Transfer Map from the start to a given observation point.
The order of the transfer map is defined by \texttt{NORMAL\_NO} switch.
Tracking is done in parallel, i.e. the coordinates of all particles are
transformed through each beam element, or over full turns.
A particle is lost if its trajectory is outside specified boundaries.
In \ptc, there is a continuous check that the particle trajectories stay
within the aperture limits.
The Normal Form calculation is controlled through options of the
\texttt{PTC\_TRACK} command.
\textbf{Remarks} \\
If \texttt{TOTALPATH} is set to true than the 5th coordinate is
total path length or time of flight and the PTC conversion is kept
for the output tables and files.
In particular, initial coordinates provided in \texttt{PTC\_START}
will appear with swapped sign. \\
Please also remember that as the total time or path length becomes
larger as it becomes less precise and calculation gets more vulnerable
to numerical instabilities. \texttt{PTC\_TRACK} internally attempts to
periodically subtract from it a value corresponding to
common wavelenth of all oscillating elements, however, in cases when
ratios of all the frequency pairs are not rational numbers
than it can not be done.
\madbox{
PTC\_TRACK, \=ICASE=integer, DELTAP=real, CLOSED\_ORBIT=logical,\\
\>ELEMENT\_BY\_ELEMENT=logical, TURNS=integer, \\
\>DUMP=logical, ONETABLE=logical, RECLOSS=logical, \\
\>MAXAPER=real\_array, \\
\>NORM\_NO=integer, NORM\_OUT=logical, \\
\>FILE[=string], EXTENSION=string, FFILE=integer, \\
\>X=real, PX=real, Y=real, PY=real, T=real, PT=real, \\
\>RADIATION=logical, RADIATION\_MODEL1=logical, \\
\>RADIATION\_ENERGY\_LOSS=logical, \\
\>RADIATION\_QUAD=logical, \\
\>BEAM\_ENVELOPE=logical, SPACE\_CHARGE=logical;
}
The attributes are:
\begin{madlist}
\ttitem{ICASE} the user-defined dimensionality of the phase-space
(4, 5 or 6). \\
\texttt{ICASE} has higher priority over other options. In particular:
\begin{enumerate}
\item RF cavities with non-zero voltage are ignored for
\texttt{ICASE=4} or \texttt{ICASE=5}.
\item A non-zero \texttt{DELTAP} is ignored for \texttt{ICASE=4} or \texttt{ICASE=6}.
\end{enumerate}
However, if an RF cavity has voltage set to zero and \texttt{ICASE=6} is
specified, \ptc sets \texttt{ICASE=4}.
\\(Default: 4)
\ttitem{DELTAP} the relative momentum offset for reference closed
orbit (used for 5D case ONLY). \\
\texttt{DELTAP} is ignored for \texttt{ICASE=6}, but the option
\texttt{OFFSET\_DELTAP} of command \hyperref[sec:ptc-create-layout]{
\texttt{PTC\_CREATE\_LAYOUT}} may be used, if the reference particle should
have a momentum offset. \\
(Default: 0.0)
\ttitem{CLOSED\_ORBIT}\label{opt:closed-orbit}
a logical switch to activate the closed orbit calculation.
This option must be used for closed rings only. This
option allows to activate the Normal Form analysis, if
required. With \texttt{CLOSED\_ORBIT=false}, the sequence is treated as
a transfer line. \\ (Default: false)
\ttitem{ELEMENT\_BY\_ELEMENT}\label{opt:element-by-element}
a logical switch to activate the element-by-element tracking, from
the default turn-by-turn tracking. \\ (Default: false)
\ttitem{TURNS} number of turns to be tracked. \\ (Default: 1)
\ttitem{DUMP} a logical flag to enforce writing particle coordinates
to formatted text files. \\
(Default: false)
\ttitem{ONETABLE}\label{opt:onetable} a logical switch to write all
particle coordinates to a single file instead of separate files.\\
(Default: false) \\
Tracks are reported at the defined observation points
(see \hyperref[sec:ptc-observe]{\texttt{PTC\_OBSERVE}} command)
plus at the end of each turn and at the start.
In order to make the file more readable each reported location (file segment)
is marked by comment line like \\
\texttt{\#segment s\_no nobsp npart ielem el\_name}, \\ where
\texttt{s\_no} is sequential number of the reported segment,
\texttt{nobsp} is total number of the user defined observation points,
\texttt{npart} is number of particles reported at the observation point.
\texttt{ielem} is index of the element and
\texttt{el\_name} is name of the element.
\\
\ttitem{RECLOSS} flag to create in memory a table named "trackloss"
containing the coordinates of lost particles.\\
(Default:~false) \\
See \hyperref[sec:track]{\texttt{TRACK}} section for the details.
\ttitem{MAXAPER} an array defining upper limits for particle
coordinates, essentially defining the aperture to trigger particle
loss. \\
(Default: \{0.1, 0.01, 0.1, 0.01, 1.0, 0.1\}) \\
Please watch that the check is performed directly on the PTC variables,
therefore the last 2 variables change their meaning depending if
\texttt{TIME} switch of PTC is set to true or false, see
\texttt{PTC\_SETSWITCH} command for more details.
If \texttt{TOTALPATH} is set to true then check on the 5th coordinate
is not done.
If \texttt{ELEMENT\_BY\_ELEMENT} is false then the check is performed
only at the end of each turn (at the end of the layout).
\ttitem{NORM\_NO} order of the internally used Transfer Maps and Normal Forms.\\
\texttt{NORM\_NO=1} makes them linear (always true for \madx). \\
The Transfer Maps are used to transform track coordinates from \texttt{START} to given observation point
if \texttt{ELEMENT\_BY\_ELEMENT} is false.
The Normal Form is used to transform coordinates between Cartesian and action-angle variables.
\\ (Default: 1)
\ttitem{NORM\_OUT} a logical switch to transform canonical variables
to action-angle variables. \\ (Default: false)
\ttitem{FILE} if FILE is omitted, no output is written to file.\\
if FILE is present, track tables are printed, optionally to
files with name constructed from the base filename specified. \\
The actual name of the output file is constructed from
the baseline given with \texttt{FILE} to which are appended the
strings ".obsnnnn" (where nnnn is the observation point index) and
".pnnnn" (where nnnn is now the particle number), unless the
\hyperref[opt:onetable]{\texttt{ONETABLE}} option is activated. \\
(Default: "track")
\ttitem{EXTENSION} a string providing the filename extension for the
track table files, e.g., txt, doc... \\ (Default: nil)
\ttitem{FFILE} defines the periodicity \texttt{n} of the printout:
coordinates are printed every n turns. \\ (Default: 1)
\ttitem{X, PX, Y, PY, T, PT} the initial
\hyperref[subsec:tables-canon]{canonical} coordinates for the closed orbit search. \\ (Default: 0.0) \\
\ttitem{RADIATION}\label{opt:radiation} a logical flag to turn on
the synchrotron radiation calculated by an internal procedure of
\ptc. \\
The option \texttt{RADIATION} has precedence over \texttt{RADIATION\_MODEL1}
when both are activated.
\\ (Default: false)
\ttitem{RADIATION\_MODEL1} a logical flag to turn on the synchrotron
radiation according to the method given in \cite{roy1990}. This model
simulates quantum excitation via a random number generator and tables
for photon emission. It can be used only with the option
\hyperref[opt:element-by-element]{\texttt{ELEMENT\_BY\_ELEMENT}}.\\
(Default: false)
\ttitem{RADIATION\_ENERGY\_LOSS} a logical flag to add back the
average energy loss thereby taking only the quantum excitation into
effect. It applies only when for \texttt{RADIATION\_MODEL1} is
active.\\
(Default: false)
\ttitem{RADIATION\_QUAD} a logical flag to add the effect of
synchrotron radiation in quadrupoles. It supplements either model
\texttt{RADIATION} or \texttt{RADIATION\_MODEL1}. \\
(Default: false)
\ttitem{BEAM\_ENVELOPE} a logical switch to activate the calculation
of the beam envelopes with \ptc. It requires the options
\texttt{RADIATION} and \texttt{ICASE=6}.\\
(Default: false)
\ttitem{SPACE\_CHARGE} \textbf{[under construction]}\\
a logical flag to activate the simulation of space charge forces
between particles. \\ (Default: false)
\end{madlist}
\section{PTC\_TRACKLINE}
\label{sec:ptc-trackline}
The \texttt{PTC\_TRACKLINE} command performs particle tracking that takes
into account acceleration in travelling wave cavities.
It must be invoked in the scope of correctly initialized
\hyperref[chap:ptc-setup]{PTC environment}, \textsl{i.e.} after
\hyperref[sec:ptc-create-universe]{\texttt{PTC\_CREATE\_UNIVERSE}}
and \hyperref[sec:ptc-create-layout]{\texttt{PTC\_CREATE\_LAYOUT}} commands, and before
corresponding \hyperref[sec:ptc-end]{\texttt{PTC\_END}}.
All tracks created with \hyperref[sec:ptc-start]{\texttt{PTC\_START}}
commands before \texttt{PTC\_TRACKLINE} command is issued are
tracked. Track parameters are dumped at every defined observation point
(see \hyperref[sec:ptc-observe]{\texttt{PTC\_OBSERVE}} command).
Please note that \madx always creates an observation point at the end of a
sequence.
\madbox{
PTC\_TRACK\_LINE, \=TURNS=integer, \\
\>ONETABLE=logical, FILE=string, EXTENSION=string, \\
\>ROOTNTUPLE=logical, \\
\>EVERYSTEP=logical, TABLEALLSTEPS=logical, \\
\>GCS=logical;
}
The attributes are:
\begin{madlist}
\ttitem{TURNS} number of turns to be tracked. If the layout of the
machine is not closed, this value is forced to \texttt{TURNS=1} by \ptc
\\ (Default: 1)
\ttitem{ONETABLE}\label{opt:onetable2} a logical switch to write all
particle coordinates to a single file instead of separate files. \\
%% If false one file per track per observation point is written.\\
%% File format is filename.obsNNNN.pMMMM, where NNNN and MMMM are
%% respectively the number of the observation point and of the track\\
%% Filename is defined by the switch described below. \\
%% If false, tracking data are written to a single table for each
%% track for each observation point. Table names follow the naming
%% \textit{filename}.obsMMMM.pNNNN, where \textit{filename} is
%% settable prefix with \textbf{file} parameter (see below), MMMM is
%% observation point number and NNNN is track number. \\
%% If true, all data are written to single table called onetable. \\
(Default: false) [to be clarified]
\ttitem{FILE} if FILE is omitted, no output is written to file.\\
if FILE is present, track tables are printed, optionally to
files with name constructed from the base filename specified. \\
The actual name of the output file is constructed from
tyhe baseline given with \texttt{FILE} to which are appended the
strings ".obsnnnn" (where nnnn is the observation point index) and
".pnnnn" (where nnnn is now the particle number), unless the
\hyperref[opt:onetable2]{\texttt{ONETABLE}} option is activated. \\
(Default: "track")
\ttitem{EXTENSION} a string providing the filename extension for the
track table files, e.g., txt, doc... \\ (Default: nil)
\ttitem{ROOTNTUPLE} a logical switch to store data to ROOT file as
ntuple. Accessible only if \hyperref[sec:rplot]{\texttt{RPLOT}} plugin is
available. i.e. only if \madx is dynamically linked and
\hyperref[sec:rplot]{\texttt{RPLOT}} plugin is present. \\
(Default: false)
\ttitem{EVERYSTEP} a logical switch to activate the recording of
track parameters at every integration step. Normally tracking data
are stored internally only at the end of each element. \texttt{EVERYSTEP}
provides the user with finer data points. It implies usage of the so
called node (thin) layout. \\
Track parameters are stored for each step in file
"thintracking\_ptc.txt". Storage of parameters in a table for each
step might be very memory consuming. To switch it off use option
\texttt{TABLEALLSTEPS}.\\
Collective effects can be taken into account only using this mode
(this feature of PTC is not interfaced into MAD-X). \\
(Default: false)
\ttitem{TABLEALLSTEPS} (to be completed) \\ (Default: false)
\ttitem{GCS} a logical switch to store track parameters in Global
Coordinate System - normally it starts at the entrance face of the
first element. \\ (Default: false)
\end{madlist}
%% Depending on value of \texttt{ONETABLE} switch, all output information
%% is stored in one table (and also file), or in one table per track per
%% observation point is written if the switch is false.
Plotting of track parameters (see \hyperref[sec:plot]{\texttt{PLOT}}
command) is only possible if \texttt{ONETABLE} switch is set to false (status
as for Feb. 2006). This unfortunate solution is the legacy of the
regular \madx \hyperref[chap:thintrack]{\texttt{TRACK}} command,
designed for circular machines where the user usually tracks a few
particles for many turns rather then many particles for one turn each.
Tracks that do not fit in the defined aperture for elements are
immediately stopped.
Behavior of PTC calculations can be adapted with
\hyperref[sec:ptc-setswitch]{\texttt{PTC\_SETSWITCH}} command
and with appropriate switches of
\hyperref[sec:ptc-create-layout]{\texttt{PTC\_CREATE\_LAYOUT}} command.
%% \textbf{PROGRAMMER'S MANUAL}\\
%% The routine PTC\_TRACKLINE is implemented in file
%% madx\_ptc\_trackcavs.f90\\
%% Its single parameter is the number of observation points.
%% The call sequence from MAD-X interpreter is the following
%% \\ exec\_command in madxp.c;
%% \\ pro\_ptc\_trackline in madxn.c; This routine creates appropriates
%% tables where the track parameters are stored, and after execution of the
%% Fortran routine dumps filled table(s) to files.
%% \\ w\_ptc\_trackline\_ in wrap.f90; Just interface to the appropriate
%% Fortran module
%% \\ ptc\_trackline in madx\_ptc\_trackline.f90
%% The key routine that enables appropriate calculation of beam and track
%% parameters in the presence of traveling wave cavities is setcavities.
%% Firstly, the ptc\_trackline routine finds out which are the observation
%% points. For this purpose array of integers observedelements is
%% allocated. Its length is equal to the number of elements in the
%% sequence. All elements are zero by default. If an element with an index
%% n is an observation point then observedelements[n] is equal to 1. This
%% solution enables fast checking if track parameters should be sent to a
%% table after a given element.
%% Further \href{../ptc_auxiliaries/PTC_SetCavities.html}{setcavities
%% subroutine} is called if it was not executed yet before.
%% PTC\_TRACKLINE reads the track initial parameters from the table with
%% the help of gettrack function (implemented in C in file madxn.c). For
%% the performance reasons gettrack creates a two dimensional array and
%% buffers there all the initial track parameters upon first call. The
%% array is destroyed with a call of deletetrackstrarpositions function
%% that is performed at the very end of ptc\_trackline subroutine.
%% Tracking itself is implemented in a doubly nested loop. The external
%% one goes over all initiated tracks, and the internal one performs
%% tracking of a given track element by element. The key PTC routine is
%% called TRACK. It propagates a track described by an array of 6 real
%% numbers, denoted as X in equations below. The important issue is that
%% they are the canonical variables. In order to follow the standard MAD-X
%% representation the values that are written to tables and files are
%% scaled appropriately to the reference momentum for a given element. In
%% the general case it changes along the line if traveling wave cavities
%% are present. Hence, momenta xp, yp and zp are
%% \begin{verbatim}
%% zp=sqrt((1+x(5))**2 - x(2)**2 - x(4)**2)
%% xp = x(2)/zp
%% yp = x(4)/zp
%% \end{verbatim}
%% where array x containing 6 elements is the track position in the PTC
%% representation, i.e. x(1) is horizontal spatial coordinate, x(2) -
%% horizontal momentum, x(3) - vertical spatial coordinate, x(4) - vertical
%% momentum, x(5) - $\delta$p/p$_0$c, x(6) - longitudinal coordinate
%% (caution, the exact meaning depends on the PTC settings, see
%% \href{../ptc_auxiliaries/PTC_SetSwitch.html}{ PTC\_SETSWITCH command }).
\section{PTC\_TRACK\_END}
\label{sec:ptc-track-end}
The \texttt{PTC\_TRACK\_END} command terminates the command lines related
to the \texttt{PTC\_TRACK} module.
\madbox{
PTC\_TRACK\_END;
}
The initial and final canonical coordinates are collected in the
internal table "tracksumm", which can be \hyperref[sec:write]{written}
to file.
\section{Choice of options}
\label{sec:choice-options}
The following table facilitates the choice of the correct options for a
number of typical tasks:
\begin{enumerate}
\item The tracking of a beam-line with default parameters.
\item Smilar to "1." but with element-by-element tracking and an output
at observation points.
\item Tracking in a closed ring with closed orbit search and the
Normal Forms calculations.\\
Both canonical and action-angle input/output coordinates are
possible.\\
Output at observation points is produced via PTC maps.
\item Similar to "3." except that output at observation points is
created by element-by-element tracking.
\item The ??? with PTC radiation.
\end{enumerate}
\begin{tabular}{|lccccc|}
\hline
\textbf{Option} & \textbf{case 1} & \textbf{case 2} & \textbf{case 3} & \textbf{case 4} & \textbf{case 5 } \\
\hline
\texttt{CLOSED\_ORBIT} & - & - & + & + & + \\
\hline
\texttt{ELEMENT\_BY\_ELEMENT} & - & + & - & + & - \\
\hline
\texttt{PTC\_START, X, PX, ...} & + & + & + & + & + \\
\hline
\texttt{PTC\_START, FX, PHIX, ...} & - & - & + & + & + \\
\hline
\texttt{NORM\_NO} & - & - & $>$1 & $>$1 & $>$1 \\
\hline
\texttt{NORM\_OUT} & - & - & + & - & + \\
\hline
\texttt{PTC\_OBSERVE} & - & + & + & + & - \\
\hline
\texttt{RADIATION} & - & - & - & - & + \\
\hline
\texttt{RADIATION\_MODEL1} & - & - & - & - & - \\
\hline
\texttt{RADIATION\_ENERGY\_LOSS} & - & - & - & - & - \\
\hline
\texttt{RADIATION\_QUAD} & - & - & - & - & +/- \\
\hline
\texttt{BEAM\_ENVELOPE} & - & - & - & - & - \\
\hline
\texttt{SPACE\_CHARGE} & - & - & - & - & - \\
\hline
\end{tabular}
%\href{mailto:kapin@itep.ru}{V.Kapin}(ITEP) and
%\href{mailto:Frank.Schmidt@cern.ch}{F.Schmidt}, July 2005; revised in April, 2006