ocelot
ocelot copied to clipboard
Magnetic fields of standard elements for RK tracking
Hi,
To enable more detailed simulations of, above all, bunch compression, I would like to use RK tracking through dipoles. I'm working with a large lattice (FLASH+FLASHForward) containing a large number of dipoles. When I look at the RK tutorial and example files, an undulator is used as an example. For the undulator, the magnetic field is actually defined inside its class (?), and is available in a quite simple way.
However, in my case, if I run my lattice with second-order tracking during tuning and testing and then want to do more detailed simulations of the dipoles, defining the fields for all of them currently seems like quite some hassle.
To improve ease of use, would it be possible to include the magnetic fields of standard components like dipoles, quads, etc., in the code in a similar way as for the undulator? In fact, automatically adding this magnetic field when the element is generated would be very nice from the user's point of view, since it would automatically "just work" when calling the RK method, or am I getting something wrong here? Otherwise, manually adding the magnetic field in the lattice file should not be that much trouble if it's only a matter of calling a function like for the undulator.
Best regards, Jonas