Class ThickMatrix
- All Implemented Interfaces:
IComponent
,IElement
User element representing a general beamline element. Arbitrary beamline elements are specified by providing the transfer matrix generator, elapsed time, and energy gain a priori. Note that for this element the transfer matrix, elapsed time, and energy gain are independent of any probe objects. Note also that the generator for the transfer matrix is specified, NOT the actual transfer matrix. Thus, this class should be used carefully.
This element is derived from the ThickElement base so that space charge kicks may be applied throughout the element.
Denoting the generator matrix as A, then the transfer matrix
M(s) for a section of length s is given by
M(s) =
esA
where eA is the matrix exponential.
NOTE:
Currently the class implements the matrix exponential only to second order.
Therefore
M(s) = I +
sA
+ ½s2A2
( + O(s3) )
- Author:
- Christopher K. Allen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
string type identifier for all ThickMatrix objectsFields inherited from class xal.model.elem.Element
dblNodeLen, dblNodePos
Fields inherited from interface xal.model.IElement
LIGHT_SPEED, PERMEABILITY, PERMITTIVITY, UNIT_CHARGE
-
Constructor Summary
ConstructorsConstructorDescriptionJavaBean constructor - creates a new uninitialized instance of ThickMatrix BE CAREFULThickMatrix
(String strId, double dblLen) Creates a new instance of ThickMatrix.ThickMatrix
(String strId, double dblLen, PhaseMatrix matPhiSub) Creates a new instance of ThickMatrix.ThickMatrix
(String strId, double dblLen, PhaseMatrix matPhiSub, double dblDelW) Creates a new instance of ThickMatrix -
Method Summary
Modifier and TypeMethodDescriptiondouble
elapsedTime
(IProbe probe, double dblLen) Returns the time taken for any probe to drift through part of the element.double
energyGain
(IProbe probe, double dblLen) Returns the energy gain imparted to any probe when going through part of the element.void
setElapsedTime
(double dblDelT) Set the total elapsed time for all probes to propagate the entire element.void
setEnergyGain
(double dblDelW) Set the total energy gain imparted to any probe propagating through entire element.void
setTransferMapGenerator
(PhaseMatrix matGen) Set the transfer map generator A for the element.transferMap
(IProbe probe, double dblLen) Returns the transfer map produced by the generator matrix over the distancedblLen
.Methods inherited from class xal.model.elem.ThickElement
applyErrors, getLength, initializeFrom, isFirstSubslice, isLastSubslice, longitudinalPhaseAdvance, setLength
Methods inherited from class xal.model.elem.Element
addCloseElements, backPropagate, backPropagate, compDriftingTime, compProbeLocation, getAlignX, getAlignY, getAlignZ, getCloseElements, getHardwareNodeId, getId, getLatticePosition, getNodeLen, getNodePos, getParent, getPhiX, getPhiY, getPhiZ, getPosition, getType, getUID, print, propagate, propagate, setAlign, setAlignX, setAlignY, setAlignZ, setHardwareNodeId, setId, setParent, setPhiX, setPhiY, setPhiZ, setPosition, toString
-
Field Details
-
TYPE
string type identifier for all ThickMatrix objects- See Also:
-
-
Constructor Details
-
ThickMatrix
Creates a new instance of ThickMatrix- Parameters:
strId
- identifier of this ThickMatrix objectdblLen
- length of the element (in meters)matPhiSub
- 7x7 transfer matrix for a subelementdblDelW
- energy gain imparted of this element (in electron-volts)
-
ThickMatrix
Creates a new instance of ThickMatrix. Energy gain for each subelement is initialized to zero.- Parameters:
strId
- identifier of this ThickMatrix objectdblLen
- length of the element (in meters)matPhiSub
- 7x7 transfer matrix for a subelement
-
ThickMatrix
Creates a new instance of ThickMatrix. The sub-element energy gain is initialized to zero. The sub-element transfer matrix is initialized to the 7x7 identity.- Parameters:
strId
- identifier of this ThickMatrix objectdblLen
- length of the element (in meters)
-
ThickMatrix
public ThickMatrix()JavaBean constructor - creates a new uninitialized instance of ThickMatrix BE CAREFUL
-
-
Method Details
-
setElapsedTime
public void setElapsedTime(double dblDelT) Set the total elapsed time for all probes to propagate the entire element.- Parameters:
dblDelT
- elapsed time through element in seconds
-
setEnergyGain
public void setEnergyGain(double dblDelW) Set the total energy gain imparted to any probe propagating through entire element.- Parameters:
dblDelW
- energy gain imparted to all probes (in electron-volts)
-
setTransferMapGenerator
Set the transfer map generator A for the element. The transfer map M(s) over a distance s is then given by M(s) = Exp(s*A) where Exp() is the matrix exponential function. Thus, the map M generated by A is also a matrix.- Parameters:
matGen
- transfer matrix generator (probe independent)
-
elapsedTime
Returns the time taken for any probe to drift through part of the element. The value dT(dblLen) returned by this method is given by dT(dblLen) = dblLen/getLength() * dblDelT where dblDelT is the value given to#setElapsedTime
.- Specified by:
elapsedTime
in interfaceIElement
- Specified by:
elapsedTime
in classThickElement
- Parameters:
probe
- dummy argumentdblLen
- length of subsection to propagate through meters- Returns:
- the elapsed time through sectionUnits: seconds
-
energyGain
Returns the energy gain imparted to any probe when going through part of the element. The value dW(dblLen) returned by this method is given by DW(dblLen) = dblLen/getLength() * dblDelW where dblDelW is the value given to#setEnergyGain
.- Specified by:
energyGain
in interfaceIElement
- Specified by:
energyGain
in classThickElement
- Parameters:
dblLen
- dummy argumentprobe
- dummy argument- Returns:
- energy gain for each subelement (in electron-volts)
-
transferMap
Returns the transfer map produced by the generator matrix over the distancedblLen
. NOTE: Currently the transfer map returned is accurate only to order two. That is the matrix exponential function is approximated by its first three terms.- Specified by:
transferMap
in interfaceIElement
- Specified by:
transferMap
in classThickElement
- Parameters:
dblLen
- propagation length in metersprobe
- dummy argument- Returns:
- computed transfer map
- Throws:
ModelException
- this should not occur- See Also:
-