gov.sns.xal.model.elem
Class ThinMatrix

java.lang.Object
  |
  +--gov.sns.xal.model.elem.Element
        |
        +--gov.sns.xal.model.elem.ThinElement
              |
              +--gov.sns.xal.model.elem.ThinMatrix
All Implemented Interfaces:
IComponent, IElement

public class ThinMatrix
extends ThinElement

User element represent a general beamline element. Arbitrary beamline elements are specified by providing the energy gain and tranfer matrix a priori. Note that for this element the transfer matrix and energy gain are independent of any probe objects. Thus, this class should be used carefully.

Since this is a thin element there are no space charge kicks in the particle dynamics. If


Field Summary
static java.lang.String s_strType
          string type identifier for all TranferMatrix objects
 
Fields inherited from interface gov.sns.xal.model.IElement
LightSpeed, Permeability, Permittivity, UnitCharge
 
Constructor Summary
ThinMatrix()
          JavaBean constructor - creates a new unitialized instance of ThinMatrix BE CAREFUL
ThinMatrix(java.lang.String strId)
          Creates a new instance of TransferMatrix.
ThinMatrix(java.lang.String strId, PhaseMatrix matPhi)
          Creates a new instance of TransferMatrix.
ThinMatrix(java.lang.String strId, PhaseMatrix matPhi, double dblDelW)
          Creates a new instance of ThinMatrix
 
Method Summary
 double elapsedTime(IProbe probe)
          Returns the time taken for the probe to propagate through element.
 double energyGain(IProbe probe)
          Returns the energy gain of this element, which is independent of all probe parameters.
 void setElapsedTime(double dblDelT)
          Set the elapsed time for all probes to propagate this element.
 void setEnergyGain(double dblDelW)
          Set the energy gain imparted to all probes.
 void setTransferMatrix(PhaseMatrix matPhi)
          Set the tranfer matrix of the element for all probes.
protected  PhaseMap transferMap(IProbe probe)
           Returns the transfer map of this element, which only has a linear component corresponding to the transfer matrix,
 
Methods inherited from class gov.sns.xal.model.elem.ThinElement
elapsedTime, energyGain, getLength, transferMap
 
Methods inherited from class gov.sns.xal.model.elem.Element
compDriftingTime, getId, getType, getUID, initializeFrom, print, propagate, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_strType

public static final java.lang.String s_strType
string type identifier for all TranferMatrix objects

See Also:
Constant Field Values
Constructor Detail

ThinMatrix

public ThinMatrix(java.lang.String strId,
                  PhaseMatrix matPhi,
                  double dblDelW)
Creates a new instance of ThinMatrix

Parameters:
strId - string identifier of this object
matPhi - 7x7 transfer matrix of element in homogeneous coordinates
dblDelW - energy gain of element (in electron-volts)

ThinMatrix

public ThinMatrix(java.lang.String strId,
                  PhaseMatrix matPhi)
Creates a new instance of TransferMatrix. The energy gain is initialized to zero.

Parameters:
strId - string identifier of this object
matPhi - 7x7 transfer matrix of element in homogeneous coordinates

ThinMatrix

public ThinMatrix(java.lang.String strId)
Creates a new instance of TransferMatrix. The energy gain is initialized to zero. The transfer matrix is initialized to the 7x7 identity.

Parameters:
strId - string identifier of this object

ThinMatrix

public ThinMatrix()
JavaBean constructor - creates a new unitialized instance of ThinMatrix BE CAREFUL

Method Detail

setElapsedTime

public void setElapsedTime(double dblDelT)
Set the elapsed time for all probes to propagate this element.

Parameters:
dblDelT - elapsed time through element in seconds

setEnergyGain

public void setEnergyGain(double dblDelW)
Set the energy gain imparted to all probes.

Parameters:
dblDelW - energy gain (in electron-volts)

setTransferMatrix

public void setTransferMatrix(PhaseMatrix matPhi)
Set the tranfer matrix of the element for all probes.

Parameters:
matPhi - 7x7 transfer matrix in homogeneous phase space coordinates

elapsedTime

public double elapsedTime(IProbe probe)
Returns the time taken for the probe to propagate through element.

Specified by:
elapsedTime in class ThinElement
Parameters:
probe - propagating probe
Returns:
the value zero

energyGain

public double energyGain(IProbe probe)
Returns the energy gain of this element, which is independent of all probe parameters.

Specified by:
energyGain in class ThinElement
Parameters:
probe - dummy argument
Returns:
energy gain (in electron-volts)

transferMap

protected PhaseMap transferMap(IProbe probe)
                        throws ModelException

Returns the transfer map of this element, which only has a linear component corresponding to the transfer matrix,

Note that since the transfer matrix is constant it is independent of the IProbe argument.

Specified by:
transferMap in class ThinElement
Parameters:
probe - dummy argument
Returns:
phase space transfer map
Throws:
ModelException - this should not occur