[430] | 1 | <head> |
---|
| 2 | <title>Range Selection</title> |
---|
| 3 | <!-- Changed by: Chris ISELIN, 27-Jan-1997 --> |
---|
| 4 | <!-- Changed by: Hans Grote, 10-Jun-2002 --> |
---|
| 5 | </head> |
---|
| 6 | |
---|
| 7 | <body bgcolor="#ffffff"> |
---|
| 8 | |
---|
| 9 | <center> |
---|
| 10 | EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH |
---|
| 11 | <IMG SRC="http://cern.ch/madx/icons/mx7_25.gif" align=right> |
---|
| 12 | <h2>Range and Class Selection Format</h2> |
---|
| 13 | </center> |
---|
| 14 | <p> |
---|
| 15 | <ul> |
---|
| 16 | <li><a name=range>RANGE</a>: |
---|
| 17 | A range can be defined starting at |
---|
| 18 | a given element and ending at another element, both elements included. |
---|
| 19 | Two forms exist: |
---|
| 20 | <pre> |
---|
| 21 | range=<a name=position>position</a>; |
---|
| 22 | range=position1/position2; |
---|
| 23 | </pre> |
---|
| 24 | In the first case, only one element is selected; in the second case, one |
---|
| 25 | or several elements are selected. NOTE: position1 must not be behind |
---|
| 26 | position2 in the sequence. |
---|
| 27 | <p> |
---|
| 28 | "position" is composed of the element name and an optional occurrence |
---|
| 29 | count in the sequence: |
---|
| 30 | <pre> |
---|
| 31 | mq.ir5.l6..1 ! no occurrence count given |
---|
| 32 | mb[17] ! occurrence count given |
---|
| 33 | </pre> |
---|
| 34 | There are two predefined MAD indices: |
---|
| 35 | <ul> |
---|
| 36 | <li><a name=s>#S</a>. |
---|
| 37 | The start of the beam line expanded by USE, |
---|
| 38 | <li><a name=e>#E</a>. |
---|
| 39 | The end of the beam line expanded by USE. |
---|
| 40 | </ul> |
---|
| 41 | If, in the USE statement, only a range is selected: |
---|
| 42 | <pre> |
---|
| 43 | use,period=lhcb1,range=ir1/ir5; |
---|
| 44 | </pre> |
---|
| 45 | then "#s" and "#e" refer to the start and end of the expanded range, |
---|
| 46 | of course. |
---|
| 47 | <p> |
---|
| 48 | Examples for ranges: |
---|
| 49 | <pre> |
---|
| 50 | ..,range=#s; ! first element |
---|
| 51 | ..,range=#s/#e; ! full expansion range |
---|
| 52 | ..,range=mb[5]/#e; ! from mb 5 to end |
---|
| 53 | ..,range=mq.ir5.l6..1; ! first occurrence of element mq.ir5.l6..1 |
---|
| 54 | </pre> |
---|
| 55 | |
---|
| 56 | <li><a name=class>CLASS</a>: |
---|
| 57 | The single name of a class (no occurrence counts). A class is the name |
---|
| 58 | of an element (or basic type) from which other elements have been derived. |
---|
| 59 | Example: |
---|
| 60 | <pre> |
---|
| 61 | mq:quadrupole; |
---|
| 62 | q1:mq; |
---|
| 63 | q2:mq; |
---|
| 64 | q1..a:q1; |
---|
| 65 | q2..b:q2; |
---|
| 66 | </pre> |
---|
| 67 | makes classes from mq, q1, and q2. Selection class="mq" will actually select |
---|
| 68 | q1, q2, q1..a, and q2..b in the above example. |
---|
| 69 | <address> |
---|
| 70 | <a href="http://www.cern.ch/Hans.Grote/hansg_sign.html">hansg</a>, |
---|
| 71 | June 17, 2002 |
---|
| 72 | </address> |
---|
| 73 | |
---|
| 74 | </body> |
---|