Class describing a generic position vector (point) in 3 dimensions.
Class describing a 3D Position vector.
This class is templated on the type of Coordinate system. One example is the XYZPoint which is a vector based on double precision x,y,z data members by using the ROOT::Math::Cartesian3D<double> Coordinate system. The class is having also an extra template parameter, the coordinate system tag, to be able to identify (tag) vector described in different reference coordinate system, like global or local coordinate systems.
Definition at line 59 of file PositionVector3D.h.
Public Types | |
typedef Tag | CoordinateSystemTag |
typedef CoordSystem | CoordinateType |
typedef CoordSystem::Scalar | Scalar |
Public Member Functions | |
constexpr | PositionVector3D () noexcept=default |
Default constructor. | |
template<class T > | |
PositionVector3D (const DisplacementVector3D< T, Tag > &p) | |
Construct from an arbitrary displacement vector. | |
template<class ForeignVector > | |
PositionVector3D (const ForeignVector &v) | |
Construct from a foreign 3D vector type, for example, Hep3Vector Precondition: v must implement methods x(), y() and z() | |
template<class T > | |
PositionVector3D (const PositionVector3D< T, Tag > &v) | |
Construct from a position vector expressed in different coordinates, or using a different Scalar type. | |
constexpr | PositionVector3D (const Scalar &a, const Scalar &b, const Scalar &c) noexcept |
Construct from three values of type Scalar. | |
const CoordSystem & | Coordinates () const |
Retrieve a copy of the coordinates object. | |
template<class OtherCoords > | |
PositionVector3D | Cross (const DisplacementVector3D< OtherCoords, Tag > &v) const |
Return vector (Cross) product of this point with a displacement, as a point vector in this coordinate system of the first. | |
template<class OtherCoords > | |
Scalar | Dot (const DisplacementVector3D< OtherCoords, Tag > &v) const |
Return the scalar (Dot) product of this with a displacement vector in any coordinate system, but with the same tag. | |
Scalar | Eta () const |
Polar eta, converting if necessary from internal coordinate system. | |
Scalar | eta () const |
template<class IT > | |
void | GetCoordinates (IT begin) const |
get internal data into 3 Scalars at *begin | |
template<class IT > | |
void | GetCoordinates (IT begin, IT end) const |
get internal data into 3 Scalars at *begin to *end (3 past begin) | |
void | GetCoordinates (Scalar &a, Scalar &b, Scalar &c) const |
get internal data into 3 Scalar numbers | |
void | GetCoordinates (Scalar dest[]) const |
get internal data into a C-style array of 3 Scalar numbers | |
Scalar | Mag2 () const |
Magnitute squared ( r^2 in spherical coordinate) | |
Scalar | mag2 () const |
bool | operator!= (const PositionVector3D &rhs) const |
PositionVector3D | operator* (Scalar a) const |
Multiply a vector by a real number. | |
PositionVector3D & | operator*= (Scalar a) |
multiply this vector by a scalar quantity | |
template<class OtherCoords > | |
PositionVector3D & | operator+= (const DisplacementVector3D< OtherCoords, Tag > &v) |
Self Addition with a displacement vector. | |
template<class OtherCoords > | |
PositionVector3D & | operator-= (const DisplacementVector3D< OtherCoords, Tag > &v) |
Self Difference with a displacement vector. | |
PositionVector3D | operator/ (Scalar a) const |
Division of a vector with a real number. | |
PositionVector3D & | operator/= (Scalar a) |
divide this vector by a scalar quantity | |
template<class OtherCoords > | |
PositionVector3D & | operator= (const DisplacementVector3D< OtherCoords, Tag > &v) |
Assignment operator from a displacement vector of arbitrary type. | |
template<class ForeignVector > | |
PositionVector3D & | operator= (const ForeignVector &v) |
Assignment from a foreign 3D vector type, for example, Hep3Vector Precondition: v must implement methods x(), y() and z() | |
template<class OtherCoords > | |
PositionVector3D & | operator= (const PositionVector3D< OtherCoords, Tag > &v) |
Assignment operator from a position vector of arbitrary type. | |
bool | operator== (const PositionVector3D &rhs) const |
Exact equality. | |
Scalar | Perp2 () const |
Transverse component squared (rho^2 in cylindrical coordinates. | |
Scalar | perp2 () const |
Scalar | Phi () const |
Polar phi, converting if necessary from internal coordinate system. | |
Scalar | phi () const |
Scalar | R () const |
Polar R, converting if necessary from internal coordinate system. | |
Scalar | r () const |
Scalar | Rho () const |
Cylindrical transverse component rho. | |
Scalar | rho () const |
PositionVector3D< CoordSystem, Tag > & | SetCoordinates (const Scalar src[]) |
Set internal data based on a C-style array of 3 Scalar numbers. | |
template<class IT > | |
PositionVector3D< CoordSystem, Tag > & | SetCoordinates (IT begin, IT end) |
Set internal data based on 3 Scalars at *begin to *end. | |
PositionVector3D< CoordSystem, Tag > & | SetCoordinates (Scalar a, Scalar b, Scalar c) |
Set internal data based on 3 Scalar numbers. | |
PositionVector3D< CoordSystem, Tag > & | SetEta (Scalar etaval) |
Change Eta - CylindricalEta3D coordinates only. | |
PositionVector3D< CoordSystem, Tag > & | SetPhi (Scalar ang) |
Change Phi - Polar3D or CylindricalEta3D coordinates. | |
PositionVector3D< CoordSystem, Tag > & | SetR (Scalar rr) |
Change R - Polar3D coordinates only. | |
PositionVector3D< CoordSystem, Tag > & | SetRho (Scalar rr) |
Change Rho - CylindricalEta3D coordinates only. | |
PositionVector3D< CoordSystem, Tag > & | SetTheta (Scalar ang) |
Change Theta - Polar3D coordinates only. | |
PositionVector3D< CoordSystem, Tag > & | SetX (Scalar xx) |
Change X - Cartesian3D coordinates only. | |
PositionVector3D< CoordSystem, Tag > & | SetXYZ (Scalar a, Scalar b, Scalar c) |
set the values of the vector from the cartesian components (x,y,z) (if the vector is held in polar or cylindrical eta coordinates, then (x, y, z) are converted to that form) | |
PositionVector3D< CoordSystem, Tag > & | SetY (Scalar yy) |
Change Y - Cartesian3D coordinates only. | |
PositionVector3D< CoordSystem, Tag > & | SetZ (Scalar zz) |
Change Z - Cartesian3D coordinates only. | |
Scalar | Theta () const |
Polar theta, converting if necessary from internal coordinate system. | |
Scalar | theta () const |
Scalar | X () const |
Cartesian X, converting if necessary from internal coordinate system. | |
Scalar | x () const |
Scalar | Y () const |
Cartesian Y, converting if necessary from internal coordinate system. | |
Scalar | y () const |
Scalar | Z () const |
Cartesian Z, converting if necessary from internal coordinate system. | |
Scalar | z () const |
Private Member Functions | |
template<class OtherCoords , class OtherTag > | |
PositionVector3D (const DisplacementVector3D< OtherCoords, OtherTag > &) | |
template<class OtherCoords , class OtherTag > | |
PositionVector3D (const PositionVector3D< OtherCoords, OtherTag > &) | |
template<class OtherCoords , class OtherTag > | |
PositionVector3D & | operator+= (const DisplacementVector3D< OtherCoords, OtherTag > &) |
template<class OtherCoords , class OtherTag > | |
PositionVector3D & | operator-= (const DisplacementVector3D< OtherCoords, OtherTag > &) |
template<class OtherCoords , class OtherTag > | |
PositionVector3D & | operator= (const DisplacementVector3D< OtherCoords, OtherTag > &) |
template<class OtherCoords , class OtherTag > | |
PositionVector3D & | operator= (const PositionVector3D< OtherCoords, OtherTag > &) |
Private Attributes | |
CoordSystem | fCoordinates |
#include <MathX/GenVectorX/PositionVector3D.h>
typedef Tag ROOT::ROOT_MATH_ARCH::PositionVector3D< CoordSystem, Tag >::CoordinateSystemTag |
Definition at line 64 of file PositionVector3D.h.
typedef CoordSystem ROOT::ROOT_MATH_ARCH::PositionVector3D< CoordSystem, Tag >::CoordinateType |
Definition at line 63 of file PositionVector3D.h.
typedef CoordSystem::Scalar ROOT::ROOT_MATH_ARCH::PositionVector3D< CoordSystem, Tag >::Scalar |
Definition at line 62 of file PositionVector3D.h.
|
constexprdefaultnoexcept |
Default constructor.
Construct an empty object with zero values
|
inlineconstexprnoexcept |
Construct from three values of type Scalar.
In the case of a XYZPoint the values are x,y,z In the case of a polar vector they are r,theta,phi
Definition at line 79 of file PositionVector3D.h.
|
inlineexplicit |
Construct from a position vector expressed in different coordinates, or using a different Scalar type.
Definition at line 86 of file PositionVector3D.h.
|
inlineexplicit |
Construct from an arbitrary displacement vector.
Definition at line 94 of file PositionVector3D.h.
|
inlineexplicit |
Construct from a foreign 3D vector type, for example, Hep3Vector Precondition: v must implement methods x(), y() and z()
Definition at line 103 of file PositionVector3D.h.
|
explicitprivate |
|
explicitprivate |
|
inline |
Retrieve a copy of the coordinates object.
Definition at line 178 of file PositionVector3D.h.
|
inline |
Return vector (Cross) product of this point with a displacement, as a point vector in this coordinate system of the first.
Definition at line 420 of file PositionVector3D.h.
|
inline |
Return the scalar (Dot) product of this with a displacement vector in any coordinate system, but with the same tag.
Definition at line 410 of file PositionVector3D.h.
|
inline |
Polar eta, converting if necessary from internal coordinate system.
Definition at line 306 of file PositionVector3D.h.
|
inline |
Definition at line 501 of file PositionVector3D.h.
|
inline |
get internal data into 3 Scalars at *begin
Definition at line 241 of file PositionVector3D.h.
|
inline |
get internal data into 3 Scalars at *begin to *end (3 past begin)
Definition at line 227 of file PositionVector3D.h.
|
inline |
get internal data into 3 Scalar numbers
Definition at line 216 of file PositionVector3D.h.
|
inline |
get internal data into a C-style array of 3 Scalar numbers
Definition at line 221 of file PositionVector3D.h.
|
inline |
Magnitute squared ( r^2 in spherical coordinate)
Definition at line 318 of file PositionVector3D.h.
|
inline |
Definition at line 503 of file PositionVector3D.h.
|
inline |
Definition at line 269 of file PositionVector3D.h.
|
inline |
Multiply a vector by a real number.
Definition at line 476 of file PositionVector3D.h.
|
inline |
multiply this vector by a scalar quantity
Definition at line 456 of file PositionVector3D.h.
|
private |
|
inline |
Self Addition with a displacement vector.
Definition at line 437 of file PositionVector3D.h.
|
private |
|
inline |
Self Difference with a displacement vector.
Definition at line 447 of file PositionVector3D.h.
|
inline |
Division of a vector with a real number.
Definition at line 486 of file PositionVector3D.h.
|
inline |
divide this vector by a scalar quantity
Definition at line 465 of file PositionVector3D.h.
|
private |
|
inline |
Assignment operator from a displacement vector of arbitrary type.
Definition at line 141 of file PositionVector3D.h.
|
inline |
Assignment from a foreign 3D vector type, for example, Hep3Vector Precondition: v must implement methods x(), y() and z()
Definition at line 152 of file PositionVector3D.h.
|
private |
|
inline |
Assignment operator from a position vector of arbitrary type.
Definition at line 131 of file PositionVector3D.h.
|
inline |
Exact equality.
Definition at line 268 of file PositionVector3D.h.
|
inline |
Transverse component squared (rho^2 in cylindrical coordinates.
Definition at line 323 of file PositionVector3D.h.
|
inline |
Definition at line 504 of file PositionVector3D.h.
|
inline |
Polar phi, converting if necessary from internal coordinate system.
Definition at line 301 of file PositionVector3D.h.
|
inline |
Definition at line 500 of file PositionVector3D.h.
|
inline |
Polar R, converting if necessary from internal coordinate system.
Definition at line 291 of file PositionVector3D.h.
|
inline |
Definition at line 498 of file PositionVector3D.h.
|
inline |
Cylindrical transverse component rho.
Definition at line 311 of file PositionVector3D.h.
|
inline |
Definition at line 502 of file PositionVector3D.h.
|
inline |
Set internal data based on a C-style array of 3 Scalar numbers.
Definition at line 183 of file PositionVector3D.h.
|
inline |
Set internal data based on 3 Scalars at *begin to *end.
Definition at line 202 of file PositionVector3D.h.
|
inline |
Set internal data based on 3 Scalar numbers.
Definition at line 192 of file PositionVector3D.h.
|
inline |
Change Eta - CylindricalEta3D coordinates only.
Definition at line 396 of file PositionVector3D.h.
|
inline |
Change Phi - Polar3D or CylindricalEta3D coordinates.
Definition at line 378 of file PositionVector3D.h.
|
inline |
Change R - Polar3D coordinates only.
Definition at line 360 of file PositionVector3D.h.
|
inline |
Change Rho - CylindricalEta3D coordinates only.
Definition at line 387 of file PositionVector3D.h.
|
inline |
Change Theta - Polar3D coordinates only.
Definition at line 369 of file PositionVector3D.h.
|
inline |
Change X - Cartesian3D coordinates only.
Definition at line 333 of file PositionVector3D.h.
|
inline |
set the values of the vector from the cartesian components (x,y,z) (if the vector is held in polar or cylindrical eta coordinates, then (x, y, z) are converted to that form)
Definition at line 257 of file PositionVector3D.h.
|
inline |
Change Y - Cartesian3D coordinates only.
Definition at line 342 of file PositionVector3D.h.
|
inline |
Change Z - Cartesian3D coordinates only.
Definition at line 351 of file PositionVector3D.h.
|
inline |
Polar theta, converting if necessary from internal coordinate system.
Definition at line 296 of file PositionVector3D.h.
|
inline |
Definition at line 499 of file PositionVector3D.h.
|
inline |
Cartesian X, converting if necessary from internal coordinate system.
Definition at line 276 of file PositionVector3D.h.
|
inline |
Definition at line 495 of file PositionVector3D.h.
|
inline |
Cartesian Y, converting if necessary from internal coordinate system.
Definition at line 281 of file PositionVector3D.h.
|
inline |
Definition at line 496 of file PositionVector3D.h.
|
inline |
Cartesian Z, converting if necessary from internal coordinate system.
Definition at line 286 of file PositionVector3D.h.
|
inline |
Definition at line 497 of file PositionVector3D.h.
|
private |
Definition at line 507 of file PositionVector3D.h.