public abstract class EnvelopeTrackerBase extends Tracker
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.
Modifier and Type | Class and Description |
---|---|
static class |
EnvelopeTrackerBase.EmitGrowthModel
RF Gap Emittance Growth Models
|
static class |
EnvelopeTrackerBase.PhasePlane
Enumerations for supported phase planes
|
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ATTR_EMITGROWTH
label for emittance growth flag
|
static java.lang.String |
ATTR_SCHEFF
label for use simple tracking (no space charge)
|
static java.lang.String |
ATTR_STEPSIZE
label for maximum step size
|
static java.lang.String |
ATTR_USESPACECHARGE
label for use simple tracking (no space charge)
|
static java.lang.String |
LABEL_OPTIONS
data node label for EnvelopeTracker settings
|
static java.lang.String |
TBL_LBL_ENVBASETRACKER
EditContext table name containing basic envelope tracking parameters
|
ATTRTAG_DEBUG, ATTRTAG_RFGAP_PHASE, ATTRTAG_TYPE, ATTRTAG_UPDATE, ATTRTAG_VER, NODETAG_ALG, NODETAG_TRACKER, TBL_PRIM_KEY_NAME, UPDATE_ALWAYS, UPDATE_CUSTOM, UPDATE_ENTRANCE, UPDATE_ENTRANCEANDEXIT, UPDATE_EXIT
Constructor and Description |
---|
EnvelopeTrackerBase(EnvelopeTrackerBase sourceTracker)
Copy constructor for EnvelopeTracker
|
EnvelopeTrackerBase(java.lang.String strType,
int intVersion,
java.lang.Class<? extends IProbe> clsProbeType)
EnvelopeTrackerBase Constructor
|
Modifier and Type | Method and Description |
---|---|
protected double |
compEmitGrowthFunction(EnvelopeTrackerBase.PhasePlane plane,
double phi_s,
double dphi)
Emittance Growth Function for Phase Spread in RF Gap
|
protected double |
compLongFourierTransform(double dphi)
Longitudinal Fourier Transform for Uniform Distribution
|
protected 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 Transform
|
double |
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 simultanously
used in EnvTrackerAdapt, EnvelopeTracker
|
protected double |
correctTransFocusingPhaseSpread(EnvelopeProbe probe,
IdealRfGap gap)
Moved from
IdealRfGap . |
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 Beam
|
protected double |
fourierLong1dGaussian(double dphi)
Longitudinal Fourier Transform for 2D Gaussian Distribution
|
protected double |
fourierLong1dUniform(double dphi)
Longitudinal Fourier Transform for Single Phase Plane
|
protected double |
fourierLong3dGaussian(double dphi)
Longitudinal Fourier Transform for 3D Gaussian Distribution
|
protected double |
fourierLong3dUniform(double dphi)
Longitudinal Fourier Transform for 3D Uniform Distribution
|
protected double |
fourierLongTrace3d(double dphi)
Longitudinal Fourier Transform given by Trace3D
|
protected double |
fourierTrans1dGaussian(double dphi)
Transverse Fourier Transform for 2D Gaussian Distribution
|
protected double |
fourierTrans1dUniform(double dphi)
Transverse Fourier Transform for Single Phase Plane
|
protected double |
fourierTrans3dGaussian(double dphi)
Transverse Fourier Transform for 3D Gaussian Distribution
|
protected double |
fourierTrans3dUniform(double dphi)
Transverse Fourier Transform for 3D Uniform Distribution
|
protected double |
fourierTransTrace3d(double dphi)
Transverse Fourier Transform given by Trace3D
|
EnvelopeTrackerBase.EmitGrowthModel |
getEmitGrowthModel()
Return the emittance growth model
|
boolean |
getEmittanceGrowthFlag()
Return the emittance growth flag.
|
boolean |
getSpaceChargeFlag()
Returns the flag determining whether or not space charge effects are being
considered during the propagation.
|
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.
|
void |
load(DataAdaptor daptArchive)
Load the parameters of the algorithm from a data source exposing the
IArchive interface. |
void |
load(java.lang.String strPrimKeyVal,
EditContext ecTableData)
Load the parameters of this
IAlgorithm object from the
table data in the given EditContext . |
protected PhaseMatrix |
modTransferMatrixForDisplError(double dx,
double dy,
double dz,
PhaseMatrix matPhi)
Add Displacement Error to Transfer Matrix
|
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 the
DataAdaptor interface. |
void |
setEmitGrowthModel(EnvelopeTrackerBase.EmitGrowthModel enmModel)
Set the emittance growth mechanism
|
void |
setEmittanceGrowth(boolean bolEmitGrowth)
Set the emittance growth flag.
|
void |
setStepSize(double step)
Set maximum step size allowed between space charge kicks
|
void |
setUseSpacecharge(boolean tf)
Method to toggle the flag to use/not use space charge calculations.
|
advanceProbe, doPropagation, getDebugMode, getElemPosition, getProbeType, getProbeUpdatePolicy, getStartElementId, getStopElementId, getType, getVersion, initialize, isStopElementIncluded, newFromEditContext, newFromEditContext, newInstance, propagate, registerProbeType, retractProbe, setDebugMode, setElemPosition, setIncludeStopElement, setProbeUpdatePolicy, setRfGapPhaseCalculation, setStartElementId, setStopElementId, unsetStartElementId, unsetStopElementId, useRfGapPhaseCalculation, validElement, validProbe
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copy
public static final java.lang.String TBL_LBL_ENVBASETRACKER
public static final java.lang.String LABEL_OPTIONS
public static final java.lang.String ATTR_SCHEFF
public static final java.lang.String ATTR_USESPACECHARGE
protected static final java.lang.String ATTR_EMITGROWTH
public static final java.lang.String ATTR_STEPSIZE
public EnvelopeTrackerBase(java.lang.String strType, int intVersion, java.lang.Class<? extends IProbe> clsProbeType)
This should be used by child classes to pass up their class properties.
strType
- string type identifier of the classintVersion
- version number of class implementationclsProbeType
- the class type of valid probepublic EnvelopeTrackerBase(EnvelopeTrackerBase sourceTracker)
sourceTracker
- Tracker that is being copiedpublic void setStepSize(double step)
step
- the new maximum step size for space charge calculationspublic void setUseSpacecharge(boolean tf)
Method to toggle the flag to use/not use space charge calculations.
tf
- the truth flagpublic 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.
bolEmitGrowth
- set true to simulation emittance growthIdealRfGap
,
setEmitGrowthModel(EmitGrowthModel)
public void setEmitGrowthModel(EnvelopeTrackerBase.EmitGrowthModel enmModel)
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 the
IMPACT
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, or Trace3D
is simply more accurate.
NOTES: (CKA)
· This flag only has an effect when the
setEmittanceGrowth()
feature is set to true
.
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 preperation).
enmModel
- use the Trace3D
method or the
C.K. Allen et. al. methodpublic 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.
public boolean getSpaceChargeFlag()
public boolean getEmittanceGrowthFlag()
setEmittanceGrowth(boolean)
public EnvelopeTrackerBase.EmitGrowthModel getEmitGrowthModel()
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 the
IMPACT
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, or Trace3D
is simply more accurate.
NOTES: (CKA)
· This flag only has an effect when the
setEmittanceGrowth()
feature is set to true
.
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 preperation).
public void load(java.lang.String strPrimKeyVal, EditContext ecTableData) throws DataFormatException
IAlgorithm
object from the
table data in the given EditContext
.
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.load
in interface IContextAware
load
in class Tracker
strPrimKeyVal
- primary key value specifying the name of the data recordecTableData
- EditContext containing table dataDataFormatException
- bad data format - error in readingIContextAware.load(String, xal.tools.data.EditContext)
public void load(DataAdaptor daptArchive)
IArchive
interface.
The superclass load
method is called first, then the properties
particular to EnvTrackerAdapt are loaded.
load
in interface IArchive
load
in class Tracker
daptArchive
- data source containing algorithm configurationIArchive.load(xal.tools.data.DataAdaptor)
public void save(DataAdaptor daptArchive)
DataAdaptor
interface. Subclasses should
override this method to store the data particular to there own
operation.save
in interface IArchive
save
in class Tracker
daptArchive
- data source to receive algorithm configurationIArchive.save(xal.tools.data.DataAdaptor)
protected PhaseMatrix modTransferMatrixForDisplError(double dx, double dy, double dz, PhaseMatrix matPhi)
Method to add the effects of a spatially displaced to the
beamline element represented by the given
transfer matrix. The returned matrix is the
original transfer matrix conjugated by the displacement
matrix representing the displacement vector Δr
Δr ≡ (dx,dy,dz).
NOTES: (H. SAKO)
· added alignment error in sigma matrix
dx
- spatial displacement in x planedy
- spatial displacement in y planedz
- spatial displacement in z planematPhi
- transfer matrix Φ to be processedPhaseMatrix
,
PhaseMatrix.translation(PhaseVector)
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 the IElement
argument is any other type of element, nothing is done.
The argument matPhi
is the original transfer matrix for
(normal) propagation through the elem
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(Δφ)
(see compLongFourierTransform(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).
dphi
- effective phase spread ΔφmatPhi
- transfer matrix Φ for conserved normalized emittanceModelException
- unsupport/unknown emittance growth modelcompTransFourierTransform(double)
,
compLongFourierTransform(double)
,
effPhaseSpread(EnvelopeProbe, IdealRfGap)
,
EnvelopeTrackerBase#momentSine(double)
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 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.
dblLen
- incremental path length over which space charge is appliedprobe
- EnvelopeProbe
containing correlation matrixelem
- IElement
where probe is currently locatedModelException
- could not compute the transfer map for given elementgov.sns.tools.beam.em.BeamEllipsoid
protected double compEmitGrowthFunction(EnvelopeTrackerBase.PhasePlane plane, double phi_s, double dphi) throws ModelException
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
(see setEmitGrowthModel(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
and
compTransFourierTransform(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 (divergance 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 preperation).
plane
- Compute the emittance growth function for this phase planephi_s
- the synchronous particle phase φs
in radiansdphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radiansModelException
- unknown/unsupport emittance growth model,
or unknown/unsupported phase planecompTransFourierTransform(double)
,
compLongFourierTransform(double)
,
effPhaseSpread(EnvelopeProbe, IdealRfGap)
protected double compTransFourierTransform(double dphi) throws ModelException
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 (tranverse) 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 preperation).
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radiansModelException
- unsupported/unknown emittance growth modeleffPhaseSpread(EnvelopeProbe, IdealRfGap)
,
gov.sns.xal.model.elem.IdealRfGap
protected double compLongFourierTransform(double dphi) throws ModelException
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 independly,
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 preperation).
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radiansModelException
- unsupported/unknown emittance growth modeleffPhaseSpread(EnvelopeProbe, IdealRfGap)
,
compTransFourierTransform(double)
,
compEmitGrowthFunction(PhasePlane, double, double)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierTransTrace3d(double dphi)
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,
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radians#momentSine(double)
,
compTransFourierTransform(double)
,
effPhaseSpread(EnvelopeProbe, IdealRfGap)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierLongTrace3d(double dphi)
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 preperation).
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianseffPhaseSpread(EnvelopeProbe, IdealRfGap)
,
compTransFourierTransform(double)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierLong3dUniform(double dphi)
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)
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianseffPhaseSpread(EnvelopeProbe, IdealRfGap)
,
compTransFourierTransform(double)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierTrans3dUniform(double dphi)
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)
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianscompTransFourierTransform(double)
,
effPhaseSpread(EnvelopeProbe, IdealRfGap)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierTrans3dGaussian(double dphi)
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)
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianscompTransFourierTransform(double)
,
effPhaseSpread(EnvelopeProbe, IdealRfGap)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierLong3dGaussian(double dphi)
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)
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianseffPhaseSpread(EnvelopeProbe, IdealRfGap)
,
compTransFourierTransform(double)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierTrans1dUniform(double dphi)
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)
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianscompTransFourierTransform(double)
,
effPhaseSpread(EnvelopeProbe, IdealRfGap)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierLong1dUniform(double dphi)
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)
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianscompTransFourierTransform(double)
,
effPhaseSpread(EnvelopeProbe, IdealRfGap)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierTrans1dGaussian(double dphi)
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)
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianscompTransFourierTransform(double)
,
effPhaseSpread(EnvelopeProbe, IdealRfGap)
,
gov.sns.xal.model.elem.IdealRfGap
protected double fourierLong1dGaussian(double dphi)
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)
dphi
- effective phase spread Δφ (half-width)
of equivalent uniform beam in radianseffPhaseSpread(EnvelopeProbe, IdealRfGap)
,
compTransFourierTransform(double)
,
gov.sns.xal.model.elem.IdealRfGap
protected double effPhaseSpread(EnvelopeProbe probe, IdealRfGap elem)
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, longitundinal 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.
probe
- probe containing relativistic dataelem
- the RF gap modeling element creating the bunch phase spreadprotected double phaseSpread(EnvelopeProbe probe, IdealRfGap gap)
Compute the phase spread of the bunch for a probe (based on Trace3D RfGap.f)
probe
- we are computing the phase spread for this probe at the current
IdealRfGap
conditiongap
- the RF gap modeling element creating the bunch phase spreadprotected double correctTransFocusingPhaseSpread(EnvelopeProbe probe, IdealRfGap gap)
IdealRfGap
.protected double[] correctSigmaPhaseSpread(EnvelopeProbe probe, IdealRfGap gap)
probe
- envelope probe object (something with emittance and moments)gap
- the RF gap modeling element creating the bunch phase spreadpublic double correctTransSigmaPhaseSpread(EnvelopeProbe probe, IdealRfGap gap)
Calculation of emittance increase due to phase spread based on calculations in Trace3d (RfGap.f)
Used in EnvTrackerAdapt, EnvelopeTracker
EnvelopeProbe
- element objects
should really not be concerned with the type of probe.
probe
- envelope probe object (something with emittance and moments)gap
- the RF gap modeling element creating the bunch phase spreadpublic double correctLongSigmaPhaseSpread(EnvelopeProbe probe, IdealRfGap gap)
Calculation of emittance increase due to phase spread based on calculations in Trace3d (RfGap.f)
used in EnvTrackerAdapt, EnvelopeTracker
EnvelopeProbe
- element objects
should really not be concerned with the type of probe.
probe
- envelope-type probe (something with emittance and moments)gap
- the RF gap modeling element creating the bunch phase spread