CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Private Attributes
Basic2DVector< T > Class Template Reference

#include <extBasic2DVector.h>

Public Types

typedef Vec2< TMathVector
 
typedef mathSSE::Vec2< TMathVector
 
typedef Basic2DVector< TMathVector
 
typedef Geom::Polar2Cartesian< TPolar
 
typedef Geom::Polar2Cartesian< TPolar
 
typedef Geom::Polar2Cartesian< TPolar
 
typedef T ScalarType
 
typedef T ScalarType
 
typedef T ScalarType
 
typedef mathSSE::Vec2< TVectorType
 
typedef Vec2< TVectorType
 

Public Member Functions

T barePhi () const
 
T barePhi () const
 
T barePhi () const
 
 Basic2DVector ()
 
 Basic2DVector ()
 
 Basic2DVector (const Basic2DVector &p)
 Copy constructor from same type. Should not be needed but for gcc bug 12685. More...
 
 Basic2DVector (const Basic2DVector &p)
 Copy constructor from same type. Should not be needed but for gcc bug 12685. More...
 
 Basic2DVector ()
 
template<typename U >
 Basic2DVector (const Basic2DVector< U > &p)
 
template<typename U >
 Basic2DVector (const Basic2DVector< U > &p)
 
 Basic2DVector (const Basic2DVector &p)
 Copy constructor from same type. Should not be needed but for gcc bug 12685. More...
 
template<class Other >
 Basic2DVector (const Other &p)
 
template<class Other >
 Basic2DVector (const Other &p)
 
template<class Other >
 Basic2DVector (const Other &p)
 
 Basic2DVector (const T &x, const T &y)
 construct from cartesian coordinates More...
 
 Basic2DVector (const T &x, const T &y)
 construct from cartesian coordinates More...
 
 Basic2DVector (const T &x, const T &y)
 construct from cartesian coordinates More...
 
 Basic2DVector (MathVector const &iv)
 
template<typename U >
 Basic2DVector (mathSSE::Vec2< U > const &iv)
 
template<typename U >
 Basic2DVector (Vec2< U > const &iv)
 
template<typename U >
 Basic2DVector (mathSSE::Vec4< U > const &iv)
 
template<typename U >
 Basic2DVector (Vec4< U > const &iv)
 
T cross (const Basic2DVector &lh) const
 Vector product, or "cross" product, with a vector of same type. More...
 
T cross (const Basic2DVector &lh) const
 Vector product, or "cross" product, with a vector of same type. More...
 
template<class U >
PreciseFloatType< T, U >::Type cross (const Basic2DVector< U > &lh) const
 
template<class U >
PreciseFloatType< T, U >::Type cross (const Basic2DVector< U > &lh) const
 
T cross (const Basic2DVector &v) const
 Vector product, or "cross" product, with a vector of same type. More...
 
template<class U >
PreciseFloatType< T, U >::Type cross (const Basic2DVector< U > &v) const
 
T dot (const Basic2DVector &lh) const
 Scalar product, or "dot" product, with a vector of same type. More...
 
T dot (const Basic2DVector &lh) const
 Scalar product, or "dot" product, with a vector of same type. More...
 
template<class U >
PreciseFloatType< T, U >::Type dot (const Basic2DVector< U > &lh) const
 
template<class U >
PreciseFloatType< T, U >::Type dot (const Basic2DVector< U > &lh) const
 
T dot (const Basic2DVector &v) const
 Scalar product, or "dot" product, with a vector of same type. More...
 
template<class U >
PreciseFloatType< T, U >::Type dot (const Basic2DVector< U > &v) const
 
T mag () const
 The vector magnitude. Equivalent to sqrt(vec.mag2()) More...
 
T mag () const
 The vector magnitude. Equivalent to sqrt(vec.mag2()) More...
 
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...
 
T mag2 () const
 The vector magnitude squared. Equivalent to vec.dot(vec) More...
 
T mag2 () const
 The vector magnitude squared. Equivalent to vec.dot(vec) More...
 
MathVector const & mathVector () const
 
MathVector const & mathVector () const
 
MathVectormathVector ()
 
MathVectormathVector ()
 
