&rf_setup
STRING filename = NULL;
STRING name = NULL;
long start_occurence = -1;
long end_occurence = -1;
double s_start = -1;
double s_end = -1;
long set_for_each_step = 0;
double near_frequency = 0;
long harmonic = -1;
double bucket_half_height = 0;
double over_voltage = 0;
double total_voltage = 0;
&end
This command must follow a twiss_output command that includes radiation integral computation, since the
energy loss per turn is needed to set up the rf cavities.
Note that the command includes features to allow selecting a subset of the RFCA elements in the beamline.
The selected subset is assumed to include all of the cavities that will impart net energy to the beam.
filename -- Name of a file to which data related to the rf settings will be written.
name -- A possibly-wildcard-containing string giving the names of the
elements to set. If not given, all RFCA elements are selected.
start_occurence, end_occurence -- If nonzero, these give the starting and
ending occurrence numbers of elements that will be set.
s_start, s_end -- If non-negative, these give the gaving and ending position
limits for the end-of-element locations of elements to be set.
set_for_each_step -- If nonzero, then the setup is repeated at each simulation step.
In this case, one must also give output_at_each_step=1 for twiss_output.
near_frequency - If nonzero, then the rf frequency is chosen to be the closest harmonic
to the given frequency.
harmonic -- If nonzero, then the rf frequency is set to the given harmonic of the revolution
frequency.
bucket_half_height -- If nonzero, the voltage is computed so as to give the specified bucket
half height.
![]() |
(3) |
| (4) |
over_voltage -- If nonzero, the voltage is set to the given factor relative to the
energy loss per turn.
total_voltage -- If nonzero, the total rf voltage is set to the given value. The frequency and
phase are computed for this voltage.