RFCA: can't treat cavities like drifts when CHANGE_P0=1

Moderators: cyao, michael_borland

Post Reply
WEI-HOU
Posts: 31
Joined: 01 Mar 2018, 08:20

RFCA: can't treat cavities like drifts when CHANGE_P0=1

Post by WEI-HOU » 10 Jul 2019, 15:37

Hi,

I use RFCA to model a RF cavity and track with a given distribution.
However, I receive the error messages saying that "can't treat cavities like drifts when CHANGE_P0=1".

Setting "CHANGE_P0=0" works fine.

Is there anything that I missed in my elegant script ?
I attach files for your reference.
Attachments
rfca.zip
(4.43 MiB) Downloaded 128 times

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: RFCA: can't treat cavities like drifts when CHANGE_P0=1

Post by michael_borland » 11 Jul 2019, 11:13

This is discussed on the manual page for twiss_output. The basic issue is that if matched=1 (the default), we are typically looking at a storage ring, in which case it makes sense to treat the rf cavities as drift spaces for the purpose of finding the twiss parameters. In a linac, this makes less sense, so the condition is flagged. You can set cavities_are_drifts_if_matched = 0 to force use of the actual matrix for the rf cavities.

--Michael

Post Reply