Particle Identification and Tracking
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
tracking::Accum_sofq Class Reference

s(|q|) computation. More...

#include <accum_sofq.h>

+ Inheritance diagram for tracking::Accum_sofq:
+ Collaboration diagram for tracking::Accum_sofq:

Public Member Functions

void add_particle (const particle *)
 Adds a particle. More...
 
void out_to_wrapper (utilities::Generic_wrapper &, const utilities::Md_store &md_store) const
 outputs the result of the computation to the wrapper More...
 
 Accum_sofq (const utilities::Tuple< float, 2 > &q_range, utilities::Tuplef q, const int n_bins)
 constructor,will gain arguments More...
 
 ~Accum_sofq ()
 
void get_magnitude_sqr (std::vector< float > &out) const
 Returns an array with the magnitudes of the complex s(q) values. More...
 
void display () const
 Plots to screen using gnuplot. More...
 
void get_q_vec (std::vector< float > &out) const
 Fills a vector with the q values used. More...
 
int get_n_bins () const
 

Private Attributes

const unsigned int n_bins_
 number of bins More...
 
const utilities::Tuple< float, 2 > q_range_
 range More...
 
const float q_step_
 Spacing of evaluation points in reciprocal space. More...
 
const utilities::Tuplef q_
 direction in reciprocal space to evaluate along. More...
 
std::vector< std::complex
< float > > 
s_of_q_
 vector to hold the values More...
 
int parts_added_
 count of the number of particles added More...
 
std::string units_
 the units of q More...
 

Static Private Attributes

static const std::complex< float > i_ = complex<float>(0,1)
 $i$ More...
 
static const float pi_ = 4.0*atan(1.0)
 $\pi$ More...
 

Detailed Description

s(|q|) computation.

This takes in a specific direction in reciprocal space and computes s(|q|) along that direction. If the assumption that the particles have no preferred direction holds, then this saves a lot of computation time.

Constructor & Destructor Documentation

Accum_sofq::Accum_sofq ( const utilities::Tuple< float, 2 > &  q_range,
utilities::Tuplef  q,
const int  n_bins 
)

constructor,will gain arguments

Parameters
[in]q_rangePair with the min and max $|\vec{q}|$
[in]qthe direction $\hat{q}$ to take s(q) along, does not need to be a unit vector
[in]n_binsthe number of bins to use
Accum_sofq::~Accum_sofq ( )

Member Function Documentation

void Accum_sofq::add_particle ( const particle )
virtual

Adds a particle.

The sub class determines what is computed from the particle.

Implements tracking::Accumulator.

References tracking::particle_base::get_position(), i_, n_bins_, parts_added_, pi_, q_, q_range_, q_step_, and s_of_q_.

void Accum_sofq::display ( ) const

Plots to screen using gnuplot.

References get_magnitude_sqr(), get_q_vec(), n_bins_, and parts_added_.

Referenced by main().

void Accum_sofq::get_magnitude_sqr ( std::vector< float > &  out) const

Returns an array with the magnitudes of the complex s(q) values.

Parameters
[out]outvector of $|s(q)|^2|$. Vector will be re-sized if needed

References n_bins_, parts_added_, and s_of_q_.

Referenced by display(), and out_to_wrapper().

int tracking::Accum_sofq::get_n_bins ( ) const
inline

References n_bins_.

void Accum_sofq::get_q_vec ( std::vector< float > &  out) const

Fills a vector with the q values used.

Out is cleared and resized as needed.

Parameters
[out]outvector of q values

References n_bins_, q_range_, and q_step_.

Referenced by display(), and out_to_wrapper().

void Accum_sofq::out_to_wrapper ( utilities::Generic_wrapper ,
const utilities::Md_store md_store 
) const
virtual

Member Data Documentation

const std::complex< float > Accum_sofq::i_ = complex<float>(0,1)
staticprivate

$i$

Referenced by add_particle().

const unsigned int tracking::Accum_sofq::n_bins_
private
int tracking::Accum_sofq::parts_added_
private

count of the number of particles added

Referenced by add_particle(), display(), and get_magnitude_sqr().

const float Accum_sofq::pi_ = 4.0*atan(1.0)
staticprivate

$\pi$

Referenced by add_particle().

const utilities::Tuplef tracking::Accum_sofq::q_
private

direction in reciprocal space to evaluate along.

Referenced by add_particle(), and out_to_wrapper().

const utilities::Tuple<float,2> tracking::Accum_sofq::q_range_
private

range

Referenced by add_particle(), and get_q_vec().

const float tracking::Accum_sofq::q_step_
private

Spacing of evaluation points in reciprocal space.

Referenced by add_particle(), and get_q_vec().

std::vector<std::complex<float> > tracking::Accum_sofq::s_of_q_
private

vector to hold the values

Referenced by add_particle(), and get_magnitude_sqr().

std::string tracking::Accum_sofq::units_
private

the units of q


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