46 4 DESCRIPTION OF THE AVAILABLE PROCEDURES?{¤1³£7>DDDD7 >DDbig Awith the Twiss matrix, following ?1 big A ¤1DD{©Ë – d • J©Ë – d • FIT: Fitting procedureThe keyword FIT allows the automatic adjustment of up to 20 variables, for fitting up to 20 constraints. It has been realizedafter existing routines used in the matrix transport code BETA [15]. Any physical parameter of any element (i.e. keyword)may be varied. Available constraints are, amongst others: any of the Gcoefficients of the first order transfer matrix1 bhg G as defined in the keyword MATRIX, and its horizontaland verticalA 1 7k7 1 >k> w†1 7 > 1 > 7determinants; horizontal and vertical tunes (if periodical structure); any of the G G Garray ?coefficients of the second ordercoefficients of D the -matrix as defined by 1 T$T 1 PkP wC1 T P 1 P T bigkj Aas defined in MATRIX ; any of the @ R7$7> 7>k>A ¥„ big¦„……®? DTkTT P< |{andany trajectory coordinates as (¤ defined in OBJET = particle number,"k¤respectively , ,¥ , ,or path O length).d •Tunes – Ë ·and Twiss periodic É functionsof the full optical structure transfer ? matrix= coordinate number = 1 to 6 forare adjustable as well; they are defined by identificationP TPkP'¦ @whereino ¹ É w Á w ¹ s .– d •"k¹Š&†– d •" Á – d •{-'ž @VARIABLESThe first input data in FIT are the number of variables NV , and for each one of them, the following parameters1 number of the varied element in the structurenumber of the physical parameter to be varied in this element¤¦¥²coupling parameter. Normally § ²aC\. If § ²ˆ‡ K\, coupling will occur (see below).§allowed relative range of variation of the physical parameter ¤¥ .O‚˜Numbering of the elements (IR):The elements (DIPOLE, QUADRUPO, etc.) are numbered following their sequence in the zgoubi input data file, for thepurpose of the FIT procedure. The number of any element just identifies with its position in the data sequence. However,a simple way to ¤ get is to make a preliminary run: zgoubi will then print the whole structure into the file zgoubi.reswith all elements numbered.Numbering of the physical parameters (IP):In the elements DIPOLE, AIMANT and EBMULT, ELMULT, MULTIPOL, the numbering of the physical parametersjust follows their sequence, as it is shown here after for DIPOLE-M: the left column below represents the input data, theright one the corresponding numbering to be used for the FIT procedure.Input dataDIPOLE-MNFACE, ¤ ², ¤÷¨ 1, 2, 3Numbering for FIT¡ 4£ ¡ 46 > T P M 7² 7‰ ‰Å ÃIAMAX, IRMAX 4, 5, , ,6, 7, 8, 9AT, ACENT, RM, RMIN, RMAX 10, 11, 12, 13, 14, 15,16NC , , , , , , shift 17, 18, 19, 20, 21, 22, 23, 24, , , , , 25, 26, 27, 28, 29, 30etc.etc.
4.3 Declaration of options 47· £¨ ²£>7@77>>10 ?E" BDBEB " q20 ?E" BDBEB "A7qA7@1Parameters in SCALING also have a specific numbering, as follows.Input dataSCALINGIOPT, NFAMNAMEFNumbering for FITNAMEFv¤¤ , ¤ q , £10 ?E" BDBEB " q £# \V£#¤ , ¤ q , £2 \ @v¤...etc. up to NFAM¤ , ¤ q , £20 ?E" BDBEB "For all other keywords, the parameters are numbered in the following wayetc.@ \ @V£#Input dataNumbering for FITKEYWORDfirst line 1, 2, 3,...second line 10, 11, 12, 13,...this is a comment a line of comments is skippednext line 20, 21, 22,...and so on... 30, 31, 32, 33,...The examples of QUADRUPO (quadrupole) and TOSCA (Cartesian or cylindrical mesh field map) are given below.Input dataQUADRUPONumbering for FIT1¤÷¨ 4, , 10, 11, 12§ ¨, 1 20, 21¡ 4 Š §‹ŠNCE ³ 7, ,>, ,T, ² P, ² M ² ² ² ²Œ , Œ 40, 41§ 4NCS , , ³ 7, ² >, ² T, ² P, ² M² ²30, 31, 32, 33, 34, 35, 3650, 51, 52, 53, 54, 55, 56XPAS 60KPOS, XCE, YCE, ALE 70, 71, 72, 73> A· ² ¨¤ , ¤ @ \ £#> A2 q , £TOSCABNORM, X- [, Y-, Z-]NORM 10, 11 [, 12, 13]TITThis is text¤ ², ¤÷¨ 1, 2FNAMEThis is text¤§ , ¤¦ , ¤ , MOD 20, 21, 22, 23IORDRE 40XPAS 50KPOS, XCE, YCE, ALE 60,61,62,63¤`O , ´ , ¡ , ² [´ ), ¡ ), ² ) , etc. if ¤`O-Ž] 30, 31, 32, 33 [34, 35, 36 [, 37, 38, 39] if ¤`O Ž]Coupled variables (§ ²)§ ²€€¤€€¤¦¥ €€€). For example, § ²ý @ \ ƒq\\Coupling a variable parameter to any other parameter in the structure is possible. This is done by giving a valueof the form where the integer part is the number of the coupled element in the structure (equivalent to , seeabove), and the decimal part is the number of its parameter of concern (equivalent to , see above) (if the parameternumber is in the range 1,...,9, then must take the form is a request for coupling withis a request for coupling with thethe parameter number 1 of element number 20 of the structure, while § ² @ \ ƒparameter number 10 of element 20.