next up previous
Next: Baseline definition Up: Operations used in conjunction Previous: Operations used in conjunction

Alignment fitting

This operations allows the user to fit the values read in monitors (see their definition in the machine list). Any parameter can be used as variable. Successive use of this operation can simulate progressive alignment correction of a beamline. A new minimizer is installed since December 1 1984. It has a default tolerance and default increments for the variables which seem adequate. As a consequence the input parameters del(i) have no influence. We have kept them to avoid changes in the input format .

Input format 

ALIGnment fitting .....(maximum 80 characters)
nstep nit nvar ncond nfit nopter
$\beta_{x},\alpha_{x},\eta_{x},\eta '_{x}$
$\beta_{y},\alpha_{y},\eta_{y},\eta '_{y}$
$x_{0},x'_{0},y_{0},y'_{0}$
dx dx' dy dy'
nener ${\rm ener}_{i}$ for i from 1 to nener
Origin
${\rm name}_{i},{\rm keyword}_{i},{\rm del}_{i}$ for i from 1 to npar
When nfit equals 1 or 2 the following group applies
CORR
${\rm name}_{i},{\rm pos}_{i},{\rm opt}_{i} ,{\rm param}_{i},{\rm del}_{i}$ for i from 1 to ncor
NOTE: ncor+npar=nval
${\rm mon}_{i},{\rm pos}_{i},{\rm val\char93 }_{i}, {\rm value}_{i},{\rm weight}_{i},{\rm error}_{i}$ for i from 1 to ncond
End of the group for nfit 1 or 2
If nfit equals 3 the following group applies :
CORR
mcorr
${\rm name}_{i},{\rm opt}_{i},{\rm param}_{i}$ for i from 1 to mcorr
nmon nskip
${\rm name}_{i},{\rm val\char93 }_{i},{\rm value}_{i}, {\rm weight}_{i},{\rm error}_{i}$) for i from 1 to nmon
end of group for nfit 3
nasp
repeat the following nasp times
name keywd npas
${\rm name}_{k},{\rm keyword}_{k},{\rm mult}_{k}, {\rm add}_{k}$ for k from 1 to npas
Parameter definitions

nstep $\textstyle \parbox{10cm}{ number of steps taken to approach final fit.}$

nit $\textstyle \parbox{10cm}{
number of iterations used in final step. During thes...
...ions the stepsizes del of the parameters are
reduced by a constant factor(5).}$

nvar $\textstyle \parbox{10cm}{
number of variables used (maximum 12).}$

ncond $\textstyle \parbox{10cm}{
number of conditions fitted.}$

nfit $\textstyle \parbox{10cm}{
selects the fitting procedure.}$

1 $\textstyle \parbox{10cm}{
Newton's method is used. In this case ncond = nvar.
We recommend that you do not use this fit option}$

2 $\textstyle \parbox{10cm}{
A least square fit is used.}$

nopter $\textstyle \parbox{10cm}{
error option parameter for the reading of the monitors,
this is a noise error of the reading.}$

0 $\textstyle \parbox{10cm}{
the monitors have no errors}$

1 $\textstyle \parbox{10cm}{
the monitor error is the value given in the error
parameter of the monitor(see below) multiplied randomly
by + and - signs.}$

2 $\textstyle \parbox{10cm}{
The monitor error is a uniform random distribution with
a sigma equal to the error value.}$

3 $\textstyle \parbox{10cm}{
The monitor error is a gaussian distribution cutoff at
two sigmas}$

4 $\textstyle \parbox{10cm}{
The monitor error is a gaussian distribution cutoff at
six sigmas}$

11,12,13,14 $\textstyle \parbox{8cm}{
the random error is the same as for 1,2,3 or 4
with ...
... validity of your results with a family of
runs using the options 1,2,3 or 4.}$

The initial seed used is the same as that defined by the operation SEED. The generation of the random errors for the monitors is, INDEPENDENT of that of the misalignments and of the field errors.

$\beta_{x},\alpha_{x},\eta_{x},\eta'_{x}, \beta_{y},\alpha_{y},\eta_{y},\eta'_{y}$

$\textstyle \parbox{10cm}{
input parameters used in the computing the beam line
function values}$

$x_{0},x'_{0},y_{0},y'_{0}$ $\textstyle \parbox{10cm}{initial values of nominal orbit.}$

dx dx' dy dy' $\textstyle \parbox{10cm}{
increments used in the computation of the cx sx cy sy
functions needed to generate the transfer matrices
around the nominal orbit}$

nener $\textstyle \parbox{10cm}{
number of momenta traced (maximum 3).}$

ener $\textstyle \parbox{10cm}{
values of the momenta (p-p0)/p0.}$

origin $\textstyle \parbox{10cm}{
position used as current origin to position the correctors
used later. This position is be specified by the name
of an element.}$

$name_{i},keyword_{i}$ $\textstyle \parbox{8cm}{
names of the elements having parameters to be varied.
npar<=nvar such elements can be used}$

del $\textstyle \parbox{10cm}{
not used in the present version, but must be present in
the input.}$

CORR $\textstyle \parbox{10cm}{
flag to signal the correctors are going to be used}$

mcor $\textstyle \parbox{10cm}{
for fit 3 : number of corrector names. The
program ...
...ble correctors
whose name are any of name(i). Remember that ncor =
nvar-npar}$

$name_{i}$ $\textstyle \parbox{10cm}{
name of corrector}$

${\rm pos}_{i}$ $\textstyle \parbox{10cm}{
relative position (origin + pos is the absolute
position of the corrector)}$

${\rm opt}_{i}$ $\textstyle \parbox{10cm}{
option defining the type of corrector(see SETCorrector
operation)}$

