Corrector at exit method

Use n_compensating cavities around the failure to shape the beam and propagate it without losses. Rephase downstream cavities to keep the beam as intact as possible. Give an ultimate energy boost to the beam with the last n_correctors cavities.

This method is very similar to the one used at SNS [SP22]. In this paper however, there are no compensating cavities around the failure.

Important

This method was designed to work with:

  1. reference_phase_policy = "phi_s". This way, cavities downstream of a failure are rephased to preserve synchronous phase and hence acceptance.

  2. strategy = "corrector at exit". This tells the failed_and_compensating() called at initialization of FaultScenario to add n_correctors cavities at the end of the linac to retrieve energy.

LightWin will not verify that these keys are properly set.

Todo

Automatically check validity of reference_phase_policy and consistency of strategy/objective_preset.

Warning

Setting n_compensating = 0 in the [wtf] section of the TOML configuration file will raise an error, as LightWin currently does not handle optimization problem without compensating elements.

Todo

Handle optimization problems without compensating cavities.

  • Skip creation of associated Fault?

  • Other solution?

Entry

Type

Description

Mandatory?

Allowed values

tie_politics

str

How to select the compensating

elements when several are

equidistant to the failure.

(‘upstream first’, ‘downstream first’)

shift

int

Distance increase for

downstream elements (shift <

0) or upstream elements

(shift > 0). Used to have a

window of compensating

cavities which is not centered

around the failed elements.

n_compensating

int

Number of compensating

cavities around every failure.

They are used to shape the

beam without retrieving

nominal energy, so that it can

propagate up to the ``

correctors `` without losses.

Currently, you must set at

least 1 compensating cavity to

avoid errors.

n_correctors

int

Number of compensating

cavities at the exit of the

linac. They are used to

retrieve nominal energy. Not

affected by the `` shift ``

keyword.