Package xal.model.elem
Class IdealPermMagQuad
java.lang.Object
xal.model.elem.Element
xal.model.elem.ThickElement
xal.model.elem.ThickElectromagnet
xal.model.elem.IdealPermMagQuad
- All Implemented Interfaces:
IElectromagnet
,IComponent
,IElement
Represents an ideal permanent magnet quadrupole for a beam
transport/accelerator system.
These magnets have significant field profiles and, thus, must be stepped
through
- Author:
- Hiroyuki Sako
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
Parameters for XAL MODEL LATTICE dtdstatic final String
string type identifier for all IdealMagQuad objectsFields inherited from class xal.model.elem.ThickElectromagnet
dblField, enmOrient
Fields inherited from class xal.model.elem.Element
dblNodeLen, dblNodePos
Fields inherited from interface xal.model.elem.sync.IElectromagnet
ORIENT_HOR, ORIENT_NONE, ORIENT_VER
Fields inherited from interface xal.model.IElement
LIGHT_SPEED, PERMEABILITY, PERMITTIVITY, UNIT_CHARGE
-
Constructor Summary
ConstructorsConstructorDescriptionJavaBean constructor - creates a new uninitialized instance of IdealMagQuad BE CAREFULIdealPermMagQuad
(String strId, int enmOrient, double dblFld, double dblLen) Creates a new instance of IdealMagQuad -
Method Summary
Modifier and TypeMethodDescriptiondouble
Removed - Jan 2019 Natalia Milas private static PhaseMatrix applyAlignErrorStatic(PhaseMatrix matPhi, double delx, double dely, double delz) { if ((delx==0)&&(dely==0)&&(delz==0)) { return matPhi; } PhaseMatrix T = new PhaseMatrix(); //T = Translation Matrix by Chris Allen // |1 0 0 0 0 0 dx| // |0 1 0 0 0 0 0| // |0 0 1 0 0 0 dy| // |0 0 0 1 0 0 0| // |0 0 0 0 1 0 dz| // |0 0 0 0 0 1 0| // |0 0 0 0 0 0 1| // T(d)r = r+dr // where // r = |x | // |x'| // |y | // |y'| // |z | // |z'| // |1 | // dr = |dx | // |0 | // |dy | // |0 | // |dz | // |0 | // |0 | for (int i=0;i<7;i++) { T.setElem(i,i,1); } T.setElem(0,6,-delx); T.setElem(2,6,-dely); T.setElem(4,6,-delz); PhaseMatrix Phidx = T.inverse().times(matPhi).times(T); return Phidx; }double
elapsedTime
(IProbe probe, double dblLen) Returns the time taken for the probe to drift through part of the element.double
energyGain
(IProbe probe, double dblLen) Return the energy ga in imparted to a particular probe.double
double
double
double
int
int
double
getK()
double
getK1()
double
double
double
getRadIn()
double
double
double
static boolean
double
protected double
kFringeFromOthers
(IProbe probe, double dblLen) void
print
(PrintWriter os) Dump current state and content to output stream.void
setBRhoScaling
(double d) void
setEffLength
(double el) void
setFieldPathFlag
(double ba) void
setFringeLeft
(int edge) void
setFringeLenEntr
(double fl) void
setFringeLenExit
(double fl) void
setFringeRight
(int edge) void
setK1
(double k1) void
setNominalKineEnergy
(double ba) protected void
setOrientProbe
(int orient) void
setRadIn
(double ri) void
setRadOut
(double ro) void
setSCenter
(double se) void
setSLength
(double sl) transferMap
(IProbe probe, double dblLen) Compute the transfer matrix for subsection of this element of lengthdblLen
for the specified given probe.transferMap
(IProbe probe, double dL, double k, int orientation) Compute the partial transfer map of an ideal permanent quadrupole for the particular probe.Methods inherited from class xal.model.elem.ThickElectromagnet
getMagField, getOrientation, initializeFrom, setMagField, setOrientation
Methods inherited from class xal.model.elem.ThickElement
applyErrors, getLength, isFirstSubslice, isLastSubslice, longitudinalPhaseAdvance, setLength
Methods inherited from class xal.model.elem.Element
addCloseElements, backPropagate, backPropagate, compDriftingTime, compProbeLocation, getAlignX, getAlignY, getAlignZ, getCloseElements, getHardwareNodeId, getId, getLatticePosition, getNodeLen, getNodePos, getParent, getPhiX, getPhiY, getPhiZ, getPosition, getType, getUID, propagate, propagate, setAlign, setAlignX, setAlignY, setAlignZ, setHardwareNodeId, setId, setParent, setPhiX, setPhiY, setPhiZ, setPosition, toString
-
Field Details
-
TYPE
string type identifier for all IdealMagQuad objects- See Also:
-
PARAM_ORIENT
Parameters for XAL MODEL LATTICE dtd- See Also:
-
PARAM_FIELD
- See Also:
-
-
Constructor Details
-
IdealPermMagQuad
Creates a new instance of IdealMagQuad- Parameters:
strId
- identifier for this IdealMagQuad objectenmOrient
- enumeration specifying the quadrupole orientation (ORIENT_HOR or ORIENT_VER)dblFld
- field gradient strength (in Tesla/meter)dblLen
- length of the quadrupole
-
IdealPermMagQuad
public IdealPermMagQuad()JavaBean constructor - creates a new uninitialized instance of IdealMagQuad BE CAREFUL
-
-
Method Details
-
getBRhoScaling
public double getBRhoScaling() -
setBRhoScaling
public void setBRhoScaling(double d) -
getOrientProbe
public double getOrientProbe() -
setOrientProbe
protected void setOrientProbe(int orient) -
setFringeLeft
public void setFringeLeft(int edge) -
setFringeRight
public void setFringeRight(int edge) -
getFringeLeft
public int getFringeLeft() -
getFringeRight
public int getFringeRight() -
getFringeFactor
public double getFringeFactor() -
getK
public double getK() -
setRadIn
public void setRadIn(double ri) -
setRadOut
public void setRadOut(double ro) -
setSCenter
public void setSCenter(double se) -
setSLength
public void setSLength(double sl) -
setEffLength
public void setEffLength(double el) -
setFringeLenEntr
public void setFringeLenEntr(double fl) -
setFringeLenExit
public void setFringeLenExit(double fl) -
getRadIn
public double getRadIn() -
getRadOut
public double getRadOut() -
getSCenter
public double getSCenter() -
getSLength
public double getSLength() -
getEffLength
public double getEffLength() -
setFieldPathFlag
public void setFieldPathFlag(double ba) -
setNominalKineEnergy
public void setNominalKineEnergy(double ba) -
getFieldPathFlag
public double getFieldPathFlag() -
getNominalKineEnergy
public double getNominalKineEnergy() -
getK1
public double getK1() -
setK1
public void setK1(double k1) -
elapsedTime
Returns the time taken for the probe to drift through part of the element.- Specified by:
elapsedTime
in interfaceIElement
- Specified by:
elapsedTime
in classThickElement
- Parameters:
probe
- propagating probedblLen
- length of subsection to propagate through meters- Returns:
- the elapsed time through sectionUnits: seconds
-
energyGain
Return the energy ga in imparted to a particular probe. For an ideal quadrupole magnet this value is always zero.- Specified by:
energyGain
in interfaceIElement
- Specified by:
energyGain
in classThickElement
- Parameters:
dblLen
- dummy argumentprobe
- dummy argument- Returns:
- returns a zero value
-
transferMap
Compute the partial transfer map of an ideal permanent quadrupole for the particular probe. Computes transfer map for a section of quadrupoledblLen
meters in length.- Parameters:
probe
- supplies the charge, rest and kinetic energy parametersdL
- compute transfer matrix for section of this lengthk
- focal strengthorientation
-- Returns:
- transfer map of ideal quadrupole for particular probe
-
kFringeFromOthers
-
calcK
Removed - Jan 2019 Natalia Milas private static PhaseMatrix applyAlignErrorStatic(PhaseMatrix matPhi, double delx, double dely, double delz) { if ((delx==0)&&(dely==0)&&(delz==0)) { return matPhi; } PhaseMatrix T = new PhaseMatrix(); //T = Translation Matrix by Chris Allen // |1 0 0 0 0 0 dx| // |0 1 0 0 0 0 0| // |0 0 1 0 0 0 dy| // |0 0 0 1 0 0 0| // |0 0 0 0 1 0 dz| // |0 0 0 0 0 1 0| // |0 0 0 0 0 0 1| // T(d)r = r+dr // where // r = |x | // |x'| // |y | // |y'| // |z | // |z'| // |1 | // dr = |dx | // |0 | // |dy | // |0 | // |dz | // |0 | // |0 | for (int i=0;i<7;i++) { T.setElem(i,i,1); } T.setElem(0,6,-delx); T.setElem(2,6,-dely); T.setElem(4,6,-delz); PhaseMatrix Phidx = T.inverse().times(matPhi).times(T); return Phidx; } -
kFringe
-
getUseApproxLens
public static boolean getUseApproxLens() -
transferMap
Description copied from class:Element
Compute the transfer matrix for subsection of this element of lengthdblLen
for the specified given probe. That is, this method should return the incremental transfer matrix.- Specified by:
transferMap
in interfaceIElement
- Specified by:
transferMap
in classThickElement
- Parameters:
probe
- probe containing parameters for the sub-sectional transfer matrixdblLen
- length of sub-element- Returns:
- transfer map for an element of length dblLen
- Throws:
ModelException
- unable to compute transfer map- See Also:
-
print
Dump current state and content to output stream.
-