public class TwissTracker extends Tracker
Tracking algorithm for TwissProbe
objects. The TwissProbe
's
primary state object, a BunchDescriptor
object containing three sets of Twiss
parameters (one for each phase plane), is advanced using the linear
dynamics portion of any beamline element (IElement
exposing object)
Moreover, currently the dynamics are not coupled between phase planes. The
values of the Twiss parameter propagated according to formula 2.54 from S.Y. Lee's book.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ATTR_EMITGROWTH
label for emittance growth flag
|
protected static java.lang.String |
ATTR_SCHEFF
label for simulating space charge effects
|
protected static java.lang.String |
ATTR_STEPSIZE
label for maxstepsize
|
protected static java.lang.String |
ATTR_USESPACECHARGE
label for simulating space charge effects
|
protected static java.lang.String |
LABEL_OPTIONS
data node label for EnvelopeTracker settings
|
static java.lang.Class<TwissProbe> |
s_clsProbeType
probe type recognized by this algorithm
|
static int |
s_intVersion
current algorithm version
|
static java.lang.String |
s_strTypeId
string type identifier for algorithm
|
protected static java.lang.String |
TBL_LBL_TWISSTRACKER
EditContext table name containing EnvelopeTracker parameters
|
protected static java.lang.String |
TBL_PRIM_KEY_NAME
Table record primary key name
|
ATTRTAG_DEBUG, ATTRTAG_RFGAP_PHASE, ATTRTAG_TYPE, ATTRTAG_UPDATE, ATTRTAG_VER, NODETAG_ALG, NODETAG_TRACKER, UPDATE_ALWAYS, UPDATE_CUSTOM, UPDATE_ENTRANCE, UPDATE_ENTRANCEANDEXIT, UPDATE_EXIT
Modifier | Constructor and Description |
---|---|
|
TwissTracker()
Creates a new instance of EnvelopeTracker
|
protected |
TwissTracker(java.lang.String strType,
int intVersion,
java.lang.Class<? extends IProbe> clsProbeType)
Creates a new, empty, instance of EnvelopeTracker.
|
|
TwissTracker(TwissTracker sourceTracker)
Copy constructor for TwissTracker
|
Modifier and Type | Method and Description |
---|---|
protected void |
advanceState(IProbe ifcProbe,
IElement ifcElem,
double dblLen)
Advances the probe state through a subsection of the element with the
specified length.
|
TwissTracker |
copy()
Creates a deep copy of TwissTracker
|
void |
doPropagation(IProbe probe,
IElement elem)
Propagates the probe through the element.
|
boolean |
getEmittanceGrowthFlag()
Return the emittance growth flag.
|
boolean |
getSpaceChargeFlag()
Returns the flag determining whether or not space charge effects are being
considered during the propagation.
|
double |
getStepSize()
Returns the element subsection length (in meters) that the probe
may be advanced for exceptional cases.
|
void |
load(DataAdaptor daSource)
Load the parameters of the algorithm from a data source exposing the
IArchive interface. |
void |
load(java.lang.String strPrimKeyVal,
EditContext ecTableData)
Load the parameters of this
IAlgorithm object from the
table data in the given EditContext . |
void |
save(DataAdaptor daSink)
Save the state and settings of this algorithm to a data source
exposing the
DataAdaptor interface. |
void |
setEmittanceGrowth(boolean bolEmitGrowth)
Set the emittance growth flag.
|
void |
setStepSize(double dblStepSize)
Set the step size used for PMQ and any other
exceptional propagation.
|
void |
setUseSpacecharge(boolean bolScheff)
Method to set the flag to use/notuse spacecharge.
|
advanceProbe, getDebugMode, getElemPosition, getProbeType, getProbeUpdatePolicy, getStartElementId, getStopElementId, getType, getVersion, initialize, isStopElementIncluded, newFromEditContext, newFromEditContext, newInstance, propagate, registerProbeType, retractProbe, setDebugMode, setElemPosition, setIncludeStopElement, setProbeUpdatePolicy, setRfGapPhaseCalculation, setStartElementId, setStopElementId, unsetStartElementId, unsetStopElementId, useRfGapPhaseCalculation, validElement, validProbe
protected static final java.lang.String TBL_LBL_TWISSTRACKER
protected static final java.lang.String TBL_PRIM_KEY_NAME
protected static final java.lang.String LABEL_OPTIONS
protected static final java.lang.String ATTR_SCHEFF
protected static final java.lang.String ATTR_USESPACECHARGE
protected static final java.lang.String ATTR_EMITGROWTH
protected static final java.lang.String ATTR_STEPSIZE
public static final java.lang.String s_strTypeId
public static final int s_intVersion
public static final java.lang.Class<TwissProbe> s_clsProbeType
public TwissTracker()
protected TwissTracker(java.lang.String strType, int intVersion, java.lang.Class<? extends IProbe> clsProbeType)
strType
- string type identifier of algorithmintVersion
- version of algorithmclsProbeType
- class object for probe handled by this algorithm.public TwissTracker(TwissTracker sourceTracker)
sourceTracker
- Tracker that is being copiedpublic TwissTracker copy()
public void setStepSize(double dblStepSize)
dblStepSize
- new step size in meterspublic void setEmittanceGrowth(boolean bolEmitGrowth)
bolEmitGrowth
- set true to simulation emittance growthIdealRfGap
public void setUseSpacecharge(boolean bolScheff)
bolScheff
- set whether or not to simulation space charge effectspublic double getStepSize()
public boolean getEmittanceGrowthFlag()
setEmittanceGrowth(boolean)
public boolean getSpaceChargeFlag()
public void doPropagation(IProbe probe, IElement elem) throws ModelException
doPropagation
in class Tracker
probe
- probe to propagateelem
- element acting on probeModelException
- invalid probe type or error in advancing probeTracker.validProbe(IProbe)
public void load(java.lang.String strPrimKeyVal, EditContext ecTableData) throws DataFormatException
IAlgorithm
object from the
table data in the given EditContext
.
Here we load only the parameters specific to the base class. It is expected
that Subclasses should override this method to recover the data particular
to there own operation.load
in interface IContextAware
load
in class Tracker
strPrimKeyVal
- primary key value specifying the name of the data recordecTableData
- EditContext containing table dataDataFormatException
- bad data format - error in readingIContextAware.load(String, EditContext)
public void load(DataAdaptor daSource)
IArchive
interface.
The superclass load
method is called first, then the properties
particular to EnvTrackerAdapt are loaded.
load
in interface IArchive
load
in class Tracker
daSource
- data source containing state dataIArchive.load(xal.tools.data.DataAdaptor)
public void save(DataAdaptor daSink)
DataAdaptor
interface. Subclasses should
override this method to store the data particular to there own
operation.save
in interface IArchive
save
in class Tracker
daSink
- data source to receive algorithm configurationIArchive.save(xal.tools.data.DataAdaptor)
protected void advanceState(IProbe ifcProbe, IElement ifcElem, double dblLen) throws ModelException
ifcElem
- interface to the beam elementifcProbe
- interface to the probedblLen
- length of element subsection to advance throughModelException
- bad element transfer matrix/corrupt probe state