-
Notifications
You must be signed in to change notification settings - Fork 39
/
mad_dict.c
3474 lines (3457 loc) · 102 KB
/
mad_dict.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "mad_dict.h"
char *constant_def = 0;
char *command_def = 0;
char *element_def = 0;
/* J. Beringer et al. (Particle Data Group), Phys. Rev. D86, 010001 (2012). = PDG 2012 */
/* K.A. Olive et al. (Particle Data Group), Chin. Phys. C, 38, 090001 (2014). = PDG2014 */
const char *const_constant_def =
#define mkstr(a) mkstr_(a)
#define mkstr_(a) #a
"const version = " mkstr(_VERSION_NUM) "; "
#undef mkstr
#undef mkstr_
/* constants (pre-defined variables) CODATA 2018
nmass is the unified atomic mass unit [GeV/(c**2)] */
"const pi = 4 * atan(1.); "
"const twopi = 2 * pi; "
"const degrad = 180 / pi; "
"const raddeg = pi / 180; "
"const e = exp(1.); "
"const amu0 = 4.e-7 * pi; "
"const emass = 0.51099895000e-3; "
"const mumass = 0.1056583755; "
"const nmass = 0.93956542052; "
"const umass = 0.93149410242; "
"const pmass = 0.93827208816; "
"const clight = 299792458; "
"const qelect = 1.602176634e-19; "
"const hbar = 6.582119569e-25; " /* GeV*s */
"const erad = 2.8179403262e-15; "
"const prad = erad*emass/pmass; ";
/* mods HG090508 - speed-up twiss
all new elements must start with at, l, kmax, kmin, calib, polarity
exactly as the existing ones. Existing elements can only be extended
at the end. */
/* command definitions, sorted by module resp. type */
/* The special commands
"if(", "else{", "elseif(", "while(", ">:macro", ">:line"
are not included here, but can be found in mad_gcst.c
under special_comm_desc */
/* IMPORTANT:
beta0 and twiss MUST have identical portions
up to "energy" included */
/* format as follows: <...> optional, missing defaults become 0
"none" stands for empty string
name : module group type mad_8
module = the module this command belongs to
group = the command group this command belongs to
type = 0: default
1: start of group
2: end of group
mad_8 = mad-8 element code
remark: sequence ... endsequence is NOT a group
parameter 1 = (type <,default<, call default>>),
parameter 2 = (type <,default<, call default>>),
etc.
some commands contain only data (module "data") for easy access.
examples:
l = (r) means: default l = 0, l in command without value -> 0
energy = (r, 1) means: default energy is 1, in command without value -> 0
file = (s, none, twiss) means: default no file,
file in command without value -> twiss
types: l=logical, i=int, r=real, s=string
integer and real arrays of arbitrary length can be defined via {...};
arrays must be defined with maximum length.
*/
/* threader tolerances and maxima: xmax,ymax: orbit excursion at which
threader is switched on; att: attenuation factor for kicks.
*/
/* FS 15.03.2004: initial matrix for ptc_twiss, preparation of Touschek */
const char *const_command_def =
"antiproton: data none 0 0 " /* comment allowed outside quotes */
"mass = [r, pmass], "
"charge = [r, -1]; "
" "
"electron: data none 0 0 "
"mass = [r, emass], "
"charge = [r, -1]; "
" "
"negmuon: data none 0 0 "
"mass = [r, mumass], "
"charge = [r, -1]; "
" "
"positron: data none 0 0 "
"mass = [r, emass], "
"charge = [r, 1]; "
" "
"posmuon: data none 0 0 "
"mass = [r, mumass], "
"charge = [r, 1]; "
" "
"proton: data none 0 0 "
"mass = [r, pmass], "
"charge = [r, 1]; "
" "
"ion: data none 0 0 "
"mass = [r, nmass], "
"charge = [r, 1]; "
" "
"aperture: aperture none 0 0 "
"file = [s, none, none], " /* output file with aperture table */
"halofile = [s, none, none], " /* input file w/halo polygon coordinates */
/* "pipefile = [s, none, none], " */ /* input file w/pipe polygon coordinates */
"range = [s, #s/#e, none], " /* range */
"dqf = [r, 2.086], " /* peak linear dispersion */
"betaqfx = [r, 170.25], " /* beta x in standard qf */
"dp = [r, 0.0015], " /* bucket edge at injection */
"dparx = [r, 0.273], " /* fractional parasitic dispersion - horizontal */
"dpary = [r, 0.273], " /* fractional parasitic dispersion - vertical */
"cor = [r, 0.004], " /* maximum radial closed orbit */
"bbeat = [r, 1.1], " /* beta beating coefficient applying to beam size*/
"bbeat_x = [r, 1.1], " /* beta beating coefficient applying to beam size*/
"bbeat_y = [r, 1.1], " /* beta beating coefficient applying to beam size*/
"nco = [i, 5], " /* number of azimuth for radial scan */
"halo = [r, {6., 8.4, 7.3, 7.3}], " /* halo parameters: n, r, h, v */
"interval = [r, 1.], " /* length in meters between measurements */
"spec = [r, 0.], " /* aperture spec, for plotting only */
"notsimple = [l, false, true], " /* use if beam pipe is not a simply connex */
"trueprofile = [s, none, none], " /* read discrete displacements from this file */
"offsetelem = [s, none, none], " /* read off-axis data from this file */
"refnode = [s, none, none]; " /* read reference element for the offset file */
" "
/* "aperture: aperture none 0 0 " */
/* "range = [s, #s/#e, none], " /\* range *\/ */
/* "dqf = [r, 0.], " /\* peak linear dispersion *\/ */
/* "dparx = [r, 0.], " /\* fractional parasitic dispersion - horizontal *\/ */
/* "dpary = [r, 0.], " /\* fractional parasitic dispersion - vertical *\/ */
/* "betaqfx = [r, 1.], " /\* beta x in standard qf *\/ */
/* "bbeat = [r, 1.], " /\* beta beating coefficient applying to beam size*\/ */
/* "dp = [r, 0.], " /\* bucket edge at injection *\/ */
/* "cor = [r, 0.], " /\* maximum radial closed orbit *\/ */
/* "nco = [i, 5], " /\* number of azimuth for radial scan *\/ */
/* "halo = [r, {0., 0., 0., 0.}], " /\* halo parameters: n, r, h, v *\/ */
/* "halofile = [s, none, none], " /\* input file w/halo polygon coordinates *\/ */
/* "interval = [r, 1.], " /\* length in meters between measurements *\/ */
/* "spec = [r, 0.], " /\* aperture spec, for plotting only *\/ */
/* "notsimple = [l, false, true], " /\* use if beam pipe is not a simply connex *\/ */
/* "trueprofile = [s, none, none], " /\* read discrete displacements from this file *\/ */
/* "offsetelem = [s, none, none], " /\* read off-axis data from this file *\/ */
/* "refnode = [s, none, none], " /\* read reference element for the offset file *\/ */
/* /\* "pipefile = [s, none, none], " *\/ /\* input file w/pipe polygon coordinates *\/ */
/* "file = [s, none, none]; " /\* output file with aperture table *\/ */
/* " " */
"assign: control none 0 0 "
"echo = [s, terminal, none], "
"truncate = [l, false, true]; "
" "
"beam: control none 0 0 "
"particle = [s, positron, positron], "
"sequence = [s, none, none], "
"bunched = [l, true, true], "
"radiate = [l, false, true], "
"mass = [r, emass], "
"charge = [r, 1], "
"energy = [r, 1], "
"pc = [r, 0], "
"gamma = [r, 0], "
"beta = [r, 0], "
"brho = [r, 0], "
"ex = [r, 1], "
"exn = [r, 0], "
"ey = [r, 1], "
"eyn = [r, 0], "
"et = [r, 1e-3], "
"sigt = [r, 1], "
"sige = [r, 1e-3], "
"kbunch = [r, 1], "
"npart = [r, 1], "
"bcurrent = [r, 0], "
"freq0 = [r, 0], "
"circ = [r, 0], "
"dtbyds = [r, 0], "
"deltap = [r, 0], "
"alfa = [r, 0], "
"u0 = [r, 0], "
"qs = [r, 0], "
"arad = [r, 0], "
"bv = [r, 1], "
"pdamp = [r, {1,1,2}, {0,0,0}], "
"n1min = [r, -1]; "
" "
"beta0: control none 0 0 "
"betx = [r, 0], alfx = [r, 0], mux = [r, 0], "
"bety = [r, 0], alfy = [r, 0], muy = [r, 0], "
"x = [r, 0], px = [r, 0], "
"y = [r, 0], py = [r, 0], "
"t = [r, 0], pt = [r, 0], "
"dx = [r, 0], dpx = [r, 0], "
"dy = [r, 0], dpy = [r, 0], "
"wx = [r, 0], phix = [r, 0], dmux = [r, 0], "
"wy = [r, 0], phiy = [r, 0], dmuy = [r, 0], "
"ddx = [r, 0], ddpx = [r, 0], "
"ddy = [r, 0], ddpy = [r, 0], "
"r11 = [r, 0], r12 = [r, 0], "
"r21 = [r, 0], r22 = [r, 0], "
"energy = [r, 0]; "
" "
"call: control none 0 0 "
"file = [s, none]; "
" "
"chdir: control none 0 0 "
"dir = [s, none]; "
" "
"coguess: control control 0 0 "
"x = [r, 0], "
"px = [r, 0], "
"y = [r, 0], "
"py = [r, 0], "
"t = [r, 0], "
"pt = [r, 0], "
"tolerance= [r, 1.0e-6], "
"clear = [l, false, true];"
" "
"create: control none 0 0 "
"table = [s, none], "
"column = [s,{none}]; "
" "
"delete: control none 0 0 "
"sequence = [s, none], "
"table = [s, none]; "
" "
"distribution: distribution none 0 0 "
"npart = [i, -1], "
"horizontal = [s, zero, zero], "
"vertical = [s, zero, zero], "
"longitudinal = [s, zero, zero], "
"table = [s, disttable, disttable], "
"cutsig_h = [r, {-1}], "
"cutsig_v = [r, {-1}], "
"betx = [r, 0], "
"bety = [r, 0], "
"alfx = [r, 0], "
"alfy = [r, 0], "
"use_intial = [l, false, true], "
"cutsig_l = [r, {-1}]; "
" "
"deselect: control none 0 0 " /* GR: stub exists but not properly implemented */
"flag = [s, none, none], "
"range = [s, #s/#e, none], "
"class = [s, none, none], "
"pattern = [s, any, none], "
"clear = [l, false, true]; "
" "
"dumpsequ: control none 0 0 "
"sequence = [s, none], "
"level = [i, 0], "
"file = [s, 0]; "
" "
"exec: control none 0 0; "
" "
"exit: control none 0 0; "
" "
"extract: control none 0 0 "
"sequence = [s, none, none], "
"newname = [s, none, none], "
"refpos = [s, none, none], "
"to = [s, none, none], "
"from = [s, none, none]; "
" "
"fill: control none 0 0 "
"table = [s, none], "
"row = [i, 0], "
"scale = [r, 1]; "
" "
"shrink: control none 0 0 "
"table = [s, none], "
"row = [i, -1]; "
" "
"setvars: control none 0 0 "
"table = [s, none], "
"row = [i, -1]; "
" "
"help: control none 0 0 "
"dummy = [s, 0]; "
" "
"option: control none 0 0 "
"echo = [l, true, true], "
"echomacro = [l, false, true], " /* ld */
"echosystem = [l, false, true], " /* ld */
"info = [l, true, true], "
"reset = [l, false, true], "
"debug = [l, false, true], "
"verbose = [l, false, true], " /*hbu */
"rbarc = [l, true, true], "
"rand = [s, default, best], "
"randid = [i, 0, 1], "
"synrad = [i, 2, 2], " /* ld */
"cfsbend = [l, true, true], " /* combined function sbend */
"thin_foc = [l, true, true], "
"sympl = [l, true, true], "
"tell = [l, false, true], "
"threader = [l, false, true], "
"trace = [l, false, true], "
"verify = [l, false, true], "
"no_fatal_stop = [l, false, true], "
"twiss_print = [l, true, true], "
"warn = [l, true, true], "
"update_from_parent = [l, false, true], "
"keep_exp_move = [l, false, true], "
"thin_cf = [l, false, true], "
"missing_file_fatal = [l, false, true], "
"fdstep = [r, 0], " /* ld 07.2020, finite difference step for JACOBIAN and LMDIF */
/* BB and SPCH related options */
"bborbit = [l, false, true], " /* frs */
"bb_ultra_relati = [l, false, true], " /* frs */
"bb_sxy_update = [l, false, true], " /* frs */
"emittance_update = [l, true, true], " /* frs */
"fast_error_func = [l, false, true], " /* frs */
"exit_loss_turn = [l, false, true], " /* frs */
"bucket_swap = [l, false, true], " /* frs Sep. 2017 */
"sc_setup = [l, false, true], " /* frs April 2021 */
"sc_chrom_fix = [l, true], " /* frs Sep. 2017 */
"sc_3d_kick = [l, false, true], " /* frs June 2018 */
"sc_3d_beamsize = [l, false, true], " /* frs May 2019 */
"sc_3d_periodic = [l, false, true], " /* frs June 2018 */
"sc_mult_ord = [i, 10, 20], " /* frs May 2019 */
"sc_mytracksumm_maxlines = [i, 4000008,16000008], " /* hrr Sep 2021 */
"sc_mytracksumm_per_turns = [i, 1, 1000], " /* hrr Sep 2021 */
"sc_mytracksumm_start_particle = [i, 1], " /* hrr Sep 2021 */
"sc_mytracksumm_end_particle = [i, 0], " /* hrr Sep 2021 */
"sc_3d_kick_long = [l, false, true]; " /* frs June 2018 */
" "
"plot: control none 0 0 "
"vaxis = [s, {none}], "
"vaxis1 = [s, {none}], "
"vaxis2 = [s, {none}], "
"vaxis3 = [s, {none}], "
"vaxis4 = [s, {none}], "
"haxis = [s, none], "
"hmin = [r, 0, 0], "
"hmax = [r, 0, 0], "
"vmin = [r, {0}], "
"vmax = [r, {0}], "
"bars = [i, 0, 1], "
"style = [i, 1, 1], "
"colour = [i, 0, 100], "
"symbol = [i, 0, 1], "
"interpolate = [l, false, true], "
"spline = [l, false, true], "
"noline = [l, false, true], "
"notitle = [l, false, true], "
"noversion = [l, false, true], "
"nolegend = [l, false, true], "
"particle = [s, {none}], "
"multiple = [l, false, true], "
"ptc = [l, false, true], "
"marker_plot = [l, false, true], "
"range_plot = [l, false, true], "
"zero_suppr = [l, false, true], " /*hbu */
"table = [s, twiss], "
"ptc_table = [s, ptc_twiss], "
"title = [s, none], "
"param = [s, none], "
"range = [s, #s/#e, none], "
"file = [s, none], "
"trackfile = [s, track]; "
" "
"print: control none 0 0 "
"text = [s, none]; "
" "
"quit: control none 0 0; "
" "
"readtable: control none 0 0 "
"table = [s, none], "
"file = [s, none]; "
" "
"readmytable: correct correct 0 0 " /* ghislain ???? */
"table = [s, none], "
"file = [s, none]; "
" "
"removefile: control none 0 0 "
"file = [s, none]; "
" "
"renamefile: control none 0 0 "
"file = [s, none], "
"to = [s, none]; "
" "
"copyfile: control none 0 0 "
"file = [s, none], "
"to = [s, none], "
"append = [l, false, true]; "
" "
"resbeam: control none 0 0, "
"sequence = [s, none, none]; "
" "
"resplot: control none 0 0; "
" "
"return: control none 0 0; "
" "
"save: control none 0 0 "
"sequence = [s, {none}], "
"bare = [l, false, true],"
"beam = [l, false, true],"
"mad8 = [l, false, true], "
"noexpr = [l, false, true], "
"csave = [l, false, true], "
"file = [s, save, save], "
"newname = [s, dummy, dummy]; "
" "
"save_state: control none 0 0 "
"sequence = [s, {none}], "
"beam = [l, true, true],"
"full = [l, true],"
"csave = [l, true, true], "
"file = [s, save, save], "
"folder = [s, saved_state, saved_state]; "
" "
"savebeta: control none 0 0 "
"label = [s, none], "
"place = [s, none], "
"sequence = [s, none], "
"clear = [l, false, true]; "
" "
"select: control none 0 0 "
"flag = [s, none, none], "
"range = [s, #s/#e, none], "
"class = [s, none, none], "
"pattern = [s, any, none], "
"slice = [i, 1, 1], "
"step = [r, 0, 0], "
"at = [r, {}], "
"thick = [l, false, true], "
"column = [s,{none}], "
"sequence = [s, none], "
"full = [l, false, true], "
"clear = [l, false, true]; "
" "
"set: control none 0 0 "
"sequence = [s, none], "
"format = [s,{\"10d\",\"18.10g\",\"-18s\"}]; "
" "
"setplot: control none 0 0 "
"font = [i, 1], "
"lwidth = [r, 5], "
"xsize = [r, 27.], "
"ysize = [r, 19.], "
"ascale = [r, 1.5], "
"lscale = [r, 2], "
"sscale = [r, 2], "
"rscale = [r, 1.8], "
"post = [i, 1], "
"interpolate = [l, false, true]; "
" "
"sodd: control none 0 0 "
"detune = [l, false, true], "
"distort1 = [l, false, true], "
"distort2 = [l, false, true], "
"start_stop = [r, {0.0,0.0}], "
"noprint = [l, false, true], "
"nosixtrack = [l, false, true], "
"print_at_end = [l, false, true], "
"print_all = [l, false, true], "
"multipole_order_range = [i,{1,2}]; "
" "
"show: control none 0 0; "
" "
"stop: control none 0 0; "
" "
"system: control none 0 0 "
"dummy = [s, 0]; "
" "
"title: control none 0 0 "
"dummy = [s, 0]; "
" "
"threader: control none 0 0 "
"vector= [r, {5.e-3,5.e-3,1}]; " /* xmax,ymax,att */
" "
"use: control none 0 0 "
"period = [s, none, none], "
"sequence = [s, none, none], "
"range = [s, #s/#e, none], "
"survey = [l, false, true], "
"survtest = [l, false, true]; "
" "
"value: control none 0 0 "
"dummy = [s, 0]; "
" "
"printf: control none 0 0 "
"text = [s, none], "
"value = [r, {0}]; "
" "
"write: control none 0 0 "
"table = [s, none], "
"file = [s, none]; "
" "
"sixtrack: c6t none 0 0 "
"mult_auto_off = [l, false, true], "
"cavall = [l, false, true], "
"markall = [l, false, true], "
"aperture = [l, false, true], "
"split = [l, false, true], "
"mangle = [l, false, true], "
"long_names = [l, true, false], "
"multicol = [l, false, true], "
"max_mult_ord = [i, 11], "
"six_version = [i, 0], "
"radius = [r, 1]; "
" "
"ptc_create_universe: ptc_create_universe none 0 0 "
"sector_nmul_max = [i, -1], "
"sector_nmul = [i, -1], "
"symprint = [l, true], "
"ntpsa = [l, false, true]; "
" "
"ptc_export_xml: ptc_export_xml none 0 0 " /* space after 0! */
"file = [s,output.xml,output.xml]; " /* defaults to output.xml */
" "
"ptc_create_layout: ptc_create_layout none 0 0 "
"time = [l, true, true], "
"model = [i, 1], "
"method = [i, 2], "
"exact = [l, false, true], "
"closed_layout = [l, true, true], "
"nst = [i, 1], "
"mad_mult = [l, true], "
"mad8 = [l, true], "
"offset_deltap = [r, 0], "
"errors_out = [l, false, true], "
"magnet_name = [s, none, none], "
"resplit = [l, false, true], "
"thin = [r, 0.001], "
"xbend = [r, -1, 0.001], "
"even = [l, true, true]; "
" "
"ptc_read_errors: ptc_read_errors none 0 0 "
"overwrite = [l, false, true]; "
" "
"ptc_refresh_k: ptc_refresh_k none 0 0 "
"overwrite = [l, false, true]; "
" "
"ptc_move_to_layout: ptc_move_to_layout none 0 0 "
"index = [i, 1]; "
" "
"ptc_align: ptc_align none 0 0; "
" "
"ptc_select: ptc_select none 0 0 "
"table = [s, none, none], "
"column = [s, none, none], "
"polynomial = [i, 0] , "/*defines the element of the tracked 6D array of polynomials */
"monomial = [s, none] , "/*defines the monomial that coefficient will be sent to table */
"parametric = [l, false, true], "/*Tells if the result should be stored in a parametric form if knobs are present*/
"quantity = [s, {none}]; "
" "
"ptc_select_moment: ptc_select_moment none 0 0 "
"table = [s, moments, none], "
"column = [s, none, none], "
"parametric = [l, false, true], "/*Tells if the result should be stored in a parametric form if knobs are present*/
/*"place = [s, none], "*/
"moment_s = [s, {none}], "
"moment = [i, {0}], "
"quantity = [s, {none}]; "
" "
"ptc_knob: ptc_knob none 0 0 "
"initial = [s, none] , "/* */
"element = [s, none] , "/* */
"kn = [i, {-1}], "
"ks = [i, {-1}], "
"exactmatch = [l, true, true]; "
" "
"ptc_putbeambeam: ptc_putbeambeam none 0 0 "
"element = [s, none] , "/* */
"local_s = [r, -1] , "/* */
"global_s = [r, -1] , "/* */
"xma = [r, 0] , "/* */
"yma = [r, 0] , "/* */
"sigx = [r, 0], "
"sigy = [r, 0]; "
" "
"ptc_varyknob: ptc_varyknob none 0 0 "
"initial = [s, none] , "/* */
"element = [s, none] , "/* */
"kn = [i, -1], "
"ks = [i, -1], "
"exactmatch = [l, true, true], "
"trustrange = [r, 0.1], " /*defines the range the expansion is trusted*/
"step = [r, 0.0], "
"lower = [r, -1.e20], "
"upper = [r, 1.e20]; "
" "
"ptc_setknobvalue: ptc_setknobvalue none 0 0 "
"element = [s, none] , "/* */
"kn = [i, -1], "
"ks = [i, -1], "
"refreshtables = [l, true, true], "
"value = [r]; "
" "
"ptc_refreshpartables: ptc_refreshpartables none 0 0 "
"refreshtables = [l, true, true]; "
" "
"rviewer: rviewer none 0 0 "
"exactmatch = [l, true, true]; "
" "
"ptc_printparametric: ptc_printparametric none 0 0 "
"filename = [s, none] , "/* */
"format = [s, ptc]; "
" "
"ptc_setfieldcomp: ptc_setfieldcomp none 0 0 "
"fromerrtable = [s, none, efield], "
"add = [l, false, true], "
"element = [s, none] , "/* */
"kn = [i, -1], "
"ks = [i, -1], "
"value = [r]; "
" "
"ptc_eplacement: ptc_eplacement none 0 0 "
"range = [s, none] , "/* */
"x = [r, 0], y = [r, 0], z = [r, 0], " /*position of the front face*/
"phi = [r, 0], " /**/
"psi = [r, 0], " /**/
"theta = [r, 0], "
"surveyall = [l, true, true] , "
"onlyposition = [l, false, true] , "/* if true changes only position and, leaves orinetation untouched */
"onlyorientation = [l, false, true] , "/* if true changes only orientation and, leaves position untouched */
"autoplacedownstream = [l, true, true] , "/* if true all the elements downstream are placed at default positions, if false the rest of the layout stays antouched */
"refframe = [s, gcs]; " /* coordinate system, gcs - global coordinate syste, current - current position, previouselement */
" "
"ptc_printframes: ptc_printframes none 0 0 "
"file = [s, none] , "/* */
"with = [s, none] , "/* */
"format = [s, text]; "
" "
"ptc_twiss: ptc_twiss none 0 0 "
"betx = [r, 0], alfx = [r, 0], mux = [r, 0], "
"bety = [r, 0], alfy = [r, 0], muy = [r, 0], "
"x = [r, 0], px = [r, 0], "
"y = [r, 0], py = [r, 0], "
"t = [r, 0], pt = [r, 0], "
"dx = [r, 0], dpx = [r, 0], "
"dy = [r, 0], dpy = [r, 0], "
"wx = [r, 0], phix = [r, 0], dmux = [r, 0], "
"wy = [r, 0], phiy = [r, 0], dmuy = [r, 0], "
"ddx = [r, 0], ddpx = [r, 0], "
"ddy = [r, 0], ddpy = [r, 0], "
"r11 = [r, 0], r12 = [r, 0], "
"r21 = [r, 0], r22 = [r, 0], "
"energy = [r, 0], "
"file = [s, none, ptc_twiss], "
"table = [s, none, ptc_twiss], "
"summary_file = [s, none, ptc_twiss_summary], "
"summary_table = [s, none, ptc_twiss_summary], "
"savemaps = [l, false, true], " /*buffers maps for future usage as universal_taylors */
"writetmap = [l,false, true], " /*writes transfer.map */
"slice_magnets = [l,false,true], "
"center_magnets = [l,false,true], "
"deltap_dependency = [l,false,true], " /* compute Twiss derivatives w.r.t deltap*/
"xdistr = [s, gauss, gauss], " /* type of distribution in X plane*/
"ydistr = [s, gauss, gauss], " /* type of distribution in Y plane*/
"zdistr = [s, gauss, gauss], " /* type of distribution in Z plane*/
"deltapreadsize = [r, 0], " /*size on delta */
"bunchlegngth = [r, 0], " /*size in Z/T*/
"initial_moments_manual = [l, false, true], " /* re?? are moments at beginning of the line, 21 in case of 3DGauss, or 10 in fully coupled */
"deltap = [r, 0], "
"range = [s, #s/#e, none], "
"icase = [i, 4], "
"no = [i, 1], "
"closed_orbit = [l, false, true], "
"rmatrix = [l, false, true], "
"ring_parameters = [l, false, true], " /* forces ring parametersd (skowron on 140120)*/
"normal = [l, false, true], " /* runs normal form analysis (skowron on 150903)*/
"trackrdts = [l, false, true], " /* track RDTs (GnFu) (skowron on 180124)*/
"initial_matrix_table = [l, false, true], " /* reads table map_table cooked by ptc_normal */
"initial_matrix_manual = [l, false, true], "
"initial_map_manual = [l, false, true], "
"ignore_map_orbit = [l, false, true], " /* Ignores orbit in the map table and uses the closed or specified x,px,y... (skowron on 140120)*/
"initial_ascript_manual = [l, false, true], "
"re11 = [r, 1], re12 = [r, 0], re13 = [r, 0], "
"re14 = [r, 0], re15 = [r, 0], re16 = [r, 0], "
"re21 = [r, 0], re22 = [r, 1], re23 = [r, 0], "
"re24 = [r, 0], re25 = [r, 0], re26 = [r, 0], "
"re31 = [r, 0], re32 = [r, 0], re33 = [r, 1], "
"re34 = [r, 0], re35 = [r, 0], re36 = [r, 0], "
"re41 = [r, 0], re42 = [r, 0], re43 = [r, 0], "
"re44 = [r, 1], re45 = [r, 0], re46 = [r, 0], "
"re51 = [r, 0], re52 = [r, 0], re53 = [r, 0], "
"re54 = [r, 0], re55 = [r, 1], re56 = [r, 0], "
"re61 = [r, 0], re62 = [r, 0], re63 = [r, 0], "
"re64 = [r, 0], re65 = [r, 0], re66 = [r, 1], "
"betz = [r, 0], alfz = [r, 0], muz = [r, 0], "
"maptable = [l, false, true], "
"scale_with_pt = [l, true, false], "
"beta0 = [s, none, beta0]; "
" "
"ptc_moments: ptc_moments none 0 0 "
"no = [i, 1], "
"xdistr = [s, gauss, gauss], " /* type of distribution in X plane*/
"ydistr = [s, gauss, gauss], " /* type of distribution in Y plane*/
"zdistr = [s, gauss, gauss]; " /* type of distribution in Z plane*/
" "
"select_ptc_normal: select_ptc_normal none 0 0 "
"dx = [s, {none}], "
"dpx = [s, {none}], "
"dy = [s, {none}], "
"dpy = [s, {none}], "
"q1 = [s, {none}], "
"dq1 = [s, {none}], "
"q2 = [s, {none}], "
"dq2 = [s, {none}], "
"gnfu = [s, {none}], "
"haml = [s, {none}], "
"anhx = [s, {none}], "
"anhy = [s, {none}], "
"eign = [s, {none}], "
"clear = [l, false, true]; "
" "
"ptc_normal: ptc_normal none 0 0 "
"icase = [i, 4], "
"no = [i, 1], "
"normal = [l, false, true], "
"closed_orbit = [l, false, true], "
"maptable = [l, false, true], "
"time = [l, false, true], "
"deltap = [r, 0], "
"x = [r, 0], "
"px = [r, 0], "
"y = [r, 0], "
"py = [r, 0], "
"t = [r, 0], "
"pt = [r, 0]; "
" " /*Piotr.Skowronski@cern.ch*/
"ptc_trackline: ptc_trackline none 0 0 " /*implemented by subroutine ptc_trackline() in madx_ptc_trackline.f90*/
"turns = [i, 1], "
"ffile = [i, 1], "
"file = [s, track, track], "
"gcs = [l, false, true], "
"everystep = [l, false, true], "
"tableallsteps = [l, false, true], "
"extension= [s, none, none], "
"rootntuple = [l, false, true], "/*writes all the tracks in ROOT NTuple -> works only if program is dynamically linked and RPLOT plugin is present */
"onetable = [l, false, true]; "
" " /*Piotr.Skowronski@cern.ch*/
"ptc_dumpmaps: ptc_dumpmaps none 0 0 " /*implemented by subroutine ptc_dumpmaps() in madx_ptc_module.f90*/
"range = [s, #s/#e], "
"frombegin = [s, ptcmaps, ptcmaps], "
"file = [s, ptcmap, ptcmaps]; "
" "
"ptc_oneturnmap: ptc_oneturnmap none 0 0 " /*implemented by subroutine ptc_dumpmaps() in madx_ptc_module.f90*/
"x = [r, 0], "
"px = [r, 0], "
"y = [r, 0], "
"py = [r, 0], "
"t = [r, 0], "
"pt = [r, 0], "
"range = [s, #s/#e], "
"file = [s, ptcmap, ptcmaps]; "
" "
"ptc_track_shape: ptc_track_shape none 0 0 "
"debug = [i, 0, 1]; "
" "
"ptc_setswitch: ptc_setswitch none 0 0 "
"debuglevel = [i,1], "/*sets the level of debugging printout 0 none, 4 everything */
"mapdump = [i, 0], " /*ld: sets the level of map dump printout in all tracking codes 0: none, 1: order 0, 2: order 1 */
"madprint = [l, false, true], " /*ld: sets map dump printout format*/
"seed = [i, 123456789], "
"maxacceleration = [l, true, true], " /*switch saying to set cavities phases so the reference orbit is always on the crest, i.e. gains max energy*/
"exact_mis = [l, false, true], " /* switch to ensure exact misaligment treatment */
"totalpath = [l, false, true], " /* switch to use totalpath, modifies PTC states by adding totalpath0 flag */
"spin = [l, false, true], " /*sets the spin switch/internal state of PTC*/
"radiation = [l, false, true], " /*sets the radiation switch/internal state of PTC */
"modulation = [l, false, true], " /*sets the modulation switch/internal state of PTC */
"stochastic = [l, false, true], " /*sets the stochastic switch/internal state of PTC */
"envelope = [l, false, true], " /*sets the envelope switch/internal state of PTC */
"fringe = [l, false, true], " /*sets the fringe switch/internal state of PTC */
"nocavity = [l, false, true], " /*sets the nocavity switch/internal state of PTC */
"time = [l, true, true]; " /* switch to use time rather than pathlength, modifies PTC states by adding TIME0 flag */
" "
"ptc_enforce6d: ptc_enforce6d none 0 0 "
"flag = [l, false, false]; " /* normally 6D is reduced to 4D if no cavities are present. This switch prevents it. It is needed to calcualte fg R56 in a chicane */
" "
"ptc_track: ptc_track none 0 0 "
"icase = [i, 4], "
"turns = [i, 1], "
"closed_orbit = [l, false, true], "
"deltap = [r, 0], "
"time = [l, true, true], "
"element_by_element = [l, false, true], "
"radiation = [l, false, true], "
"radiation_model1 = [l, false, true], "
"radiation_energy_loss = [l, false, true], "
"radiation_quad = [l, false, true], "
"space_charge = [l, false, true], "
"beam_envelope = [l, false, true], "
"dump = [l, false, true], "
"onetable = [l, false, true], "
"recloss = [l, false, true], "
"file = [s, track, track], "
"extension= [s, none, none], "
"ffile = [i, 1], "
"rootntuple = [l, false, true], "/*writes all the tracks in ROOT NTuple -> works only if program is dynamically linked and RPLOT plugin is present */
"maxaper= [r, {0.1, 0.01, 0.1, 0.01, 1., 0.1}], "
"x = [r, 0], px = [r, 0], " /*initial guess for closed orbit search*/
"y = [r, 0], py = [r, 0], "
"t = [r, 0], pt = [r, 0], "
"norm_out = [l, false, true], "
"norm_no = [i, 1]; "
" "
"ptc_start: ptc_start none 0 0 "
"x = [r, 0], "
"px = [r, 0], "
"y = [r, 0], "
"py = [r, 0], "
"t = [r, 0], "
"pt = [r, 0], "
"fx = [r, 0], "
"phix = [r, 0], "
"fy = [r, 0], "
"phiy = [r, 0], "
"ft = [r, 0], "
"phit = [r, 0]; "
" "
"ptc_observe: ptc_observe none 0 0 "
"place = [s, none]; "
" "
"ptc_track_end: ptc_track_end none 0 0; "
" " /*Piotr.Skowronski@cern.ch*/
"ptc_script: ptc_script none 0 0 " /*implemented by subroutine ptc_dumpmaps() in madx_ptc_script.f90*/
"file = [s, script.ptc, script.ptc]; "
" "
"ptc_open_gino: ptc_open_gino 0 0 "
"command = [s, dothis, dothis]; "
" "
"ptc_end: ptc_end none 0 0; "
" "
"correct: correct correct 0 0 "
"error = [r, 1.e-5], "
"ncorr = [i, 0], "
"monerror = [i, 0], "
"monscale = [i, 0], "
"monon = [r, 1], "
"moncut = [r, 0], "
"corrlim = [r, 1], "
"resout = [i, 0], "
"sequence = [s, {none}], "
"clist = [s, none], "
"mlist = [s, none], "
"plane = [s, x], "
"flag = [s, ring], "
"mode = [s, micado], "
"cond = [i, 0], "
"twissum = [i, 0], "
"orbit = [s, none], "
"model = [s, none], "
"corzero = [i, 0], "
"tworing = [l, false, true], "
"beam1tab = [s, none], "
"beam2tab = [s, none], "
"target = [s, none], "
"name_col = [s, none], "
"x_col = [s, none], "
"y_col = [s, none], "
"units = [r, 1], "
"sngcut = [r, 50], "
"sngval = [r, 2], "
"extern = [l, false, true]; "
" "
"getorbit: correct correct 0 0 "
"file = [s, orbit, orbit]; "
" "
"readcorr: correct correct 0 0 "
"file = [s, orbit, orbit]; "
" "
"setcorr: correct correct 0 0 "
"table = [s, none], "
"file = [s, orbit, orbit]; "
" "
// 2013-Dec-10 11:22:38 ghislain: en attente
// "prtcorr: correct correct 0 0 "
// "file = [s, orbit, orbit]; "
// " "
"putorbit: correct correct 0 0 "
"file = [s, orbit, orbit]; "
" "
"getkick: correct correct 0 0 "
"file = [s, setting, setting], "
"plane = [s, none, none], "
"add = [l, false], "
"direct = [l, false]; "
" "
"putkick: correct correct 0 0 "
"file = [s, setting, setting], "
"plane = [s, none, none], "
"direct = [l, false]; "
" "
"getdisp: correct correct 0 0 "
"file = [s, dispersion, dispersion]; "
" "
"putdisp: correct correct 0 0 "
"file = [s, dispersion, dispersion]; "
" "
"usekick: correct correct 0 0 "
"sequence = [s, none, none], "
"status = [s, on], "
"range = [s, #s/#e], "
"class = [s, none], "
"pattern = [s, any, none]; "
" "
"usemonitor: correct correct 0 0 "
"sequence = [s, none, none], "
"status = [s, on], "
"range = [s, #s/#e], "
"class = [s, none], "
"pattern = [s, any, none]; "
" "
"coption: correct none 0 0 "
"seed = [i, 123456789], "
"print = [i, 1];"
" "
"seqedit: edit edit 1 0 "
"sequence = [s, none, none]; "
" "
"flatten: edit edit 0 0; "
" "
"install: edit edit 0 0 "
"element = [s, none, none], "
"class = [s, none, none], "
"at = [r, 0, 0], "
"from = [s, none, none], "
"last = [l, true, true]; "
" "
"move: edit edit 0 0 "
"element = [s, none, none], "
"by = [r, 0, 0], "
"to = [r, 0, 0], "
"from = [s, none, none], "
"last = [l, true, true]; "
" "
"remove: edit edit 0 0 "
"element = [s, none, none]; "
" "
"cycle: edit edit 0 0 "
"start = [s, none, none]; "
" "
"reflect: edit edit 0 0; "
" "
"replace: edit edit 0 0 "
"element = [s, none, none], "
"by = [s, none, none]; "
" "
"endedit: edit edit 2 0; "
" "
"emit: emit none 0 0 "
"deltap = [r, 0], "
"tol = [r, 1.000001, 0]; "
" "
"taper: taper none 0 0 "
"iterate = [i, 3], "
"stepsize = [r, 0], "
"reset = [l, false, true], "
"file = [s, taper.madx, taper.madx]; "
" "
"ealign: error none 0 0 "
"dx = [r, 0], "
"dy = [r, 0], "
"ds = [r, 0], "
"dphi = [r, 0], "
"dtheta = [r, 0], "
"dpsi = [r, 0], "
"mrex = [r, 0], "
"mrey = [r, 0], "
"mredx = [r, 0], "
"mredy = [r, 0], "
"arex = [r, 0], "
"arey = [r, 0], "
"mscalx = [r, 0], "
"mscaly = [r, 0]; "
" "
"eoption: error none 0 0 "
"seed = [i, 123456789], "
"add = [l, false, true]; "
" "
"eprint: error none 0 0 "
"full = [l, false]; "
" "
"esave: error none 0 0 "
"file = [s, esave], "
"full = [l, false]; "
" "
"etable: error none 0 0 "
"table = [s, etable]; "
" "
"seterr: error none 0 0 "
"table = [s, none], "
"file = [s, errfil, errfil]; "
" "
"efcomp: error none 0 0 "
"order = [i, -1], "
"hyster = [i, 0], "