Siamese and Girders in PTC Etienne Forest KEKCERN

  • Slides: 20
Download presentation
Siamese and Girders in PTC Etienne Forest KEK/CERN

Siamese and Girders in PTC Etienne Forest KEK/CERN

Elements and Fibres • In PTC the equivalent of magnet in MAD-X or other

Elements and Fibres • In PTC the equivalent of magnet in MAD-X or other codes, is the object of type ELEMENT. Therefore if I refer to a magnet in this document; it is the type ELEMENT of the code. • In PTC, magnets are not the objects which appear sequentially in a beam line. This is the novel aspect of PTC. A beam line in PTC, which is of type LAYOUT, is made of fibres of type FIBRE. • The idea is that the same magnet can appear in several beam lines (common elements) or it can reappear in the same beam line several times non-trivially (in a recirculator). • Each fibre has a pointer to a magnet and to Euclidean patches which connect this magnet geometrically and energetically to its surrounding fibre. • The fibre has a chart which localises it in space in its ideal position and energy. Generally it is not the position produced by a MAD 8 survey. In fact the position is arbitrary.

Siamese and girders • Several magnets can be glued together. For example in LHC,

Siamese and girders • Several magnets can be glued together. For example in LHC, the magnets are actually two bore magnets: one inner pipe for the inner ring and one outer pipe for the outer ring. One could imagine more magnets glued together: for example in a recirculator. • In PTC such magnets are called Siamese. They are joined and the user can misaligned them as a block with a special command. • A girder is collection of Siamese and regular magnets which can be moved together. It is obviously a super set.

Siamese and Girder in type Element • The magnet has the following pointers TYPE(FIBRE_APPEARANCE),

Siamese and Girder in type Element • The magnet has the following pointers TYPE(FIBRE_APPEARANCE), POINTER : : DOKO TYPE(ELEMENT), POINTER : : SIAMESE TYPE(ELEMENT), POINTER : : GIRDER TYPE(AFFINE_FRAME), POINTER : : SIAMESE_FRAME TYPE(AFFINE_FRAME), POINTER : : GIRDER_FRAME

Siamese creation Siamese are formed by making a circular list using the pointer SIAMESE

Siamese creation Siamese are formed by making a circular list using the pointer SIAMESE Actual Code m 1 m 4 m 2 m 3 m 1%siamese => m 2%siamese => m 3%siamese => m 4%siamese => m 1

Siamese Frame for Misalignments • If the reader wants a special frame to define

Siamese Frame for Misalignments • If the reader wants a special frame to define the misalignments of the siamese, he must use a set of commands to create this frame • Decide with respect to what magnet the frame is defined • Allocate the frame. For example, if we pick m 1, then we must use • Call alloc_af(m 1%siamese_frame)

continued • Next we must find the angle and the translation between the entrance

continued • Next we must find the angle and the translation between the entrance frame of m 1 and the frame chosen A=(M 1%P%F%O+M 4%P%F%O)/2. D 0 ENT=M 1%P%F%MID CALL FIND_PATCH(M 1%P%F%A, M 1%P%F%ENT, A, ENT, & M 1%SIAMESE_FRAME%D, M 1%SIAMESE_FRAME%ANGLE) • Of course if SIAMESE_FRAME%D and if SIAMESE_FRAME%ANGLE are already known, they can be directly set!

Misalignment Command for Siamese Choose a magnet of the siamese (anyone), say m 1,

Misalignment Command for Siamese Choose a magnet of the siamese (anyone), say m 1, then chose a fibre which contains m 1, say p 1, then the command can be (see next page): CALL MISALIGN_SIAMESE(P 1, X, ADD=. TRUE. ) X(1: 3) = (dx, dy, dz) and X(4: 6) = (ax, ay, az) All the commands are in the PTC order. There is no way around this. Therefore the user has two choices: 1) Call the misalign commands in successions to realize his particular convention: the ADD=. true. is useful in this context. 2) Use PTC geometrical routines to create the correct input. PTC is very powerful in this case. N. B. Look in the tracking routine to see what the PTC order is! N. B. Beware of reverse propagators. The misalignments are defined in the natural frame of the magnet irrespective of reverse or forward.

