gov.sns.xal.model.elem
Class ThinElement

java.lang.Object
  |
  +--gov.sns.xal.model.elem.Element
        |
        +--gov.sns.xal.model.elem.ThinElement
All Implemented Interfaces:
IComponent, IElement
Direct Known Subclasses:
IdealMagDipoleFace, IdealMagSteeringDipole, IdealRfGap, Marker, ThinLens, ThinMatrix

public abstract class ThinElement
extends Element

Classes derived from ThinElement are modeled as having no length. Thus, space charge effects are neglected here. The IElement interface method getLength() always returns zero. However, a ThinElement may have an "effective length" which is a parameter used to determine it's effect on the beam, that is, it is used to compute the transfer matrix.


Field Summary
 
Fields inherited from interface gov.sns.xal.model.IElement
LightSpeed, Permeability, Permittivity, UnitCharge
 
Constructor Summary
ThinElement(java.lang.String strType)
          Creates a new instance of ThinElement specifying the element type identifier.
ThinElement(java.lang.String strType, java.lang.String strId)
          Creates a new instance of ThinElement specifying with the element type identifier and the instance identifier.
 
Method Summary
protected abstract  double elapsedTime(IProbe probe)
          Returns the time taken for the probe to propagate through element.
 double elapsedTime(IProbe probe, double dblLen)
          Returns the time taken for the probe to drift through part of the element.
protected abstract  double energyGain(IProbe probe)
          Calculate the energy gain for this element on the supplied probe.
 double energyGain(IProbe probe, double dblLen)
          Calculate the energy gain for this element.
 double getLength()
          Return the length of this element
protected abstract  PhaseMap transferMap(IProbe probe)
          Compute the transfer matrix of this element.
 PhaseMap transferMap(IProbe probe, double dblLen)
          Compute the tranfer matrix for subsection of this element of length dblLen for the specified given probe.
 
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
 

Constructor Detail

ThinElement

public ThinElement(java.lang.String strType)
Creates a new instance of ThinElement specifying the element type identifier.

Parameters:
strType - type identifier string of element

ThinElement

public ThinElement(java.lang.String strType,
                   java.lang.String strId)
Creates a new instance of ThinElement specifying with the element type identifier and the instance identifier.

Parameters:
strType - type string of element
strId - string identifier of the element
Method Detail

elapsedTime

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

Parameters:
probe - propagating probe
Returns:
elapsed time through element Units: seconds

energyGain

protected abstract double energyGain(IProbe probe)
Calculate the energy gain for this element on the supplied probe.

Returns:
this element's energy gain

transferMap

protected abstract PhaseMap transferMap(IProbe probe)
                                 throws ModelException
Compute the transfer matrix of this element.

Returns:
transfer map for this element
ModelException

getLength

public double getLength()
Return the length of this element

Specified by:
getLength in interface IComponent
Specified by:
getLength in class Element
Returns:
a value of zero

elapsedTime

public double elapsedTime(IProbe probe,
                          double dblLen)
Returns the time taken for the probe to drift through part of the element.

Specified by:
elapsedTime in interface IElement
Specified by:
elapsedTime in class Element
Parameters:
probe - propagating probe
dblLen - length of subsection to propagate through meters
Returns:
the elapsed time through sectionUnits: seconds

energyGain

public double energyGain(IProbe probe,
                         double dblLen)
Calculate the energy gain for this element. Because this is a thin element with no length, the length parameter is ignored.

Specified by:
energyGain in interface IElement
Specified by:
energyGain in class Element
Parameters:
probe - Probe for which energy gain is to be computed
Returns:
the energy gain for this element on the particular probe

transferMap

public PhaseMap transferMap(IProbe probe,
                            double dblLen)
                     throws ModelException
Compute the tranfer matrix for subsection of this element of length dblLen for the specified given probe. Because this is a thin element (with no length), the length parameter is ignored in computing the transfer matrix.

Specified by:
transferMap in interface IElement
Specified by:
transferMap in class Element
Parameters:
dblLen - length of subelement
probe - probe containing parameters for the subsectional transfer matrix
Returns:
transfer map for an element of length dblLen
Throws:
ModelException - unable to compute transfer map
See Also:
#transferMap()