Class EnvelopeTrackerBase
- All Implemented Interfaces:
Remote
,IAlgorithm
,IArchive
,IContextAware
- Direct Known Subclasses:
EnvelopeBacktracker
,EnvelopeTracker
,EnvTrackerAdapt
Abstract Base Class for Algorithms Propagating RMS Envelopes
This class adds functionality beyond the base class Tracker
specific to tracker algorithms designed for RMS envelope beam probes, that
is, probes which carry the RMS statistical properties as their beam state.
- Since:
- Feb 10, 2009
- Author:
- Christopher K. Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
RF Gap Emittance Growth Modelsstatic enum
Enumerations for supported phase planes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
label for emittance growth flagstatic final String
label for use simple tracking (no space charge)static final String
label for maximum step size *static final String
label for use DC Beam *static final String
label for use simple tracking (no space charge)static final String
data node label for EnvelopeTracker settingsstatic final String
EditContext table name containing basic envelope tracking parametersFields inherited from class xal.model.alg.Tracker
ATTRTAG_DEBUG, ATTRTAG_RFGAP_PHASE, ATTRTAG_TYPE, ATTRTAG_UPDATE, ATTRTAG_VER, NODETAG_ALG, NODETAG_TRACKER, TBL_LBL_ALGORITHM, TBL_PRIM_KEY_NAME, UPDATE_ALWAYS, UPDATE_CUSTOM, UPDATE_ENTRANCE, UPDATE_ENTRANCEANDEXIT, UPDATE_EXIT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
EnvelopeTrackerBase
(String strType, int intVersion, Class<? extends IProbe> clsProbeType) EnvelopeTrackerBase Constructorprotected
EnvelopeTrackerBase
(EnvelopeTrackerBase sourceTracker) Copy constructor for EnvelopeTracker -
Method Summary
Modifier and TypeMethodDescriptionprotected double
compEmitGrowthFunction
(EnvelopeTrackerBase.PhasePlane plane, double phiS, double dphi) Emittance Growth Function for Phase Spread in RF Gapprotected double
compLongFourierTransform
(double dphi) Longitudinal Fourier Transform for Uniform Distributionprotected PhaseMatrix
compScheffMatrix
(double dblLen, EnvelopeProbe probe, IElement elem) Method to compute the space charge transfer matrix for the given length, probe and modeling element.protected double
compTransFourierTransform
(double dphi) Transverse Emittance Growth Fourier Transformdouble
correctLongSigmaPhaseSpread
(EnvelopeProbe probe, IdealRfGap gap) Calculation of emittance increase due to phase spread based on calculations in Trace3d (RfGap.f)protected double[]
correctSigmaPhaseSpread
(EnvelopeProbe probe, IdealRfGap gap) new implementation by sako, 7 Aug 06, to do trans/long simultaneously used in EnvTrackerAdapt, EnvelopeTrackerprotected double
correctTransFocusingPhaseSpread
(EnvelopeProbe probe, IdealRfGap gap) Moved fromIdealRfGap
.double
correctTransSigmaPhaseSpread
(EnvelopeProbe probe, IdealRfGap gap) Calculation of emittance increase due to phase spread based on calculations in Trace3d (RfGap.f)protected double
effPhaseSpread
(EnvelopeProbe probe, IdealRfGap elem) Effective Phase Spread for Equivalent Uniform Beamprotected double
fourierLong1dGaussian
(double dphi) Longitudinal Fourier Transform for 2D Gaussian Distributionprotected double
fourierLong1dUniform
(double dphi) Longitudinal Fourier Transform for Single Phase Planeprotected double
fourierLong3dGaussian
(double dphi) Longitudinal Fourier Transform for 3D Gaussian Distributionprotected double
fourierLong3dUniform
(double dphi) Longitudinal Fourier Transform for 3D Uniform Distributionprotected double
fourierLongTrace3d
(double dphi) Longitudinal Fourier Transform given by Trace3Dprotected double
fourierTrans1dGaussian
(double dphi) Transverse Fourier Transform for 2D Gaussian Distributionprotected double
fourierTrans1dUniform
(double dphi) Transverse Fourier Transform for Single Phase Planeprotected double
fourierTrans3dGaussian
(double dphi) Transverse Fourier Transform for 3D Gaussian Distributionprotected double
fourierTrans3dUniform
(double dphi) Transverse Fourier Transform for 3D Uniform Distributionprotected double
fourierTransTrace3d
(double dphi) Transverse Fourier Transform given by Trace3DReturn the emittance growth modelboolean
Return the emittance growth flag.boolean
Deprecated.boolean
Deprecated.double
Returns the maximum element subsection length (in meters) that the probe may be advanced before applying a space charge kick when space charge is present.boolean
Returns the flag determining whether or not space charge kick for DC beam is being consideredboolean
Returns the flag determining whether or not space charge effects are being considered during the propagation.void
load
(String strPrimKeyVal, EditContext ecTableData) Load the parameters of thisIAlgorithm
object from the table data in the givenEditContext
.void
load
(DataAdaptor daptArchive) Load the parameters of the algorithm from a data source exposing theIArchive
interface.protected PhaseMatrix
modTransferMatrixForEmitGrowth
(double dphi, PhaseMatrix matPhi) Method to modify the transfer matrix when we are simulating emittance growth.protected double
phaseSpread
(EnvelopeProbe probe, IdealRfGap gap) Compute the phase spread of the bunch for a probe (based on Trace3D RfGap.f)void
save
(DataAdaptor daptArchive) Save the state and settings of this algorithm to a data source exposing theDataAdaptor
interface.void
Set the emittance growth mechanismvoid
setEmittanceGrowth
(boolean bolEmitGrowth) Set the emittance growth flag.void
setStepSize
(double step) Set maximum step size allowed between space charge kicksvoid
setUseDCBeam
(boolean tf) Method to toggle the flag to use/not the DC beam space charge kicks.void
setUseSpacecharge
(boolean tf) Method to toggle the flag to use/not use space charge calculations.Methods inherited from class xal.model.alg.Tracker
advanceProbe, doPropagation, getDebugMode, getElemPosition, getProbeType, getProbeUpdatePolicy, getRfGapPhaseCalculation, getStartElementId, getStopElementId, getType, getVersion, initialize, isStopElementIncluded, newFromEditContext, newFromEditContext, newInstance, propagate, registerProbeType, retractProbe, setDebugMode, setElemPosition, setIncludeStopElement, setProbeUpdatePolicy, setRfGapPhaseCalculation, setStartElementId, setStopElementId, unsetStartElementId, unsetStopElementId, validElement, validProbe
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xal.model.IAlgorithm
copy
-
Field Details
-
TBL_LBL_ENVBASETRACKER
EditContext table name containing basic envelope tracking parameters- See Also:
-
LABEL_OPTIONS
data node label for EnvelopeTracker settings- See Also:
-
ATTR_SCHEFF
label for use simple tracking (no space charge)- See Also:
-
ATTR_USESPACECHARGE
label for use simple tracking (no space charge)- See Also:
-
ATTR_EMITGROWTH
label for emittance growth flag- See Also:
-
ATTR_STEPSIZE
label for maximum step size *- See Also:
-
ATTR_USEDCBEAM
label for use DC Beam *- See Also:
-
-
Constructor Details
-
EnvelopeTrackerBase
EnvelopeTrackerBase Constructor
This should be used by child classes to pass up their class properties.
- Parameters:
strType
- string type identifier of the classintVersion
- version number of class implementationclsProbeType
- the class type of valid probe
-
EnvelopeTrackerBase
Copy constructor for EnvelopeTracker- Parameters:
sourceTracker
- Tracker that is being copied
-
-
Method Details
-
setStepSize
public void setStepSize(double step) Set maximum step size allowed between space charge kicks- Parameters:
step
- the new maximum step size for space charge calculations
-
setUseSpacecharge
public void setUseSpacecharge(boolean tf) Method to toggle the flag to use/not use space charge calculations.
- Parameters:
tf
- the truth flag
-
setUseDCBeam
public void setUseDCBeam(boolean tf) Method to toggle the flag to use/not the DC beam space charge kicks.
- Parameters:
tf
- the truth flag
-
setEmittanceGrowth
public void setEmittanceGrowth(boolean bolEmitGrowth) Set the emittance growth flag. If set true then the algorithm will simulate emittance growth through RF gaps.
NOTE: (CKA)
· If set, the dynamics will no longer be consistent since the response matrix and betatron phases will not reproduce the current Twiss parameters.- Parameters:
bolEmitGrowth
- set true to simulation emittance growth- See Also:
-
setEmitGrowthModel
Set the emittance growth mechanism
Set the current mechanism for simulation emittance growth from RF accelerating gaps. We can either use the same model as
Trace3D
or the generalized technique described in C.K. Allen et. al. (see references below). This applies primarily to the longitudinal situation since the transverse cases show very good agreement.Since longitudinal emittance growth mechanism is not well documented in the
Trace3D
manual, it is somewhat unclear how the effect is being modeled. However, it does appear to create a result that tracks theIMPACT
simulation better than the CKA method (at least for one case). At this point it is unclear whether there is an error in the analysis of C.K. Allen, orTrace3D
is simply more accurate.NOTES: (CKA)
· This flag only has an effect when thesetEmittanceGrowth()
feature is set totrue
.References
[1] M. Weiss, "Bunching of Intense Proton Beams with Six-Dimensional Matching to the Linac Acceptance", CERN/MPS/LI report 73-2, Geneva, Switzerland (1978).
[2] K.R. Crandall and D.P. Rusthoi, "Trace 3-D Documentation", LANL Report LA-UR-97-887 (1997), Appendix F.
[3] C.K. Allen, H. Sako, M. Ikegami, and G. Shen, "Emittance Growth Due to Phase Spread for Proton Beams in Radio Frequency Accelerating Gaps", (in preparation).- Parameters:
enmModel
- use theTrace3D
method or the C.K. Allen et. al. method
-
getStepSize
public double getStepSize()Returns the maximum element subsection length (in meters) that the probe may be advanced before applying a space charge kick when space charge is present.
- Returns:
- Maximum space charge integration step size.
-
getUseSpacecharge
public boolean getUseSpacecharge()Returns the flag determining whether or not space charge effects are being considered during the propagation.- Returns:
- true if space charge forces are used, false otherwise
-
getUseDCBeam
public boolean getUseDCBeam()Returns the flag determining whether or not space charge kick for DC beam is being considered- Returns:
- true if space charge forces for DC beam is used, false otherwise
-
getSpaceChargeFlag
Deprecated. -
getEmittanceGrowth
public boolean getEmittanceGrowth()Return the emittance growth flag.- Returns:
- true if we are simulating emittance growth, false otherwise
- See Also:
-
getEmittanceGrowthFlag
Deprecated. -
getEmitGrowthModel
Return the emittance growth model
Get the current mechanism for simulating emittance growth from RF accelerating gaps. We are either using the that of
Trace3D
or the generalized technique described in C.K. Allen et. al. (see references below). This applies primarily to the longitudinal situation since the transverse cases show very good agreement.Since longitudinal emittance growth mechanism is not well documented in the
Trace3D
manual, it is somewhat unclear how the effect is being modeled. However, it does appear to create a result that tracks theIMPACT
simulation better than the CKA method (at least for one case). At this point it is unclear whether there is an error in the analysis of C.K. Allen, orTrace3D
is simply more accurate.NOTES: (CKA)
· This flag only has an effect when thesetEmittanceGrowth()
feature is set totrue
.References
[1] M. Weiss, "Bunching of Intense Proton Beams with Six-Dimensional Matching to the Linac Acceptance", CERN/MPS/LI report 73-2, Geneva, Switzerland (1978).
[2] K.R. Crandall and D.P. Rusthoi, "Trace 3-D Documentation", LANL Report LA-UR-97-887 (1997), Appendix F.
[3] C.K. Allen, H. Sako, M. Ikegami, and G. Shen, "Emittance Growth Due to Phase Spread for Proton Beams in Radio Frequency Accelerating Gaps", (in preparation).- Returns:
- enumeration code for particular emittance growth mechanism
-
load
Load the parameters of thisIAlgorithm
object from the table data in the givenEditContext
. Here we load only the parameters specific to the base class. It is expected that Subclasses should override this method to recover the data particular to there own operation.- Specified by:
load
in interfaceIContextAware
- Overrides:
load
in classTracker
- Parameters:
strPrimKeyVal
- primary key value specifying the name of the data recordecTableData
- EditContext containing table data- Throws:
DataFormatException
- bad data format - error in reading- See Also:
-
load
Load the parameters of the algorithm from a data source exposing theIArchive
interface. The superclassload
method is called first, then the properties particular toEnvTrackerAdapt
are loaded. -
save
Save the state and settings of this algorithm to a data source exposing theDataAdaptor
interface. Subclasses should override this method to store the data particular to there own operation. -
modTransferMatrixForEmitGrowth
protected PhaseMatrix modTransferMatrixForEmitGrowth(double dphi, PhaseMatrix matPhi) throws ModelException Method to modify the transfer matrix when we are simulating emittance growth. Currently, the method only considers the case of propagation through an
IdealRfGap
element. If theIElement
argument is any other type of element, nothing is done.The argument
matPhi
is the original transfer matrix for (normal) propagation through theelem
element.NOTES: (H. SAKO)
· Increase emittance using same (nonlinear) procedure on the second moments as in Trace3D.
(C.K. Allen)
· The <x'|x> transfer matrix element is modified by the formula
<x'|x> = <x'|x>Ft(Δφ)
where Δφ is the longitudial phase spread and Ft(Δφ) is an approximation to <sin(φ)>.
· Originally, the <z'|z> transfer matrix element is modified by the formula
<z'|z> = <z'|z>(1 - Δφ2/12)
This approximation is given in the Trace3D manualThis formula is accurate only for dφ <<. Even then, the results are questionable. For a more in depth treatment of longitudinal emittance growth see the reference below.
· The two-term expansion for Fz(Δφ) (seecompLongFourierTransform(double)
) is given as
Fz(Δφ) ≈ 1 - 3Δφ2/14
which does not correspond to the Trace3D manual. So I do not know where they got the number.Reference
C.K. Allen, Hiroyuki Sako, et. al., "Emittance Growth Due to Phase Spread for Proton Beams in a Radio Frequency Accelerating Gap" (in preparation).- Parameters:
dphi
- effective phase spread ΔφmatPhi
- transfer matrix Φ for conserved normalized emittance- Returns:
- Transfer matrix Φ after modifying focusing term
- Throws:
ModelException
- unsupport/unknown emittance growth model- See Also:
-
compTransFourierTransform(double)
compLongFourierTransform(double)
effPhaseSpread(EnvelopeProbe, IdealRfGap)
EnvelopeTrackerBase#momentSine(double)
-
compScheffMatrix
protected PhaseMatrix compScheffMatrix(double dblLen, EnvelopeProbe probe, IElement elem) throws ModelException Method to compute the space charge transfer matrix for the given length, probe and modeling element.
The correlation matrix of the probe is used to determine the space charge transfer matrix. The transfer matrix of the elem is computed for half the distance provided, the correlation matrix is advanced this half step, and the space charge matrix is computed there. Thus, the space charge matrix is always computed at the center of the distance
NOTE:dblLen
.This half-step business maintains consistency with the Trace3D algorithm. Once inside the element you are essentially doing leap-frog integration, which may or may not be more accurate then integration at full steps. The final algorithms are both second-order accurate, simply by the way the final transfer matrix is computed.
- Parameters:
dblLen
- incremental path length over which space charge is appliedprobe
-EnvelopeProbe
containing correlation matrixelem
-IElement
where probe is currently located- Returns:
- space-charge transfer matrix for incremental distance
- Throws:
ModelException
- could not compute the transfer map for given element- See Also:
-
compEmitGrowthFunction
protected double compEmitGrowthFunction(EnvelopeTrackerBase.PhasePlane plane, double phiS, double dphi) throws ModelException Emittance Growth Function for Phase Spread in RF Gap
Calculation of the emittance growth function describing the emittance growth due to finite phase spread in an RF gap. (Note that the growth function differs for each density distribution and for each phase plane.) The particular phase plane is identified by the argument
plane
, which is currently either transverse or longitudinal. The density distribution is specified by the emittance growth model (seesetEmitGrowthModel(EmitGrowthModel)
). We currently assume the beam bunch to be axially symmetric. We denote the growth function in the transverse plane as Gt(φs,Δφ) and the growth function in the longitudinal plane as Gz(φs,Δφ).The emittance growth calculation was originally described by M. Weiss for then implemented in Trace3d. C.K. Allen, et. al. generalized the results for arbitrary distributions and the longitudinal case (see references below).
The emittance growth function Gt(φs,Δφ) for the transverse plane is defined as
Gt(φs,Δφ) ≡ St(Δφ) - sin2 φs Tt(Δφ)
where φs is the synchronous particle phase, Δφ is the effective phase spread, and functions St(Δφ) and Tt(Δφ) are given by
St(Δφ) ≡ ½[1 - Ft(2Δφ)]
and
Tt(Δφ) ≡ Ft2(Δφ) - Ft(2Δφ)
respectively. There are analogous formulas for the longitudinal emittance growth function Gz(φs,Δφ) where the transverse Fourier transform Ft is replaced by the longitudinal Fourier transform Fz. (See the methods
andcompTransFourierTransform(double)
.)compLongFourierTransform(double)
The before gap and after gap transverse RMS emittances, εt,i and εt,f, respectively, are related by the following formula:
εt,f2 = η2εt,i2 + Δεt,f2
where η is the momentum compaction due to acceleration
η ≡ βiγi/βfγf
and Δεt,f is the emittance increase term
Δεt,f2 ≡ Δ<x'f2> <xf2>2.
where
Δ<x'f2> ≡ kt2 Gt(φs,Δφ) <xi2>.
and where x'f and xi represent the after-gap divergence angle and before-gap position for either transverse phase plane, respectively. Once again there are analogous formulas for the before and after gap longitudinal plane emittances εz,i and εz,f, respectively, with Gt(φs,Δφ) replaced by Gz(φs,Δφ) and x(f,i) replaced by z(f,i).NOTES: CKA
· Since we are modeling the RF gap as a thin lens, only the momentum (divergence angle) is modified, <x2>, <y2>, and <z2> remain unaffected. Thus, <xf2> = <xi2> and <zf2> = <zi2> and may be computed as such in the above.References
[1] M. Weiss, "Bunching of Intense Proton Beams with Six-Dimensional Matching to the Linac Acceptance", CERN/MPS/LI report 73-2, Geneva, Switzerland (1978).
[2] K.R. Crandall and D.P. Rusthoi, "Trace 3-D Documentation", LANL Report LA-UR-97-887 (1997), Appendix F.
[3] C.K. Allen, H. Sako, M. Ikegami, and G. Shen, "Emittance Growth Due to Phase Spread for Proton Beams in Radio Frequency Accelerating Gaps", (in preparation).- Parameters:
plane
- Compute the emittance growth function for this phase planephiS
- the synchronous particle phase φs in radiansdphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of the emittance growth function Gt(φs,Δφ) or Gz(φs,Δφ)
- Throws:
ModelException
- unknown/unsupported emittance growth model, or unknown/unsupported phase plane- Since:
- Feb 19, 2009
- See Also:
-
compTransFourierTransform
Transverse Emittance Growth Fourier Transform
Java method for evaluating the Fourier-Bessel transform needed to compute transverse emittance growth due to finite longitudinal phase spread. The technique for computing emittance growth due to phase spread is described in C.K. Allen, et. al., "Emittance Growth Due to Phase Spread for Proton Beams in Radio Frequency Accelerating Gaps." This work is a generalization of that covered in the Trace3D users' manual, Appendix G, which is in turn based upon the work of M. Weiss (see references below).
When considering only one (transverse) phase plane beams the transform Ft(Δφ) evaluated here is given as follows:
Ft(Δφ) ≡ (2/f1) ∫J0(Δφs) f(s2)s ds,
where f is the density distribution, Jn(s) is the nth-order cylindrical Bessel function of the first kind, Δφ is the effective phase spread of the equivalent uniform beam, s is the transform variable. and fk is the number
fk ≡ ∫ f(s)sk ds.
Both integrals are taken from 0 to ∞.When considering three spatial dimensions the transform Ft(Δφ) evaluated here is given as follows:
Ft(Δφ) ≡ (2/f3/2) ∫[j0(Δφs) + j2(Δφs)] f(s2)s4 ds,
where f is the density distribution, jn(s) is the nth-order spherical Bessel function of the first kind, Δφ is the effective phase spread of the equivalent uniform beam, and s is the transform variable. Again, both integrals are taken from 0 to ∞.NOTES: (CKA)
· This method actually falls out of the calculation for <x2sin φ(z)>. The assumption that x and z are uncorrelated yields the result
<x2sin φ(z)> = <x2> sin φs Ft(Δφ)
where Ft(dφ) = <sin(Δφ)> is this method, sin φs is the synchronous particle phase, and Δφ is the effective phase spread of the distribution.
· The value of <sin2 φ)(z)> can also be computed from this method. The formula is
<sin2 φ(z)> = St(Δφ) + sin2 φs Ft(2Δφ)
where
St(Δφ) ≡ ½[1 - Ft(2Δφ)]
has analogy with sin2 ΔφReferences
[1] M. Weiss, "Bunching of Intense Proton Beams with Six-Dimensional Matching to the Linac Acceptance", CERN/MPS/LI report 73-2, Geneva, Switzerland (1978).
[2] K.R. Crandall and D.P. Rusthoi, "Trace 3-D Documentation", LANL Report LA-UR-97-887 (1997), Appendix F.
[3] C.K. Allen, H. Sako, M. Ikegami, and G. Shen, "Emittance Growth Due to Phase Spread for Proton Beams in Radio Frequency Accelerating Gaps", (in preparation).- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Ft(Δφ) for the uniform distribution.
- Throws:
ModelException
- unsupported/unknown emittance growth model- Since:
- Feb 17, 2009
- See Also:
-
compLongFourierTransform
Longitudinal Fourier Transform for Uniform Distribution
Java method for evaluating the Fourier-Bessel transform needed to compute longitudinal emittance growth due to finite longitudinal phase spread in RF accelerating gaps. For information on this effect see due to phase spread is described in C.K. Allen, et. al., "Emittance Growth Due to Phase Spread for Proton Beams in Radio Frequency Accelerating Gaps." This work is a generalization of that covered in the Trace3D users' manual, Appendix G for the longitudinal direction. M. Weiss treated the transverse direction (see references below).
When considering only one (uncorrelated) phase plane beams the transform Fz(Δφ) evaluated here is given as follows:
Fz(Δφ) ≡ (2/f1) ∫ [J0(Δφs) - J2(Δφs)] f(s2)s3 ds,
where f is the density distribution, Jn(s) is the nth-order cylindrical Bessel function of the first kind, Δφ is the effective phase spread of the equivalent uniform beam, s is the transform variable. and fk is the number
fk ≡ ∫ f(s)sk ds.
Both integrals are taken from 0 to ∞.When considering three spatial dimensions the transform Fz(Δφ) evaluated here is given as follows:
Fz(Δφ) ≡ (2/f3/2) ∫[j0(Δφs) - 2j2(Δφs)] f(s2)s4 ds,
= Ft(Δφ) - (2/f3/2) ∫j2(Δφs)] f(s2)s4 ds,
where f is the density distribution, jn(s) is the nth-order spherical Bessel function of the first kind, Δφ is the effective phase spread of the equivalent uniform beam, and s is the transform variable. The number fk is as before.NOTES: (CKA)
· This method falls out of the computation for <x2sin φ(z)>. At least when considering the longitudinal phase plane independently, it can be shown that
<z2sin φ(z)> = <z2> sin φs Fz(Δφ)
where Fz(dφ) = <sin(Δφ)> is this method, sin φs is the synchronous particle phase, and Δφ is the effective phase spread of the distribution.
· The technique for computing longitudinal emittance growth is not covered in the Trace3D manual. A two-term power series expansion for this function is simply stated, but no development is presented.
· The result returned by this method has a different power series expansion about Δφ = 0 than that presented in the Trace3D manual.References
[1] M. Weiss, "Bunching of Intense Proton Beams with Six-Dimensional Matching to the Linac Acceptance", CERN/MPS/LI report 73-2, Geneva, Switzerland (1978).
[2] K.R. Crandall and D.P. Rusthoi, "Trace 3-D Documentation", LANL Report LA-UR-97-887 (1997), Appendix F.
[3] C.K. Allen, H. Sako, M. Ikegami, and G. Shen, "Emittance Growth Due to Phase Spread for Proton Beams in Radio Frequency Accelerating Gaps", (in preparation).- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Fz(Δφ) for the uniform distribution.
- Throws:
ModelException
- unsupported/unknown emittance growth model- Since:
- Feb 17, 2009
- See Also:
-
fourierTransTrace3d
protected double fourierTransTrace3d(double dphi) Transverse Fourier Transform given by Trace3D
This method returns the longitudinal Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we return the exact same value as Trace3D. It considers a uniform beam in three spatial dimensions.
The method computes the kluge of <sin(φ)>. In this calculation we assume that the transverse and longitudinal phase planes are uncorrelated and that the beam distribution is a uniform ellipsoid (that's why the sinc() function pops up). Pretty restrictive - Sacherer's theorem does not apply here.
This quantity is used when computing the transverse emittance increase in an RF gap due to a finite phase spread in the beam.
NOTES: (CKA)
· This method is used to approximate <x2sin(φ)>, which is at least third order in the phase coordinates.
· The assumption that x and z are not correlated yields the result
<x2sin(φ)> = <x2> f(dφ)
where f(dφ) ≡ <sin(dφ)is this method, and dφ is the "phase spread" of the distribution. The phase spread is defined
dφ = <(φ - φs)2>1/2
where φs is the synchronous particle phase.See K.R. Crandall and D.P. Rusthoi,
- "Trace 3-D Documentation", LANL Report LA-UR-97-887 (1997), Appendix F.
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Ft(Δφ) given by Trace3D which is the value of <sin(φ)> = f(dp).
- Since:
- Feb 17, 2009
- See Also:
-
#momentSine(double)
compTransFourierTransform(double)
effPhaseSpread(EnvelopeProbe, IdealRfGap)
IdealRfGap
-
fourierLongTrace3d
protected double fourierLongTrace3d(double dphi) Longitudinal Fourier Transform given by Trace3D
This method returns the longitudinal Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we return the exact same value as Trace3D. It considers a uniform beam in three spatial dimensions.
The returned value (which is not derived or explained in the Trace3D manual) is
Fz(Δφ) = 1 - Δφ2/12
This value is taken from the Trace3D code. The manual actually quotes it as 1 + Δφ2/12.NOTES: (CKA)
References
[1] M. Weiss, "Bunching of Intense Proton Beams with Six-Dimensional Matching to the Linac Acceptance", CERN/MPS/LI report 73-2, Geneva, Switzerland (1978).
[2] K.R. Crandall and D.P. Rusthoi, "Trace 3-D Documentation", LANL Report LA-UR-97-887 (1997), Appendix F.
[3] C.K. Allen, H. Sako, M. Ikegami, and G. Shen, "Emittance Growth Due to Phase Spread for Proton Beams in Radio Frequency Accelerating Gaps", (in preparation).- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Fz(Δφ) given by Trace3D.
- Since:
- Feb 17, 2009
- See Also:
-
fourierLong3dUniform
protected double fourierLong3dUniform(double dphi) Longitudinal Fourier Transform for 3D Uniform Distribution
This method return the longitudinal Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we consider the case when the beam is uniformly distributed over three spatial dimensions. For this distribution f(s), we find that
Fz(Δφ) = 15 j2(Δφ)/Δφ2 - 15 j3(Δφ)/Δφ
For small arguments we avoid any numerically singular behavior at Δφ = 0 by Taylor expanding. We have
Fz(Δφ) ≈ 1 - x2/7 + x4/168 - x6/8316 + 5x8/3459456 + O(x17/2)
Currently we are expanding to sixth order.NOTES: (CKA)
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Fz(Δφ) for the 3D uniform distribution.
- Since:
- Feb 17, 2009
- See Also:
-
fourierTrans3dUniform
protected double fourierTrans3dUniform(double dphi) Transverse Fourier Transform for 3D Uniform Distribution
This method return the transverse Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we consider the case when the beam is uniformly distributed over three spatial dimensions. For this distribution f(s), we find that
Ft(Δφ) = 15 j2(Δφ)/Δφ2
For small arguments we avoid any numerically singular behavior at Δφ = 0 by Taylor expanding. We have
Ft(Δφ) ≈ 1 - x2/14 + x4/504 - x6/33264 + x8/3459456 + O(x17/2)
Currently we are expanding to sixth order.NOTES: (CKA)
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Ft(Δφ) for the uniform distribution.
- Since:
- Feb 17, 2009
- See Also:
-
fourierTrans3dGaussian
protected double fourierTrans3dGaussian(double dphi) Transverse Fourier Transform for 3D Gaussian Distribution
This method return the transverse Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we consider the case when the beam has a Gaussian distribution over three spatial dimensions. For this distribution f(s), we find that
Ft(Δφ) = e-Δφˆ2/10
There is no need for a small argument expansion since the above expression is numerically stable.NOTES: (CKA)
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Ft(Δφ) for the Gaussian distribution.
- Since:
- Feb 17, 2009
- See Also:
-
fourierLong3dGaussian
protected double fourierLong3dGaussian(double dphi) Longitudinal Fourier Transform for 3D Gaussian Distribution
This method return the longitudinal Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we consider the case when the beam has a Gaussian distribution over the three spatial dimensions. For this distribution f(s), we find that
Fz(Δφ) = (1 - Δφ2/5) e-Δφˆ2/10
There is no need for a small argument expansion since the above expression is numerically stable.NOTES: (CKA)
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Fz(Δφ) for the 3D Gaussian distribution.
- Since:
- Feb 17, 2009
- See Also:
-
fourierTrans1dUniform
protected double fourierTrans1dUniform(double dphi) Transverse Fourier Transform for Single Phase Plane
This method return the transverse Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we consider the case when the beam is uniformly distributed in one transverse phase plane. For this distribution f(s), we find that
Ft(Δφ) = 2 J1(Δφ)/Δφ
For small arguments we avoid any numerically singular behavior at Δφ = 0 by Taylor expanding. We have
Ft(Δφ) ≈ 1 - x2/8 + x4/192 - x6/9216 + x8/737280 + O(x9)
Currently we are expanding to sixth order.NOTES: (CKA)
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Ft(Δφ) for the single phase plane uniform distribution.
- Since:
- Feb 25, 2009
- See Also:
-
fourierLong1dUniform
protected double fourierLong1dUniform(double dphi) Longitudinal Fourier Transform for Single Phase Plane
This method return the longitudinal Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we consider the case when the beam is uniformly distributed in one transverse phase plane. For this distribution f(s), we find that
Fz(Δφ) = 8 J2(Δφ)/Δφ2 - 8 J3(Δφ)/Δφ
For small arguments we avoid any numerically singular behavior at Δφ = 0 by Taylor expanding. We have
Fz(Δφ) ≈ 1 - x2/4 + 5x4/384 - 7x6/23040 + x8/245760 + O(x9)
Currently we are expanding to sixth order.NOTES: (CKA)
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Ft(Δφ) for the single phase plane uniform distribution.
- Since:
- Feb 25, 2009
- See Also:
-
fourierTrans1dGaussian
protected double fourierTrans1dGaussian(double dphi) Transverse Fourier Transform for 2D Gaussian Distribution
This method return the transverse Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we consider the case when the beam is Gaussian distributed in each (uncorrelated) phase plane. For this distribution f(s), we find that
Ft(Δφ) = e-Δφˆ2/8
There is no need for a small argument expansion since the above expression is numerically stable.NOTES: (CKA)
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Ft(Δφ) for the Gaussian distribution.
- Since:
- Feb 25, 2009
- See Also:
-
fourierLong1dGaussian
protected double fourierLong1dGaussian(double dphi) Longitudinal Fourier Transform for 2D Gaussian Distribution
This method return the longitudinal Fourier-Bessel transform needed to compute emittance growth from finite phase spread in an RF accelerating gap. Here we consider the case when the beam is Gaussian distributed in each (uncorrelated) phase plane. For this distribution f(s), we find that
Fz(Δφ) = (1 - Δφ2/4) e-Δφˆ2/8
There is no need for a small argument expansion since the above expression is numerically stable.NOTES: (CKA)
- Parameters:
dphi
- effective phase spread Δφ (half-width) of equivalent uniform beam in radians- Returns:
- The value of transform Fz(Δφ) for the Gaussian distribution in single phase plane.
- Since:
- Feb 25, 2009
- See Also:
-
effPhaseSpread
Effective Phase Spread for Equivalent Uniform Beam
Compute the longitudinal phase spread of the bunch with respect to the RF in an RF gap element (based on Trace3D RfGap.f) The phase spread is computed assuming a uniform distribution. The returned value is then the effective phase spread for the equivalent uniform beam. (see below).
In XAL, longitudinal coordinate z is the "phase spread", but in meters. To convert to phase spread dφ in radians we have
dφ = 2πz/(βλ)
where λ is the wavelength of the RF. To simplify matters make the definition
k ≡ 2π/βλ,
which is the synchronous particle wave number. So, for <dφ2> we get
<dφ2> = k2<z2>.
Note then that <dφ2>1/2 is the RMS phase spread.I am using the mid-gap value for β, that is, β average. And, thus, k is also the mid-gap wave number.
We need to multiply <z2> by 5 to get the "(three-dimensional) equivalent uniform beam" longitudinal semi-axis (even though there is no uniform equivalent beam for emittance growth).
Putting this all together gives the following value for the effective phase phase spread for the equivalent uniform beam, Δφ:
Δφ = k<5z2>1/2.
The above is the value returned by this method. Note that Δφ is also referred to as the beam half-length (with respect to the RF phase).NOTES: (CKA)
· Note that the RMS phase spread can also be represented as
dφ = <[φ(s) - φs]2>1/2
where φs is the synchronous particle phase.- Parameters:
probe
- probe containing relativistic dataelem
- the RF gap modeling element creating the bunch phase spread- Returns:
- phase spread (half width) Δφ ≡ <5dφ2>1/2 for this probe (radians)
-
phaseSpread
Compute the phase spread of the bunch for a probe (based on Trace3D RfGap.f)
CKA Notes:
- This method needs to be optimized now that I understand what it is doing. In XAL, longitudinal coordinate z is the "phase spread", but in meters. To convert to phase spread δφ in radians we have
δφ = 2πz/(βλ) ,
where λ is the wavelength of the RF. So, for <δφ2> we get
<δφ2> = <z2>2πf /(βc) ,
where f is the RF frequency of the gap and c is the speed of light.
- For the optional computation phaseSpreadT3d (which apparently is not used) I am not sure what is happening, or why <y'y'> is significant?- Parameters:
probe
- we are computing the phase spread for this probe at the currentIdealRfGap
conditiongap
- the RF gap modeling element creating the bunch phase spread- Returns:
- phase spread (half width) for this probe (radian)
-
correctTransFocusingPhaseSpread
Moved fromIdealRfGap
. -
correctSigmaPhaseSpread
new implementation by sako, 7 Aug 06, to do trans/long simultaneously used in EnvTrackerAdapt, EnvelopeTracker- Parameters:
probe
- envelope probe object (something with emittance and moments)gap
- the RF gap modeling element creating the bunch phase spread
-
correctTransSigmaPhaseSpread
Calculation of emittance increase due to phase spread based on calculations in Trace3d (RfGap.f)
Used in EnvTrackerAdapt, EnvelopeTracker
CKA Notes:
- I think this should go in the Algorithm class. It expects an
EnvelopeProbe
- element objects should really not be concerned with the type of probe.- Parameters:
probe
- envelope probe object (something with emittance and moments)gap
- the RF gap modeling element creating the bunch phase spread- Returns:
- the change in emittance after going through this element
-
correctLongSigmaPhaseSpread
Calculation of emittance increase due to phase spread based on calculations in Trace3d (RfGap.f)
used in EnvTrackerAdapt, EnvelopeTracker
CKA Notes:
- I think this should go in the Algorithm class. It expects an
EnvelopeProbe
- element objects should really not be concerned with the type of probe.- Parameters:
probe
- envelope-type probe (something with emittance and moments)gap
- the RF gap modeling element creating the bunch phase spread- Returns:
- the increase in longitudinal emittance due to finite phase spread
-