#include <Basic3DVectorLD.h>
Public Types | |
typedef Geom::Cylindrical2Cartesian< T > | Cylindrical |
typedef Basic3DVector< T > | MathVector |
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 () | |
Basic3DVector (const Basic3DVector &p) | |
Copy constructor from same type. Should not be needed but for gcc bug 12685. More... | |
template<class U > | |
Basic3DVector (const Basic3DVector< U > &p) | |
Copy constructor and implicit conversion from Basic3DVector of different precision. More... | |
Basic3DVector (const Basic2DVector< T > &p) | |
constructor from 2D vector (X and Y from 2D vector, z set to zero) More... | |
template<class OtherPoint > | |
Basic3DVector (const OtherPoint &p) | |
Basic3DVector (const T &x, const T &y, const T &z) | |
construct from cartesian coordinates More... | |
template<typename U > | |
Basic3DVector (const Geom::Theta< U > &theta, const Geom::Phi< U > &phi, const T &r) | |
Basic3DVector | cross (const Basic3DVector &v) const |
Vector product, or "cross" product, with a vector of same type. More... | |
template<class U > | |
Basic3DVector< typename PreciseFloatType< T, U >::Type > | cross (const Basic3DVector< U > &v) const |
T | dot (const Basic3DVector &v) const |
Scalar product, or "dot" product, with a vector of same type. More... | |
template<class U > | |
PreciseFloatType< T, U >::Type | dot (const Basic3DVector< U > &v) const |
T | eta () const |
T | mag () const |
The vector magnitude. Equivalent to sqrt(vec.mag2()) More... | |
T | mag2 () const |
The vector magnitude squared. Equivalent to vec.dot(vec) More... | |
Basic3DVector & | operator*= (T t) |
Scaling by a scalar value (multiplication) More... | |
template<class U > | |
Basic3DVector & | operator+= (const Basic3DVector< U > &p) |
Basic3DVector | operator- () const |
Unary minus, returns a vector with components (-x(),-y(),-z()) More... | |
template<class U > | |
Basic3DVector & | operator-= (const Basic3DVector< U > &p) |
Basic3DVector & | operator/= (T t) |
Scaling by a scalar value (division) More... | |
bool | operator== (const Basic3DVector &rh) const |
T | perp () const |
Magnitude of transverse component. More... | |
T | perp2 () const |
Squared magnitude of transverse component. More... | |
Geom::Phi< T > | phi () const |
Geom::Theta< T > | theta () const |
T | transverse () const |
Another name for perp() More... | |
Basic3DVector | unit () const |
T | x () const |
Cartesian x coordinate. More... | |
Basic2DVector< T > | xy () const |
T | y () const |
Cartesian y coordinate. More... | |
T | z () const |
Cartesian z coordinate. More... | |
Private Attributes | |
T | theW |
T | theX |
T | theY |
T | theZ |
Definition at line 11 of file Basic3DVectorLD.h.
typedef Geom::Cylindrical2Cartesian<T> Basic3DVector< long double >::Cylindrical |
Definition at line 17 of file Basic3DVectorLD.h.
typedef Basic3DVector<T> Basic3DVector< long double >::MathVector |
Definition at line 21 of file Basic3DVectorLD.h.
typedef Spherical Basic3DVector< long double >::Polar |
Definition at line 19 of file Basic3DVectorLD.h.
typedef T Basic3DVector< long double >::ScalarType |
Definition at line 16 of file Basic3DVectorLD.h.
typedef Geom::Spherical2Cartesian<T> Basic3DVector< long double >::Spherical |
Definition at line 18 of file Basic3DVectorLD.h.
typedef long double Basic3DVector< long double >::T |
Definition at line 15 of file Basic3DVectorLD.h.
|
inline |
default constructor uses default constructor of T to initialize the components. For built-in floating-point types this means initialization to zero??? (force init to 0)
Definition at line 27 of file Basic3DVectorLD.h.
|
inline |
Copy constructor from same type. Should not be needed but for gcc bug 12685.
Definition at line 30 of file Basic3DVectorLD.h.
|
inline |
Copy constructor and implicit conversion from Basic3DVector of different precision.
Definition at line 35 of file Basic3DVectorLD.h.
|
inline |
constructor from 2D vector (X and Y from 2D vector, z set to zero)
Definition at line 39 of file Basic3DVectorLD.h.
|
inlineexplicit |
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 51 of file Basic3DVectorLD.h.
|
inline |
|
inline |
Deprecated construct from polar coordinates, use
Basic3DVector<T>( Basic3DVector<T>::Polar( theta, phi, r)) instead.
Definition at line 78 of file Basic3DVectorLD.h.
References AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, Geom::Theta< T >::value(), and Geom::Phi< T >::value().
|
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 120 of file Basic3DVectorLD.h.
|
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 127 of file Basic3DVectorLD.h.
|
inline |
Vector product, or "cross" product, with a vector of same type.
Definition at line 205 of file Basic3DVectorLD.h.
References Basic3DVector< T >::Basic3DVector(), Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
|
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 219 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
|
inline |
Scalar product, or "dot" product, with a vector of same type.
Definition at line 190 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
Referenced by operator*().
|
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 200 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
|
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 135 of file Basic3DVectorLD.h.
Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().
|
inline |
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition at line 105 of file Basic3DVectorLD.h.
References Basic3DVector< T >::mag2(), and mathSSE::sqrt().
|
inline |
The vector magnitude squared. Equivalent to vec.dot(vec)
Definition at line 102 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
|
inline |
Scaling by a scalar value (multiplication)
Definition at line 173 of file Basic3DVectorLD.h.
References lumiQTWidget::t, Basic3DVector< T >::theX, Basic3DVector< T >::theY, and Basic3DVector< T >::theZ.
|
inline |
Operator += with a Basic3DVector of possibly different precision.
Definition at line 152 of file Basic3DVectorLD.h.
|
inline |
Unary minus, returns a vector with components (-x(),-y(),-z())
Definition at line 170 of file Basic3DVectorLD.h.
|
inline |
Operator -= with a Basic3DVector of possibly different precision.
Definition at line 162 of file Basic3DVectorLD.h.
|
inline |
Scaling by a scalar value (division)
Definition at line 181 of file Basic3DVectorLD.h.
References lumiQTWidget::t.
|
inline |
Definition at line 97 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
|
inline |
Magnitude of transverse component.
Definition at line 111 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp2(), and mathSSE::sqrt().
|
inline |
Squared magnitude of transverse component.
Definition at line 108 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), and Basic3DVector< T >::y().
|
inline |
Definition at line 121 of file Basic3DVectorLD.h.
References Basic3DVector< T >::barePhi().
Referenced by Particle.Particle::__str__().
|
inline |
Definition at line 128 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp(), and Basic3DVector< T >::z().
Referenced by Tau.Tau::zImpact().
|
inline |
Another name for perp()
Definition at line 114 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp().
|
inline |
Unit vector parallel to this. If mag() is zero, a zero vector is returned.
Definition at line 141 of file Basic3DVectorLD.h.
References Basic3DVector< T >::mag2().
|
inline |
Cartesian x coordinate.
Definition at line 85 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theX.
Referenced by svgfig.Curve.Sample::__repr__(), svgfig.Ellipse::__repr__(), Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Vispa.Gui.VispaWidget.VispaWidget::boundingRect(), operator*(), operator+(), operator-(), geometryXMLparser.Alignable::pos(), and Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget().
|
inline |
Definition at line 93 of file Basic3DVectorLD.h.
Referenced by geometryXMLparser.Alignable::covariance().
|
inline |
Cartesian y coordinate.
Definition at line 88 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theY.
Referenced by svgfig.Ellipse::__repr__(), Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Vispa.Gui.VispaWidget.VispaWidget::boundingRect(), operator*(), operator+(), operator-(), geometryXMLparser.Alignable::pos(), and Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget().
|
inline |
Cartesian z coordinate.
Definition at line 91 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theZ.
Referenced by operator*(), operator+(), operator-(), and geometryXMLparser.Alignable::pos().
|
private |
Definition at line 229 of file Basic3DVectorLD.h.
|
private |
Definition at line 226 of file Basic3DVectorLD.h.
|
private |
Definition at line 227 of file Basic3DVectorLD.h.
|
private |
Definition at line 228 of file Basic3DVectorLD.h.