An Element which propagates the statistical moments of a bunch. More...
#include <moment.h>
Public Types | |
typedef MomentState | state_t |
typedef state_t::matrix_t | value_t |
Public Member Functions | |
MomentElementBase (const Config &c) | |
void | get_misalign (const state_t &ST, const Particle &real, value_t &M, value_t &IM) const |
virtual void | advance (StateBase &s) |
Propogate the given State through this Element. | |
virtual bool | check_cache (const state_t &S) const |
void | resize_cache (const state_t &ST) |
virtual void | recompute_matrix (state_t &ST) |
recalculate 'transfer' taking into consideration the provided input state | |
virtual void | show (std::ostream &strm, int level) const |
virtual void | assign (const ElementVoid *other)=0 |
Public Member Functions inherited from ElementVoid | |
ElementVoid (const Config &conf) | |
Construct this element using the provided Config. More... | |
virtual const char * | type_name () const =0 |
const Config & | conf () const |
The Config used to construct this element. | |
Observer * | observer () const |
The current observer, or NULL. | |
void | set_observer (Observer *o) |
Public Attributes | |
Particle | last_ref_in |
Particle | last_ref_out |
std::vector< Particle > | last_real_in |
std::vector< Particle > | last_real_out |
std::vector< value_t > | transfer |
final transfer matricies | |
std::vector< value_t > | misalign |
std::vector< value_t > | misalign_inv |
double | dx |
constituents of misalign | |
double | dy |
double | pitch |
double | yaw |
double | roll |
bool | skipcache |
If set, check_cache() will always return false. | |
Public Attributes inherited from ElementVoid | |
const std::string | name |
Name of this element (unique in its Machine) | |
const size_t | index |
Index of this element (unique in its Machine) | |
double | length |
Longitudual length of this element (added to StateBase::pos) | |
Protected Attributes | |
state_t::matrix_t | scratch |
An Element which propagates the statistical moments of a bunch.
|
pure virtual |
Used by Machine::reconfigure() to avoid re-alloc (and iterator invalidation) Assumes other has the same type. Sub-classes must call base class assign() Come c++11 this can be replaced with a move ctor.
Implements ElementVoid.
Definition at line 511 of file moment.cpp.
|
virtual |
Return true if previously calculated 'transfer' matricies may be reused Should compare new input state against values used when 'transfer' was last computed
Definition at line 627 of file moment.cpp.
void MomentElementBase::resize_cache | ( | const state_t & | ST | ) |
Helper to resize our std::vector s to match the # of charge states in the provided new input state.
Definition at line 637 of file moment.cpp.
|
virtual |
Print information about the element. level is a hint as to the verbosity expected by the caller.
Reimplemented from ElementVoid.
Definition at line 530 of file moment.cpp.