Class BunchProbeState<S extends BunchProbeState<S>>

java.lang.Object
xal.model.probe.traj.ProbeState<S>
xal.model.probe.traj.BunchProbeState<S>
All Implemented Interfaces:
IProbeState, IArchive
Direct Known Subclasses:
EnsembleProbeState, EnvelopeProbeState, SynchronousState, TwissProbeState

public abstract class BunchProbeState<S extends BunchProbeState<S>> extends ProbeState<S>
Encapsulates a BunchProbe's state at a point in time. Contains addition state variables for probes with beam-like behavior.
Version:
$id:
Author:
Craig McChesney, Christopher K. Allen
  • Constructor Details

    • BunchProbeState

      protected BunchProbeState()
      Default constructor. Creates an empty BunchProbeState.
    • BunchProbeState

      protected BunchProbeState(S state)
      Copy constructor for BunchProbeState. Initializes the new BunchProbeState objects with the state attributes of the given BunchProbeState.
      Parameters:
      state - initializing state
      Since:
      Jun 26, 2014
    • BunchProbeState

      protected BunchProbeState(BunchProbe<S> probe)
      Initializing constructor. Creates a new BunchProbe 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

      public String toString()
      Write out state information to a string.
      Overrides:
      toString in class ProbeState<S extends BunchProbeState<S>>
      Returns:
      text version of internal state data
    • addPropertiesTo

      protected void addPropertiesTo(DataAdaptor daSink)
      Save the state values particular to BunchProbeState objects to the data sink.
      Overrides:
      addPropertiesTo in class ProbeState<S extends BunchProbeState<S>>
      Parameters:
      daSink - data sink represented by DataAdaptor interface
    • readPropertiesFrom

      protected void readPropertiesFrom(DataAdaptor daSource) throws DataFormatException
      Recover the state values particular to BunchProbeState objects from the data source.
      Overrides:
      readPropertiesFrom in class ProbeState<S extends BunchProbeState<S>>
      Parameters:
      daSource - data source represented by a DataAdaptor interface
      Throws:
      DataFormatException - state information in data source is malformatted