Command MISALIGN_SIAMESE(S 2, S 1, OMEGA, BASIS, ADD) The red quantities are optional. Here

Command MISALIGN_SIAMESE(S 2, S 1, OMEGA, BASIS, ADD) The red quantities are optional. Here is the actual code. FOUND=. FALSE. ADDIN=. FALSE. CALL FIND_AFFINE_SIAMESE(S 2, CN, FOUND) ! Looking for siamese IF(FOUND) CALL FIND_FRAME_SIAMESE(CN, B, EXI, ADD) IF(PRESENT(ADD)) ADDIN=ADD IF(PRESENT(OMEGA)) THEN ! Arbitrary Origin OMEGAT=OMEGA ELSE OMEGAT=S 2%CHART%F%O ! Centre of magnet otherwise ENDIF IF(PRESENT(BASIS)) THEN ! Arbitrary Basis BASIST=BASIS ELSE BASIST=S 2%CHART%F%MID ! Centre of Magnet Otherwise ENDIF IF((. NOT. PRESENT(OMEGA)). AND. (. NOT. PRESENT(BASIS))) THEN IF(FOUND) THEN ! If no special basis and no special origin OMEGAT=B ! and siamese is found, then it uses the siamese basis BASIST=EXI ! Notice that if ADD=true, the siamese frames move with the magnets ENDIF

Girder creation Girders are formed by making a circular list using the pointer GIRDER

Girder creation Girders are formed by making a circular list using the pointer GIRDER Actual Code m 1 m 4 m 2 m 3 m 1%girder => m 2%girder => m 3%girder => m 4%girder => m 1 The girder looks very much like a siamese, however the girder frame is defined separately. This frame is allocated as follows: CALL ALLOC_AF(M 1%GIRDER_FRAME, GIRDER=. TRUE. ) M 1%GIRDER_FRAME%ENT(1: 3, 1: 3)=ENT(1: 3, 1: 3) M 1%GIRDER_FRAME%A(1: 3)=A(1: 3) M 1%GIRDER_FRAME%EXI=ENT M 1%GIRDER_FRAME%B=A ENT and A determined the ideal location of the girder in absolute space. EXI and B determined the location of the girder after misalignments.

Misalign Girder MISALIGN_GIRDER has exactly the same input as MISALIGN_SIAMESE Here is an example:

Misalign Girder MISALIGN_GIRDER has exactly the same input as MISALIGN_SIAMESE Here is an example: Blue siamese has the white frame; the girder has the red frame. X=0. D 0 ; X(5)=PI/4. 5; CALL MISALIGN_GIRDER(P 1, X, ADD=. TRUE. ) X(5) = -PI/4. 5 CALL MISALIGN_SIAMESE(P 1, X, ADD=. TRUE. ) Notice that the siamese frame was properly moved by the girder misalignment!

Moving Girders and Siamese Moving girders and siamese can be done automatically in PTC.

Moving Girders and Siamese Moving girders and siamese can be done automatically in PTC. 1. No DNA: we have simple rings stored in the MAD Universe. 2. DNA used: we have complex topologies. In PTC, there are two distinct types operations: placements of the fibre in its ideal position and misalignments of the magnet within the fibre. In a standard ring there is one fibre per magnet. However in more complex topologies, the same magnet can exist in several fibres since the fibre is really the discretized s-variable. For example in the collision IP of the LHC, the same magnet appears in a fibre of LHC 1 and LHC 2. To fully exploit these complex lattice, we use the concept of a DNA sequence.

Placement of Siamese and girders • • The following subroutine have automatic patching in

