gov.sns.xal.model.elem
Class IdealMagSteeringDipole

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

public class IdealMagSteeringDipole
extends ThinElement
implements IElectromagnet

Represents the action of an ideal magnetic dipole. These structures are typically used for beam steering.


Field Summary
static java.lang.String s_strParamField
           
static java.lang.String s_strParamLenEff
          Parameters for XAL MODEL LATTICE dtd
static java.lang.String s_strParamOrient
           
static java.lang.String s_strType
          the string type identifier for all IdealMagSteeringDipole's
 
Fields inherited from interface gov.sns.xal.model.elem.IElectromagnet
ORIENT_HOR, ORIENT_NONE, ORIENT_VER
 
Fields inherited from interface gov.sns.xal.model.IElement
LightSpeed, Permeability, Permittivity, UnitCharge
 
Constructor Summary
IdealMagSteeringDipole()
          Default constructor - creates a new uninitialized instance of IdealMagSteeringDipole.
IdealMagSteeringDipole(java.lang.String strId)
          Create a new instance of IdealMagSteeringDipole and specify its instance identifier.
IdealMagSteeringDipole(java.lang.String strId, double dblLenEff, int enmOrient, double dblFld)
          Creates a new instance of IdealMagSteeringDipole.
 
Method Summary
 double elapsedTime(IProbe probe)
          Returns the time taken for the probe to propagate through element.
 double energyGain(IProbe probe)
          Return the energy gain for this Element.
 double getEffLength()
          Return the effective length of this dipole magnet
 double getMagField()
          Return the current magnetic field
 int getOrientation()
          Return the orientation enumeration code.
 void print(java.io.PrintWriter os)
          Dump current state and content to output stream.
 void setEffLength(double dblLenEff)
          Set the effective length of the dipole magnet.
 void setMagField(double dblAmp)
          Set the field amplitude of the dipole magnet
 void setOrientation(int enmOrient)
          Set the magnet orientation
protected  PhaseMap transferMap(IProbe probe)
          Computes the transfer map for an ideal magnetic dipole.
 
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, 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
the string type identifier for all IdealMagSteeringDipole's

See Also:
Constant Field Values

s_strParamLenEff

public static final java.lang.String s_strParamLenEff
Parameters for XAL MODEL LATTICE dtd

See Also:
Constant Field Values

s_strParamOrient

public static final java.lang.String s_strParamOrient
See Also:
Constant Field Values

s_strParamField

public static final java.lang.String s_strParamField
See Also:
Constant Field Values
Constructor Detail

IdealMagSteeringDipole

public IdealMagSteeringDipole()
Default constructor - creates a new uninitialized instance of IdealMagSteeringDipole. Typically used by automatic lattice generation.


IdealMagSteeringDipole

public IdealMagSteeringDipole(java.lang.String strId)
Create a new instance of IdealMagSteeringDipole and specify its instance identifier.

Parameters:
strId - string instance identifier of element

IdealMagSteeringDipole

public IdealMagSteeringDipole(java.lang.String strId,
                              double dblLenEff,
                              int enmOrient,
                              double dblFld)
Creates a new instance of IdealMagSteeringDipole. Only the

Parameters:
strId - string identifier of element
dblFld - field strength (in Tesla)
enmOrient - dipole orientation (ORIENT_HOR or ORIENT_VER)
dblLenEff - effective length of dipole magnet
Method Detail

setEffLength

public void setEffLength(double dblLenEff)
Set the effective length of the dipole magnet. This value, along with the field strength, determines the action of the dipole.

Parameters:
dblLenEff - effective length (in meters)

getEffLength

public double getEffLength()
Return the effective length of this dipole magnet

Returns:
effective length (in meters)

getOrientation

public int getOrientation()
Return the orientation enumeration code.

Specified by:
getOrientation in interface IElectromagnet
Returns:
ORIENT_HOR - dipole has steering action in x (horizontal) plane ORIENT_VER - dipole has steering action in y (vertical) plane ORIENT_NONE - error

getMagField

public double getMagField()
Return the current magnetic field

Specified by:
getMagField in interface IElectromagnet
Returns:
magnetic field string (in Tesla)

setOrientation

public void setOrientation(int enmOrient)
Set the magnet orientation

Specified by:
setOrientation in interface IElectromagnet
Parameters:
enmOrient - magnet orientation enumeration code
See Also:
getOrientation()

setMagField

public void setMagField(double dblAmp)
Set the field amplitude of the dipole magnet

Specified by:
setMagField in interface IElectromagnet
Parameters:
dblAmp - magnetic field strength (in Tesla)

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)
Return the energy gain for this Element.

Specified by:
energyGain in class ThinElement
Parameters:
probe - dummy argument
Returns:
value of zero

transferMap

protected PhaseMap transferMap(IProbe probe)
                        throws ModelException
Computes the transfer map for an ideal magnetic dipole.

Specified by:
transferMap in class ThinElement
Parameters:
probe - probe interface from which we get rest energy and kinetic energy
Returns:
7x7 tranfer matrix in homogeneous coordinates
Throws:
ModelException - bad orientation code

print

public void print(java.io.PrintWriter os)
Dump current state and content to output stream.

Overrides:
print in class Element
Parameters:
os - output stream object