SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Member Functions | Private Attributes
Beam::BunchData Class Reference

Holds a the underlying phase space vectors that form a Bunch. More...

#include <BunchData.hh>

Public Member Functions

 BunchData ()
 Default constructor, initilizes everything to 0. More...
 
 BunchData (const BunchMap &samples, const BunchMap &errors)
 Map constructor, sets the particle sample from maps. More...
 
 BunchData (const BunchData &bunchdata)
 Copy constructor. More...
 
BunchData & operator= (const BunchData &bunchdata)
 Equality operator. More...
 
 ~BunchData ()
 Destructor. More...
 
const std::vector< double > & operator[] (const std::string &var) const
 Overload the subscript operator, return the samples for the requested variable. More...
 
const Matrix< double > & PhaseSpace () const
 Returns the matrix of transverse samples. More...
 
const Matrix< double > & PhaseSpaceErrors () const
 Returns the matrix of uncertainties on the transverse samples. More...
 
const std::vector< double > & Samples (const std::string var) const
 Returns the array of samples of variable var. More...
 
const std::vector< double > & Errors (const std::string var) const
 Returns the array of uncertainties on the samples of variable var. More...
 
const Matrix< double > & S () const
 Returns one element of the covariance matrix of the bunch. More...
 
const double & S (const std::string vara, const std::string varb) const
 Returns the phase space covariance matrix of the bunch. More...
 
const Matrix< double > & TraceSpace () const
 Returns the matrix of transverse optical samples. More...
 
const Matrix< double > & TraceSpaceErrors () const
 Returns the matrix of uncertainties on the transverse optical samples. More...
 
const std::vector< double > & Opticals (const std::string var) const
 Returns the array of optical samples of variable var. More...
 
const std::vector< double > & OpticalErrors (const std::string var) const
 Returns the array of uncertainties on the optical samples of variable var. More...
 
const Matrix< double > & T () const
 Returns one element of the covariance matrix of the bunch. More...
 
const double & T (const std::string vara, const std::string varb) const
 Returns the phase space covariance matrix of the bunch. More...
 
const size_t Size () const
 Returns the dimension of space in which the bunch lives. More...
 
const std::vector< std::string > & Axes () const
 Returns the list of transverse axes. More...
 
const std::vector< std::string > & Keys () const
 Returns the list of BunchMap dictionary keys. More...
 
const size_t & Id (const std::string &key) const
 Returns the position of the requested key. More...
 
bool Contains (const std::string &var) const
 Checks if the variable is provided. More...
 
void AssertContains (const std::string &var) const
 Checks if the variable is provided, throws if not. More...
 

Private Member Functions

void Initialize (const BunchMap &samples, const BunchMap &errors)
 Normal initializer, sets the particle sample and bunch variables. More...
 

Private Attributes

Matrix< double > _trans
 Transverse phase space. More...
 
Matrix< double > _etrans
 Transverse phase space uncertainties. More...
 
Matrix< double > _S
 Transverse phase space covariance matrix. More...
 
Matrix< double > _opt
 Transverse trace space. More...
 
Matrix< double > _eopt
 Transverse trace space uncertainties. More...
 
Matrix< double > _T
 Transverse trace space covariance matrix. More...
 
std::vector< double > _pz
 Vector of longitudinal momenta. More...
 
std::vector< double > _epz
 Vector of longitudinal momenta uncertainties. More...
 
std::vector< std::string > _axes
 List of transverse axes. More...
 
std::vector< std::string > _keys
 List of transverse variables. More...
 
std::map< std::string, size_t > _ids
 Reciprocal of BunchMap keys, return id of var. More...
 

Detailed Description

Holds a the underlying phase space vectors that form a Bunch.

It stores the array of phase space vectors $(x, p_x, y, p_y, p_z)$ of all the particle that are contained in the bunch.

Constructor & Destructor Documentation

Beam::BunchData::BunchData ( )

Default constructor, initilizes everything to 0.

Beam::BunchData::BunchData ( const BunchMap &  samples,
const BunchMap &  errors 
)

Map constructor, sets the particle sample from maps.