Placement of Siamese and girders • • The following subroutine have automatic patching in a normal and DNA based context. Therefore the basic topology of the lattice(s) • • • TRANSLATE_MAGNET (R, D, ORDER, BASIS, PATCH, PREC) TRANSLATE_SIAMESE(S 2, D, ORDER, BASIS, PATCH, PREC) TRANSLATE_GIRDER (S 2, D, ORDER, BASIS, PATCH, PREC) • • • ROTATE_MAGNET (R, ANG, OMEGA, ORDER, BASIS, PATCH, PREC) ROTATE_SIAMESE(S 2, ANG, OMEGA, ORDER, BASIS, PATCH, PREC) ROTATE_GIRDER (S 2, ANG, OMEGA, ORDER, BASIS, PATCH, PREC) The optional variables are in red. Notice that the order of ANG and OMEGA is inverted compared to the standard routines to move beam lines.

Ordinary Lattice 1. 2. 3. 4. In an ordinary lattice, magnets and fibres are

Ordinary Lattice 1. 2. 3. 4. In an ordinary lattice, magnets and fibres are in a one to one correspondence. We will assume that there is no DNA present The basic lattice has been created and is trackable. We now want to move siamese and girders As in the misalignment, select a single element of siamese/girder and call the appropriate routine. X=0. D 0 X(5)=PI/4. 5 CALL MISALIGN_GIRDER(P 1, X, ADD=. TRUE. ) X(5)=-PI/4. 5 MISALIGN_SIAMESE(P 1, X, ADD=. TRUE. ) X(5)=-PI/4. 5 CALL ROTATE_GIRDER (P 1, ANG, PATCH=. TRUE. , PREC=1. D-8)

