public class ThickMatrix extends ThickElement
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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
s_strType
string type identifier for all ThickMatrix objects
|
LightSpeed, Permeability, Permittivity, UnitCharge
Constructor and Description |
---|
ThickMatrix()
JavaBean constructor - creates a new uninitialized instance of ThickMatrix
BE CAREFUL
|
ThickMatrix(java.lang.String strId,
double dblLen)
Creates a new instance of ThickMatrix.
|
ThickMatrix(java.lang.String strId,
double dblLen,
PhaseMatrix matPhiSub)
Creates a new instance of ThickMatrix.
|
ThickMatrix(java.lang.String strId,
double dblLen,
PhaseMatrix matPhiSub,
double dblDelW)
Creates a new instance of ThickMatrix
|
Modifier and Type | Method and Description |
---|---|
double |
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.
|
PhaseMap |
transferMap(IProbe probe,
double dblLen)
Returns the transfer map produced by the generator matrix over the
distance
dblLen . |
getLength, initializeFrom, setLength
addCloseElements, applyAlignError, backPropagate, backPropagate, compDriftingTime, compProbeLocation, getAlignX, getAlignY, getAlignZ, getCloseElements, getHardwareNodeId, getId, getPosition, getType, getUID, print, propagate, propagate, setAlign, setAlignX, setAlignY, setAlignZ, setHardwareNodeId, setId, setPosition, toString
public static final java.lang.String s_strType
public ThickMatrix(java.lang.String strId, double dblLen, PhaseMatrix matPhiSub, double dblDelW)
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)public ThickMatrix(java.lang.String strId, double dblLen, PhaseMatrix matPhiSub)
strId
- identifier of this ThickMatrix objectdblLen
- length of the element (in meters)matPhiSub
- 7x7 transfer matrix for a subelementpublic ThickMatrix(java.lang.String strId, double dblLen)
strId
- identifier of this ThickMatrix objectdblLen
- length of the element (in meters)public ThickMatrix()
public void setElapsedTime(double dblDelT)
dblDelT
- elapsed time through element in secondspublic void setEnergyGain(double dblDelW)
dblDelW
- energy gain imparted to all probes (in electron-volts)public void setTransferMapGenerator(PhaseMatrix matGen)
matGen
- transfer matrix generator (probe independent)public double elapsedTime(IProbe probe, double dblLen)
#setElapsedTime
.elapsedTime
in interface IElement
elapsedTime
in class Element
probe
- dummy argumentdblLen
- length of subsection to propagate through meterspublic double energyGain(IProbe probe, double dblLen)
#setEnergyGain
.energyGain
in interface IElement
energyGain
in class ThickElement
dblLen
- dummy argumentprobe
- dummy argumentpublic PhaseMap transferMap(IProbe probe, double dblLen) throws ModelException
dblLen
.
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.transferMap
in interface IElement
transferMap
in class ThickElement
dblLen
- propagation length in metersprobe
- dummy argumentModelException
- this should not occursetTransferMapGenerator(xal.tools.beam.PhaseMatrix)