EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH

PTC_SETSWITCH

routine that sets the internal PTC switches

USER MANUAL

SYNOPSIS


PTC_SETSWITCH,
debuglevel = [i,0], 
maxacceleration = [l, true, true],
exact_mis = [l, false, true],
totalpath = [l, false, true],
radiation = [l false, true],
fringe = [l, false, true],
time = [l, true, true];

Description

Using this command the user can set switches of PTC and the MAD-X-PTC interface, adapting this way the program behavior to his needs.

Command parameters and switches

debuglevel
integer, default value 1, no default value if value explicitly not specified

Sets the level of debugging printout 0 none, 4 everything

maxacceleration
logical, default true, if value explicitly not specified then true

Switch saying to set cavities phases so the reference orbit is always on the crest, i.e. gains max energy

exact_mis
logical, default false, true if value explicitly specified

Switch ensures exact misalignment treatment.

totalpath
logical, default false, true if value explicitly specified

If true, the 6th variable of PTC, i.e. 5th of MAD-X is the total path. If false it is deviation from the reference particle, which is normally the closed orbit for closed layouts.

radiation
logical, default false, if value explicitly not specified then true:

Sets the radiation switch/internal state of PTC.

fringe
logical, default false, true if value explicitly specified:

Sets the fringe switch/internal state of PTC. If true the influence of the fringe fields is evaluated for all the elements.

Please note that currently fringe fields are always taken to the account for some elements (f.g. traveling wave cavities) even if this flag is set to false. The more detailed list of the elements will be provided later, when the situation in this matter will be definitely settled.

time
logical, default true, if value explicitly not specified then true :

If true, Selects time of flight rather than path length. (cT to be precise) as the 6th variable of PTC, i.e. 5th of MAD-X.

PROGRAMMERS MANUAL

Values of the switches are stored in Fortran 90 module mad_ptc_intstate (mad_ptc_intstate.f90). The command is processed by pro_ptc_setswitch C function in file madxn.c It call an appropriate routines of the Fortran module to set each of the switches: