Functions/objects to construct/edit beam lines and elements in FFS.
Usage: BeamLine[e1, e2, ...];
where e1, e2 has a form of
[ - ][ n* ] x ,
with x being one of
An optional negative sign specifies the direction and a number n the repetition number in the same way as MAIN. A BeamLine object is automatically expanded to the lowest level whenever it is evalluated. Editing of BeamLine can be done using any List-handling functions such as Join, Insert, Delete, etc. of FFS.
A BeamLine object can be used for FFS calculation when it is used as the argument of USE or VISIT commands:
Examples: 1) USE BeamLine[IP,QF,QD] 2) aaa=ExtractBeamLine[]; USE Join[aaa,-aaa]
In these cases the new beam line becomes a new LINE in the MAIN level, with a name which is created automatically.
BeamLineName[] returns the name of the current beam line. If a BeamLine object is used by USE or VISIT, the new beam line becomes a new LINE in the MAIN level, with a name which is created automatically.
Usage: ExtractBeamLine[line]
returns a BeamLine object which represents the expanded form of line which has been defined in MAIN. If line is omitted, the current line is assumed.
Usage: PrintBeamLine[f, b1,.. ,option]
writes the BeamLine b1,.. to file f to stdout. If Format->"MAIN" is given, it writes in the MAIN-input format. If Name->{name1,..} is given, names of BeamLines are also written. The number of Name must be larger than number of BeamLines.
Usage: WriteBeamLine[f, b1,.. ,option]
writes the BeamLine b1,.. to file f. If Format->"MAIN" is given, it writes in the MAIN-input format. If Name->{name1,..} is given, names of BeamLines are also written. The number of Name must be larger than number of BeamLines.