EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH
MAKETHIN: Slice a sequence into thin lenses
This module converts a sequence with thick elements into one composed of
thin (zero length) element slices or simplified thick slices as required
by MAD-X tracking or conversion to SIXTRACK input format.
Slicing to thin elements
The slicing is performed by the command:
MAKETHIN,SEQUENCE=seq_name, STYLE=slicing_style,
MAKEDIPEDGE= logical;
MINIMIZEPARENTS= logical,
MAKECONSISTENT= logical;
The parameters are defined as:
Number of slices
The number of slices can be set individually for elements or groups of
elements using
SELECT
commands
SELECT, FLAG=makethin,
RANGE=range, CLASS=class, PATTERN=pattern[,FULL][,CLEAR],
THICK=logical, SLICE=integer;
where the argument to the parameter SLICE is the number of
slices for the selected elements.
The default is one slice and THICK=false for all elements,
i.e. conversion of all thick elements to a single thin slice
positioned at the centre of the original thick element.
Note that THICK=true only applies to dipole or quadrupole magnet
elements and is ignored otherwise.
MAKETHIN allows for thick quadrupole slicing with insertion of
markers between thick slices. Positioning is done with markers between
slices, here however with thick slice quadrupole piece filling the whole
length.
Examples:
! slice quadrupoles thick, insert 2 markers per quadrupole
select, flag=makethin, class=quadrupole, thick=true, slice=2;
! thick slicing for quadrupoles named mqxa, insert one marker in the middle
select, flag=makethin, pattern=mqxa\., slice=1, thick=true;
Slicing can be turned off for certain elements or classes by specifying
a number of slices < 1. Examples:
! turn off slicing for sextupoles
select, flag=makethin, class=sextupole, slice=0;
! keep elements unchanged with names starting by mbxw
select, flag=makethin, pattern=mbxw\., slice=0;
This option allows to introduce slicing step by step and monitor the
resulting changes in optics parameters.
Keep in mind however that subsequent tracking generally requires full slicing, with
possible exception of quadrupoles and bending magents.
Additional Information
The generated thin lens sequence has the following properties:
- The new sequence has the same name as the original. The original sequence
is replaced by the new one in memory. If the original sequence is
needed for further processing in MAD-X, it should be reloaded.
- The algorithm also processes any sub-sequence inserted in the main
sequence. These sub-sequences are also given the same names as the original ones.
- Any element transformed into a single thin lens element has the
same name as the original.
- If an element is sliced into more than one slice, the individual
slices have the same basename as the original element plus a suffix
..1, ..2, etc. and a marker, with the name of the original
element, is placed at the location of the center of the original element.
Hints:
- Compare the main optics parameters like tunes before and after slicing
with MAKETHIN. Rematch tunes and chromaticity as necessary after
MAKETHIN.
- In tests, turn off slicing for some of the main element classes to
identify the main sources of changes.
- For sextuples and octupoles, a single slice should always be sufficient.
- Increase the number of slices for critical elements like mini-beta
quadrupoles. Even there, more than four slices should rarely be
required.
- In case of problems or doubts, consider to
flatten the sequence before slicing.
- See the
examples for makethin.
See also the presentations on the upgrade of the makethin module:
LCU_makethin_2012_09_18.pdf, and
LCU_makethin_2013_04_19.pdf.
TEAPOT is documented in
IPAC'13 MOPWO027
Helmut Burkhardt, May 2014