LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "GeoTrajectory.h"
Public Member Functions | |
Trajectory (size_t npoints=0, size_t ndimension=0) | |
Default ctor to specify # points and dimension of each point. More... | |
virtual | ~Trajectory () |
Default dtor. More... | |
Trajectory (const std::vector< std::vector< double > > &obj) | |
Alternative ctor (0) using a vector of mere vector point expression. More... | |
Trajectory (const std::vector< geoalgo::Point_t > &obj) | |
Alternative ctor (1) using a vector of point. More... | |
double | Length (size_t start_step=0, size_t end_step=0) const |
The summed-length along all trajectory points. More... | |
bool | IsLonger (double) const |
Check if the trajectory is longer than specified value. More... | |
Vector | Dir (size_t i=0) const |
The direction at a specified trajectory point. More... | |
void | push_back (const Point_t &obj) |
push_back overrie w/ dimensionality check More... | |
Trajectory & | operator+= (const Point_t &rhs) |
void | compat (const Point_t &obj) const |
Dimensionality check function w/ Trajectory. More... | |
void | compat (const Trajectory &obj) const |
Dimensionality check function w/ Point_t. More... | |
template<class T > | |
void | push_back (const T &obj) |
push_back template More... | |
Public Attributes | |
T | elements |
STL member. More... | |
Protected Member Functions | |
Vector | _Dir_ (size_t i) const |
Returns a direction vector at a specified trajectory point w/o size check. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, Trajectory const &a) |
Streamer. More... | |
This class represents a trajectory which is an ordered list of Point. It is a friend class w/ geoalgo::Point_t hence it has an access to protected functions that avoids dimensionality sanity checks for speed.
Definition at line 27 of file GeoTrajectory.h.
geoalgo::Trajectory::Trajectory | ( | size_t | npoints = 0 , |
size_t | ndimension = 0 |
||
) |
Default ctor to specify # points and dimension of each point.
Definition at line 8 of file GeoTrajectory.cxx.
Referenced by ~Trajectory().
|
inlinevirtual |
Default dtor.
Definition at line 35 of file GeoTrajectory.h.
References Dir(), IsLonger(), Length(), push_back(), Trajectory(), and lar::dump::vector().
geoalgo::Trajectory::Trajectory | ( | const std::vector< std::vector< double > > & | obj | ) |
Alternative ctor (0) using a vector of mere vector point expression.
Definition at line 12 of file GeoTrajectory.cxx.
References push_back().
geoalgo::Trajectory::Trajectory | ( | const std::vector< geoalgo::Point_t > & | obj | ) |
Alternative ctor (1) using a vector of point.
Definition at line 18 of file GeoTrajectory.cxx.
References push_back().
|
protected |
Returns a direction vector at a specified trajectory point w/o size check.
Definition at line 104 of file GeoTrajectory.cxx.
Referenced by Dir(), and operator+=().
void geoalgo::Trajectory::compat | ( | const Point_t & | obj | ) | const |
Dimensionality check function w/ Trajectory.
Definition at line 65 of file GeoTrajectory.cxx.
References evd::details::begin().
Referenced by geoalgo::GeoAlgo::ClosestPt(), geoalgo::GeoAlgo::commonOrigin(), geoalgo::GeoAlgo::Intersection(), operator+=(), push_back(), and geoalgo::GeoAlgo::SqDist().
void geoalgo::Trajectory::compat | ( | const Trajectory & | obj | ) | const |
Dimensionality check function w/ Point_t.
Definition at line 78 of file GeoTrajectory.cxx.
References evd::details::begin().
Vector geoalgo::Trajectory::Dir | ( | size_t | i = 0 | ) | const |
The direction at a specified trajectory point.
Definition at line 93 of file GeoTrajectory.cxx.
References _Dir_().
Referenced by ~Trajectory().
bool geoalgo::Trajectory::IsLonger | ( | double | ref | ) | const |
Check if the trajectory is longer than specified value.
Definition at line 44 of file GeoTrajectory.cxx.
Referenced by ~Trajectory().
double geoalgo::Trajectory::Length | ( | size_t | start_step = 0 , |
size_t | end_step = 0 |
||
) | const |
The summed-length along all trajectory points.
Definition at line 24 of file GeoTrajectory.cxx.
Referenced by ~Trajectory().
|
inline |
Definition at line 55 of file GeoTrajectory.h.
References _Dir_(), compat(), and push_back().
void geoalgo::Trajectory::push_back | ( | const Point_t & | obj | ) |
push_back overrie w/ dimensionality check
Definition at line 59 of file GeoTrajectory.cxx.
References compat().
Referenced by operator+=(), push_back(), Trajectory(), and ~Trajectory().
|
inline |
push_back template
Definition at line 76 of file GeoTrajectory.h.
References pt, and push_back().
|
friend |
Streamer.
Definition at line 83 of file GeoTrajectory.h.
|
inherited |
STL member.