Program for Computing Energy Gain of Photoelectrons

Description

The program computes the energy gained of an initially stationary electron due to the passage of a positively charged bunch, as a function of radius of the electron in the beam pipe. It makes several approximations:

The program also computes the average energy gained per particle assuming that the particles are uniformly distributed in the vacuum chamber.

To obtain and compile the programs

A tarred and gzipped file of the code can be downloaded by clicking here. Simply unpack the archive with

gunzip -c egain.tar.gz | tar -xvf - 
This will create a directory egain. Go into the directory, edit the Makefile to set the C compiler and compiler flags. Then type ``make.'' This will create the program sim00.

Using the programs

sim00 is run by giving it 6 command line arguments:

  1. The number of particles in the bunch
  2. The bunch length
  3. The transverse bunch sigma
  4. The beam pipe radius
  5. The time step fraction (I recommend 0.03)
  6. The radial step fraction (I recommend 0.1)
It will output 6 columns of numbers on stdout
  1. The radial position
  2. The energy gained for a longitudinally rectangular bunch
  3. The energy gained for a Gaussian bunch
  4. The energy gained for a parabolic-like bunch cut at 3 sigma
  5. The energy gained in the kick approximation
  6. The energy gained in the autonomous approximation
It will then output 3 numbers on stderr
  1. The average energy gain for a longitudinally rectangular bunch
  2. The average energy gain for a Gaussian bunch
  3. The average energy gain for a parabolic-like bunch cut at 3 sigma

Other Information

Please send me email at <Scott.Berg@cern.ch> if you have any questions, problems, suggestions, or would like to be notified of future improvements (which there will be!).

There is at least one known bug in the program which causes the average energy gain for a longitudinally rectangular bunch to converge rather slowly as you increase the radial time step. It has no effect on the other bunch shapes or the energy gain as a function of radius (except for the point near the beam pipe wall).