|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.beam.TraceXalUnitConverter
Converts between Trace3D and XAL unit for envelope simulations.
| Field Summary | |
double |
LightSpeed
Speed of light in a vaccuum (meters/second) |
| Method Summary | |
PhaseVector |
centroidFromXal(CorrelationMatrix matCorrel)
Compute and return the beam centroid coordinates from the correlation matrix in homogeneous coordinates. |
CorrelationMatrix |
correlationMatrixFromT3d(Twiss t3dX,
Twiss t3dY,
Twiss t3dZ)
Builds a correlation matrix from Twiss parameters in the three phase planes. |
CorrelationMatrix |
correlationMatrixFromT3d(Twiss t3dX,
Twiss t3dY,
Twiss t3dZ,
PhaseVector centroid)
Builds a correlation matrix from Twiss parameters in the three phase planes. |
static TraceXalUnitConverter |
newConverter(double f,
double ER,
double W)
Creates a new TraceXalUnitConverter object configured to the specified machine and beam species parameters. |
PhaseVector |
traceToXalCoordinates(PhaseVector vecCoords)
Converts phase vector values in Trace3D units to values in units used by XAL (MKS). |
Twiss |
traceToXalLongitudinal(Twiss t3dTwiss)
Converts Twiss parameters in Trace3D units to XAL (MKS) units for the longitudinal phase planes. |
Twiss |
traceToXalTransverse(Twiss t3dTwiss)
Converts Twiss parameter in Trace3D units to XAL (MKS) units for the transverse phase planes. |
Twiss[] |
twissParametersFromXal(CorrelationMatrix mat)
Computes and return the Twiss parameters for each plane that correspond to the given correlation matrix. |
PhaseVector |
xalToTraceCoordinates(PhaseVector vecCoords)
Converts phase vector values in XAL (MKS) units to values in units used by Trace3D. |
Twiss |
xalToTraceLongitudinal(Twiss twissXal)
Converts Twiss parameters in XAL (MKS) units to Trace3D units for the longitudinal phase planes. |
Twiss |
xalToTraceTransverse(Twiss twissXal)
Converts Twiss parameter in XAL (MKS) units to Trace3D units for the transverse phase planes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final double LightSpeed
| Method Detail |
public static TraceXalUnitConverter newConverter(double f,
double ER,
double W)
f - machine electromagnetic frequency in HzER - the rest energy of the beam particle species in eVW - the kinetic energy of the beam in eV
public PhaseVector traceToXalCoordinates(PhaseVector vecCoords)
Converts phase vector values in Trace3D units to values in units used by XAL (MKS).
Specifically, the argument vecCoord is assumed to be in the form
vecPhase=(x,x',y,y',dPhi,dW,1)
x in mm
x' in mrad
y in mm
y' in mrad
dPhi in degrees
dW in keV
The output vector in in the following form along with the units:
returned=(x,x',y,y',z,z',1)
x in meters
x' in radians
y in meters
y' in radians
z in meters
z' in radians
public PhaseVector xalToTraceCoordinates(PhaseVector vecCoords)
Converts phase vector values in XAL (MKS) units to values in units used by Trace3D.
Specifically, the argument vecCoords is assumed to be in the form
vecCoords=(x,x',y,y',z,z',1)
x in meters
x' in radians
y in meters
y' in radians
z in meters
z' in radians
The output vector in in the following form along with the units:
returned=(x,x',y,y',dPhi,dW,1)
x in mm
x' in mrad
y in mm
y' in mrad
dPhi in degrees
dW in keV
public Twiss traceToXalTransverse(Twiss t3dTwiss)
Converts Twiss parameter in Trace3D units to XAL (MKS) units for the transverse phase planes. Method takes the set of Twiss parameters as a Twiss object argument and returns a new object containing the same Twiss in the different units. The method is none destructive.
alpha Trace3D XAL unitless unitless (no conversion)
beta Trace3D XAL m/rad m/rad
emittance Trace3D XAL eff. (5xRMS) mm-mrad RMS m-rad
t3dTwiss - Twiss parameters in Trace3D units
public Twiss traceToXalLongitudinal(Twiss t3dTwiss)
Converts Twiss parameters in Trace3D units to XAL (MKS) units for the longitudinal phase planes. Method takes the set of Twiss parameters as a Twiss object argument and returns a new object containing the same Twiss in the different units. The method is non destructive.
alpha Trace3D XAL unitless (-1)unitless (phase lag is positive)
beta Trace3D XAL deg/keV m/rad
emittance Trace3D XAL eff. (5xRMS) deg-keV RMS m-rad
t3dTwiss - Trace3D twiss parameters
public Twiss xalToTraceTransverse(Twiss twissXal)
Converts Twiss parameter in XAL (MKS) units to Trace3D units for the transverse phase planes. Method takes the set of Twiss parameters as a Twiss object argument and returns a new object containing the same Twiss in the different units. The method is none destructive.
alpha Trace3D XAL unitless unitless (no conversion)
beta Trace3D XAL m/rad m/rad
emittance Trace3D XAL eff. (5xRMS) mm-mrad RMS m-rad
twissXal - Twiss parameters in XAL (MKS) units
public Twiss xalToTraceLongitudinal(Twiss twissXal)
Converts Twiss parameters in XAL (MKS) units to Trace3D units for the longitudinal phase planes. Method takes the set of Twiss parameters as a Twiss object argument and returns a new object containing the same Twiss in the different units. The method is none destructive.
alpha Trace3D XAL unitless (-1)unitless (phase lag is positive)
beta Trace3D XAL deg/keV m/rad
emittance Trace3D XAL eff. (5xRMS) deg-keV RMS m-rad
public CorrelationMatrix correlationMatrixFromT3d(Twiss t3dX,
Twiss t3dY,
Twiss t3dZ)
Builds a correlation matrix from Twiss parameters in the three phase planes. The Twiss parameters are assumed to be in the units used by Trace3D. The beam is also assumed to be centered (on axis), thus the correlation matrix equals the covariance matrix (usually denoted sigma).
NOTE: The returned matrix is in homogeneous coordinates of the block diagonal form | Rxx 0 0 0 | | 0 Ryy 0 0 | | 0 0 Rzz 0 | | 0 0 0 1 | where Rii are 2x2 symmetric blocks corresponding to each phase plane. Clearly the phase planes are uncoupled.
The covariance matrix is the second central moment of the beam
distribution defined by
sigma=<(z-
t3dX - Twiss parameters describing the beam ellipse in the x planet3dY - Twiss parameters describing the beam ellipse in the y planet3dZ - Twiss parameters describing the beam ellipse in the z plane
traceToXalLongitudinal(gov.sns.tools.beam.Twiss),
traceToXalTransverse(gov.sns.tools.beam.Twiss)
public CorrelationMatrix correlationMatrixFromT3d(Twiss t3dX,
Twiss t3dY,
Twiss t3dZ,
PhaseVector centroid)
Builds a correlation matrix from Twiss parameters in the three phase
planes. The Twiss parameters are assumed to be in the units used by
Trace3D. The correlation matrix also has the mean values corresponding
to the mean value vector centroid is also assumed to be in the units used by Trace3D.
It is also assumed to have the form
centroid=
The correlation matrix is computed by first computing the covariance matrix
(usually denoted sigma in the literature) from the Twiss parameters then
adjusting the value according to the effects of being "off center". This is
done by adding the tensor product of the mean value vector
To see this not that the correlation matrix is the second moment of the beam
distribution defined by
NOTE:
The returned matrix is in homogeneous coordinates of the block
diagonal form
| Rxx 0 0 0 |
| 0 Ryy 0 0 | +
t3dX - Twiss parameters describing the beam ellipse in the x planet3dY - Twiss parameters describing the beam ellipse in the y planet3dZ - Twiss parameters describing the beam ellipse in the z planecentroid - phase position of the beam centroid
traceToXalLongitudinal(gov.sns.tools.beam.Twiss),
traceToXalTransverse(gov.sns.tools.beam.Twiss)public PhaseVector centroidFromXal(CorrelationMatrix matCorrel)
matCorrel - correlation matrix xalToTraceCoordinates(gov.sns.tools.beam.PhaseVector)public Twiss[] twissParametersFromXal(CorrelationMatrix mat)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||