Basic2DVectoroperator*= (T t)
 Scaling by a scalar value (multiplication) More...
 
Basic2DVectoroperator*= (T t)
 Scaling by a scalar value (multiplication) More...
 
Basic2DVectoroperator*= (const T &t)
 Scaling by a scalar value (multiplication) More...
 
template<class U >
Basic2DVectoroperator+= (const Basic2DVector< U > &p)
 
template<class U >
Basic2DVectoroperator+= (const Basic2DVector< U > &p)
 
template<class U >
Basic2DVectoroperator+= (const Basic2DVector< U > &p)
 
Basic2DVector operator- () const
 Unary minus, returns a vector with components (-x(),-y(),-z()) More...
 
Basic2DVector operator- () const
 Unary minus, returns a vector with components (-x(),-y(),-z()) More...
 
Basic2DVector operator- () const
 Unary minus, returns a vector with components (-x(),-y(),-z()) More...
 
template<class U >
Basic2DVectoroperator-= (const Basic2DVector< U > &p)
 
template<class U >
Basic2DVectoroperator-= (const Basic2DVector< U > &p)
 
template<class U >
Basic2DVectoroperator-= (const Basic2DVector< U > &p)
 
Basic2DVectoroperator/= (T t)
 Scaling by a scalar value (division) More...
 
Basic2DVectoroperator/= (T t)
 Scaling by a scalar value (division) More...
 
Basic2DVectoroperator/= (const T &t)
 Scaling by a scalar value (division) More...
 
T operator[] (int i) const
 
T operator[] (int i) const
 
Toperator[] (int i)
 
Toperator[] (int i)
 
T operator[] (int i) const
 
Toperator[] (int i)
 
Geom::Phi< Tphi () const
 
Geom::Phi< Tphi () const
 
Geom::Phi< Tphi () const
 
T r () const
 Radius, same as mag() More...
 
T r () const
 Radius, same as mag() More...
 
T r () const
 Radius, same as mag() More...
 
Basic2DVector unit () const
 
Basic2DVector unit () const
 
Basic2DVector unit () const
 
T x () const
 Cartesian x coordinate. More...
 
T x () const
 Cartesian x coordinate. More...
 
T x () const
 Cartesian x coordinate. More...
 
T y () const
 Cartesian y coordinate. More...
 
T y () const
 Cartesian y coordinate. More...
 
T y () const
 Cartesian y coordinate. More...
 

Public Attributes

mathSSE::Vec2< Tv
 
Vec2< Tv
 

Private Attributes

T theX
 
T theY
 

Detailed Description

template<class T>
class Basic2DVector< T >

Definition at line 15 of file extBasic2DVector.h.

Member Typedef Documentation

template<class T>
typedef Vec2<T> Basic2DVector< T >::MathVector

Definition at line 20 of file extBasic2DVector.h.

template<class T>
typedef mathSSE::Vec2<T> Basic2DVector< T >::MathVector

Definition at line 20 of file sseBasic2DVector.h.

template<class T>
typedef Basic2DVector<T> Basic2DVector< T >::MathVector

Definition at line 22 of file oldBasic2DVector.h.

template<class T>
typedef Geom::Polar2Cartesian<T> Basic2DVector< T >::Polar

Definition at line 21 of file extBasic2DVector.h.

template<class T>
typedef Geom::Polar2Cartesian<T> Basic2DVector< T >::Polar

Definition at line 21 of file sseBasic2DVector.h.

template<class T>
typedef Geom::Polar2Cartesian<T> Basic2DVector< T >::Polar

Definition at line 25 of file oldBasic2DVector.h.

template<class T>
typedef T Basic2DVector< T >::ScalarType

Definition at line 18 of file sseBasic2DVector.h.

template<class T>
typedef T Basic2DVector< T >::ScalarType

Definition at line 18 of file extBasic2DVector.h.

template<class T>
typedef T Basic2DVector< T >::ScalarType

Definition at line 24 of file oldBasic2DVector.h.

template<class T>
typedef mathSSE::Vec2<T> Basic2DVector< T >::VectorType

Definition at line 19 of file sseBasic2DVector.h.

