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_LABELFields inherited from interface xal.model.probe.traj.IProbeState
LIGHT_SPEED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor.protectedBunchProbeState(S state) Copy constructor for BunchProbeState.protectedBunchProbeState(BunchProbe<S> probe) Initializing constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPropertiesTo(DataAdaptor daSink) Save the state values particular toBunchProbeStateobjects to the data sink.doubleReturns the generalized, two-dimensional beam perveance K.doubleReturns the generalized, three-dimensional beam perveance K.doubleComputes and returns the charge in each beam bunchdoubleReturns the total beam current, which is the bunch charge Q times the bunch frequency f.doubleReturns the bunch frequency, that is, the rate at which beam bunches pass a stationary point (in laboratory coordinates).protected voidreadPropertiesFrom(DataAdaptor daSource) Recover the state values particular toBunchProbeStateobjects from the data source.voidsetBeamCurrent(double i) Set the total beam currentvoidsetBunchFrequency(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 newBunchProbeStateobjects with the state attributes of the givenBunchProbeState.- Parameters:
state- initializing state- Since:
- Jun 26, 2014
-
BunchProbeState
Initializing constructor. Creates a newBunchProbeobject 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:
toStringin classProbeState<S extends BunchProbeState<S>>- Returns:
- text version of internal state data
-
addPropertiesTo
Save the state values particular toBunchProbeStateobjects to the data sink.- Overrides:
addPropertiesToin classProbeState<S extends BunchProbeState<S>>- Parameters:
daSink- data sink represented byDataAdaptorinterface
-
readPropertiesFrom
Recover the state values particular toBunchProbeStateobjects from the data source.- Overrides:
readPropertiesFromin classProbeState<S extends BunchProbeState<S>>- Parameters:
daSource- data source represented by aDataAdaptorinterface- Throws:
DataFormatException- state information in data source is malformatted
-