Track slices of a beam

Moderators: cyao, michael_borland

Post Reply
Posts: 12
Joined: 05 Nov 2021, 08:33

Track slices of a beam

Post by Adam_Dixon » 05 Nov 2021, 11:46

Hi all,

I am using ELEGANT to study CSR kicks and I want to get the slice Twiss parameters and slice phase advance at multiple locations.

I have been able to calculate slice alpha and beta by slicing the final bunch and processing the data externally, but not the phase advance. So, now I want to track how individual slices move through the simulation to get the slice Twiss and phase advance of each slice. Can ELEGANT track multiple slices in a simulation, keeping track of the particles that were in each separate slice?

Thanks in advance,

Posts: 1832
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory

Re: Track slices of a beam

Post by michael_borland » 15 Nov 2021, 14:21


You should be able to do this using WATCH elements with MODE="coordinate" and using the particleID column to keep track of particles from one location to the next. Using the &insert_elements command will make it easy to put a sequence of WATCH elements into the lattice without editing it.
The first file in the sequence can be used to get the initial time for each particle, which can then be associated using the particleID field with coordinates at other locations. This allows tracking each particle as a member of its initial slice regardless of relative longitudinal motion.

An example is attached.

(2.29 MiB) Downloaded 134 times

Post Reply