General structure of the code

The highest-level object is an Accelerator. It is initialized thanks to a .dat file (the same format as TraceWin). Its main purpose is to store a ListOfElements, which is a list containing all the Elements of the .dat file.

The propagation of the beam through the accelerator is performed thanks to a BeamCalculator. As for now, three different BeamCalculators are implemented: * Envelope1D, which computes the propagation of the beam in envelope and in 1D (longitudinal). * Envelope3D, which computes the propagation of the beam in envelope and in 3D. * TraceWin, which simply calls TraceWin from the command-line interface.

All BeamCalculators have a BeamCalculator.run() method, which perform the beam dynamics calculation along the linac; it takes in a ListOfElements and returns a SimulationOutput. This last object contains all the useful information, such as kinetic energy along the linac.