Questions Regarding SHIFT_IN_FIELD_MAP and Transfer Matrix Extraction in TraceWin

https://www.dacm-logiciels.fr/tracewin
Post Reply
Chinashliu
Skilled
Skilled
Posts: 103
Joined: Fri 5 Feb 2021 04:36
Country:
China (cn)
China

Questions Regarding SHIFT_IN_FIELD_MAP and Transfer Matrix Extraction in TraceWin

Post by Chinashliu »

Dear Didier,
I hope you are doing well.
I am using TraceWin for beam dynamics simulations and have encountered some questions regarding the `SHIFT_IN_FIELD_MAP` command and transfer matrix extraction. I would appreciate your help in clarifying these issues.
In my lattice file, some diagnostic elements are positioned inside magnetic field maps using the `SHIFT_IN_FIELD_MAP` command.
The following is a relevant section of my actual TraceWin lattice file:
;name MEBT_SLIT3
DIAG_SIZE 210
DIAG_PHASE 211
SHIFT_IN_FIELD_MAP 360
;name MEBT_BPM5
DIAG_POSITION 212 0 0 0.5
MATCH_FAM_GRAD 12 0
SUPERPOSE_MAP 0 0 0 0 0 0
;name MEBT_Q11
adjust 1003 5 1 0 180
FIELD_MAP 70 400 0 15.001 23.6771 0 0 0 MEBT_Q1 0
SUPERPOSE_MAP 160 0 0 0 0 0
MATCH_FAM_GRAD 12 0
;name MEBT_Q12
adjust 1003 5 2 -180 0
FIELD_MAP 70 400 0 15.001 -66.1659 0 0 0 MEBT_Q2 0
In this configuration, diagnostic No. 212 corresponds to element No. 46 (BPM05), and its position is defined using `SHIFT_IN_FIELD_MAP 360`.
However, when checking the simulation outputs, I noticed a discrepancy between the longitudinal positions reported by different TraceWin outputs:
In the `RAR.diag1` file, diagnostic No. 211 (element No. 45) is located at **2.84050 m**.
In the `RAR.diag1` file, diagnostic No. 212 (element No. 46) is located at **3.24084 m**.
In the TraceWin Data/Lattice interface, the position displayed for element No. 46 appears to be approximately 2.84050 m, which differs from the position reported in `RAR.diag1`.
The distance between diagnostics No. 211 and No. 212 reported in `RAR.diag1` is approximately 400.34 mm, while the specified `SHIFT_IN_FIELD_MAP` value for diagnostic No. 212 is 360 mm.
I am not sure how these different position values should be interpreted, or whether this discrepancy is related to the combined use of `SHIFT_IN_FIELD_MAP` and `SUPERPOSE_MAP`.
I also obtained the transfer matrix from element No. 1 to element No. 46 using:
`Charts → Transfer Matrix → From 1 to 46`
Since element No. 46 is associated with the `SHIFT_IN_FIELD_MAP` command, I am unsure whether the extracted transfer matrix corresponds to the position displayed in the lattice or to the actual shifted diagnostic position.
I would greatly appreciate your clarification on the following points:
(1)When `SHIFT_IN_FIELD_MAP` is used, does the transfer matrix extracted through `Charts → Transfer Matrix → From 1 to 46` correspond to the original lattice position of element No. 46, or to its shifted diagnostic position inside the field map?
(2) Why does the longitudinal position reported in `RAR.diag1` differ from that displayed in the Data/Lattice interface? Is this expected behavior?
(3) What is the recommended method for obtaining the transfer matrix corresponding exactly to the actual diagnostic position (3.24084 m) reported in `RAR.diag1`?
(4) If I temporarily disable `SHIFT_IN_FIELD_MAP`, will this only change the diagnostic position, or could it also affect the beam transport calculations?
I have attached several screenshots showing the relevant lattice configuration, `RAR.diag1` output, element positions, and the extracted transfer matrix.
Thank you very much for your time and assistance. I look forward to your reply.
Best regards
Attachments
05_Transfer_matrix_1_to_46.png
05_Transfer_matrix_1_to_46.png (69.55 KiB) Viewed 84 times
04_Beamline_layout.png
04_Beamline_layout.png (197.01 KiB) Viewed 84 times
03_Data_element_position.png
03_Data_element_position.png (155.73 KiB) Viewed 84 times
02_SHIFT_IN_FIELD_MAP_lattice.png
02_SHIFT_IN_FIELD_MAP_lattice.png (111.11 KiB) Viewed 84 times
01_RAR_diag1_BPM_position.png
01_RAR_diag1_BPM_position.png (207.63 KiB) Viewed 84 times
User avatar
FranceDidier
Administrator
Administrator
Posts: 1354
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Questions Regarding SHIFT_IN_FIELD_MAP and Transfer Matrix Extraction in TraceWin

Post by FranceDidier »

Dear Shliu,

Sorry for the late reply, but this issue turned out to be quite complex after all.
So you're right: everything displayed in the xx.daig1 files or on the Lattice interface was incorrect. I’ve corrected all of that and updated the manual regarding SHIFT_IN_FIELD_MAP to explain why the new data displayed doesn’t exactly match what’s expected and why you might notice discrepancies between the envelope simulation and the tracking simulation.

Concerning the matix tansfer, I don't really understand your comment. This tool treats the elements exactly as they are defined and ordered in the DAT file and completely ignores the SHIFT_IN_FIELD_MAP command. If I didn't answer that last point correctly, please feel free to clarify your question.

Regards,

Didier
Post Reply