-
Notifications
You must be signed in to change notification settings - Fork 4
Code Organization
Riccardo De Maria edited this page Jun 6, 2015
·
22 revisions
SixTrackLib contains parametric maps that track particle coordinates.
The maps are organized in groups sharing the same coordinate conventions and are listed here:
- Generic Maps Generic maps like: elem loop, parameters expression, counters
- Sixtrack Maps Maps implementing SixTrack tracking engine
- Nd Maps Abstract 2D, 4D, 6D maps
##Input Data Structure
Map parameters are organized in elements. From an element All data is organized in 4 arrays
name | type | Description |
---|---|---|
elemi |
integer array | Element integer data |
elemf |
floating point array | Element floating point data |
parti |
integer array | Particle integer data |
partf |
floating point array | Particle floating point data |
Each element is identified by an index elemid
such that
-
mapid=elemi[elemid]
wheremapid
identify the associated map -
mapst=elemi[elemid+1]
andelemf[mapst+<n>]
is the (n+1)-th floating point map parameter if any -
elemi[elemid+2+<n>]
if the n-th+1 integer map parameter if any
Similarly a particle is associated with a partid
such that:
-
partn=parti[0]
is the total number of particles -
ndf=parti[1]
is the number of floating point coordinates per particle -
ndi=parti[2]
is the number of integer coordinates per particle -
stf=parti[3]
is the shift forpartf
-
sti=parti[4]
is the shift forparti
-
partf[stf+partid*ndf+<n>]
is the (n+1)-th floating point coordinate of the particles -
parti[sti+partid*ndi+<n>]
is the (n+1)-th integer coordinate of the particles
Each element has the following associated methods:
-
<name>_init(elemi, elemf, elemid)
: to be called any time the parameters are updated to ensure consistency between derived inter-dependent parameters. -
<name>_map(elemi, elemf, elemid, parti, partf, partid, partn)
: maps that track a set of particles and substitute final coordinate into initial coordinates inparti
,partf
.
See C coding conventions for further details.