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 enum
Enumeration for the element position indices of three-dimensional objects. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
attribute tags for Twiss parametersprotected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
element tag for envelope Twiss parameters -
Constructor Summary
ConstructorsConstructorDescriptionTwiss3D()
Create a new, emptyInitializing constructor forTwiss3D
.Copy Constructor.Initializing Constructor: Create a newTwiss3D
object and initialize to the given argument values.Twiss3D
(DataAdaptor daSource) Initializing Constructor: Create a newTwiss3D
object and initialize it with data from the data source behind theDataAdaptor
interface. -
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.void
load
(DataAdaptor daSource) Recover the state values particular toBunchDistribution
objects from the data source.double[]
Convenience Method: Returns the rms emittances for this distribution as from the individual Twiss parameters.void
save
(DataAdaptor daSink) Save the state of this object to the data sink behind theDataAdaptor
interface.void
setTwiss
(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 newTwiss3D
object which is a deep copy of the given argument.- Parameters:
t3d
-Twiss3D
containing 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 newTwiss3D
object 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 newTwiss3D
object and initialize it with data from the data source behind theDataAdaptor
interface.- 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 theDataAdaptor
interface. -
load
Recover the state values particular toBunchDistribution
objects from the data source.- Specified by:
load
in interfaceIArchive
- Parameters:
daSource
- data source represented by aDataAdaptor
interface- Throws:
DataFormatException
- state information in data source is malformatted- See Also:
-
toString
Returns a textual representation of the internal state of this object.
-