template<class T>
typedef Vec2<T> Basic2DVector< T >::VectorType

Definition at line 19 of file extBasic2DVector.h.

Constructor & Destructor Documentation

template<class T>
Basic2DVector< T >::Basic2DVector ( )
inline

default constructor uses default constructor of T to initialize the components. For built-in floating-point types this means initialization to zero

Definition at line 27 of file extBasic2DVector.h.

Referenced by Basic2DVector< float >::operator-().

27 : v{0,0} {}
template<class T>
Basic2DVector< T >::Basic2DVector ( const Basic2DVector< T > &  p)
inline

Copy constructor from same type. Should not be needed but for gcc bug 12685.

Definition at line 30 of file extBasic2DVector.h.

30 : v(p.v) {}
template<class T>
template<typename U >
Basic2DVector< T >::Basic2DVector ( const Basic2DVector< U > &  p)
inline

Definition at line 33 of file extBasic2DVector.h.

33 : v{T(p.v[0]),T(p.v[1])} {}
long double T
template<class T>
template<class Other >
Basic2DVector< T >::Basic2DVector ( const Other &  p)
inlineexplicit

Explicit constructor from other (possibly unrelated) vector classes The only constraint on the argument type is that it has methods x() and y(), and that these methods return a type convertible to T. Examples of use are
construction from a Basic2DVector with different precision
construction from a coordinate system converter

Definition at line 44 of file extBasic2DVector.h.

44 : v{T(p.x()),T(p.y())} {}
long double T
template<class T>
Basic2DVector< T >::Basic2DVector ( const T x,
const T y 
)
inline

construct from cartesian coordinates

Definition at line 47 of file extBasic2DVector.h.

