Class Cavity
java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
org.scictrl.mp.orbitcorrect.model.optics.Cavity
- All Implemented Interfaces:
Cloneable,ISimpleElement
Cavity represent cavity.
- Author:
- igor@scictrl.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstantPR_BETRF=9static final intConstantPR_HARMON=8static final intConstantPR_LAG=7static final intConstantPR_PG=10static final intConstantPR_SHUNT=11static final intConstantPR_TFILL=12static final intConstantPR_VOLTAGE=6Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
length, matrices, matrix, PR_LENGTHFields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
PR_POSITION, PR_REL_FROM, PR_REL_POSITIONFields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
lastActionResult, owner, PR_ELEMENT_NAME, PR_VIRTUAL -
Constructor Summary
ConstructorsConstructorDescriptionCavity constructor that takes only name as parameter.Cavity(String name, boolean virtual, double position, double relpos, String relFrom, double length, double voltage, double lag, int harmon, double betRF, double pG, double shunt, double tFill) Constructs theCavitywith specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the descriptor object for this element.intelType()Returns the code of element's type.doublegetBetRF()Getter for the fieldbetRF.intGetter for the fieldharmon.doublegetLag()Getter for the fieldlag.doublegetPG()Getter for the fieldpG.doublegetShunt()Getter for the fieldshunt.doublegetTFill()Getter for the fieldtFill.doubleThis method return voltage on cavity.voidsetBetRF(double newValue) Setter for the fieldbetRF.voidsetHarmon(int newValue) Setter for the fieldharmon.voidsetLag(double newValue) Setter for the fieldlag.voidsetPG(double newValue) Setter for the fieldpG.voidsetShunt(double newValue) Setter for the fieldshunt.voidsetTFill(double newValue) Setter for the fieldtFill.voidsetVoltage(double newValue) This method set voltage to cavity.voidSets parameters values of this element to those in parameter array.toString()Returns the string representation of this element.Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
clone, getAlpha1, getAlpha2, getBeta1, getBeta2, getDispersion1, getDispersion2, getLength, getMatrix, getQ1, getQ2, newMatrix, newMatrix, setLengthMethods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
getAlpha, getBeta, getDispersion, getIndex, getPosition, getQ, getRelFrom, getRelPosition, setPosition, setRelFrom, setRelPositionMethods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
equals, getLastActionResult, getName, getOwner, getVirtual, hashCode, isInitialized, isVirtual, setVirtual, throwISE
-
Field Details
-
PR_VOLTAGE
public static final int PR_VOLTAGEConstantPR_VOLTAGE=6- See Also:
-
PR_LAG
public static final int PR_LAGConstantPR_LAG=7- See Also:
-
PR_HARMON
public static final int PR_HARMONConstantPR_HARMON=8- See Also:
-
PR_BETRF
public static final int PR_BETRFConstantPR_BETRF=9- See Also:
-
PR_PG
public static final int PR_PGConstantPR_PG=10- See Also:
-
PR_SHUNT
public static final int PR_SHUNTConstantPR_SHUNT=11- See Also:
-
PR_TFILL
public static final int PR_TFILLConstantPR_TFILL=12- See Also:
-
-
Constructor Details
-
Cavity
Cavity constructor that takes only name as parameter.- Parameters:
name- aStringobject
-
Cavity
public Cavity(String name, boolean virtual, double position, double relpos, String relFrom, double length, double voltage, double lag, int harmon, double betRF, double pG, double shunt, double tFill) Constructs theCavitywith specified parameters.
-
-
Method Details
-
descriptor
Returns the descriptor object for this element.DBElementDescriptorhelps manipulating DataBush elements dynamically.descriptor.
- Specified by:
descriptorin classAbstractDataBushElement- Returns:
- the descriptor object for this element.
- See Also:
-
elType
public int elType()Returns the code of element's type.elType.
- Specified by:
elTypein classAbstractDataBushElement- Returns:
- the code of element's type.
- See Also:
-
getBetRF
public double getBetRF()Getter for the field
betRF.- Returns:
- double
-
getHarmon
public int getHarmon()Getter for the field
harmon.- Returns:
- int
-
getLag
public double getLag()Getter for the field
lag.- Returns:
- double
-
getPG
public double getPG()Getter for the field
pG.- Returns:
- double
-
getShunt
public double getShunt()Getter for the field
shunt.- Returns:
- double
-
getTFill
public double getTFill()Getter for the field
tFill.- Returns:
- double
-
getVoltage
public double getVoltage()This method return voltage on cavity.- Returns:
doublevoltage value
-
setBetRF
public void setBetRF(double newValue) Setter for the field
betRF.- Parameters:
newValue- double
-
setHarmon
public void setHarmon(int newValue) Setter for the field
harmon.- Parameters:
newValue- int
-
setLag
public void setLag(double newValue) Setter for the field
lag.- Parameters:
newValue- double
-
setPG
public void setPG(double newValue) Setter for the field
pG.- Parameters:
newValue- double
-
setShunt
public void setShunt(double newValue) Setter for the field
shunt.- Parameters:
newValue- double
-
setTFill
public void setTFill(double newValue) Setter for the field
tFill.- Parameters:
newValue- double
-
setVoltage
public void setVoltage(double newValue) This method set voltage to cavity.- Parameters:
newValue- a double
-
setWith
Sets parameters values of this element to those in parameter array. As parameter must be used such array as for dynamical construction of new instance of this class. Current values are overriden for each notnullobject in array.setWith.
setWith.
setWith.
- Overrides:
setWithin classAbstractTransferElement- Parameters:
par- an array ofObjectobjects- Throws:
IllegalStateException- if element is initialized and inside DataBush.- See Also:
-
toString
Returns the string representation of this element. Returns string describing this element. String is formated in input-file code. Returns a String that represents the value of this object.toString.
toString.
- Specified by:
toStringin interfaceISimpleElement- Overrides:
toStringin classAbstractTransferElement- See Also:
-