#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 12 of file Basic3DVectorLD.h.
typedef Geom::Cylindrical2Cartesian<T> Basic3DVector< long double >::Cylindrical |
Definition at line 18 of file Basic3DVectorLD.h.
typedef Basic3DVector<T> Basic3DVector< long double >::MathVector |
Definition at line 22 of file Basic3DVectorLD.h.
typedef Spherical Basic3DVector< long double >::Polar |
Definition at line 20 of file Basic3DVectorLD.h.
typedef T Basic3DVector< long double >::ScalarType |
Definition at line 17 of file Basic3DVectorLD.h.
typedef Geom::Spherical2Cartesian<T> Basic3DVector< long double >::Spherical |
Definition at line 19 of file Basic3DVectorLD.h.
typedef long double Basic3DVector< long double >::T |
Definition at line 16 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 28 of file Basic3DVectorLD.h.
|
inline |
Copy constructor from same type. Should not be needed but for gcc bug 12685.
Definition at line 31 of file Basic3DVectorLD.h.
|
inline |
Copy constructor and implicit conversion from Basic3DVector of different precision.
Definition at line 36 of file Basic3DVectorLD.h.
|
inline |
constructor from 2D vector (X and Y from 2D vector, z set to zero)
Definition at line 40 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 52 of file Basic3DVectorLD.h.
References Basic3DVector< T >::Basic3DVector(), Basic3DVector< T >::theW, Basic3DVector< T >::theX, Basic3DVector< T >::theY, and Basic3DVector< T >::theZ.
|
inline |
|
inline |
Deprecated construct from polar coordinates, use
Basic3DVector<T>( Basic3DVector<T>::Polar( theta, phi, r)) instead.
Definition at line 79 of file Basic3DVectorLD.h.
|
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 121 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 128 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp(), and Basic3DVector< T >::z().
|
inline |
Vector product, or "cross" product, with a vector of same type.
Definition at line 206 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 220 of file Basic3DVectorLD.h.
|
inline |
Scalar product, or "dot" product, with a vector of same type.
Definition at line 191 of file Basic3DVectorLD.h.
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 201 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 136 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 106 of file Basic3DVectorLD.h.
References Basic3DVector< T >::mag2(), and mathSSE::sqrt().
|
inline |
The vector magnitude squared. Equivalent to vec.dot(vec)
Definition at line 103 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 174 of file Basic3DVectorLD.h.
References protons_cff::t, Basic3DVector< T >::theY, and Basic3DVector< T >::theZ.
|
inline |
Operator += with a Basic3DVector of possibly different precision.
Definition at line 153 of file Basic3DVectorLD.h.
|
inline |
Unary minus, returns a vector with components (-x(),-y(),-z())
Definition at line 171 of file Basic3DVectorLD.h.
|
inline |
Operator -= with a Basic3DVector of possibly different precision.
Definition at line 163 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x().
|
inline |
Scaling by a scalar value (division)
Definition at line 182 of file Basic3DVectorLD.h.
References protons_cff::t, and Basic3DVector< T >::theY.
|
inline |
Definition at line 98 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().
|
inline |
Magnitude of transverse component.
Definition at line 112 of file Basic3DVectorLD.h.
References Basic3DVector< T >::perp2(), and mathSSE::sqrt().
|
inline |
Squared magnitude of transverse component.
Definition at line 109 of file Basic3DVectorLD.h.
References Basic3DVector< T >::x(), and Basic3DVector< T >::y().
|
inline |
Definition at line 122 of file Basic3DVectorLD.h.
References Basic3DVector< T >::barePhi().
Referenced by Particle.Particle::__str__(), and ntupleDataFormat.Track::phiPull().
|
inline |
Definition at line 129 of file Basic3DVectorLD.h.
Referenced by Tau.Tau::zImpact().
|
inline |
Another name for perp()
Definition at line 115 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 142 of file Basic3DVectorLD.h.
|
inline |
Cartesian x coordinate.
Definition at line 86 of file Basic3DVectorLD.h.
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(), Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget(), ntupleDataFormat._HitObject::r(), and ntupleDataFormat._HitObject::r3D().
|
inline |
Definition at line 94 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theX, and Basic3DVector< T >::theY.
Referenced by geometryXMLparser.Alignable::covariance().
|
inline |
Cartesian y coordinate.
Definition at line 89 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(), Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget(), ntupleDataFormat._HitObject::r(), and ntupleDataFormat._HitObject::r3D().
|
inline |
Cartesian z coordinate.
Definition at line 92 of file Basic3DVectorLD.h.
References Basic3DVector< T >::theZ.
Referenced by operator*(), operator+(), operator-(), geometryXMLparser.Alignable::pos(), and ntupleDataFormat._HitObject::r3D().
|
private |
Definition at line 230 of file Basic3DVectorLD.h.
|
private |
Definition at line 227 of file Basic3DVectorLD.h.
|
private |
Definition at line 228 of file Basic3DVectorLD.h.
|
private |
Definition at line 229 of file Basic3DVectorLD.h.