47 : v{x,y} {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
Basic2DVector< T >::Basic2DVector ( MathVector const &  iv)
inline

Definition at line 50 of file extBasic2DVector.h.

50 : v(iv){}
template<class T>
template<typename U >
Basic2DVector< T >::Basic2DVector ( Vec2< U > const &  iv)
inline

Definition at line 52 of file extBasic2DVector.h.

52 : v{iv[0],iv[1]}{}
template<class T>
template<typename U >
Basic2DVector< T >::Basic2DVector ( Vec4< U > const &  iv)
inline

Definition at line 54 of file extBasic2DVector.h.

54 : v{iv[0],iv[1]}{}
template<class T>
Basic2DVector< T >::Basic2DVector ( )
inline

default constructor uses default constructor of T to initialize the components. For built-in floating-point types this means initialization to zero

Definition at line 31 of file oldBasic2DVector.h.

template<class T>
Basic2DVector< T >::Basic2DVector ( const Basic2DVector< T > &  p)
inline

Copy constructor from same type. Should not be needed but for gcc bug 12685.

Definition at line 34 of file oldBasic2DVector.h.

34  :
35  theX(p.x()), theY(p.y()) {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
template<class Other >
Basic2DVector< T >::Basic2DVector ( const Other &  p)
inlineexplicit

Explicit constructor from other (possibly unrelated) vector classes The only constraint on the argument type is that it has methods x() and y(), and that these methods return a type convertible to T. Examples of use are
construction from a Basic2DVector with different precision
construction from a coordinate system converter

Definition at line 45 of file oldBasic2DVector.h.

template<class T>
Basic2DVector< T >::Basic2DVector ( const T x,
const T y 
)
inline

construct from cartesian coordinates

Definition at line 48 of file oldBasic2DVector.h.

48 : theX(x), theY(y) {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
Basic2DVector< T >::Basic2DVector ( )
inline

default constructor uses default constructor of T to initialize the components. For built-in floating-point types this means initialization to zero

Definition at line 27 of file sseBasic2DVector.h.

27 {}
template<class T>
Basic2DVector< T >::Basic2DVector ( const Basic2DVector< T > &  p)
inline

Copy constructor from same type. Should not be needed but for gcc bug 12685.

Definition at line 30 of file sseBasic2DVector.h.

30 : v(p.v) {}
template<class T>
template<typename U >
Basic2DVector< T >::Basic2DVector ( const Basic2DVector< U > &  p)
inline

Definition at line 33 of file sseBasic2DVector.h.

33 : v(p.v) {}
template<class T>
template<class Other >
Basic2DVector< T >::Basic2DVector ( const Other &  p)
inlineexplicit

Explicit constructor from other (possibly unrelated) vector classes The only constraint on the argument type is that it has methods x() and y(), and that these methods return a type convertible to T. Examples of use are
construction from a Basic2DVector with different precision
construction from a coordinate system converter

Definition at line 44 of file sseBasic2DVector.h.

template<class T>
Basic2DVector< T >::Basic2DVector ( const T x,
const T y 
)
inline

construct from cartesian coordinates

Definition at line 47 of file sseBasic2DVector.h.

47 : v(x,y) {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
template<typename U >
Basic2DVector< T >::Basic2DVector ( mathSSE::Vec2< U > const &  iv)
inline

Definition at line 51 of file sseBasic2DVector.h.

51 : v(iv){}
template<class T>
template<typename U >
Basic2DVector< T >::Basic2DVector ( mathSSE::Vec4< U > const &  iv)
inline

Definition at line 53 of file sseBasic2DVector.h.

53 : v(iv.xy()){}
Vec2< T > xy() const
Definition: SSEVec.h:218

Member Function Documentation

template<class T>
T Basic2DVector< T >::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 80 of file sseBasic2DVector.h.

80 {return std::atan2(y(),x());}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
T Basic2DVector< T >::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 82 of file extBasic2DVector.h.

Referenced by PV2DBase< double, PointTag, LocalTag >::barePhi(), ThirdHitPredictionFromCircle::phi(), InnerDeltaPhi::phiRange(), and ThirdHitPredictionFromInvParabola::rangeRPhi().

82 {return std::atan2(y(),x());}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
T Basic2DVector< T >::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 91 of file oldBasic2DVector.h.

91 {return std::atan2(theY,theX);}
template<class T>
T Basic2DVector< T >::cross ( const Basic2DVector< T > &  lh) const
inline

Vector product, or "cross" product, with a vector of same type.

Definition at line 138 of file sseBasic2DVector.h.

138 { return ::cross(v,lh.v);}
Basic3DVector cross(const Basic3DVector &v) const
Vector product, or &quot;cross&quot; product, with a vector of same type.
template<class T>
T Basic2DVector< T >::cross ( const Basic2DVector< T > &  lh) const
inline

Vector product, or "cross" product, with a vector of same type.

Definition at line 140 of file extBasic2DVector.h.

Referenced by Basic2DVector< float >::cross().

140 { return ::cross2(v,lh.v);}
auto cross2(V1 x, V2 y) -> typename std::remove_reference< decltype(x[0])>::type
Definition: ExtVec.h:93
template<class T>
template<class U >
PreciseFloatType<T,U>::Type Basic2DVector< T >::cross ( const Basic2DVector< U > &  lh) 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 scalar is the more precise of the scalar types of the two vectors.

Definition at line 146 of file sseBasic2DVector.h.

146  {
149  }
T cross(const Basic2DVector &lh) const
Vector product, or &quot;cross&quot; product, with a vector of same type.
template<class T>
template<class U >
PreciseFloatType<T,U>::Type Basic2DVector< T >::cross ( const Basic2DVector< U > &  lh) 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 scalar is the more precise of the scalar types of the two vectors.

Definition at line 148 of file extBasic2DVector.h.

148  {
151  }
T cross(const Basic2DVector &lh) const
Vector product, or &quot;cross&quot; product, with a vector of same type.
template<class T>
T Basic2DVector< T >::cross ( const Basic2DVector< T > &  v) const
inline

Vector product, or "cross" product, with a vector of same type.

Definition at line 153 of file oldBasic2DVector.h.

153 { return x()*v.y() - y()*v.x();}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
template<class U >
PreciseFloatType<T,U>::Type Basic2DVector< T >::cross ( const Basic2DVector< 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 scalar is the more precise of the scalar types of the two vectors.

Definition at line 161 of file oldBasic2DVector.h.

161  {
162  return x()*v.y() - y()*v.x();
163  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
T Basic2DVector< T >::dot ( const Basic2DVector< T > &  lh) const
inline

Scalar product, or "dot" product, with a vector of same type.

Definition at line 124 of file sseBasic2DVector.h.

124 { return ::dot(v,lh.v);}
T dot(const Basic3DVector &v) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
template<class T>
T Basic2DVector< T >::dot ( const Basic2DVector< T > &  lh) const
inline

Scalar product, or "dot" product, with a vector of same type.

Definition at line 126 of file extBasic2DVector.h.

Referenced by Vector2DBase< float, MeasurementTag >::dot(), Basic2DVector< float >::dot(), operator*(), and InnerDeltaPhi::phiRange().

126 { return ::dot(v,lh.v);}
T dot(const Basic3DVector &v) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
template<class T>
template<class U >
PreciseFloatType<T,U>::Type Basic2DVector< T >::dot ( const Basic2DVector< U > &  lh) 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 132 of file sseBasic2DVector.h.

132  {
135  }
T dot(const Basic2DVector &lh) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
template<class T>
template<class U >
PreciseFloatType<T,U>::Type Basic2DVector< T >::dot ( const Basic2DVector< U > &  lh) 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 134 of file extBasic2DVector.h.

134  {
137  }
T dot(const Basic2DVector &lh) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
template<class T>
T Basic2DVector< T >::dot ( const Basic2DVector< T > &  v) const
inline

Scalar product, or "dot" product, with a vector of same type.

Definition at line 138 of file oldBasic2DVector.h.

138 { return x()*v.x() + y()*v.y();}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
template<class U >
PreciseFloatType<T,U>::Type Basic2DVector< T >::dot ( const Basic2DVector< 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 146 of file oldBasic2DVector.h.

146  {
147  return x()*v.x() + y()*v.y();
148  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
T Basic2DVector< T >::mag ( ) const
inline

The vector magnitude. Equivalent to sqrt(vec.mag2())

Definition at line 71 of file sseBasic2DVector.h.

71 { return std::sqrt( mag2());}
T sqrt(T t)
Definition: SSEVec.h:48
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
template<class T>
T Basic2DVector< T >::mag ( ) const
inline
template<class T>
T Basic2DVector< T >::mag ( ) const
inline

The vector magnitude. Equivalent to sqrt(vec.mag2())

Definition at line 82 of file oldBasic2DVector.h.

82 { return std::sqrt( mag2());}
T sqrt(T t)
Definition: SSEVec.h:48
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
template<class T>
T Basic2DVector< T >::mag2 ( ) const
inline

The vector magnitude squared. Equivalent to vec.dot(vec)

Definition at line 68 of file sseBasic2DVector.h.

68 { return ::dot(v,v);}
T dot(const Basic3DVector &v) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
template<class T>
T Basic2DVector< T >::mag2 ( ) const
inline
template<class T>
T Basic2DVector< T >::mag2 ( ) const
inline

The vector magnitude squared. Equivalent to vec.dot(vec)

Definition at line 79 of file oldBasic2DVector.h.

template<class T>
MathVector const& Basic2DVector< T >::mathVector ( ) const
inline

Definition at line 55 of file sseBasic2DVector.h.

55 { return v;}
template<class T>
MathVector& Basic2DVector< T >::mathVector ( )
inline

Definition at line 56 of file sseBasic2DVector.h.

56 { return v;}
template<class T>
MathVector const& Basic2DVector< T >::mathVector ( ) const
inline

Definition at line 56 of file extBasic2DVector.h.

56 { return v;}
template<class T>
MathVector& Basic2DVector< T >::mathVector ( )
inline

Definition at line 57 of file extBasic2DVector.h.

57 { return v;}
template<class T>
Basic2DVector& Basic2DVector< T >::operator*= ( T  t)
inline

Scaling by a scalar value (multiplication)

Definition at line 111 of file sseBasic2DVector.h.

111  {
112  v = v*t;
113  return *this;
114  }
template<class T>
Basic2DVector& Basic2DVector< T >::operator*= ( T  t)
inline

Scaling by a scalar value (multiplication)

Definition at line 113 of file extBasic2DVector.h.

113  {
114  v = v*t;
115  return *this;
116  }
template<class T>
Basic2DVector& Basic2DVector< T >::operator*= ( const T t)
inline

Scaling by a scalar value (multiplication)

Definition at line 124 of file oldBasic2DVector.h.

124  {
125  theX *= t;
126  theY *= t;
127  return *this;
128  }
template<class T>
template<class U >
Basic2DVector& Basic2DVector< T >::operator+= ( const Basic2DVector< U > &  p)
inline

Operator += with a Basic2DVector of possibly different precision.

Definition at line 94 of file sseBasic2DVector.h.

94  {
95  v = v + p.v;
96  return *this;
97  }
template<class T>
template<class U >
Basic2DVector& Basic2DVector< T >::operator+= ( const Basic2DVector< U > &  p)
inline

Operator += with a Basic2DVector of possibly different precision.

Definition at line 96 of file extBasic2DVector.h.

96  {
97  v = v + p.v;
98  return *this;
99  }
template<class T>
template<class U >
Basic2DVector& Basic2DVector< T >::operator+= ( const Basic2DVector< U > &  p)
inline

Operator += with a Basic2DVector of possibly different precision.

Definition at line 105 of file oldBasic2DVector.h.

105  {
106  theX += p.x();
107  theY += p.y();
108  return *this;
109  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
Basic2DVector Basic2DVector< T >::operator- ( ) const
inline

Unary minus, returns a vector with components (-x(),-y(),-z())

Definition at line 108 of file sseBasic2DVector.h.

108 { return Basic2DVector(-v);}
template<class T>
Basic2DVector Basic2DVector< T >::operator- ( ) const
inline

Unary minus, returns a vector with components (-x(),-y(),-z())

Definition at line 110 of file extBasic2DVector.h.

110 { return Basic2DVector(-v);}
template<class T>
Basic2DVector Basic2DVector< T >::operator- ( ) const
inline

Unary minus, returns a vector with components (-x(),-y(),-z())

Definition at line 121 of file oldBasic2DVector.h.

121 { return Basic2DVector(-x(),-y());}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
template<class U >
Basic2DVector& Basic2DVector< T >::operator-= ( const Basic2DVector< U > &  p)
inline

Operator -= with a Basic2DVector of possibly different precision.

Definition at line 102 of file sseBasic2DVector.h.

102  {
103  v = v - p.v;
104  return *this;
105  }
template<class T>
template<class U >
Basic2DVector& Basic2DVector< T >::operator-= ( const Basic2DVector< U > &  p)
inline

Operator -= with a Basic2DVector of possibly different precision.

Definition at line 104 of file extBasic2DVector.h.

104  {
105  v = v - p.v;
106  return *this;
107  }
template<class T>
template<class U >
Basic2DVector& Basic2DVector< T >::operator-= ( const Basic2DVector< U > &  p)
inline

Operator -= with a Basic2DVector of possibly different precision.

Definition at line 114 of file oldBasic2DVector.h.

114  {
115  theX -= p.x();
116  theY -= p.y();
117  return *this;
118  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
Basic2DVector& Basic2DVector< T >::operator/= ( T  t)
inline

Scaling by a scalar value (division)

Definition at line 117 of file sseBasic2DVector.h.

117  {
118  t = T(1)/t;
119  v = v*t;
120  return *this;
121  }
long double T
template<class T>
Basic2DVector& Basic2DVector< T >::operator/= ( T  t)
inline

Scaling by a scalar value (division)

Definition at line 119 of file extBasic2DVector.h.

119  {
120  t = T(1)/t;
121  v = v*t;
122  return *this;
123  }
long double T
template<class T>
Basic2DVector& Basic2DVector< T >::operator/= ( const T t)
inline

Scaling by a scalar value (division)

Definition at line 131 of file oldBasic2DVector.h.

131  {
132  theX /= t;
133  theY /= t;
134  return *this;
135  }
template<class T>
T Basic2DVector< T >::operator[] ( int  i) const
inline

Definition at line 58 of file sseBasic2DVector.h.

58 { return v[i];}
int i
Definition: DBlmapReader.cc:9
template<class T>
T Basic2DVector< T >::operator[] ( int  i) const
inline

Definition at line 59 of file extBasic2DVector.h.

59 { return v[i];}
int i
Definition: DBlmapReader.cc:9
template<class T>
T& Basic2DVector< T >::operator[] ( int  i)
inline

Definition at line 59 of file sseBasic2DVector.h.

59 { return v[i];}
int i
Definition: DBlmapReader.cc:9
template<class T>
T& Basic2DVector< T >::operator[] ( int  i)
inline

Definition at line 60 of file extBasic2DVector.h.

60 { return v[i];}
int i
Definition: DBlmapReader.cc:9
template<class T>
T Basic2DVector< T >::operator[] ( int  i) const
inline

Definition at line 69 of file oldBasic2DVector.h.

69 { return i==0 ? theX : theY ;}
int i
Definition: DBlmapReader.cc:9
template<class T>
T& Basic2DVector< T >::operator[] ( int  i)
inline

Definition at line 70 of file oldBasic2DVector.h.

70 { return i==0 ? theX : theY ;}
int i
Definition: DBlmapReader.cc:9
template<class T>
Geom::Phi<T> Basic2DVector< T >::phi ( ) const
inline

Definition at line 81 of file sseBasic2DVector.h.

Referenced by Particle.Particle::__str__().

81 {return Geom::Phi<T>(atan2(y(),x()));}
T y() const
Cartesian y coordinate.
Definition: Phi.h:20
T x() const
Cartesian x coordinate.
template<class T>
Geom::Phi<T> Basic2DVector< T >::phi ( ) const
inline

Definition at line 83 of file extBasic2DVector.h.

Referenced by Particle.Particle::__str__(), ThirdHitPredictionFromCircle::phi(), and PV2DBase< double, PointTag, LocalTag >::phi().

83 {return Geom::Phi<T>(atan2(y(),x()));}
T y() const
Cartesian y coordinate.
Definition: Phi.h:20
T x() const
Cartesian x coordinate.
template<class T>
Geom::Phi<T> Basic2DVector< T >::phi ( ) const
inline

Definition at line 92 of file oldBasic2DVector.h.

Referenced by Particle.Particle::__str__().

template<class T>
T Basic2DVector< T >::r ( ) const
inline

Radius, same as mag()

Definition at line 74 of file sseBasic2DVector.h.

74 { return mag();}
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
template<class T>
T Basic2DVector< T >::r ( ) const
inline

Radius, same as mag()

Definition at line 76 of file extBasic2DVector.h.

Referenced by PixelTripletLargeTipGenerator::hitTriplets(), and PV2DBase< double, PointTag, LocalTag >::r().

76 { return mag();}
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
template<class T>
T Basic2DVector< T >::r ( ) const
inline

Radius, same as mag()

Definition at line 85 of file oldBasic2DVector.h.

85 { return mag();}
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
template<class T>
Basic2DVector Basic2DVector< T >::unit ( ) const
inline

Unit vector parallel to this. If mag() is zero, a zero vector is returned.

Definition at line 86 of file sseBasic2DVector.h.

86  {
87  T my_mag = mag();
88  return my_mag == 0 ? *this : *this / my_mag;
89  }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
long double T
template<class T>
Basic2DVector Basic2DVector< T >::unit ( ) const
inline

Unit vector parallel to this. If mag() is zero, a zero vector is returned.

Definition at line 88 of file extBasic2DVector.h.

Referenced by InnerDeltaPhi::phiRange(), and TkRotation2D< Scalar >::TkRotation2D().

88  {
89  T my_mag = mag();
90  return my_mag == 0 ? *this : *this / my_mag;
91  }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
long double T
template<class T>
Basic2DVector Basic2DVector< T >::unit ( ) const
inline

Unit vector parallel to this. If mag() is zero, a zero vector is returned.

Definition at line 97 of file oldBasic2DVector.h.

97  {
98  T my_mag = mag();
99  return my_mag == 0 ? *this : *this / my_mag;
100  }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
long double T
template<class T>
T Basic2DVector< T >::x ( ) const
inline
template<class T>
T Basic2DVector< T >::x ( ) const
inline

Cartesian x coordinate.

Definition at line 64 of file extBasic2DVector.h.

Referenced by svgfig.Curve.Sample::__repr__(), svgfig.Ellipse::__repr__(), Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Basic2DVector< float >::barePhi(), Basic2DVector< float >::Basic2DVector(), Basic3DVector< align::Scalar >::Basic3DVector(), Vispa.Gui.VispaWidget.VispaWidget::boundingRect(), HelixBarrelPlaneCrossingByCircle::chooseSolution(), HelixBarrelCylinderCrossing::chooseSolution(), Basic2DVector< float >::cross(), ThirdHitPredictionFromInvLine::crossing(), ThirdHitPredictionFromCircle::curvature(), Basic2DVector< float >::dot(), ConformalMappingFit::findRot(), ClusterShapeTrackFilter::getGlobalDirs(), HelixBarrelCylinderCrossing::HelixBarrelCylinderCrossing(), CircleFromThreePoints::init(), ThirdHitPredictionFromInvParabola::init(), ThirdHitPredictionFromCircle::invCenterOnAxis(), TkRotation< align::Scalar >::multiplyInverse(), TkRotation< align::Scalar >::operator*(), operator*(), operator+(), Basic2DVector< float >::operator+=(), Basic2DVector< float >::operator-(), operator-(), Basic2DVector< float >::operator-=(), operator/(), Basic2DVector< float >::phi(), geometryXMLparser.Alignable::pos(), HelixBarrelPlaneCrossingByCircle::position(), Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget(), ThirdHitPredictionFromCircle::HelixRZ::rAtZ(), TrackFitter::run(), KFBasedPixelFitter::run(), PixelFitterByHelixProjections::run(), TkRotation2D< Scalar >::TkRotation2D(), and PV2DBase< double, PointTag, LocalTag >::x().

64 { return v[0];}
template<class T>
T Basic2DVector< T >::x ( ) const
inline
template<class T>
T Basic2DVector< T >::y ( ) const
inline
template<class T>
T Basic2DVector< T >::y ( ) const
inline

Cartesian y coordinate.

Definition at line 67 of file extBasic2DVector.h.

Referenced by svgfig.Ellipse::__repr__(), Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Basic2DVector< float >::barePhi(), Basic3DVector< align::Scalar >::Basic3DVector(), Vispa.Gui.VispaWidget.VispaWidget::boundingRect(), HelixBarrelPlaneCrossingByCircle::chooseSolution(), HelixBarrelCylinderCrossing::chooseSolution(), Basic2DVector< float >::cross(), ThirdHitPredictionFromInvLine::crossing(), ThirdHitPredictionFromCircle::curvature(), Basic2DVector< float >::dot(), ConformalMappingFit::findRot(), ClusterShapeTrackFilter::getGlobalDirs(), HelixBarrelCylinderCrossing::HelixBarrelCylinderCrossing(), CircleFromThreePoints::init(), ThirdHitPredictionFromInvParabola::init(), ThirdHitPredictionFromCircle::invCenterOnAxis(), TkRotation< align::Scalar >::multiplyInverse(), TkRotation< align::Scalar >::operator*(), operator*(), operator+(), Basic2DVector< float >::operator+=(), Basic2DVector< float >::operator-(), operator-(), Basic2DVector< float >::operator-=(), operator/(), Basic2DVector< float >::phi(), geometryXMLparser.Alignable::pos(), HelixBarrelPlaneCrossingByCircle::position(), Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget(), ThirdHitPredictionFromCircle::HelixRZ::rAtZ(), TrackFitter::run(), KFBasedPixelFitter::run(), PixelFitterByHelixProjections::run(), TkRotation2D< Scalar >::TkRotation2D(), and PV2DBase< double, PointTag, LocalTag >::y().

67 { return v[1];}
template<class T>
T Basic2DVector< T >::y ( ) const
inline

Member Data Documentation

template<class T>
T Basic2DVector< T >::theX
private
template<class T>
T Basic2DVector< T >::theY
private
template<class T>
mathSSE::Vec2<T> Basic2DVector< T >::v

Definition at line 154 of file sseBasic2DVector.h.

template<class T>
Vec2<T> Basic2DVector< T >::v