public class BunchLengthSimulator
extends java.lang.Object
Measurement
object. Typically, a measurement object is
populated with wire scanner data, which contains only transverse information.
In order to do computation with space charge it is necessary to have longitudinal
information since dynamics in all three phase planes are coupled by the electro-
magnetic fields. This tools provides a simulated longitudinal bunch size to
fill in the missing information.Constructor and Description |
---|
BunchLengthSimulator(AcceleratorSeq smfSeq)
Creates a new
BunchLengthSimulator object using the
given sequence, and synchronizes to the design parameters. |
BunchLengthSimulator(AcceleratorSeq smfSeq,
long lngPvLogId)
Creates a new
BunchLengthSimulator object using
the given sequence, initializes the model to the historical machine state identified
by the given PV Logger ID. |
BunchLengthSimulator(AcceleratorSeq smfSeq,
TransferMatrixGenerator.SYNC enmSyn)
Creates a new
BunchLengthSimulator object using the given accelerator (XML definition file)
accelerator, the given sequence, and the given synchronization mode. |
Modifier and Type | Method and Description |
---|---|
void |
generateBunchLengths(java.util.ArrayList<Measurement> arrMsmts,
double dblBnchFreq,
double dblBmCurr)
Generates all the bunch lengths at the given device locations for the given
measurement data.
|
void |
generateBunchLengths(java.util.ArrayList<Measurement> arrMsmts,
double dblScale,
double dblBnchFreq,
double dblBmCurr)
Generates all the bunch lengths at the given device locations for the given
measurement data.
|
void |
generateBunchLengths(java.util.ArrayList<Measurement> arrMsmts,
double dblScale,
double dblBnchFreq,
double dblBmCurr,
CovarianceMatrix matInitState)
Generates all the bunch lengths at the given device locations for the given
measurement data.
|
void |
setSynchronizationMode(TransferMatrixGenerator.SYNC enmSync)
Sets the source of hardware parameters for the simulations.
|
void |
setSyncToMachineHistory(long lngPvLogId)
Synchronizes to the machine parameters at the time of the given PV logger
snapshot ID.
|
public BunchLengthSimulator(AcceleratorSeq smfSeq) throws ModelException
BunchLengthSimulator
object using the
given sequence, and synchronizes to the design parameters.smfSeq
- the desired sequence for bunch length computationModelException
- and error occurred when instantiating the machine modelpublic BunchLengthSimulator(AcceleratorSeq smfSeq, long lngPvLogId) throws ModelException
BunchLengthSimulator
object using
the given sequence, initializes the model to the historical machine state identified
by the given PV Logger ID.smfSeq
- the desired sequence for bunch length computationlngPvLogId
- PV Logger ID of the historical machine snapshot where model parameters are takenModelException
- and error occurred when instantiating the machine modelpublic BunchLengthSimulator(AcceleratorSeq smfSeq, TransferMatrixGenerator.SYNC enmSyn) throws ModelException
BunchLengthSimulator
object using the given accelerator (XML definition file)
accelerator, the given sequence, and the given synchronization mode.smfSeq
- the desired sequence for bunch length computationenmSyn
- source of machine parametersModelException
- an error occurred when instantiating the machine modelpublic void setSynchronizationMode(TransferMatrixGenerator.SYNC enmSync)
setSyncToMachineHistory(long)
).enmSync
- synchronization mode determining parameter sourcepublic void setSyncToMachineHistory(long lngPvLogId)
lngPvLogId
- PV Logger ID for the historical machine statepublic void generateBunchLengths(java.util.ArrayList<Measurement> arrMsmts, double dblBnchFreq, double dblBmCurr) throws ModelException
Generates all the bunch lengths at the given device locations for the given measurement data. The default initial beam state is used to start the beam simulation at the entrance of the accelerator sequence.
arrMsmts
- the measurement data to be packed with longitudinal dummy datadblBmChrg
- beam bunch charge in CoulombsModelException
- general error during model synchronization or simulationpublic void generateBunchLengths(java.util.ArrayList<Measurement> arrMsmts, double dblScale, double dblBnchFreq, double dblBmCurr) throws ModelException
Generates all the bunch lengths at the given device locations for the given measurement data. The default initial beam state is used to start the beam simulation at the entrance of the accelerator sequence. The beam sizes are multiplied by the scaling factor provided; this is used to convert units since the online model units are all MKS. For example, use 1000.0 to convert from meters (XAL) to millimeters.
arrMsmts
- the measurement data to be packed with longitudinal dummy datadblScale
- multiplicative factor used to scale bunch lengths.dblBmChrg
- beam bunch charge in CoulombsModelException
- general error during model synchronization or simulationpublic void generateBunchLengths(java.util.ArrayList<Measurement> arrMsmts, double dblScale, double dblBnchFreq, double dblBmCurr, CovarianceMatrix matInitState) throws ModelException
Generates all the bunch lengths at the given device locations for the given measurement data. The simulation is performed with the given bunch charge and the given initial beam state at the start of the accelerator sequence. The beam sizes are multiplied by the scaling factor provided; this is used to convert units since the online model units are all MKS. For example, use 1000.0 to convert from meters (XAL) to millimeters.
arrMsmts
- the measurement data to be packed with longitudinal dummy datadblScale
- multiplicative factor used to scale bunch lengths.dblBmChrg
- beam bunch charge in CoulombsmatInitState
- initial state of the beam, initial covariance matrix or the default value is used if null
ModelException
- general error during model synchronization or simulation