PRINT,RANGE=range{,range},TYPE=type{,type},FULL,CLEAR
SELECT,FLAG=name,RANGE=range{,range},TYPE=type{,type},FULL,CLEAR
(See obsolete element selection).
As from Version 8.18 the new element selection
is used:
PRINT,RANGE=range,CLASS=class,PATTERN=pattern[,FULL][,CLEAR] SELECT,FLAG=name,RANGE=range,CLASS=class,PATTERN=pattern[,FULL][,CLEAR]The PRINT command always affects the print flag for SURVEY, or TWISS. In SELECT the flag type is chosen by the attribute FLAG: Three of its possible values affect action commands:
TWISS: A SELECT,TWISS statement is equivalent to PRINT: The two commands
PRINT, FULL SELECT, FLAG=TWISS,FULLhave identical effect.
OPTICS: Selects output positions for OPTICS.
TRACK: Selects print positions for TRACK. Care must be taken in using this option, as it may generate a lot of output.
Four more values are intended for debugging only:
Examples:
USE,OCT ! print at beginning and end only
PRINT,#35/37 ! print at positions number 35 to 37
SELECT,TWISS,FULL ! set all print flags
PRINT,CLEAR ! clear all print flags
PRINT,OCT ! set all print flags
PRINT,CELL[3],CLEAR ! clear all flags,
! then set flags for all of third CELL
! Define element classes for a simple cell: B: SBEND,L=35.09, ANGLE = 0.011306116 QF: QUADRUPOLE,L=1.6,K1=-0.02268553 QD: QUADRUPOLE,L=1.6,K1=0.022683642 SF: SEXTUPOLE,L=0.4,K2=-0.13129 SD: SEXTUPOLE,L=0.76,K2=0.26328 ! Define the cell as a sequence: CELL: SEQUENCE B1: B, AT=19.115 SF1: SF, AT=37.42 QF1: QF, AT=38.70 B2: B, AT=58.255,ANGLE=B1[ANGLE] SD1: SD, AT=76.74 QD1: QD, AT=78.20 ENDM: MARKER, AT=79.0 ENDSEQUENCE USE,CELL SELECT,OPTICS,SBEND,QUAD,SEXT OPTICS,FILENAME="cell.optics.f",EXIT,COLUMN=NAME,S,BETX,BETYThe resulting table file is:
@ GAMTR %f 64.3336 @ ALFA %f 0.241615E-03 @ XIY %f -.455678 @ XIX %f 2.05279 @ QY %f 0.250049 @ QX %f 0.249961 @ CIRCUM %f 79.0000 @ DELTA %f 0.000000E+00 @ COMMENT %20s "DATA FOR TEST CELL" @ ORIGIN %24s "MAD 8.01 IBM - VM/CMS" @ DATE %08s "19/06/89" @ TIME %08s "09.47.40" * NAME S BETX BETY $ %16s %f %f %f B1 36.6600 24.8427 126.380 SF1 37.6200 23.8830 130.925 QF1 39.5000 23.6209 132.268 B2 75.8000 124.709 25.2153 SD1 77.1200 130.933 23.8718 QD1 79.0000 132.277 23.6098Second Example. The following is an excerpt of the LEP description:
! Bending magnet pairs:
! The definitions take into account the different magnetic length
! for the inner and outer pairs of a group of six.
B2: RBEND, L=11.55,ANGLE=KMB2,K1=KQB,K2=KSB, &
E1=-.25*B2[ANGLE],E2=-.25*B2[ANGLE]
B2OUT: B2, ANGLE=1.00055745184472*KMB2, &
E1=-.25*B2OUT[ANGLE],E2=-.25*B2OUT[ANGLE]
B2MID: B2, ANGLE=1.00111490368947*KMB2, &
E1=-.25*B2MID[ANGLE],E2=-.25*B2MID[ANGLE]
! Quadrupoles:
MQ: QUADRUPOLE,L=1.6 ! standard quadrupoles =
QD: MQ, K1=KQD ! cell quadrupoles, defocussing
QF: MQ, K1=KQF !cell quadrupoles, focussing
! Sextupoles:
MSF: SEXTUPOLE, L=0.40 ! F sextupoles
MSD: SEXTUPOLE, L=0.76 ! D sextupoles
SF1.2: MSF, K2=KSF1.2 ! F family 1, circuit 2
SF2.2: MSF, K2=KSF2.2 ! F family 2, circuit 2
SF3.2: MSF, K2=KSF3.2 ! F family 3, circuit 2
SD1.2: MSD, K2=KSD1.2 ! D family 1, circuit 2
SD2.2: MSD, K2=KSD2.2 ! D family 2, circuit 2
SD3.2: MSD, K2=KSD3.2 ! D family 3, circuit 2
! Orbit correctors and monitors:
CH: HKICK, L=0.4 ! Horizontal orbit correctors
CV: VKICK, L=0.4 ! Vertical orbit correctors
MHV: MONITOR, L=0 ! Orbit position monitors
LEP:SEQUENCE
...
QF23.R1: QF, AT=639.180037
SF2.QF23.R1: SF2.2, AT=640.460037
B2L.QF23.R1: B2OUT, AT=647.257037
B2M.QD24.R1: B2MID, AT=659.147037
B2R.QD24.R1: B2OUT, AT=671.037037
CV.QD24.R1: CV, AT=677.392037, KICK=KCV24.R1
PU.QD24.R1: MHV, AT=677.712037
QD24.R1: QD, AT=678.680037
SD2.QD24.R1: SD2.2, AT=680.140037
B2L.QD24.R1: B2OUT, AT=686.757037
B2M.QF25.R1: B2MID, AT=698.647037
B2R.QF25.R1: B2OUT, AT=710.537037
CH.QF25.R1: CH, AT=716.942037, KICK=KCH25.R1
QF25.R1: QF, AT=718.180037
SF1.QF25.R1: SF1.2, AT=719.460037
B2L.QF25.R1: B2OUT, AT=726.257037
B2M.QD26.R1: B2MID, AT=738.147037
B2R.QD26.R1: B2OUT, AT=750.037037
CV.QD26.R1: CV, AT=756.392037, KICK=KCV26.R1
PU.QD26.R1: MHV, AT=756.712037
QD26.R1: QD, AT=757.680037
SD1.QD26.R1: SD1.2, AT=759.140037
B2L.QD26.R1: B2OUT, AT=765.757037
B2M.QF27.R1: B2MID, AT=777.647037
B2R.QF27.R1: B2OUT, AT=789.537037
QF27.R1: QF, AT=797.180037
SF3.QF27.R1: SF3.2, AT=798.460037
B2L.QF27.R1: B2OUT, AT=805.257037
B2M.QD28.R1: B2MID, AT=817.147037
B2R.QD28.R1: B2OUT, AT=829.037037
PU.QD28.R1: MHV, AT=835.712037
QD28.R1: QD, AT=836.680037
SD3.QD28.R1: SD3.2, AT=838.140037
B2L.QD28.R1: B2OUT, AT=844.757037
B2M.QF29.R1: B2MID, AT=856.647037
B2R.QF29.R1: B2OUT, AT=868.537037
CH.QF29.R1: CH, AT=874.942037, KICK=KCH29.R1
...
ENDSEQUENCE
In the above structure it is easy to select many sets of observation
points:
Print at all F sextupoles:
PRINT,MSF
Split all quadrupoles at 1/3 of their length for OPTICS command:
SPLIT,QUADRUPOLE,FACTOR=1/3
Misalign two quadrupole QF25.R1 and QD26.R1:
EALIGN,QF25.R1,QD26.R1,DX=0.001*GAUSS(),DY=0.0005*GAUSS()
Print first-order matrices for elements B2L.QD24.R1 through CV.QD26.R1:
SELECT,FIRST,B2L.QD24.R1[1]/CV.QD24.R1[1]
Print lattice functions at all F-sextupoles of the first family, if connected to the second circuit:
PRINT,SF1.2