#include <GeoVector.h>
Public Member Functions | |
Vector () | |
Default ctor. More... | |
Vector (size_t n) | |
Ctor to instantiate with invalid value. More... | |
Vector (const std::vector< double > &obj) | |
Default ctor w/ a bare std::vector<double> More... | |
Vector (const double x, const double y) | |
ctor w/ x & y More... | |
Vector (const double x, const double y, const double z) | |
ctor w/ x, y & z More... | |
Vector (const TVector3 &pt) | |
ctor w/ TVector3 More... | |
Vector (const TLorentzVector &pt) | |
ctor w/ TLorentzVector More... | |
void | Normalize () |
Normalize itself. More... | |
bool | IsValid () const |
Check if point is valid. More... | |
double | SqLength () const |
Compute the squared length of the vector. More... | |
double | Length () const |
Compute the length of the vector. More... | |
Vector | Dir () const |
Return a direction unit vector. More... | |
double | Phi () const |
Compute the angle Phi. More... | |
double | Theta () const |
Compute the angle theta. More... | |
double | SqDist (const Vector &obj) const |
Compute the squared distance to another vector. More... | |
double | Dist (const Vector &obj) const |
Compute the distance to another vector. More... | |
double | Dot (const Vector &obj) const |
Vector | Cross (const Vector &obj) const |
Compute a dot product of two vectors. More... | |
double | Angle (const Vector &obj) const |
Compute a cross product of two vectors. More... | |
TLorentzVector | ToTLorentzVector () const |
Compute an opening angle w.r.t. the given vector. More... | |
void | compat (const Vector &obj) const |
Dimensional check for a compatibility. More... | |
void | RotateX (const double &theta) |
rotation operations More... | |
void | RotateY (const double &theta) |
void | RotateZ (const double &theta) |
Vector & | operator+= (const Vector &rhs) |
Vector & | operator-= (const Vector &rhs) |
Vector & | operator*= (const double rhs) |
Vector & | operator/= (const double rhs) |
Vector & | operator= (const Vector &rhs) |
Vector | operator+ (const Vector &rhs) const |
Vector | operator- (const Vector &rhs) const |
double | operator* (const Vector &rhs) const |
Vector | operator* (const double &rhs) const |
Vector | operator/ (const double &rhs) const |
bool | operator< (const Vector &rhs) const |
bool | operator< (const double &rhs) const |
bool | operator== (const Vector &rhs) const |
bool | operator!= (const Vector &rhs) const |
Protected Member Functions | |
double | _SqDist_ (const Vector &obj) const |
Compute the squared-distance to another vector w/o dimension check. More... | |
double | _Dist_ (const Vector &obj) const |
Compute the distance to another vector w/o dimension check. More... | |
double | _Dot_ (const Vector &obj) const |
Compute a dot product w/o dimention check. More... | |
Vector | _Cross_ (const Vector &obj) const |
Compute a cross product w/o dimension check. More... | |
double | _Angle_ (const Vector &obj) const |
Compute the angle in degrees between 2 vectors w/o dimension check. More... | |
Friends | |
class | Trajectory |
class | HalfLine |
class | LineSegment |
class | Sphere |
class | GeoAlgo |
std::ostream & | operator<< (std::ostream &o,::geoalgo::Vector const &a) |
Streamer. More... | |
This class represents an n-dimensional vector
Definition at line 33 of file GeoVector.h.
|
inline |
|
inline |
|
inline |
Default ctor w/ a bare std::vector<double>
Definition at line 49 of file GeoVector.h.
geoalgo::Vector::Vector | ( | const double | x, |
const double | y | ||
) |
geoalgo::Vector::Vector | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
geoalgo::Vector::Vector | ( | const TVector3 & | pt | ) |
geoalgo::Vector::Vector | ( | const TLorentzVector & | pt | ) |
|
protected |
Compute the angle in degrees between 2 vectors w/o dimension check.
Definition at line 130 of file GeoVector.cxx.
Compute a cross product w/o dimension check.
Definition at line 121 of file GeoVector.cxx.
|
protected |
Compute the distance to another vector w/o dimension check.
Definition at line 115 of file GeoVector.cxx.
|
protected |
Compute a dot product w/o dimention check.
Definition at line 118 of file GeoVector.cxx.
|
protected |
Compute the squared-distance to another vector w/o dimension check.
Definition at line 108 of file GeoVector.cxx.
double geoalgo::Vector::Angle | ( | const Vector & | obj | ) | const |
Compute a cross product of two vectors.
Definition at line 76 of file GeoVector.cxx.
void geoalgo::Vector::compat | ( | const Vector & | obj | ) | const |
Dimensional check for a compatibility.
Definition at line 97 of file GeoVector.cxx.
Compute a dot product of two vectors.
Definition at line 56 of file GeoVector.cxx.
Vector geoalgo::Vector::Dir | ( | ) | const |
Return a direction unit vector.
Definition at line 91 of file GeoVector.cxx.
double geoalgo::Vector::Dist | ( | const Vector & | obj | ) | const |
Compute the distance to another vector.
Definition at line 48 of file GeoVector.cxx.
double geoalgo::Vector::Dot | ( | const Vector & | obj | ) | const |
Definition at line 51 of file GeoVector.cxx.
bool geoalgo::Vector::IsValid | ( | ) | const |
double geoalgo::Vector::Length | ( | ) | const |
Compute the length of the vector.
Definition at line 40 of file GeoVector.cxx.
void geoalgo::Vector::Normalize | ( | ) |
Normalize itself.
Definition at line 89 of file GeoVector.cxx.
Definition at line 180 of file GeoVector.h.
|
inline |
Definition at line 140 of file GeoVector.h.
|
inline |
Definition at line 147 of file GeoVector.h.
|
inline |
Definition at line 110 of file GeoVector.h.
Definition at line 126 of file GeoVector.h.
Definition at line 100 of file GeoVector.h.
Definition at line 133 of file GeoVector.h.
Definition at line 105 of file GeoVector.h.
|
inline |
Definition at line 154 of file GeoVector.h.
|
inline |
Definition at line 115 of file GeoVector.h.
Definition at line 161 of file GeoVector.h.
|
inline |
Definition at line 169 of file GeoVector.h.
Definition at line 120 of file GeoVector.h.
Definition at line 172 of file GeoVector.h.
double geoalgo::Vector::Phi | ( | ) | const |
Compute the angle Phi.
Definition at line 65 of file GeoVector.cxx.
void geoalgo::Vector::RotateX | ( | const double & | theta | ) |
void geoalgo::Vector::RotateY | ( | const double & | theta | ) |
Definition at line 150 of file GeoVector.cxx.
void geoalgo::Vector::RotateZ | ( | const double & | theta | ) |
Definition at line 166 of file GeoVector.cxx.
double geoalgo::Vector::SqDist | ( | const Vector & | obj | ) | const |
Compute the squared distance to another vector.
Definition at line 43 of file GeoVector.cxx.
double geoalgo::Vector::SqLength | ( | ) | const |
Compute the squared length of the vector.
Definition at line 34 of file GeoVector.cxx.
double geoalgo::Vector::Theta | ( | ) | const |
Compute the angle theta.
Definition at line 69 of file GeoVector.cxx.
TLorentzVector geoalgo::Vector::ToTLorentzVector | ( | ) | const |
Compute an opening angle w.r.t. the given vector.
Convert geovector to TLorentzVector (with 4th element set equal to 0)
Definition at line 83 of file GeoVector.cxx.
|
friend |
Definition at line 38 of file GeoVector.h.
|
friend |
Definition at line 35 of file GeoVector.h.
|
friend |
Definition at line 36 of file GeoVector.h.
|
friend |
|
friend |
Definition at line 37 of file GeoVector.h.
|
friend |
Definition at line 34 of file GeoVector.h.