Frames: translations TRANSLATE_SIAMESE(S 2, D, ORDER, BASIS, PATCH, PREC) FOUND=. FALSE. CALL FIND_AFFINE_SIAMESE(S 2,

Frames: translations TRANSLATE_SIAMESE(S 2, D, ORDER, BASIS, PATCH, PREC) FOUND=. FALSE. CALL FIND_AFFINE_SIAMESE(S 2, CN, FOUND) IF(FOUND) CALL FIND_FRAME_SIAMESE(CN, B, EXI, ADD=MY_FALSE) IF(PRESENT(BASIS)) THEN BASIST=BASIS ELSE IF(FOUND) THEN BASIST=EXI ELSE BASIST=GLOBAL_FRAME ENDIF TRANSLATE_GIRDER(S 2, D, ORDER, BASIS, PATCH, PREC) FOUND=. FALSE. CALL FIND_AFFINE_GIRDER(S 2, CAF, FOUND) IF(FOUND) CALL FIND_FRAME_GIRDER(CAF, B, EXI, ADD=MY_FALSE) IF(PRESENT(BASIS)) THEN BASIST=BASIS ELSE IF(FOUND) THEN BASIST=EXI ELSE BASIST=GLOBAL_FRAME ENDIF If a frame is given, then it is used. Otherwise the code looks for a siamese or girder frame. If it fails, the global frame is used. Patch=true : patching is attempted assuming an ordinary lattice. This means that the fibre is patched to its two neighbouring fibres only! (NO DNA, NO POINTED LATTICES) Patches are put on if the norm of the patches is bigger than PREC. (defaulted to a tiny number)

Frames: rotations ROTATE_SIAMESE(S 2, ANG, OMEGA, ORDER, BASIS, PATCH, PREC) FOUND=. FALSE. CALL FIND_AFFINE_SIAMESE(S

Frames: rotations ROTATE_SIAMESE(S 2, ANG, OMEGA, ORDER, BASIS, PATCH, PREC) FOUND=. FALSE. CALL FIND_AFFINE_SIAMESE(S 2, CN, FOUND) IF(FOUND) CALL FIND_FRAME_SIAMESE(CN, B, EXI, ADD=MY_FALSE) IF(PRESENT(BASIS)) THEN BASIST=BASIS ELSE IF(FOUND) THEN BASIST=EXI ELSE BASIST=GLOBAL_FRAME ENDIF IF(PRESENT(OMEGA)) THEN OMEGAT=OMEGA ELSE IF(FOUND) THEN OMEGAT=B ELSE OMEGAT=GLOBAL_ORIGIN ENDIF ROTATE_GIRDER (S 2, ANG, OMEGA, ORDER, BASIS, PATCH, PREC) FOUND=. FALSE. CALL FIND_AFFINE_GIRDER(S 2, CAF, FOUND) IF(FOUND) CALL FIND_FRAME_GIRDER(CAF, B, EXI, ADD=MY_FALSE) IF(PRESENT(BASIS)) THEN BASIST=BASIS ELSE IF(FOUND) THEN BASIST=EXI ELSE BASIST=GLOBAL_FRAME ENDIF IF(PRESENT(OMEGA)) THEN OMEGAT=OMEGA ELSE IF(FOUND) THEN OMEGAT=B ELSE OMEGAT=GLOBAL_ORIGIN ENDIF Same story as before concerning patching. Notice that for a rotation, an axis must be defined OMEGA(3) is needed. Patch=true : patching is attempted assuming an ordinary lattice. This means that the fibre is patched to its two neighbouring fibres only! (NO DNA, NO POINTED LATTICES) Patches are put on if the norm of the patches is bigger than PREC. (defaulted to a tiny number)

Lattices with DNA • The user of PTC can create complex topologies anyway he

Lattices with DNA • The user of PTC can create complex topologies anyway he wants too. To do this the standard “moving” routines of PTC are necessary. During that initial creation process patching cannot be fully automatic since the fibres do not yet exist. For example, when I create LHC 1, LHC 2 is not there yet. Therefore the common IP section cannot be patched to the fibres of a non-existent layout. • Therefore we will be talking here about moving objects in an already trackable completed complex.

DNA • N. B. A complex system can be created without DNA. What follows

DNA • N. B. A complex system can be created without DNA. What follows would NOT work in that case! • If you use DNA, then all the magnets must appear in ordinary layouts only once! These layouts are not for tracking but for data base purposes. They often correspond to MAD 8 style trackable beam lines but not necessarily. • Then the actual trackable layouts (recirculators, dog-bones, colliders) must be constructed using a command which appends a fibre whose magnet points at one of the member of the DNA.

Append_point DO J=1, 9 P=>LHC 1%DNA(J)%L%START DO I=1, LHC 1%DNA(J)%L%N CALL APPEND_POINT(LHC 1, P)

Append_point DO J=1, 9 P=>LHC 1%DNA(J)%L%START DO I=1, LHC 1%DNA(J)%L%N CALL APPEND_POINT(LHC 1, P) P=>P%NEXT ENDDO In this example, nine beam lines were read and store in a MAD_UNIVERSE. LHC 1%DNA(1. . 9)%L points to each of these “DNA” layout. The actual LHC 1 is then created using APPEND_POINT(LHC 1, P). Actually this LHC 1 is mathematically trackable although in reality it might require more manipulations to make it the real thing. Actually at this point in time, it is the survey lattice LHC 0, still a fictitious object but PTC would not know. N. B. Append_point takes a object type fibre_appearance and uses it to locate all the appearance of a given magnet.

Fibre_appearance TYPE FIBRE_APPEARANCE TYPE(FIBRE), POINTER : : PARENT_FIBRE TYPE(FIBRE_APPEARANCE), POINTER : : NEXT END

Fibre_appearance TYPE FIBRE_APPEARANCE TYPE(FIBRE), POINTER : : PARENT_FIBRE TYPE(FIBRE_APPEARANCE), POINTER : : NEXT END TYPE FIBRE_APPEARANCE • In the element, there is an object called “doko” from the Japanese meaning “where”! • A link list is made all the fibres outside the DNA where the magnet appears! • Patching proceeds for all fibres of the DOKO linked list!