source: PSPA/madxPSPA/tests/test-ptc-twiss-56Dt/test-ptc-twiss-56Dt.ref @ 430

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

import madx-5.01.00

File size: 21.5 KB
Line 
1
2  +++++++++++++++++++++++++++++++++++++++++++
3  +    MAD-X 5.00.19  (64 bit, Linux)       +
4  +    DEBUG Version - use at own risk!     +
5  + Code Modification Date: 2012.12.11      +
6  + Execution Time Stamp: 08.02.13 16.14.36 +
7  +++++++++++++++++++++++++++++++++++++++++++
8
9
10call, file="../share/LEIR/LEIR.seqx";
11
12! LEIR Lattice definitions
13
14
15
16! Input parameter to be provided before calling :
17
18
19
20!  LSSH  .... half length of straight section from "mire to mire"
21
22
23
24!  dLSext ... Quad length reduction due to a Sextupole close to it
25
26!  dLBmp  ... Quad length reduction due to a Bumper close to it
27
28!  dLDip  ... Quad length reduction due to a Dipole close to it
29
30!  dLSol  ... Quad length reduction due to a Correction solenoid close
31
32!  dLSkew ... Quad length reduction due to a Skew Quad close to it
33
34!  KickEC ... Flag (multiplier) wheter if kicks due to toroid should be taken into account (=1)
35
36
37
38  TuneH  =  1.82;
39
40  TuneV  =  2.72;
41
42  DisEC  = -0.00;
43
44  BetHEC =  5.00;
45
46  BetVEC =  5.00;
47
48  kEddy  =  0.00;
49
50
51
52 ! Define lattice .... first parameter, then CALL a routine
53
54
55
56 ! LSSH = ((25.-2*4.17)*Pi - .0052)/8. ! To have a circumf. of 25 Pi m
57
58  LSSH = 6.5422;                        ! From fit to survey data
59
60  DFD = 0.;  !  Flag, if 1 DFD, if 0 FDF
61
62  dLSext = 0.005;  ! Mag. length decrease of Quads due to adjacent X-Pole
63
64  dLBmp  = 0.000;  ! Mag. length decrease of Quads due to adjacent Bumper
65
66  dLDip  = 0.000;  ! Mag. length decrease of Quads due to adjacent Dipole
67
68  dLSol  = 0.000;  ! Mag. length decrease of Quads due to adjacent correct. Sol.
69
70  dLSkew = 0.005;  ! Mag. length decrease of Quads due to adjacent Skew Quad
71
72  KickEC = 1.;     ! Flag whether kick due to cooler is taken into account (=1) or not (-0)   
73
74
75
76
77
78  kD1030   =-1.1303*(1-DFD) - 1.2003*DFD;
79
80  kF1030   = 0.9041*(1-DFD) + 0.9286*DFD;
81
82  kF2040   = .30876*(1-DFD) - 1.2094*DFD;
83
84  kD2040   =-1.3181*(1-DFD) + 0.9226*DFD;
85
86  kF2344   = 0.7167*(1-DFD) - 0.0918*DFD;
87
88  dkFT20   = 0.0;
89
90  dkDT20   = 0.0;
91
92  dkFT23   = 0.0;  ! strictly applies for ER.QFN24 and ER.QFN23
93
94  Msol     = 0.0;
95
96  MsolC    = 0.0;
97
98  kSk1     = 0.0;
99
100  kEddy    = 0.0;
101
102++++++ info: keddy redefined
103
104
105  LFrMir =  1.11684*((1 - cos(0.240964) + sin(0.240964))/0.240964) +       
106
107            0.01575*(sin(0.240964) + cos(0.240964)) +                     
108
109            2.13554*((cos(0.240964) - Sin(0.240964))/(Pi/4. - 0.240964)) +
110
111            0.07299*sqrt(2.) - 4.17;
112
113  LstrH = LSSH - LFrMir;
114
115  LbenH = 1.11684 + 0.01575 + 2.13554 + 0.07299;
116
117
118
119! RF system (my test) ... for CHARGE=1 ... VOLTAGE should be scale --> devided by 54
120
121! Vrf=2.2kV / H=2 / Fsynch = 1.567kHz
122
123  CAV: RFCAVITY, L=1.0, VOLT=0.0022/54, HARMON=2, LAG=0, no_cavity_totalpath; 
124
125
126
127
128
129! Definitions for bending blocks
130
131  ED1 =-0.01157;
132
133  ED2 = 0.01500;
134
135  ED3 = 0.09557;
136
137  BA1HO :  SBEND, L=1.11684/2.,            ANGLE=-0.240964/2.,                                  K1:=kEddy, K2:=sEddy, E1=-ED1, E2= 0   ;
138
139  BA1HI :  SBEND, L=1.11684/2.,            ANGLE=-0.240964/2.,                                  K1:=kEddy, K2:=sEddy, E1= 0,   E2=-ED2 ;
140
141  BI1PO :  SBEND, L=2.13554-0.2620-1.4778, ANGLE=-(Pi/4.-0.240964)*(1-(1.4778+0.2620)/2.13554), K1:=kEddy, K2:=sEddy, E1= 0,   E2= 0   ;
142
143  BI1PM :  SBEND, L=0.2620,                ANGLE=-(Pi/4.-0.240964)*0.2620/2.13554,              K1:=kEddy, K2:=sEddy, E1= 0,   E2= 0   ;
144
145  BI1PI :  SBEND, L=1.4778,                ANGLE=-(Pi/4.-0.240964)*1.4778/2.13554,              K1:=kEddy, K2:=sEddy, E1= 0,   E2=-ED3 ;
146
147  BI2PI :  SBEND, L=1.4778,                ANGLE=-(Pi/4.-0.240964)*1.4778/2.13554,              K1:=kEddy, K2:=sEddy, E1=-ED3, E2= 0   ;
148
149  BI2PM :  SBEND, L=0.2620,                ANGLE=-(Pi/4.-0.240964)*0.2620/2.13554,              K1:=kEddy, K2:=sEddy, E1= 0,   E2= 0   ;
150
151  BI2PO :  SBEND, L=2.13554-0.2620-1.4778, ANGLE=-(Pi/4.-0.240964)*(1-(1.4778+0.2620)/2.13554), K1:=kEddy, K2:=sEddy, E1= 0,   E2= 0   ;
152
153  BA2HI :  SBEND, L=1.11684/2.,            ANGLE=-0.240964/2.,                                  K1:=kEddy, K2:=sEddy, E1=-ED2, E2= 0   ;
154
155  BA2HO :  SBEND, L=1.11684/2.,            ANGLE=-0.240964/2.,                                  K1:=kEddy, K2:=sEddy, E1= 0,   E2=-ED1 ;
156
157  DBA   :  DRIFT, L=0.01575;
158
159  DBI   :  DRIFT, L=0.07299;
160
161
162
163! Quadrupole families
164
165  QDN1030 : QUADRUPOLE, L=0.5172, K1 := kD1030;
166
167  QFN1030 : QUADRUPOLE, L=0.5172, K1 := kF1030;
168
169
170
171  QFN2040 : QUADRUPOLE, L=0.5172, K1 := kF2040;
172
173  QDN2040 : QUADRUPOLE, L=0.5172, K1 := kD2040;
174
175  QFN2344 : QUADRUPOLE, L=0.5172, K1 := kF2344;
176
177
178
179  QFT20   : QUADRUPOLE, L=0.5172, K1 := kF2040 + dkFT20;
180
181  QDT20   : QUADRUPOLE, L=0.5172, K1 := kD2040 + dkDT20;
182
183  QFT23   : QUADRUPOLE, L=0.5172, K1 := kF2344 + dkFT23;
184
185  QFT24   : QUADRUPOLE, L=0.5172, K1 := kF2344 + dkFT23;
186
187
188
189! Sextupoles
190
191  XFW01   : MULTIPOLE, KNL := {0, 0, 1.11684*sW01}; 
192
193  XFW02   : MULTIPOLE, KNL := {0, 0, 1.11684*sW02}; 
194
195
196
197  XDN11   : SEXTUPOLE, L=0.33535, K2 := sD1030;
198
199  XFN11   : SEXTUPOLE, L=0.33535, K2 := sF1030;
200
201  XFN12   : SEXTUPOLE, L=0.33535, K2 := sF1030;
202
203  XDN12   : SEXTUPOLE, L=0.33535, K2 := sD1030;
204
205
206
207  XDN31   : SEXTUPOLE, L=0.33535, K2 := sD1030;
208
209  XFN31   : SEXTUPOLE, L=0.33535, K2 := sF1030;
210
211  XFN32   : SEXTUPOLE, L=0.33535, K2 := sF1030;
212
213  XDN32   : SEXTUPOLE, L=0.33535, K2 := sD1030;
214
215
216
217  XFLS41 : SEXTUPOLE, L=0.33535, K2 := sF40; 
218
219  XFLS42 : SEXTUPOLE, L=0.33535, K2 := sF40; 
220
221
222
223! Dipoles, Bumpers and (extraction) Kicker :
224
225  DWHV11 : KICKER;
226
227  DFH11  : HKICKER, KICK := dBmpI;
228
229  DHV12  : KICKER;
230
231  DFH12  : HKICKER, KICK := dBmpI;
232
233  DWHV12 : KICKER;
234
235
236
237  DWHV21 : KICKER;
238
239  DFH21  : HKICKER, KICK := dBmpO;
240
241  DEHV21 : KICKER;
242
243  DEHV22 : KICKER;
244
245  DWHV22 : KICKER;
246
247
248
249  DWHV31 : KICKER;
250
251  KFH31  : HKICKER;  ! "extraction" kicker
252
253  DHV31  : KICKER;
254
255  KFH3234: HKICKER;  ! extraction kicker
256
257  DWHV32 : KICKER;
258
259
260
261  DHV41  : KICKER;
262
263  DHV42  : KICKER;
264
265  DFH42  : HKICKER, KICK := dBmpO;
266
267  DWHV41 : KICKER;
268
269  DWHV42 : KICKER;
270
271
272
273! Pick-ups all defined in "SEQUENCE" command
274
275
276
277! Solenoid and compensation Elements (Skew-Quads + Solenoids)
278
279!  Modeling of Cooler + Compensators provided by J. Pasternak
280
281  EC0    : SOLENOID,   L=0.18787, KS := 0.1059*Msol;
282
283  ECDH1  : HKICKER,    KICK :=  KickEC*0.022919*Msol*1.138/0.0756;
284
285  EC1    : SOLENOID,   L=0.48451, KS := 0.549*Msol;
286
287  ECQSI1 : MULTIPOLE,             KSL:={0, -(1/59.5808)*Msol*1.138/0.0756};
288
289  EC2    : SOLENOID,   L=0.15578, KS := 0.74*Msol;
290
291  ECQSI2 : MULTIPOLE,             KSL:={0, -(1/55.8782)*Msol*1.138/0.0756};
292
293  EC3    : SOLENOID,   L=0.53184, KS := 0.9*Msol;
294
295  EC4    : SOLENOID,   L=0.110,   KS := 1.02*Msol;
296
297  EC5H   : SOLENOID,   L=1.089,   KS := Msol;
298
299  ECQS01 : MULTIPOLE,             KSL:={0, (1/59.5808)*Msol*1.138/0.0756};
300
301  ECQS02 : MULTIPOLE,             KSL:={0, (1/55.8782)*Msol*1.138/0.0756};
302
303  ECDH2  : HKICKER,    KICK := -KickEC*0.022919*Msol*1.138/0.0756;
304
305
306
307  QSK21  : QUADRUPOLE, L=0.32,   K1S := kSk1;
308
309  SOL21  : SOLENOID,   L=0.427,  KS  := MsolC;
310
311  SOL22  : SOLENOID,   L=0.427,  KS  := MsolC;
312
313  QSK22  : QUADRUPOLE, L=0.32,   K1S :=-kSk1;
314
315
316
317! RF cavities
318
319!  CRF41  : MARKER;
320
321  CRF43  : MARKER;
322
323
324
325! Special Diagnostics
326
327  MPIV42 : MONITOR;
328
329  MSH42  : MONITOR;
330
331  MSV42  : MONITOR;
332
333
334
335! Put pieces together to form Arcs
336
337  Arc10  : SEQUENCE, l=2*LbenH;
338
339    BA1HO.1 : BA1HO,    AT=1.11684/4.;
340
341    DWHV11,             AT=1.11684/2.;
342
343    XFW11   : XFW01,    AT=1.11684/2.;
344
345    BA1HI.1 : BA1HI,    AT=1.11684*(3./4.);
346
347    BI1PO.1 : BI1PO,    AT=LbenH - (0.07299 + 1.4778 + 0.2620 + (2.13554-0.2620-1.4778)/2);
348
349    UEV13   : VMONITOR, AT=LbenH - (0.07299 + 1.4778 + 0.2620);
350
351    BI1PM.1 : BI1PM,    AT=LbenH - (0.07299 + 1.4778 + 0.2620/2);
352
353    UEH13   : HMONITOR, AT=LbenH - (0.07299 + 1.4778);
354
355    BI1PI.1 : BI1PI,    AT=LbenH - (0.07299 + 1.4778/2);
356
357    CtrBHN10: MARKER,   AT=LbenH;
358
359    BI2PI.1 : BI2PI,    AT=LbenH + (0.07299 + 1.4778/2);
360
361    UEH14   : HMONITOR, AT=LbenH + (0.07299 + 1.4778);
362
363    BI2PM.1 : BI2PM,    AT=LbenH + (0.07299 + 1.4778 + 0.2620/2);
364
365    UEV14   : VMONITOR, AT=LbenH + (0.07299 + 1.4778 + 0.2620);
366
367    BI2PO.1 : BI2PO,    AT=LbenH + (0.07299 + 1.4778 + 0.2620 + (2.13554-0.2620-1.4778)/2);
368
369    BA2HI.1 : BA2HI,    AT=2*LbenH - 1.11684*(3./4.);
370
371    XFW12   : XFW02,    AT=2*LbenH - 1.11684/2.;
372
373    DWHV12,             AT=2*LbenH - 1.11684/2.;
374
375    BA2HO.1 : BA2HO,    AT=2*LbenH - 1.11684/4.;
376
377  ENDSEQUENCE;
378
379  Arc20  : SEQUENCE, l=2*LbenH;
380
381    BA1HO.2 : BA1HO,    AT=1.11684/4.;
382
383    DWHV21,             AT=1.11684/2.;
384
385    XFW21   : XFW02,    AT=1.11684/2.;
386
387    BA1HI.2 : BA1HI,    AT=1.11684*(3./4.);
388
389    BI1PO.2 : BI1PO,    AT=LbenH - (0.07299 + 1.4778 + 0.2620 + (2.13554-0.2620-1.4778)/2);
390
391    UEV23   : VMONITOR, AT=LbenH - (0.07299 + 1.4778 + 0.2620);
392
393    BI1PM.2 : BI1PM,    AT=LbenH - (0.07299 + 1.4778 + 0.2620/2);
394
395    UEH23   : HMONITOR, AT=LbenH - (0.07299 + 1.4778);
396
397    BI1PI.2 : BI1PI,    AT=LbenH - (0.07299 + 1.4778/2);
398
399    CtrBHN20: MARKER,   AT=LbenH;
400
401    BI2PI.2 : BI2PI,    AT=LbenH + (0.07299 + 1.4778/2);
402
403    UEH24   : HMONITOR, AT=LbenH + (0.07299 + 1.4778);
404
405    BI2PM.2 : BI2PM,    AT=LbenH + (0.07299 + 1.4778 + 0.2620/2);
406
407    UEV24   : VMONITOR, AT=LbenH + (0.07299 + 1.4778 + 0.2620);
408
409    BI2PO.2 : BI2PO,    AT=LbenH + (0.07299 + 1.4778 + 0.2620 + (2.13554-0.2620-1.4778)/2);
410
411    BA2HI.2 : BA2HI,    AT=2*LbenH - 1.11684*(3./4.);
412
413    XFW22   : XFW01,    AT=2*LbenH - 1.11684/2.;
414
415    DWHV22,             AT=2*LbenH - 1.11684/2.;
416
417    BA2HO.2 : BA2HO,    AT=2*LbenH - 1.11684/4.;
418
419  ENDSEQUENCE;
420
421  Arc30  : SEQUENCE, l=2*LbenH;
422
423    BA1HO.3 : BA1HO,    AT=1.11684/4.;
424
425    DWHV31,             AT=1.11684/2.;
426
427    XFW31   : XFW01,    AT=1.11684/2.;
428
429    BA1HI.3 : BA1HI,    AT=1.11684*(3./4.);
430
431    BI1PO.3 : BI1PO,    AT=LbenH - (0.07299 + 1.4778 + 0.2620 + (2.13554-0.2620-1.4778)/2);
432
433    UEV33   : VMONITOR, AT=LbenH - (0.07299 + 1.4778 + 0.2620);
434
435    BI1PM.3 : BI1PM,    AT=LbenH - (0.07299 + 1.4778 + 0.2620/2);
436
437    UEH33   : HMONITOR, AT=LbenH - (0.07299 + 1.4778);
438
439    BI1PI.3 : BI1PI,    AT=LbenH - (0.07299 + 1.4778/2);
440
441    CtrBHN30: MARKER,   AT=LbenH;
442
443    BI2PI.3 : BI2PI,    AT=LbenH + (0.07299 + 1.4778/2);
444
445    UEH34   : HMONITOR, AT=LbenH + (0.07299 + 1.4778);
446
447    BI2PM.3 : BI2PM,    AT=LbenH + (0.07299 + 1.4778 + 0.2620/2);
448
449    UEV34   : VMONITOR, AT=LbenH + (0.07299 + 1.4778 + 0.2620);
450
451    BI2PO.3 : BI2PO,    AT=LbenH + (0.07299 + 1.4778 + 0.2620 + (2.13554-0.2620-1.4778)/2);
452
453    BA2HI.3 : BA2HI,    AT=2*LbenH - 1.11684*(3./4.);
454
455    XFW32   : XFW02,    AT=2*LbenH - 1.11684/2.;
456
457    DWHV32,             AT=2*LbenH - 1.11684/2.;
458
459    BA2HO.3 : BA2HO,    AT=2*LbenH - 1.11684/4.;
460
461  ENDSEQUENCE;
462
463  Arc40  : SEQUENCE, l=2*LbenH;
464
465    BA1HO.4 : BA1HO,    AT=1.11684/4.;
466
467    DWHV41,             AT=1.11684/2.;
468
469    XFW41,  : XFW02,    AT=1.11684/2.;
470
471    BA1HI.4 : BA1HI,    AT=1.11684*(3./4.);
472
473    BI1PO.4 : BI1PO,    AT=LbenH - (0.07299 + 1.4778 + 0.2620 + (2.13554-0.2620-1.4778)/2);
474
475    UEV43   : VMONITOR, AT=LbenH - (0.07299 + 1.4778 + 0.2620);
476
477    BI1PM.4 : BI1PM,    AT=LbenH - (0.07299 + 1.4778 + 0.2620/2);
478
479    UEH43   : HMONITOR, AT=LbenH - (0.07299 + 1.4778);
480
481    BI1PI.4 : BI1PI,    AT=LbenH - (0.07299 + 1.4778/2);
482
483    CtrBHN40: MARKER,   AT=LbenH;
484
485    BI2PI.4 : BI2PI,    AT=LbenH + (0.07299 + 1.4778/2);
486
487    UEH44   : HMONITOR, AT=LbenH + (0.07299 + 1.4778);
488
489    BI2PM.4 : BI2PM,    AT=LbenH + (0.07299 + 1.4778 + 0.2620/2);
490
491    UEV44   : VMONITOR, AT=LbenH + (0.07299 + 1.4778 + 0.2620);
492
493    BI2PO.4 : BI2PO,    AT=LbenH + (0.07299 + 1.4778 + 0.2620 + (2.13554-0.2620-1.4778)/2);
494
495    BA2HI.4 : BA2HI,    AT=2*LbenH - 1.11684*(3./4.);
496
497    XFW42   : XFW01,    AT=2*LbenH - 1.11684/2.;
498
499    DWHV42,             AT=2*LbenH - 1.11684/2.;
500
501    BA2HO.4 : BA2HO,    AT=2*LbenH - 1.11684/4.;
502
503  ENDSEQUENCE;
504
505
506
507! Put pieces together to form Straight Sections
508
509  BEAM;
510
511  SS10   : SEQUENCE, L=2*LstrH;
512
513    DFH11,             AT=LstrH - 5.7725;
514
515    QDN11  : QDN1030,  AT=LstrH - (5.1645-.5*dLBmp+.5*dLSext), L=0.5172-dLBmp-dLSext;
516
517    XDN11,             AT=LstrH - 4.6645;
518
519    QFN11  : QFN1030,  AT=LstrH - 4.1645,                      L=0.5172-2*dLSext;
520
521    XFN11,             AT=LstrH - 3.6345;
522
523    UEH11  : HMONITOR, AT=LstrH - 2.904;
524
525    UEV11  : VMONITOR, AT=LstrH - 2.814;
526
527    CtrS10 : MARKER,   AT=LstrH;
528
529    DHV12,             AT=LstrH + 0.746;
530
531    UEH12  : HMONITOR, AT=LstrH + 1.3245;
532
533    UEV12  : VMONITOR, AT=LstrH + 1.4145;
534
535    XFN12,             AT=LstrH + 3.6345;
536
537    QFN12  : QFN1030,  AT=LstrH + 4.1645,                      L=0.5172-2*dLSext;
538
539    XDN12,             AT=LstrH + 4.6645;
540
541    QDN12  : QDN1030,  AT=LstrH + (5.1645-.5*dLBmp+.5*dLSext), L=0.5172-dLSext-dLBmp;
542
543    DFH12,             AT=LstrH + 5.7725;
544
545  ENDSEQUENCE;
546
547
548
549  SS20 : SEQUENCE, L=2*LstrH;  !  Note first R than L !!!
550
551    QFN21  : QFT20,    AT=LstrH - (5.6745+.5*dLBmp),           L=0.5172-dLBmp;
552
553    DFH21,             AT=LstrH - 5.2145;
554
555    QDN21  : QDT20,    AT=LstrH - (4.7545-.5*dLBmp+.5*dLSkew), L=0.5172-dLBmp-dLSkew;
556
557    QSK21,             AT=LstrH - 4.25;
558
559    QFN23  : QFT23,    AT=LstrH - (3.7545-.5*dLSkew+.5*dLSol), L=0.5172-dLSkew-dLSol;
560
561    SOL21,             AT=LstrH - 3.124;
562
563    DEHV21,            AT=LstrH - 2.559;
564
565    EC0.R  : EC0,      AT=LstrH - 2.465065;
566
567    ECQSI1,            AT=LstrH - 2.37113;
568
569    EC1.R  : EC1,      AT=LstrH - 2.128875;
570
571    ECDH1,             AT=LstrH - 1.88662;
572
573    EC2.R  : EC2,      AT=LstrH - 1.80873;
574
575    ECQSI2,            AT=LstrH - 1.73084;
576
577    EC3.R  : EC3,      AT=LstrH - 1.46492;
578
579    UEV21  : VMONITOR, AT=LstrH - 1.199;
580
581    EC4.R  : EC4,      AT=LstrH - 1.144;
582
583    UEH21  : HMONITOR, AT=LstrH - 1.089;
584
585    EC5H.R : EC5H,     AT=LstrH - 0.5445;
586
587    CtrS20 : MARKER,   AT=LstrH;
588
589    EC5H.L : EC5H,     AT=LstrH + 0.5445;
590
591    UEH22  : HMONITOR, AT=LstrH + 1.089;
592
593    EC4.L  : EC4,      AT=LstrH + 1.144;
594
595    UEV22  : VMONITOR, AT=LstrH + 1.199;
596
597    EC3.L  : EC3,      AT=LstrH + 1.46492;
598
599    ECQS02,            AT=LstrH + 1.73084;
600
601    EC2.L  : EC2,      AT=LstrH + 1.80873;
602
603    ECDH2,             AT=LstrH + 1.88662;
604
605    EC1.L  : EC1,      AT=LstrH + 2.128875;
606
607    ECQS01,            AT=LstrH + 2.37113;
608
609    EC0.L  : EC0,      AT=LstrH + 2.465065;
610
611    DEHV22,            AT=LstrH + 2.559;
612
613    SOL22,             AT=LstrH + 3.124;
614
615    QFN24  : QFT24,    AT=LstrH + (3.7545-.5*dLSkew+.5*dLSol), L=0.5172-dLSol-dLSkew;
616
617    QSK22,             AT=LstrH + 4.25;
618
619    QDN22  : QDT20,    AT=LstrH + (4.7545+.5*dLSkew),          L=0.5172-dLSkew;
620
621    QFN22  : QFT20,    AT=LstrH + 5.6745,                      L=0.5172;
622
623  ENDSEQUENCE;
624
625
626
627  SS30 : SEQUENCE, L=2*LstrH;
628
629    QDN31  : QDN1030,  AT=LstrH - (5.1645+.5*dLSext), L=0.5172-dLSext;
630
631    XDN31,             AT=LstrH - 4.6645;
632
633    QFN31  : QFN1030,  AT=LstrH - 4.1645,             L=0.5172-2*dLSext;
634
635    XFN31,             AT=LstrH - 3.6345;
636
637    KFH31,             AT=LstrH - 3.0085;
638
639    UEH31  : HMONITOR, AT=LstrH - 2.5735;
640
641    UEV31  : VMONITOR, AT=LstrH - 2.4835;
642
643    DHV31,             AT=LstrH - 1.7500;
644
645
646
647    CtrS30 : MARKER,   AT=LstrH;
648
649   
650
651   
652
653    UEH32  : HMONITOR, AT=LstrH + 1.6885 -1.0;
654
655   
656
657    UEV32  : VMONITOR, AT=LstrH + 1.7785;
658
659    KFH3234,           AT=LstrH + 2.7585;
660
661    XFN32,             AT=LstrH + 3.6345;
662
663    QFN32  : QFN1030,  AT=LstrH + 4.1645,             L=0.5172-2*dLSext;
664
665    XDN32,             AT=LstrH + 4.6645;
666
667    QDN32  : QDN1030,  AT=LstrH + (5.1645+.5*dLSext), L=0.5172-dLSext;
668
669  ENDSEQUENCE;
670
671
672
673  SS40 : SEQUENCE, L=2*LstrH;
674
675    QFN41  : QFN2040,  AT=LstrH - 5.6745,                      L=0.5172;
676
677    QDN41  : QDN2040,  AT=LstrH - (4.7545+.5*dLSext),          L=0.5172-dLSext;
678
679    XFLS41,            AT=LstrH - 4.2545;
680
681    QFN43  : QFN2344,  AT=LstrH - (3.7545-.5*dLSext),          L=0.5172-dLSext;
682
683    UEH41  : HMONITOR, AT=LstrH - 3.1205;
684
685    UEV41  : VMONITOR, AT=LstrH - 3.0305;
686
687    DHV41,             AT=LstrH - 2.8085;
688
689  !  CRF41,             AT=LstrH - 2.1865;
690
691 
692
693    CRF41:  CAV,        AT=LstrH - 2.1865,  L = 1.00;
694
695 
696
697    CRF43,             AT=LstrH - 1.0865;
698
699    CtrS40 : MARKER,   AT=LstrH;
700
701    DHV42,             AT=LstrH + 1.7425;
702
703    UEV42  : VMONITOR, AT=LstrH + 1.9645;
704
705    UEH42  : HMONITOR, AT=LstrH + 2.0545;
706
707    MSH42,             AT=LstrH + 3.0795;                             ! moved downstream by 3 mm
708
709    MSV42,             AT=LstrH + 3.2755;                             !   3 mm on Nov. 5th, 2004.
710
711    QFN44  : QFN2344,  AT=LstrH + (3.7545-.5*dLSext),          L=0.5172-dLSext;
712
713    XFLS42,            AT=LstrH + 4.2545;
714
715    QDN42  : QDN2040,  AT=LstrH + (4.7545+.5*dLSext-.5*dLBmp), L=0.5172-dLSext-dLBmp;
716
717    DFH42,             AT=LstrH + 5.2145;
718
719    QFN42  : QFN2040,  AT=LstrH + (5.6745+.5*dLBmp),           L=0.5172-dLBmp;
720
721  ENDSEQUENCE;
722
723
724
725! Finally the whole LEIR ring
726
727  LEIR : SEQUENCE, REFER=CENTRE, L=8*(LstrH + LbenH);
728
729    SS10,  AT= 0;
730
731    Arc10, AT= 2*LstrH;
732
733    SS20,  AT= 2*LstrH + 2*LbenH;
734
735    Arc20, AT= 4*LstrH + 2*LbenH;
736
737    SS30,  AT= 4*LstrH + 4*LbenH;
738
739    Arc30, AT= 6*LstrH + 4*LbenH;
740
741    SS40,  AT= 6*LstrH + 6*LbenH;
742
743    Arc40, AT= 8*LstrH + 6*LbenH;
744
745  ENDSEQUENCE;
746
747
748
749
750
751RETURN;
752
753
754
755
756
757eg :=  0.938272+0.0042+10000; !  ... in GeV
758
759
760
761eg :=  0.938272*2.8385; !  ... in GeV on transition
762
763++++++ info: eg redefined
764eg :=  0.938272*1.1547; !  ... in GeV beta = 0.5
765
766++++++ info: eg redefined
767
768
769beam, particle = proton, energy = eg; 
770
771
772
773use, period=LEIR;
774
775
776
777
778
779
780
781
782
783select,flag=twiss,clear;
784
785select, flag=twiss, column=name,s,beta11,beta22,alfa11,alfa22,mu1,mu2,disp1,disp2,
786
787                          re11,re12,re13,re14,re15,re16,
788
789                          re21,re22,re23,re24,re25,re26,
790
791                          re31,re32,re33,re34,re35,re36,
792
793                          re41,re42,re43,re44,re45,re46,
794
795                          re51,re52,re53,re54,re55,re56,
796
797                          re61,re62,re63,re64,re65,re66;
798
799
800
801
802
803
804
805ptc_create_universe;
806
807 Now PTC
808  ptc_create_layout, model=1, method=6, nst=5, exact=true, closed_layout=true;
809
810 MAD-X Beam Parameters
811                  Energy : 0.108342E+01
812          Kinetic Energy : 0.145151E+00
813      Particle Rest Mass : 0.938272E+00
814                Momentum : 0.541711E+00
815 Setting MADx with
816     energy           1.0834226784000001     
817     method                   6
818     Num. of steps            5
819     charge           1.0000000000000000     
820  Length of machine:    78.543702661677671     
821 The machine is a RING
822 ------------------------------------ PTC Survey ------------------------------------
823 Before start:    0.0000000000000000        0.0000000000000000        0.0000000000000000     
824 Before   end:    0.0000000000000000        0.0000000000000000        0.0000000000000000     
825 After  start:    0.0000000000000000        0.0000000000000000        0.0000000000000000     
826 After    end:   -3.1641356201816961E-015   0.0000000000000000        1.5543122344752192E-014
827  Bullshitting in MADX with Cavities            2
828
829
830  !!!!!       T I M E   F A L S E,   T O T P A T H  F A L S E
831
832  ptc_setswitch, debuglevel=0, exact_mis=true, time=true, totalpath=false;
833
834 
835
836 
837
838  ptc_twiss, table=twiss, icase=56, no=2, closed_orbit;
839
840++++++ info: Zero value of SIGT replaced by 1.
841++++++ info: Zero value of SIGE replaced by 1/1000.
842Deviation from symplecticity  0.1290120216526990E-10 %
843  PARENT LAYOUT NAME :No name assigned
844  NUMBER OF ORIGINAL LAYOUT ELEMENTS :         266
845  NUMBER OF THIN OBJECTS :        1678
846  TOTAL IDEAL LENGTH OF STRUCTURE :   78.543702661677656     
847  TOTAL INTEGRATION LENGTH OF STRUCTURE (mad8 style survey) :   78.543702661677656     
848Deviation from symplecticity  0.1290120216526990E-10 %
849
850++++++ table: ptc_twiss_summary
851
852            length            alpha_c          alpha_c_p         alpha_c_p2
853       78.54370266       0.1241077847       -41.13731262           -1000000
854
855        alpha_c_p3              eta_c           gamma_tr                 q1
856          -1000000      -0.6258929355         2.83857575       0.8200596224
857
858                q2                dq1                dq2                 qs
859      0.7198292883       -4.353246537       -9.482228978                  0
860
861        beta_x_min         beta_x_max         beta_y_min         beta_y_max
862       3.282153615        15.12420817        1.633285387        20.07025827
863
864            deltap            orbit_x           orbit_px            orbit_y
865                 0    1.068886127e-08    2.546139786e-09                  0
866
867          orbit_py           orbit_pt          orbit_-cT             xcorms
868                 0                  0                  0    1.168573345e-08
869
870            ycorms            pxcorms            pycorms             xcomax
871                 0    3.059593723e-09                  0    2.508645927e-08
872
873            ycomax            pxcomax            pycomax
874                 0    1.106286922e-08                  0
875  write, table=twiss, file="leir.56dt.ptc.twiss";
876
877  write, table=ptc_twiss_summary, file="leir.56dt.ptc.summ.twiss";
878
879 
880
881ptc_end;
882
883 Killing LayoutNo name assigned                                                                                                       
884  NODE LAYOUT HAS BEEN KILLED
885 Layout killed
886
887
888
889
890plot, haxis=s, vaxis=beta11,beta22, colour=100;
891
892Plot - default table plotted: twiss
893++++++ info: Zero value of SIGT replaced by 1.
894++++++ info: Zero value of SIGE replaced by 1/1000.
895
896 GXPLOT-X11  1.50 initialized
897
898 plot number =            1
899plot, haxis=s, vaxis=disp1, colour=100;
900
901Plot - default table plotted: twiss
902++++++ info: Zero value of SIGT replaced by 1.
903++++++ info: Zero value of SIGE replaced by 1/1000.
904 plot number =            2
905plot, haxis=s, vaxis=x, colour=100;
906
907Plot - default table plotted: twiss
908++++++ info: Zero value of SIGT replaced by 1.
909++++++ info: Zero value of SIGE replaced by 1/1000.
910 plot number =            3
911
912
913
914  Number of warnings: 0
915
916  ++++++++++++++++++++++++++++++++++++++++++++
917  + MAD-X 5.00.19 (64 bit) finished normally +
918  ++++++++++++++++++++++++++++++++++++++++++++
Note: See TracBrowser for help on using the repository browser.