The E. Forest s Polymorphic Tracking Code (PTC) is a kick code, allowing a symplectic integration through all accelerator elements giving the user full control over the precision (number of steps and integration type) and exactness (full or extended Hamiltonian) of the results. The degree of exactness is determined by the user and the speed of his computer. The main advantage is that the code is inherently based on the map formalism and provides users with all associated tools.
The PTC code is actually a library that can be used in many different ways to create an actual module that calculates some property of interest. Several modules using the PTC code have been presently implemented in MAD-X. These MADX-PTC modules [b] are executed by the following commands: ptc_twiss, ptc_normal, ptc_track, ptc_track_line. To perform calculations with these MADX-PTC commands, the PTC environment must be initialized, handled and turned off by the special commands within the MAD-X input script.
PTC_CREATE_UNIVERSE, sector_nmul_max=integer,
sector_nmul=integer, ntpsa=logical, symprint=logical;
PTC_CREATE_LAYOUT, time=logical, model=integer,
method=integer, nst=integer, exact=logical,
offset_deltap=double, errors_out=logical, magnet_name=string,
resplit=logical, thin=double, xbend=double,
even=logical;
.........................
PTC_READ_ERRORS, overwrite=logical;
.........................
PTC_MOVE_TO_LAYOUT, index=integer;
.........................
PTC_ALIGN;
.........................
PTC_END;
sector_nmul_max=integer, sector_nmul=integer
- Options
Option Meaning Default Value Value Type SECTOR_NMUL_MAX Global variable in PTC needed for exact sector bends defining up to which order Maxwell's equation are solved [a, page 76-77]. The value of SECTOR_NMUL_MAX must not be smaller than SECTOR_NMUL otherwise MAD-X stops with an error. 10
integer SECTOR_NMUL Global variable in PTC needed for exact sector bends defining up to which order the multipole are included in solving Maxwell's equation up to order SECTOR_NMUL_MAX. Multipoles of order N with N > SECTOR_NMUL and N ≤ SECTOR_NMUL_MAX are treated a la SixTrack. 10
integer NTPSA This attribute invokes the second DA package written in C++ and kindly provided by Lingyun Yang lyyang@lbl.gov. Etienne Forest has written the wrapper to allow both the use of the legendary DA packages written in Fortran by Martin Berz (default) or this new DA package. It is expected that this DA package will allow for the efficient calculation of a large number of DA parameters. .FALSE.
logical SYMPRINT This flag allows the supression of the printing of the check of symplecticity. It is recommended to leave this flag set to TRUE. .TRUE.
logical
Option | Meaning | Default Value | Value Type | |
---|---|---|---|---|
TIME | 5D | "time=true": fifth coordinate is PT, pt=ΔE/p0c; |
.TRUE. |
logical |
"time=false": fifth coordinate is DELTAP, δp=Δp/p0 | ||||
6D | "time=true": MAD-X coordinate system {-ct, pt} | |||
"time=false": second PTC coordinate system {-pathlength, δp} | ||||
MODEL | Type of element: 1, 2,or 3. |
1 |
integer | |
METHOD | Integration order (2, 4, 6) [a, Chapter K] |
2 |
integer | |
NST | Number of integration steps: 1, 2, 3, . |
1 |
integer | |
EXACT |
Switch to turn on calculations with an exact
Hamiltonian, otherwise the expanded Hamiltonian is used. |
.FALSE. |
logical | |
OFFSET_DELTAP |
Beware: Expert flag!
The relative momentum deviation of the reference
particle |
0.0 |
double | ERRORS_OUT |
Flag to write-out multipolar errors in Efcomp table format. Two
tables are filled "errors_field"
and "errors_total". In the first
case only field errors are written out and in the second one also
desired field components are added. The latter is useful e.g. to
include the strength of correctors. The choice of magnets is
defined by the "magnet_name"
attribute (see below). As usual the tables can be
written to files for later use for read-in via the "ERRORS_IN" flag: |
.FALSE. |
logical | MAGNET_NAME |
Simple selection for the names of magnet to be used for an error write-out using the "ERRORS_OUT" flag (see above). In fact, the errors are recorded for all magnets with their name starting with the exact string of "MAGNET_NAME". |
NULL |
string | RESPLIT |
Flag to apply the PTC resplit procedure. This is meant to create an "adaptive" setting of the "METHOD" and "NST" attributes according to the strength of the quadrupoles (using the "THIN" attribute) and separatedly the dipoles (using the "XBEND" attribute). Additionally, there is the "EVEN" attribute for even and odd number of splits. |
.FALSE. |
logical | THIN |
This is the main "RESPLIT" attribute. It is meant for splitting quadrupoles according to their strength. The default of "THIN=0.001" has shown in practice to work well without costing too much with respect of performance. |
0.001 |
double | XBEND |
This attribute is meant for splitting dipoles, e.g. "XBEND=0.001". It is an optional "RESPLIT" attribute and therefore has the default set to -1, which means no splitting. A splitting by "XBEND=0.001" maybe advisable for dipoles as well. |
-1 (off) |
double | EVEN |
Switch to ensure even number of splits when using the PTC "RESPLIT" procedure. The default is "EVEN=TRUE". This is particularly useful when one attempts to calculate "PTC_TWISS" with then "CENTER_MAGNETS" option, i.e. if one would like to calculate the TWISS parameters in the center of the element. Uneven number of splits will be achieved with "EVEN=FALSE". |
.TRUE. |
logical |
Option | Meaning | Default Value | Value Type | |
---|---|---|---|---|
OVERWRITE |
Flag to either OVERWRITE the read-in errors (on request by using this flag) or by DEFAULT just add them to multipole components already present. |
.FALSE. |
logical |
Option | Meaning | Default Value | Value Type |
---|---|---|---|
INDEX | Number of the PTC layout to be activated. |
1 |
integer |
Option | Meaning | Default Value | Value Type |
---|---|---|---|
KNL | The normal multipole coefficient |
0 [m-1] |
double |
KSL | The skew multipole coefficient |
0 [m-1] |
double |