${\rm param}_{i}$ $\textstyle \parbox{10cm}{
parameter number of parameter to be varied}$

${\rm del}_{i}$ $\textstyle \parbox{10cm}{
increment used in the fitting routine to vary the
parameter}$

${\rm mon}_{i}$ $\textstyle \parbox{10cm}{
Monitor name as present in machine list}$

nmon $\textstyle \parbox{10cm}{
for nfit 3 : names of distinct monitors. The program
picks ncond monitors whose name fits name(i) AFTER
SKIPPING nskip monitors!}$

${\rm pos}_{i}$ $\textstyle \parbox{10cm}{
Relative position of the monitor with respect to the
origin point.}$

${\rm val\char93 }_{i}$ $\textstyle \parbox{10cm}{
\begin{tabbing}
value number \= \\
\> =(iener-1)*...
...y monitor \\
\> =(iener-1)*4+4 sigy value as read by monitor
\end{tabbing} }$

${\rm value}_{i}$ $\textstyle \parbox{10cm}{
values read are those corresponding to momentum iener
(1 to 3 maximum).}$

${\rm weight}_{i}$ $\textstyle \parbox{10cm}{
used in conjuction with the least square fit. This
...
...e ${\rm weight}_{i}$ the stronger the constraint to fit the ${\rm value}_{i}$.}$

${\rm error}_{i}$ $\textstyle \parbox{10cm}{
used in conjunction with the parameter nopter. If
n...
...f nopter
is 1 the monitor mon(i) is affected by the error
${\rm error}_{i}$.}$

nasp: $\textstyle \parbox{10cm}{
number of associated parameters}$

name1 $\textstyle \parbox{10cm}{
Name of element to which some parameters are to be
associated.}$

keywd $\textstyle \parbox{10cm}{
parameter keyword of element name1 to which some
parameters are to be associated.}$

npas $\textstyle \parbox{10cm}{
total number of parameters to be associated to the
parameter (keywd) of name1.}$

${\rm name}_{k}$ $\textstyle \parbox{10cm}{
name of the element which has a parameter to be
associated with name 1.}$

${\rm par}_{k}$ $\textstyle \parbox{10cm}{
keyword of parameter to be associated.}$

${\rm mult}_{k},{\rm add}_{k}$ $\textstyle \parbox{10cm}{
multiplicative and additive constants which define t...
...ameter used in the
element name1 and to which ${\rm par}_{k}$\ is associated.}$



Examples

The first two examples are taken from demo6.

The third set comes from demo7. Please refer to these demos for their relation with other operations.

* the following is an example of an Alignment fitting with nfit = 3
ALIGNMENT FITTING
0 1 8 8 3 0
3 0 0 0 1 0 0 0
0 0 0 0
0.00001 0.00001 0.00001 0.00001
1 0
MRKC2
CORR
2
HC 0 4
kcv 3 2
2 0
PMC 1 0.0 1.0 20E-06
PMC 2 0.0 1.0 20E-06
0,


* the following is an example of an Alignment fitting with nfit = 2
ALIGNMENT FITTING
0 1 6 6 2 0
3 0 0 0 1 0 0 0
0 0 0 0
0.00001 0.00001 0.00001 0.00001
1 0
MRKS1
corr
ksv 2 3 2 0.0001 ksv 16 3 2 0.0001 ksv 35 3 2 0.0001
ksh 7 3 1 0.0001 ksh 19 3 1 0.0001 ksh 32 3 1 0.0001
PMs 13 1 0.0 1.0 20E-06 PMs 13 2 0.0 1.0 20E-06
PMs 28 1 0.0 1.0 20E-06 PMs 28 2 0.0 1.0 20E-06
PMs 40 1 0.0 1.0 20E-06 PMs 40 2 0.0 1.0 20E-06
0,



* the following is an example of an Alignment fitting with nfit = 2
* and shows how to correct  off momentum orbits and beam sigma
* values
ALIGNMENT CORRECTION FINAL FOCUS ORBIT
0 1 6 6 2  0
49.26950355 0 0 0 22.75617615 0 0 0
0 0 0 0
0.000001 0.000001 0.000001 0.000001
2 0 -0.001
MFIN
KORS DXP 0.000001 KORS DYP 0.000001
KETA DXP 0.000001 KETA DYP 0.000001
KORT DXP 0.000001 KORT DYP 0.000001
PMINT 28 1 0.0 1.0 10E-06 PMINT 28 2 0.0 1.0 10E-06
PMINT 31 5 0.0 1.0 10E-06 PMINT 31 6 0.0 1.0 10E-06
PMINT 33 1 0.0 1.0 10E-06 PMINT 33 2 0.0 1.0 10E-06
0,
ALIGNMENT CORRECTION FINAL FOCUS SIGMAS
0 2 4 6 2  0
49.26950355 0 0 0 22.75617615 0 0 0
0 0 0 0
0.000001 0.000001 0.000001 0.000001
3 0 -0.003 0.003
MFIN
QC1 K1 0.0001  QS1 K1 0.0001
Q3XC K1 0.0001  Q2BA K1 0.0001
PMINT 31  3 1.2E-06 1.0 0.000 PMINT 31  4 1.2E-06 1.0 0.000
PMINT 31  7 1.2E-06 1.0 0.000 PMINT 31  8 1.2E-06 1.0 0.000
PMINT 31 11 1.2E-06 1.0 0.000 PMINT 31 12 1.2E-06 1.0 0.000
0,


next up previous
Next: Baseline definition Up: Operations used in conjunction Previous: Operations used in conjunction
Dobrin Kaltchev 2004-10-20