Class BunchProbeState<S extends BunchProbeState<S>>
- All Implemented Interfaces:
IProbeState
,IArchive
- Direct Known Subclasses:
EnsembleProbeState
,EnvelopeProbeState
,SynchronousState
,TwissProbeState
- Version:
- $id:
- Author:
- Craig McChesney, Christopher K. Allen
-
Field Summary
Fields inherited from class xal.model.probe.traj.ProbeState
STATE_LABEL, TYPE_LABEL
Fields inherited from interface xal.model.probe.traj.IProbeState
LIGHT_SPEED
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default constructor.protected
BunchProbeState
(S state) Copy constructor for BunchProbeState.protected
BunchProbeState
(BunchProbe<S> probe) Initializing constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPropertiesTo
(DataAdaptor daSink) Save the state values particular toBunchProbeState
objects to the data sink.double
Returns the generalized, two-dimensional beam perveance K.double
Returns the generalized, three-dimensional beam perveance K.double
Computes and returns the charge in each beam bunchdouble
Returns the total beam current, which is the bunch charge Q times the bunch frequency f.double
Returns the bunch frequency, that is, the rate at which beam bunches pass a stationary point (in laboratory coordinates).protected void
readPropertiesFrom
(DataAdaptor daSource) Recover the state values particular toBunchProbeState
objects from the data source.void
setBeamCurrent
(double i) Set the total beam currentvoid
setBunchFrequency
(double f) Set the bunch arrival time frequency.toString()
Write out state information to a string.Methods inherited from class xal.model.probe.traj.ProbeState
computeBetaFromGamma, computeGammaFromBeta, computeGammaFromW, copy, getBeta, getBetaGamma, getElementId, getElementTypeId, getGamma, getHardwareNodeId, getKineticEnergy, getLongitudinalPhase, getMomentum, getPosition, getSpeciesCharge, getSpeciesRestEnergy, getTime, load, save, setElementId, setElementTypeId, setHardwareNodeId, setKineticEnergy, setLongitudinalPhase, setPosition, setSpeciesCharge, setSpeciesRestEnergy, setTime
-
Constructor Details
-
BunchProbeState
protected BunchProbeState()Default constructor. Creates an emptyBunchProbeState
. -
BunchProbeState
Copy constructor for BunchProbeState. Initializes the newBunchProbeState
objects with the state attributes of the givenBunchProbeState
.- Parameters:
state
- initializing state- Since:
- Jun 26, 2014
-
BunchProbeState
Initializing constructor. Creates a newBunchProbe
object initialized to the argument's state.- Parameters:
probe
- probe object with which to initialize this state
-
-
Method Details
-
setBunchFrequency
public void setBunchFrequency(double f) Set the bunch arrival time frequency.- Parameters:
f
- new bunch frequency in Hz
-
setBeamCurrent
public void setBeamCurrent(double i) Set the total beam current- Parameters:
i
- new beam current in Amperes
-
getBunchFrequency
public double getBunchFrequency()Returns the bunch frequency, that is, the rate at which beam bunches pass a stationary point (in laboratory coordinates). The frequency f of the bunches determines the beam current I.
The bunch frequency f is related to the beam current I and bunch charge Q as
f = I/Q
- Returns:
- bunch frequency in Hertz
-
getBeamCurrent
public double getBeamCurrent()Returns the total beam current, which is the bunch charge Q times the bunch frequency f.- Returns:
- beam current in amps
-
bunchCharge
public double bunchCharge()Computes and returns the charge in each beam bunch- Returns:
- beam charge in coulombs
-
beamPerveance
public double beamPerveance()Returns the generalized, three-dimensional beam perveance K. This value is defined to be
K = (Q/4*π*ε0)(1/γ3β2)(|q|/ER)where Q is the bunch charge, ε0 is the permittivity of free space, γ is the relativistic factor, β is the normalized design velocity, q is the individual particle charge and ER is the rest energy of the beam particles.
NOTES:
- The value (1/4πε0) is equal to 10-7c2 where c is the speed of light.
- Returns:
- generalized beam perveance Units: radians^2/meter
-
beamDCPerveance
public double beamDCPerveance()Returns the generalized, two-dimensional beam perveance K. This value is defined to be
K = (I/π*ε0)(1/γ3β3c)(|q|/ER)where I is the current, ε0 is the permittivity of free space, γ is the relativistic factor, β is the normalized design velocity, q is the individual particle charge and ER is the rest energy of the beam particles.
NOTES:
- The value (1/πε0) is equal to 40-7c2 where c is the speed of light.
- Returns:
- generalized beam perveance Units: radians^2/meter
-
toString
Write out state information to a string.- Overrides:
toString
in classProbeState<S extends BunchProbeState<S>>
- Returns:
- text version of internal state data
-
addPropertiesTo
Save the state values particular toBunchProbeState
objects to the data sink.- Overrides:
addPropertiesTo
in classProbeState<S extends BunchProbeState<S>>
- Parameters:
daSink
- data sink represented byDataAdaptor
interface
-
readPropertiesFrom
Recover the state values particular toBunchProbeState
objects from the data source.- Overrides:
readPropertiesFrom
in classProbeState<S extends BunchProbeState<S>>
- Parameters:
daSource
- data source represented by aDataAdaptor
interface- Throws:
DataFormatException
- state information in data source is malformatted
-