gov.sns.xal.model.elem
Class ThickElement

java.lang.Object
  |
  +--gov.sns.xal.model.elem.Element
        |
        +--gov.sns.xal.model.elem.ThickElement
All Implemented Interfaces:
IComponent, IElement
Direct Known Subclasses:
IdealDrift, IdealMagQuad, IdealMagSectorDipole, ThickDipole, ThickMatrix

public abstract class ThickElement
extends Element

Base class for all modeling elements having a finite length. As such, space charge will affect probes propagation through these elements. The transfer matrix that is stored in the parent element is actually the incremental transfer matrix of the full element. Thus, derived classes should implement the method subTransferMatrix() that returns the nSecs root of the full tranfer matrix. Deriving beamline elements from this class allows space charge kicks to be applied at nSecs equally spaced locations throughout the element.


Field Summary
 
Fields inherited from interface gov.sns.xal.model.IElement
LightSpeed, Permeability, Permittivity, UnitCharge
 
Constructor Summary
ThickElement(java.lang.String strType)
          Default constructor to be used by automatic lattice generation.
ThickElement(java.lang.String strType, java.lang.String strId)
          Default constructor to be used by automatic lattice generation.
ThickElement(java.lang.String strType, java.lang.String strId, double dblLen)
          Creates a new instance of ThickElement
 
Method Summary
abstract  double energyGain(IProbe probe, double dblLen)
          Return the energy gain of the beamline element over a subsection of the specified length.
 double getLength()
          Return the total length of this element
 void setLength(double dblLen)
          Set the length of the element.
abstract  PhaseMap transferMap(IProbe probe, double dblLen)
           Compute the transfer map for a subsection of this element whose length is dblLen.
 
Methods inherited from class gov.sns.xal.model.elem.Element
compDriftingTime, elapsedTime, 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
 

Constructor Detail

ThickElement

public ThickElement(java.lang.String strType)
Default constructor to be used by automatic lattice generation. Creates a new parameter-unitialized instance of ThickElement.

Parameters:
strType - the string type-identifier of the element type

ThickElement

public ThickElement(java.lang.String strType,
                    java.lang.String strId)
Default constructor to be used by automatic lattice generation. Creates a new instance of ThickElement specifying its type identifier and its instance identifier.

Parameters:
strType - the string type-identifier of the element type
strId - the string identifier of the element instance

ThickElement

public ThickElement(java.lang.String strType,
                    java.lang.String strId,
                    double dblLen)
Creates a new instance of ThickElement

Parameters:
strType - string type identifier for the element
strId - string instance identifier for this element
dblLen - total length of the element (in meters)
Method Detail

setLength

public void setLength(double dblLen)
Set the length of the element.

Parameters:
dblLen - lenght of element (in meters)

getLength

public double getLength()
Return the total length of this element

Specified by:
getLength in interface IComponent
Specified by:
getLength in class Element
Returns:
total element length (in meters)

energyGain

public abstract double energyGain(IProbe probe,
                                  double dblLen)
Return the energy gain of the beamline element over a subsection of the specified length.

Specified by:
energyGain in interface IElement
Specified by:
energyGain in class Element
Parameters:
probe - probe for which energy gain is to be determined
dblLen - subsection length to calculate energyGain for
Returns:
the value #subEnergyGain(probe)*#getCount()

transferMap

public abstract PhaseMap transferMap(IProbe probe,
                                     double dblLen)
                              throws ModelException

Compute the transfer map for a subsection of this element whose length is dblLen. If dblLen is greater than or equal to the element's length, return the transfer map for the full element. Note that this may not be very useful for an element with differential acceleration.

Specified by:
transferMap in interface IElement
Specified by:
transferMap in class Element
Parameters:
probe - probe supplying parameters for the transfer matrix calculation
dblLen - length of element subsection to compute transfer map for
Returns:
the full tranfer map of this element
Throws:
ModelException - exception occurred in subTransferMap() method
See Also:
#transferMap()