next up previous contents index
Next: Insertion Matching Up: Matching Examples Previous: Matching Examples   Contents   Index

Simple Periodic Beam Line

Match a simple cell with given phase advances:

// Some definitions:
QF:     QUADRUPOLE,...;
QD:     QUADRUPOLE,...;
EM:     MARKER;
CELL1:  LINE=(...,QF,...,QD,...,EM);
P0 = ...;
BEAM1:  BEAM,PC=P0;
TW1:    TWISS,LINE=CELL1,BEAM=BEAM1,METHOD=LINEAR;

// Match CELL1:
MATCH;
  VARY,NAME=QD->K1,STEP=0.01;
  VARY,NAME=QF->K1,STEP=0.01;
  CONSTRAINT,ROW(TW1,EM,{MUX,MUY})=={0.25,1/6};
  LMDIF,CALLS=200;
ENDMATCH;



MAD User Guide, http://wwwslap.cern.ch/mad/