Parameters
samplesDictionary that maps each variable onto a vector of values
errorsDictionary that maps each variable onto a vector of uncertainties
Beam::BunchData::BunchData ( const BunchData &  bunchdata)

Copy constructor.

Beam::BunchData::~BunchData ( )

Destructor.

Member Function Documentation

void Beam::BunchData::AssertContains ( const std::string &  var) const

Checks if the variable is provided, throws if not.

const std::vector<std::string>& Beam::BunchData::Axes ( ) const
inline

Returns the list of transverse axes.

bool Beam::BunchData::Contains ( const std::string &  var) const

Checks if the variable is provided.

const std::vector< double > & Beam::BunchData::Errors ( const std::string  var) const

Returns the array of uncertainties on the samples of variable var.

const size_t& Beam::BunchData::Id ( const std::string &  key) const
inline

Returns the position of the requested key.

void Beam::BunchData::Initialize ( const BunchMap &  samples,
const BunchMap &  errors 
)
private

Normal initializer, sets the particle sample and bunch variables.

Parameters
samplesDictionary that maps each variable onto a vector of values
errorsDictionary that maps each variable onto a vector of errors
const std::vector<std::string>& Beam::BunchData::Keys ( ) const
inline

Returns the list of BunchMap dictionary keys.

BunchData & Beam::BunchData::operator= ( const BunchData &  bunchdata)

Equality operator.

const std::vector<double>& Beam::BunchData::operator[] ( const std::string &  var) const
inline

Overload the subscript operator, return the samples for the requested variable.

const std::vector< double > & Beam::BunchData::OpticalErrors ( const std::string  var) const

Returns the array of uncertainties on the optical samples of variable var.

const std::vector< double > & Beam::BunchData::Opticals ( const std::string  var) const

Returns the array of optical samples of variable var.

const Matrix<double>& Beam::BunchData::PhaseSpace ( ) const
inline

Returns the matrix of transverse samples.

const Matrix<double>& Beam::BunchData::PhaseSpaceErrors ( ) const
inline

Returns the matrix of uncertainties on the transverse samples.

const Matrix<double>& Beam::BunchData::S ( ) const
inline

Returns one element of the covariance matrix of the bunch.

const double & Beam::BunchData::S ( const std::string  vara,
const std::string  varb 
) const

Returns the phase space covariance matrix of the bunch.

const std::vector< double > & Beam::BunchData::Samples ( const std::string  var) const

Returns the array of samples of variable var.

const size_t Beam::BunchData::Size ( ) const
inline

Returns the dimension of space in which the bunch lives.

const Matrix<double>& Beam::BunchData::T ( ) const
inline

Returns one element of the covariance matrix of the bunch.

const double & Beam::BunchData::T ( const std::string  vara,
const std::string  varb 
) const

Returns the phase space covariance matrix of the bunch.

const Matrix<double>& Beam::BunchData::TraceSpace ( ) const
inline

Returns the matrix of transverse optical samples.

const Matrix<double>& Beam::BunchData::TraceSpaceErrors ( ) const
inline

Returns the matrix of uncertainties on the transverse optical samples.

Field Documentation

std::vector<std::string> Beam::BunchData::_axes
private

List of transverse axes.

Matrix<double> Beam::BunchData::_eopt
private

Transverse trace space uncertainties.

std::vector<double> Beam::BunchData::_epz
private

Vector of longitudinal momenta uncertainties.

Matrix<double> Beam::BunchData::_etrans
private

Transverse phase space uncertainties.

std::map<std::string, size_t> Beam::BunchData::_ids
private

Reciprocal of BunchMap keys, return id of var.

std::vector<std::string> Beam::BunchData::_keys
private

List of transverse variables.

Matrix<double> Beam::BunchData::_opt
private

Transverse trace space.

std::vector<double> Beam::BunchData::_pz
private

Vector of longitudinal momenta.

Matrix<double> Beam::BunchData::_S
private

Transverse phase space covariance matrix.

Matrix<double> Beam::BunchData::_T
private

Transverse trace space covariance matrix.

Matrix<double> Beam::BunchData::_trans
private

Transverse phase space.


The documentation for this class was generated from the following files: