![]() |
![]() |
#include <Basic3DVectorLD.h>
Public Types | |
typedef Geom::Cylindrical2Cartesian< T > | Cylindrical |
typedef Spherical | Polar |
typedef T | ScalarType |
typedef Geom::Spherical2Cartesian< T > | Spherical |
typedef long double | T |
Public Member Functions | |
T | barePhi () const |
T | bareTheta () const |
Basic3DVector (const Basic3DVector &p) | |
Copy constructor from same type. Should not be needed but for gcc bug 12685. | |
template<typename U > | |
Basic3DVector (const Geom::Theta< U > &theta, const Geom::Phi< U > &phi, const T &r) | |
Basic3DVector (const Basic2DVector< T > &p) | |
constructor from 2D vector (X and Y from 2D vector, z set to zero) | |
Basic3DVector () | |
template<class OtherPoint > | |
Basic3DVector (const OtherPoint &p) | |
template<class U > | |
Basic3DVector (const Basic3DVector< U > &p) | |
Copy constructor and implicit conversion from Basic3DVector of different precision. | |
template<typename U > | |
Basic3DVector (mathSSE::Vec4< U > const &iv) | |
Basic3DVector (const T &x, const T &y, const T &z) | |
construct from cartesian coordinates | |
template<class U > | |
Basic3DVector< typename PreciseFloatType< T, U >::Type > | cross (const Basic3DVector< U > &v) const |
Basic3DVector | cross (const Basic3DVector &v) const |
Vector product, or "cross" product, with a vector of same type. | |
template<class U > | |
PreciseFloatType< T, U >::Type | dot (const Basic3DVector< U > &v) const |
T | dot (const Basic3DVector &v) const |
Scalar product, or "dot" product, with a vector of same type. | |
T | eta () const |
T | mag () const |
The vector magnitude. Equivalent to sqrt(vec.mag2()) | |
T | mag2 () const |
The vector magnitude squared. Equivalent to vec.dot(vec) | |
Basic3DVector & | operator*= (T t) |
Scaling by a scalar value (multiplication) | |
template<class U > | |
Basic3DVector & | operator+= (const Basic3DVector< U > &p) |
Basic3DVector | operator- () const |
Unary minus, returns a vector with components (-x(),-y(),-z()) | |
template<class U > | |
Basic3DVector & | operator-= (const Basic3DVector< U > &p) |
Basic3DVector & | operator/= (T t) |
Scaling by a scalar value (division) | |
bool | operator== (const Basic3DVector &rh) const |
T | perp () const |
Magnitude of transverse component. | |
T | perp2 () const |
Squared magnitude of transverse component. | |
Geom::Phi< T > | phi () const |
Geom::Theta< T > | theta () const |
T | transverse () const |
Another name for perp() | |
Basic3DVector | unit () const |
T | x () const |
Cartesian x coordinate. | |
Basic2DVector< T > | xy () const |
T | y () const |
Cartesian y coordinate. | |
T | z () const |
Cartesian z coordinate. | |
Private Attributes | |
T | theW |
T | theX |
T | theY |
T | theZ |
Definition at line 7 of file Basic3DVectorLD.h.
typedef Geom::Cylindrical2Cartesian<T> Basic3DVector< long double >::Cylindrical |
Definition at line 11 of file Basic3DVectorLD.h.
typedef Spherical Basic3DVector< long double >::Polar |
Definition at line 13 of file Basic3DVectorLD.h.
typedef T Basic3DVector< long double >::ScalarType |
Definition at line 10 of file Basic3DVectorLD.h.
typedef Geom::Spherical2Cartesian<T> Basic3DVector< long double >::Spherical |
Definition at line 12 of file Basic3DVectorLD.h.
typedef long double Basic3DVector< long double >::T |
Definition at line 9 of file Basic3DVectorLD.h.
Basic3DVector< long double >::Basic3DVector | ( | ) | [inline] |
Basic3DVector< long double >::Basic3DVector | ( | const Basic3DVector< long double > & | p | ) | [inline] |
Basic3DVector< long double >::Basic3DVector | ( | const Basic3DVector< U > & | p | ) | [inline] |
Copy constructor and implicit conversion from Basic3DVector of different precision.
Definition at line 27 of file Basic3DVectorLD.h.
Basic3DVector< long double >::Basic3DVector | ( | const Basic2DVector< T > & | p | ) | [inline] |
Basic3DVector< long double >::Basic3DVector | ( | const OtherPoint & | p | ) | [inline, explicit] |
Explicit constructor from other (possibly unrelated) vector classes The only constraint on the argument type is that it has methods x(), y() and z(), and that these methods return a type convertible to T. Examples of use are
construction from a Basic3DVector with different precision
construction from a Hep3Vector
construction from a coordinate system converter
Definition at line 43 of file Basic3DVectorLD.h.
Basic3DVector< long double >::Basic3DVector | ( | mathSSE::Vec4< U > const & | iv | ) | [inline] |
Basic3DVector< long double >::Basic3DVector | ( | const T & | x, |
const T & | y, | ||
const T & | z | ||
) | [inline] |
Basic3DVector< long double >::Basic3DVector | ( | const Geom::Theta< U > & | theta, |
const Geom::Phi< U > & | phi, | ||
const T & | r | ||
) | [inline] |
Deprecated construct from polar coordinates, use
Basic3DVector<T>( Basic3DVector<T>::Polar( theta, phi, r)) instead.
Definition at line 63 of file Basic3DVectorLD.h.
References L1TEmulatorMonitor_cff::p, csvReporter::r, Basic3DVector< T >::theX, Basic3DVector< T >::theY, Basic3DVector< T >::theZ, Geom::Phi< T >::value(), and Geom::Theta< T >::value().
T Basic3DVector< long double >::barePhi | ( | ) | const [inline] |
Azimuthal angle. The value is returned in radians, in the range (-pi,pi]. Same precision as the system atan2(x,y) function. The return type is Geom::Phi<T>, see it's documentation.
Definition at line 105 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), and Basic3DVector< T >::y().
T Basic3DVector< long double >::bareTheta | ( | ) | const [inline] |
Polar angle. The value is returned in radians, in the range [0,pi] Same precision as the system atan2(x,y) function. The return type is Geom::Phi<T>, see it's documentation.
Definition at line 112 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp(), and Basic3DVector< T >::z().
Basic3DVector Basic3DVector< long double >::cross | ( | const Basic3DVector< long double > & | v | ) | const [inline] |
Vector product, or "cross" product, with a vector of same type.
Definition at line 190 of file Basic3DVectorLD.h.
References Basic3DVector< T >::Basic3DVector(), Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
Basic3DVector<typename PreciseFloatType<T,U>::Type> Basic3DVector< long double >::cross | ( | const Basic3DVector< U > & | v | ) | const [inline] |
Vector (or cross) product with a vector of different precision. The product is computed without loss of precision. The type of the returned vector is the more precise of the types of the two vectors.
Definition at line 204 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
T Basic3DVector< long double >::dot | ( | const Basic3DVector< long double > & | v | ) | const [inline] |
Scalar product, or "dot" product, with a vector of same type.
Definition at line 175 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
Referenced by operator*().
PreciseFloatType<T,U>::Type Basic3DVector< long double >::dot | ( | const Basic3DVector< U > & | v | ) | const [inline] |
Scalar (or dot) product with a vector of different precision. The product is computed without loss of precision. The type of the returned scalar is the more precise of the scalar types of the two vectors.
Definition at line 185 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
T Basic3DVector< long double >::eta | ( | ) | const [inline] |
Pseudorapidity. Does not check for zero transverse component; in this case the behavior is as for divide-by zero, i.e. system-dependent.
Definition at line 120 of file Basic3DVectorLD.h.
References Basic3DVector< T >::eta(), Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
{ return detailsBasic3DVector::eta(x(),y(),z());} // correct
T Basic3DVector< long double >::mag | ( | ) | const [inline] |
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition at line 90 of file Basic3DVectorLD.h.
References Basic3DVector< T >::mag2(), and mathSSE::sqrt().
T Basic3DVector< long double >::mag2 | ( | ) | const [inline] |
The vector magnitude squared. Equivalent to vec.dot(vec)
Definition at line 87 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
Basic3DVector& Basic3DVector< long double >::operator*= | ( | T | t | ) | [inline] |
Scaling by a scalar value (multiplication)
Definition at line 158 of file Basic3DVectorLD.h.
References matplotRender::t, Basic3DVector< T >::theX, Basic3DVector< T >::theY, and Basic3DVector< T >::theZ.
Basic3DVector& Basic3DVector< long double >::operator+= | ( | const Basic3DVector< U > & | p | ) | [inline] |
Operator += with a Basic3DVector of possibly different precision.
Definition at line 137 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theX, Basic3DVector< T >::theY, Basic3DVector< T >::theZ, Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
Basic3DVector Basic3DVector< long double >::operator- | ( | ) | const [inline] |
Unary minus, returns a vector with components (-x(),-y(),-z())
Definition at line 155 of file Basic3DVectorLD.h.
References Basic3DVector< T >::Basic3DVector(), Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
{ return Basic3DVector(-x(),-y(),-z());}
Basic3DVector& Basic3DVector< long double >::operator-= | ( | const Basic3DVector< U > & | p | ) | [inline] |
Operator -= with a Basic3DVector of possibly different precision.
Definition at line 147 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theX, Basic3DVector< T >::theY, Basic3DVector< T >::theZ, Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
Basic3DVector& Basic3DVector< long double >::operator/= | ( | T | t | ) | [inline] |
Scaling by a scalar value (division)
Definition at line 166 of file Basic3DVectorLD.h.
References matplotRender::t, Basic3DVector< T >::theX, Basic3DVector< T >::theY, and Basic3DVector< T >::theZ.
bool Basic3DVector< long double >::operator== | ( | const Basic3DVector< long double > & | rh | ) | const [inline] |
Definition at line 82 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
T Basic3DVector< long double >::perp | ( | ) | const [inline] |
Magnitude of transverse component.
Definition at line 96 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp2(), and mathSSE::sqrt().
T Basic3DVector< long double >::perp2 | ( | ) | const [inline] |
Squared magnitude of transverse component.
Definition at line 93 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), and Basic3DVector< T >::y().
Geom::Phi<T> Basic3DVector< long double >::phi | ( | ) | const [inline] |
Definition at line 106 of file Basic3DVectorLD.h.
References Basic3DVector< T >::barePhi().
{return Geom::Phi<T>(barePhi());}
Geom::Theta<T> Basic3DVector< long double >::theta | ( | ) | const [inline] |
Definition at line 113 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp(), and Basic3DVector< T >::z().
{return Geom::Theta<T>(std::atan2(perp(),z()));}
T Basic3DVector< long double >::transverse | ( | ) | const [inline] |
Another name for perp()
Definition at line 99 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp().
{ return perp();}
Basic3DVector Basic3DVector< long double >::unit | ( | ) | const [inline] |
Unit vector parallel to this. If mag() is zero, a zero vector is returned.
Definition at line 126 of file Basic3DVectorLD.h.
References Basic3DVector< T >::mag2(), runTheMatrix::ret, and mathSSE::sqrt().
T Basic3DVector< long double >::x | ( | ) | const [inline] |
Cartesian x coordinate.
Definition at line 70 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theX.
Referenced by operator*(), and operator+().
{ return theX;}
Basic2DVector<T> Basic3DVector< long double >::xy | ( | ) | const [inline] |
Definition at line 78 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theX, and Basic3DVector< T >::theY.
{ return Basic2DVector<T>(theX,theY);}
T Basic3DVector< long double >::y | ( | ) | const [inline] |
Cartesian y coordinate.
Definition at line 73 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theY.
Referenced by operator*(), and operator+().
{ return theY;}
T Basic3DVector< long double >::z | ( | ) | const [inline] |
Cartesian z coordinate.
Definition at line 76 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theZ.
Referenced by operator*(), and operator+().
{ return theZ;}
T Basic3DVector< long double >::theW [private] |
Definition at line 214 of file Basic3DVectorLD.h.
T Basic3DVector< long double >::theX [private] |
Definition at line 211 of file Basic3DVectorLD.h.
T Basic3DVector< long double >::theY [private] |
Definition at line 212 of file Basic3DVectorLD.h.
T Basic3DVector< long double >::theZ [private] |
Definition at line 213 of file Basic3DVectorLD.h.