Package xal.tools.beam
Class Twiss3D
java.lang.Object
xal.tools.beam.Twiss3D
- All Implemented Interfaces:
IArchive
Class
.- Since:
- Nov 5, 2013
- Author:
- Christopher K. Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration for the element position indices of three-dimensional objects. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringattribute tags for Twiss parametersprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringelement tag for envelope Twiss parameters -
Constructor Summary
ConstructorsConstructorDescriptionTwiss3D()Create a new, emptyInitializing constructor forTwiss3D.Copy Constructor.Initializing Constructor: Create a newTwiss3Dobject and initialize to the given argument values.Twiss3D(DataAdaptor daSource) Initializing Constructor: Create a newTwiss3Dobject and initialize it with data from the data source behind theDataAdaptorinterface. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a new, cloned instance of thisTwiss3D.Twiss[]getTwiss()Returns the array of Twiss parameters for this distribution for all three planes.getTwiss(Twiss3D.IND_3D iPlane) Returns the Twiss parameters for the given phase plane.voidload(DataAdaptor daSource) Recover the state values particular toBunchDistributionobjects from the data source.double[]Convenience Method: Returns the rms emittances for this distribution as from the individual Twiss parameters.voidsave(DataAdaptor daSink) Save the state of this object to the data sink behind theDataAdaptorinterface.voidsetTwiss(Twiss3D.IND_3D iPlane, Twiss twiss) Set the Twiss parameters for the given phase plane.toString()Returns a textual representation of the internal state of this object.
-
Field Details
-
LABEL_TWISS
element tag for envelope Twiss parameters- See Also:
-
ATTR_ALPHA_X
attribute tags for Twiss parameters- See Also:
-
ATTR_BETA_X
- See Also:
-
ATTR_EMIT_X
- See Also:
-
ATTR_ALPHA_Y
- See Also:
-
ATTR_BETA_Y
- See Also:
-
ATTR_EMIT_Y
- See Also:
-
ATTR_ALPHA_Z
- See Also:
-
ATTR_BETA_Z
- See Also:
-
ATTR_EMIT_Z
- See Also:
-
-
Constructor Details
-
Twiss3D
public Twiss3D()Create a new, empty -
Twiss3D
Copy Constructor. Create a newTwiss3Dobject which is a deep copy of the given argument.- Parameters:
t3d-Twiss3Dcontaining initializing state information
-
Twiss3D
Initializing constructor forTwiss3D.- Parameters:
arrTwiss- array of Twiss parameter for each phase plane- Since:
- Nov 5, 2013
-
Twiss3D
Initializing Constructor: Create a newTwiss3Dobject and initialize to the given argument values.- Parameters:
twissX- x-plane Twiss parameterstwissY- y-plane Twiss parameterstwissZ- z-plane Twiss parameters
-
Twiss3D
Initializing Constructor: Create a newTwiss3Dobject and initialize it with data from the data source behind theDataAdaptorinterface.- Parameters:
daSource- data source containing initializing data- Throws:
DataFormatException- parsing error of data source
-
-
Method Details
-
copy
Creates a new, cloned instance of thisTwiss3D.- Returns:
- a clone of this
Twiss3D - Since:
- Jul 9, 2014
-
setTwiss
Set the Twiss parameters for the given phase plane.- Parameters:
iPlane- phase plane indextwiss- twiss parameters
-
getTwiss
Returns the Twiss parameters for the given phase plane.- Parameters:
iPlane- phase plane index- Returns:
- twiss parameters for given phase plane
-
getTwiss
Returns the array of Twiss parameters for this distribution for all three planes.- Returns:
- array(twiss-H, twiss-V, twiss-L)
-
rmsEmittances
public double[] rmsEmittances()Convenience Method: Returns the rms emittances for this distribution as from the individual Twiss parameters.- Returns:
- array (ex,ey,ez) of rms emittances
-
save
Save the state of this object to the data sink behind theDataAdaptorinterface. -
load
Recover the state values particular toBunchDistributionobjects from the data source.- Specified by:
loadin interfaceIArchive- Parameters:
daSource- data source represented by aDataAdaptorinterface- Throws:
DataFormatException- state information in data source is malformatted- See Also:
-
toString
Returns a textual representation of the internal state of this object.
-