source: PSPA/madxPSPA/doc/usrguide/Introduction/ranges.html @ 489

Last change on this file since 489 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 2.0 KB
Line 
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>
10EUROPEAN 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>:
17A range can be defined starting at
18a given element and ending at another element, both elements included.
19Two forms exist:
20<pre>
21range=<a name=position>position</a>;
22range=position1/position2;
23</pre>
24In the first case, only one element is selected; in the second case, one
25or several elements are selected. NOTE: position1 must not be behind
26position2 in the sequence.
27<p>
28"position" is composed of the element name and an optional occurrence
29count in the sequence:
30<pre>
31mq.ir5.l6..1          ! no occurrence count given
32mb[17]                ! occurrence count given
33</pre>
34There are two predefined MAD indices:
35<ul>
36<li><a name=s>#S</a>.
37The start of the beam line expanded by USE,
38<li><a name=e>#E</a>.
39The end of the beam line expanded by USE.
40</ul>
41If, in the USE statement, only a range is selected:
42<pre>
43use,period=lhcb1,range=ir1/ir5;
44</pre>
45then "#s" and "#e" refer to the start and end of the expanded range,
46of course.
47<p>
48Examples 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>:
57The single name of a class (no occurrence counts). A class is the name
58of an element (or basic type) from which other elements have been derived.
59Example:
60<pre>
61mq:quadrupole;
62q1:mq;
63q2:mq;
64q1..a:q1;
65q2..b:q2;
66</pre>
67makes classes from mq, q1, and q2. Selection class="mq" will actually select
68q1, 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>,
71June 17, 2002
72</address>
73
74</body>
Note: See TracBrowser for help on using the repository browser.