Next: Shared Lines
Up: Beam Lines, Sequences, and
Previous: Beam Line Sequences
  Contents
  Index
Lines and Sequences with arguments
A line or sequence definition can also have parameters like a
MACRO.
Such a line or sequence can be nested (and instantiated) in another
line or sequence, but it must have a unique name when
instantiated in a sequence.
Examples:
CELL(X,Y):SEQUENCE,L=79;
QF&X: QF,AT=...;
Y&X: Y,L=1,AT=...;
QD&X: QD,AT=...;
ENDSEQUENCE;
When used as
CELL12: CELL(12,SF);
this expands to
CELL12:SEQUENCE,L=79;
QF12: QF,AT=...;
SF12: SF,L=1,AT=...;
QD12: QD,AT=...;
ENDSEQUENCE;
A second example:
CELL(X,Y):LINE=(D1,QF&X,D2,Y&X,D3,QD&X,D4);
If the proper drifts are used, this example is equivalent to
the sequence example above.
MAD User Guide, http://wwwslap.cern.ch/mad/