public abstract class ProbeState<S extends ProbeState<S>> extends java.lang.Object implements IProbeState
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
STATE_LABEL
element tag for the probe state data
|
protected static java.lang.String |
TYPE_LABEL
attribute tag for concrete type of probe state
|
LightSpeed| Constructor and Description |
|---|
ProbeState()
Default constructor - creates an empty
ProbeState object. |
ProbeState(Probe<S> probe)
Initializing Constructor.
|
ProbeState(S state)
Copy constructor for ProbeState.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPropertiesTo(DataAdaptor container)
Save the state information to a
DataAdaptor interface. |
protected double |
computeBetaFromGamma(double gamma)
Convenience function for computing the probe's velocity beta (w.r.t.
|
protected double |
computeGammaFromBeta(double beta)
Computes the relatavistic factor gamma from the current beta value
|
protected double |
computeGammaFromW(double W)
Convenience function for computing the relatistic factor gamma from the
probe's kinetic energy (using the particle species rest energy m_dblParEr).
|
abstract S |
copy()
Creates a new clone of this object.
|
double |
getBeta()
Returns the probe velocity normalized to the speed of light.
|
protected double |
getBetaGamma()
Convenience function for multiplication of beta * gamma
|
java.lang.String |
getElementId()
Returns the id of the lattice element associated with this state.
|
double |
getGamma()
Return the relativistic gamma of the probe.
|
java.lang.String |
getHardwareNodeId()
Returns the identifier of the hardware node modeled by the
associated modeling element for this state.
|
double |
getKineticEnergy()
Return the kinetic energy of the probe.
|
double |
getMomentum()
Returns the momentum
|
double |
getPosition()
Returns the current beam-line position of the probe
|
double |
getSpeciesCharge()
Returns the charge of probe's particle species
|
double |
getSpeciesRestEnergy()
Returns the rest energy of particle species
|
double |
getTime()
Return the time elapsed from the start of the probe tracking
|
void |
load(DataAdaptor container)
Recovers the state information from a data source represented
by a
DataAdaptor interface. |
protected void |
readPropertiesFrom(DataAdaptor container)
Recover the state information from a
DataAdaptor interface. |
void |
save(DataAdaptor daSink)
Save the state information to a data sink represented by
a
DataAdaptor interface |
void |
setElementId(java.lang.String id)
Set the lattice element id associated with this state.
|
void |
setHardwareNodeId(java.lang.String strSmfId)
Sets the hardware node ID modeled by the element owning this state.
|
void |
setKineticEnergy(double W)
Set the current kinetic energy of the probe.
|
void |
setPosition(double s)
Set the current position of the probe along the beamline.
|
void |
setSpeciesCharge(double q)
Set the charge of the particle species in the beam
|
void |
setSpeciesRestEnergy(double Er)
Set the rest energy of a single particle in the beam
|
void |
setTime(double dblTime)
Set the current probe time elapsed from the start of the probe tracking.
|
java.lang.String |
toString()
Return a textual representation of the
ProbeState internal state. |
public static final java.lang.String STATE_LABEL
protected static final java.lang.String TYPE_LABEL
public ProbeState()
ProbeState object.public ProbeState(S state)
ProbeState objects with the state attributes
of the given probe state.state - initializing statepublic abstract S copy()
public void setSpeciesCharge(double q)
setSpeciesCharge in interface IProbeStateq - species particle charge (Coulombs)public void setSpeciesRestEnergy(double Er)
setSpeciesRestEnergy in interface IProbeStateEr - particle rest energy (electron-volts)public void setPosition(double s)
setPosition in interface IProbeStates - new probe position (meters)getPosition()public void setTime(double dblTime)
setTime in interface IProbeStatedblTime - elapsed time in secondspublic void setKineticEnergy(double W)
setKineticEnergy in interface IProbeStateW - new probe kinetic energy (electron-volts)getKineticEnergy()public void setElementId(java.lang.String id)
setElementId in interface IProbeStateid - element id of current lattice elementpublic void setHardwareNodeId(java.lang.String strSmfId)
strSmfId - hardware ID of the statepublic double getSpeciesCharge()
getSpeciesCharge in interface IProbeStatepublic double getSpeciesRestEnergy()
getSpeciesRestEnergy in interface IProbeStatepublic double getMomentum()
public java.lang.String getElementId()
getElementId in interface IProbeStatepublic java.lang.String getHardwareNodeId()
public double getPosition()
getPosition in interface IProbeStatepublic double getTime()
getTime in interface IProbeStatepublic double getKineticEnergy()
getKineticEnergy in interface IProbeStatepublic double getBeta()
public double getGamma()
public java.lang.String toString()
ProbeState internal state.toString in class java.lang.ObjectProbeState statepublic final void save(DataAdaptor daSink)
DataAdaptor interfacepublic final void load(DataAdaptor container) throws DataFormatException
DataAdaptor interface.load in interface IArchivecontainer - data source containing state informationDataFormatException - data in container is malformatedprotected double computeGammaFromBeta(double beta)
beta - speed of probe w.r.t. the speed of lightprotected double computeGammaFromW(double W)
W - kinetic energy of the probeprotected double computeBetaFromGamma(double gamma)
beta - relatavistic factor gammaprotected double getBetaGamma()
protected void addPropertiesTo(DataAdaptor container)
DataAdaptor interface.container - data sink with DataAdaptor interfaceprotected void readPropertiesFrom(DataAdaptor container) throws ParsingException
DataAdaptor interface.container - data source with DataAdaptor interfaceParsingException - data source is malformatted