1 | ! Simple tracking test for collimator with aper definition. |
---|
2 | ! tstTrack_ap_collimator.madx |
---|
3 | |
---|
4 | option,-echo,-info,-warn; |
---|
5 | |
---|
6 | ! ********** Apertures introduced ********** |
---|
7 | col:rcollimator, l= 0.0, apertype= rectellipse, |
---|
8 | aperture= { 0.00175, 0.00155, 0.0020, 0.0017}; |
---|
9 | ! ----- syntax: {Hhalfwidthrect, Vhalfheightrect, Hhalfaxis, Vhalfaxis} |
---|
10 | endmk:marker; |
---|
11 | |
---|
12 | ! ********** Define sequence |
---|
13 | smachd: sequence, l= 2.0; |
---|
14 | col, at= 1.00; |
---|
15 | endmk, at= 2.0; |
---|
16 | endsequence; |
---|
17 | |
---|
18 | ! ********** Define beam and use the sequence with it |
---|
19 | beam, sequence= smachd, particle= proton, energy= 450; |
---|
20 | use, sequence= smachd; |
---|
21 | |
---|
22 | ! ********** Track 20 particles |
---|
23 | ! Note the usage of the options |
---|
24 | ! 'onepass': |
---|
25 | track, onepass, onetable, file= "out_test-track_ap_collimator", aperture, dump; |
---|
26 | n=0; |
---|
27 | while(n<20) { |
---|
28 | n= n+1; |
---|
29 | start, x= -0.002+0.004*ranf(), |
---|
30 | y= -0.0017+0.0034*ranf(), |
---|
31 | px= 0, py= 0; |
---|
32 | } |
---|
33 | run, turns= 1; |
---|
34 | endtrack; |
---|
35 | |
---|
36 | |
---|
37 | return; |
---|