The FPP and PTC libraries

In this short article we summarize the FPP package and the tracking code PTC which is crucially based on FPP. PTC is remarkable for its use of beam structures which take into full account the three dimensional structure of a lattice and its potential topological complexities such as those found in colliders and recirculators. FULLY POLYMORPHIC PACKAGE: FPP FPP overloads in Fortran90 [1] the famous “DApackage” [2] of Berz. More precisely it overloads the package which Berz developped at the now defunct SSCCentral design group. It also overload a library based on Berz’s package called Lielib1 and developped by Forest. FPP most salient feature is to create a Taylor-Real polymorphic type which changes shape at execution time. To do so using Berz’s original package, we use a piece of code based on a Fortran77 prototype of J. Bengtsson. In fact, polymorphism at execution time is an idea of Bengtsson. This is to be contrasted with interpreted polymorphism which is the mechanism which underpins the code COSY-INFINITY [4] of Berz. Both are valid ideas and can even be combined simultaneously. This is not done in FPP. The user of FPP writes a standard (symplectic) integrator [5, 6, 7] which simply pushes particles through a lattice. If the real variables “real(8)” are replaced everywhere by a new type called REAL 8 then Taylor series can be produced thanks to the underlying package of Berz. It should be pointed out that our decision to extract Taylor series directly from an integrator rather than using techniques such as those found in COSY-INIFINITY is dictated by the physics of large (circular) machines. The vast majority of people [8, 9, 10, 11, 12, 13, 14, 15, 16] in that field prefer to use integrators, even with rather poor models, than to compute some high order Taylor maps. Thus in our field, the production of Taylor maps is for analysis mainly (computation of lattice functions for example), rather than for tracking particles. There are a lot of applications where the techniques pioneered by Berz recently (interval arithmetic, validated computation, Taylor models, etc.) are more desirable than bone headed integration. However we will stick here to what we often refer to as the Talman view of accelerator simulation: take a symplectic model and stick to it fanatically. Nevertheless, one can only lament that the present work was not done in concert with Berz’s most recent tools. Perhaps this situation can be corrected in the near future: one can even imagine COSY-INFINITY being ∗Work supported by KEK and Kasokukishoureikai. 1The initial theory was described in reference [3] called from Fortran90 combining compiled and interpreted polymorphism. POLYMORPHIC TRACKING CODE: PTC PTC [17] may appear novel in two ways. First it uses FPP for all perturbative calculations. Secondly it has novel structures to fully exploit the magnet/object in a dynamical setting. The usage of FPP in PTC is by far the more ancient and well known aspect of PTC. One of the author has been pushing for the inclusion of “DA” and the related Lielib in “kick codes” since the days of the defunct SSC-CDG. Taylor polymorphism is also an old story by now with Berz and Bengtsson as main proponents. The development of structures more adapted to the mathematics of “s”-tracking is far less understood and more recent except for the fact that Forest and Bengtsson were already discussing these things in the early days of the C++ disaster known as CLASSIC. In part we did not want to get involved with this project precisely because their class design was not motivated by the underlying mathematical structure of “s” or magnet based tracking. We will now summarize very briefly what can be done with FPP in PTC or for that matter in any other integrator code equipped with FPP.