- description: Increases the number of particles in a particle input file by successively
doubling the number. Intended to be used to increase the number of particles produced by a
photoinjector simulation to improve stability of CSR and LSC simulations.
The algorithm is as follows:

- For each doubling, insert a new particle “near” every pair of existing particles in time. The particle has a new t value, but the same (x, xp, y, yp, p) as one of the original particles.
- Bin the beam according to t into a large number of bins. Randomize the assignment of p values relative to other coordinates across particles in the same bin, while additionally adding a small random value to each p value.

- synopsis:
doubleDist6 -input name -output name -doublings number -nt bins

- files:
- input — A particle distribution file, such as might be used with sdds_beam.
- output — A particle distribution file, such as might be used with sdds_beam.

- switches:
- -doublings n — The number of times to double the size of the distribution. The number
of particles in the output file is 2
^{n}times the number in the input file. - -nt bins — The number of time bins to use for momentum randomization. This helps to avoid having many particles with exactly same momentum.

- -doublings n — The number of times to double the size of the distribution. The number
of particles in the output file is 2
- author: M. Borland, ANL/APS.
- see also: smoothDist6s

haissinski