public class CalculationsOnParticles extends CalculationEngine implements ISimulationResults.ISimLocResults<ParticleProbeState>
Provides processing functions appropriate for single particle simulation data.
Additional class methods provide access to computed quantities used by the class for the above processing, such as the "periodic fixed orbit", "periodic betatron phase advance", and "period matched Twiss parameter". These parameters make not make sense here, as we make the very broad assumption that the particle is in a periodic system and the simulation data is taken about n periods, but they are available.
ISimulationResults.ISimEnvResults<S>, ISimulationResults.ISimLocResults<S>
Constructor and Description |
---|
CalculationsOnParticles(Trajectory<ParticleProbeState> datSim)
Constructor for
CalculationsOnParticles . |
Modifier and Type | Method and Description |
---|---|
PhaseVector |
computeChromAberration(ParticleProbeState state)
Computes the chromatic aberration for one pass of the particle around the ring
starting at the given state location,
or for a beamline the entrance of the line to this state position.
|
PhaseVector |
computeCoordinatePosition(ParticleProbeState state)
Simply returns the location of the simulated particle at the location of
the give state.
|
PhaseVector |
computeFixedOrbit(ParticleProbeState state) |
PhaseMatrix |
getFullResponseMatrix()
Returns the full response matrix Φ providing the sensitivity of the final particle
position z to the initial conditions z0.
|
Trajectory<ParticleProbeState> |
getTrajectory()
Returns the simulation trajectory from which all the machine properties are
computed.
|
R3 |
periodBetatronPhaseAdvance()
Returns the betatron phase advances from the simulation beginning to end
(which are computed at instantiation).
|
PhaseVector |
periodFixedOrbitPt()
Returns the phase space location of the fixed point at the simulation start
(which is computed at instantiation) assuming the simulation is that for
at least one period of a periodic accelerating or transport section.
|
Twiss[] |
periodMatchedTwiss()
Returns the matched Courant-Snyder parameters at the entrance of the simulation
assuming the simulation is at least one period of a periodic structure.
|
calculateAberration, calculateDispersion, calculateFixedPoint, calculateMatchedTwiss, calculatePhaseAdvance_old, calculatePhaseAdvance, calculatePhaseAdvPerCell, calculateTunePerCell, computeTwiss
public CalculationsOnParticles(Trajectory<ParticleProbeState> datSim)
CalculationsOnParticles
. Creates a new
CalculationsOnParticles
object for process the simulation
data contained in the given particle trajectory object.datSim
- simulation data for a particlepublic Trajectory<ParticleProbeState> getTrajectory()
public PhaseMatrix getFullResponseMatrix()
public R3 periodBetatronPhaseAdvance()
Returns the betatron phase advances from the simulation beginning to end (which are computed at instantiation). The results are value for trajectories near the simulation trajectory associated with this computation engine. The fact being from the use of the response matrix in the calculations.
The returned value is the calculation
of the super class,
and thus assumes simulation trajectory is that for at least one period of
a periodic structure.
CalculationEngine.calculatePhaseAdvPerCell(PhaseMatrix)
public PhaseVector periodFixedOrbitPt()
Returns the phase space location of the fixed point at the simulation start (which is computed at instantiation) assuming the simulation is that for at least one period of a periodic accelerating or transport section. That is, we assume the beamline is periodic and the returned value is an invariant particle position under the action of the response matrix.
The returned value z is the result of the
calculation
given the
full response matrix Φ at the simulation exit (see CalculationEngine.calculateFixedPoint(PhaseMatrix)
getFullResponseMatrix()
).
It is invariant under
the action of Φ, that is, Φz = z.
public Twiss[] periodMatchedTwiss()
Returns the matched Courant-Snyder parameters at the entrance of the simulation assuming the simulation is at least one period of a periodic structure. These are the "envelopes" taken from the "closed envelope" solution under the assume the linac is a periodic transport.
Note that emittance ε is the parameter used to describe the extend of
the actual beam (rather than the normalized size β), or "acceptance". Thus it
cannot be computed here and NaN
is returned instead.
public PhaseVector computeCoordinatePosition(ParticleProbeState state)
computeCoordinatePosition
in interface ISimulationResults.ISimLocResults<ParticleProbeState>
state
- simulation state where parameters are computedxal.tools.beam.calc.ISimEnvResults#computeCoordinatePosition(xal.model.probe.traj.ProbeState)
public PhaseVector computeFixedOrbit(ParticleProbeState state)
computeCoordinatePosition(ParticleProbeState)
. This modification is
maintain compatibility with the previous use of computeFixedOrbit()
presented by the trajectory classes for particles, beam envelopes, etc. They
responded differently depending upon whether the structure producing the simulation
data was from a ring or a linear transport/accelerator structure.
Consider first the point in phase space that is invariant under repeated application of the response matrix Φ for the entire beamline or ring. This is under the condition that we decompose Φ into its homogeneous and non-homogeneous components. A particle entering the linac at that location exits at the same location.
To compute this linac fixed point, recall that the homogeneous response
matrix Φ for the beamline (or full-turn matrix for a ring)
has final row that represents the translation Δ of the particle
under the action of Φ. The 6×6 sub-matrix of Φ represents
the (linear) action of the bending magnetics and quadrupoles and corresponds to the
matrix T ∈ R6×6 (here T is linear).
Thus, we can write the linear operator Φ
as the augmented system
Φ = |T Δ |, z ≡ |p| , |0 1 | |1|where p is the projection of z into the embedded phase space R6 (without homogeneous coordinate). coordinates).
Putting this together we get
Φz = Tp + Δ = p ,
to which the solution is
p = -(T - I)-1Δ
assuming it exists. The question of solution existence falls upon the
resolvent R ≡ (T - I)-1 of T.
By inspection we can see that p is defined so long as the eigenvalues
of T are located away from 1.
In this case the returned value is the augmented vector
(p 1)T ∈ R6 × {1}.
When the set of eigenvectors does contain 1, we attempt to find the solution for the transverse phase space. That is, we take vector p ∈ R4 and T ∈ R4×4 where T = proj4×4 Φ. The solution value is then z = (p 0 0 1)T.
Once we have the fixed point z0 for the linac we compute the trajectory of the fixed point at the location of the given probe state. To do so, we multiply z0 by the response matrix Φn for the given probe state. That is, we propagate the fixed point of the linac from the linac entrance to the location of the given phase state.
computeFixedOrbit
in interface ISimulationResults.ISimLocResults<ParticleProbeState>
state
- simulation state where parameters are computedxal.tools.beam.calc.ISimEnvResults#computeFixedOrbit(xal.model.probe.traj.ProbeState)
public PhaseVector computeChromAberration(ParticleProbeState state)
ISimLocResults#computeChromAberration(ProbeState)
for a more detailed
exposition.computeChromAberration
in interface ISimulationResults.ISimLocResults<ParticleProbeState>
state
- simulation state where parameters are computedxal.tools.beam.calc.ISimLocResults#computeChromAberration(xal.model.probe.traj.ProbeState)