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 Stringstatic final StringParameters for XAL MODEL LATTICE dtdstatic final Stringstring type identifier for all IdealMagQuad objectsFields inherited from class xal.model.elem.ThickElectromagnet
dblField, enmOrientFields inherited from class xal.model.elem.Element
dblNodeLen, dblNodePosFields inherited from interface xal.model.elem.sync.IElectromagnet
ORIENT_HOR, ORIENT_NONE, ORIENT_VERFields 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 TypeMethodDescriptiondoubleRemoved - 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; }doubleelapsedTime(IProbe probe, double dblLen) Returns the time taken for the probe to drift through part of the element.doubleenergyGain(IProbe probe, double dblLen) Return the energy ga in imparted to a particular probe.doubledoubledoubledoubleintintdoublegetK()doublegetK1()doubledoubledoublegetRadIn()doubledoubledoublestatic booleandoubleprotected doublekFringeFromOthers(IProbe probe, double dblLen) voidprint(PrintWriter os) Dump current state and content to output stream.voidsetBRhoScaling(double d) voidsetEffLength(double el) voidsetFieldPathFlag(double ba) voidsetFringeLeft(int edge) voidsetFringeLenEntr(double fl) voidsetFringeLenExit(double fl) voidsetFringeRight(int edge) voidsetK1(double k1) voidsetNominalKineEnergy(double ba) protected voidsetOrientProbe(int orient) voidsetRadIn(double ri) voidsetRadOut(double ro) voidsetSCenter(double se) voidsetSLength(double sl) transferMap(IProbe probe, double dblLen) Compute the transfer matrix for subsection of this element of lengthdblLenfor 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, setOrientationMethods inherited from class xal.model.elem.ThickElement
applyErrors, getLength, isFirstSubslice, isLastSubslice, longitudinalPhaseAdvance, setLengthMethods 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:
elapsedTimein interfaceIElement- Specified by:
elapsedTimein 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:
energyGainin interfaceIElement- Specified by:
energyGainin 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 quadrupoledblLenmeters 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:ElementCompute the transfer matrix for subsection of this element of lengthdblLenfor the specified given probe. That is, this method should return the incremental transfer matrix.- Specified by:
transferMapin interfaceIElement- Specified by:
transferMapin 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.
-