fnalacceleratormodeling/synergia2

egstern/need-accelerating-phase-separate-from-reference-energy

Closed this issue · 1 comments

We need a way to specify an accelerating phase to the RF cavity that is separate from the reference energy of the bunch. Consider the scenario of an storage ring operating at a fixed energy but there is impedance that robs the particle beam of energy. You have RF cavities in the ring that add back the energy lost to impedance.

This is currently not easily done. Right now, if you add an accelerating phase to the RF cavity, the energy gain of the beam is used to increment the reference energy of the bunch. In an accelerating ring situation, this reference energy is used to set the magnet strengths, which is the way it was in CHEF. We need a way to add energy to the beam but separately control the reference energy.

In the storage ring example, you could just keep the reference energy constant, but consider the Booster where the energy is increasing but you also need to add energy to compensate for energy loss from impedance. So you need an accelerating phase to track the magnet ramp, and an additional accelerating phase to compensate for impedance.

Tentative plan:

  • Create method in bunch that will adjust the particle coordinates for a new reference
  • Add a new Reference_particle to Bunch called target_reference_particle (or something like that.) That can be used to hold the target energy for the next turn. The flow would be:
  1. In turn_end_action, get the target_reference_particle energy.
  2. Adjust the particle coordinates for that energy.
  3. Based on the particle coordinates, set the RF cavities phase and acceleration for the next turn.
  4. Set the target reference energy appropriate for the next turn (accelerated energy for instance)
  5. tune lattice
  6. propagate