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
Basic3DVector< T > Class Template Reference

#include <newBasic3DVector.h>

Public Types

typedef
Geom::Cylindrical2Cartesian< T > 
Cylindrical
 
typedef
Geom::Cylindrical2Cartesian< T > 
Cylindrical
 
typedef Spherical Polar
 
typedef Spherical Polar
 
typedef T ScalarType
 
typedef T ScalarType
 
typedef
Geom::Spherical2Cartesian< T > 
Spherical
 
typedef
Geom::Spherical2Cartesian< T > 
Spherical
 

Public Member Functions

barePhi () const
 
barePhi () const
 
bareTheta () const
 
bareTheta () const
 
 Basic3DVector ()
 
 Basic3DVector (const Basic3DVector &p)
 Copy constructor from same type. Should not be needed but for gcc bug 12685. More...
 
 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...
 
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...
 
 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)
 
template<class OtherPoint >
 Basic3DVector (const OtherPoint &p)
 
 Basic3DVector (mathSSE::Vec4< T > const &iv)
 
 Basic3DVector (const T &x, const T &y, const T &z)
 construct from cartesian coordinates More...
 
template<typename U >
 Basic3DVector (mathSSE::Vec4< U > const &iv)
 
 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)
 
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...
 
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
 
template<class U >
Basic3DVector< typename
PreciseFloatType< T, U >::Type > 
cross (const Basic3DVector< U > &v) const
 
dot (const Basic3DVector &v) const
 Scalar product, or "dot" product, with a vector of same type. More...
 
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
 
template<class U >
PreciseFloatType< T, U >::Type dot (const Basic3DVector< U > &v) const
 
eta () const
 
eta () const
 
mag () const
 The vector magnitude. Equivalent to sqrt(vec.mag2()) More...
 
mag () const
 The vector magnitude. Equivalent to sqrt(vec.mag2()) More...
 
mag2 () const
 The vector magnitude squared. Equivalent to vec.dot(vec) More...
 
mag2 () const
 The vector magnitude squared. Equivalent to vec.dot(vec) More...
 
Basic3DVectoroperator*= (T t)
 Scaling by a scalar value (multiplication) More...
 
Basic3DVectoroperator*= (T t)
 Scaling by a scalar value (multiplication) More...
 
template<class U >
Basic3DVectoroperator+= (const Basic3DVector< U > &p)
 
template<class U >
Basic3DVectoroperator+= (const Basic3DVector< U > &p)
 
Basic3DVector operator- () const
 Unary minus, returns a vector with components (-x(),-y(),-z()) More...
 
Basic3DVector operator- () const
 Unary minus, returns a vector with components (-x(),-y(),-z()) More...
 
template<class U >
Basic3DVectoroperator-= (const Basic3DVector< U > &p)
 
template<class U >
Basic3DVectoroperator-= (const Basic3DVector< U > &p)
 
Basic3DVectoroperator/= (T t)
 Scaling by a scalar value (division) More...
 
Basic3DVectoroperator/= (T t)
 Scaling by a scalar value (division) More...
 
bool operator== (const Basic3DVector &rh) const
 
bool operator== (const Basic3DVector &rh) const
 
perp () const
 Magnitude of transverse component. More...
 
perp () const
 Magnitude of transverse component. More...
 
perp2 () const
 Squared magnitude of transverse component. More...
 
perp2 () const
 Squared magnitude of transverse component. More...
 
Geom::Phi< T > phi () const
 
Geom::Phi< T > phi () const
 
Geom::Theta< T > theta () const
 
Geom::Theta< T > theta () const
 
transverse () const
 Another name for perp() More...
 
transverse () const
 Another name for perp() More...
 
Basic3DVector unit () const
 
Basic3DVector unit () const
 
x () const
 Cartesian x coordinate. More...
 
x () const
 Cartesian x coordinate. More...
 
Basic2DVector< T > xy () const
 
Basic2DVector< T > xy () const
 
y () const
 Cartesian y coordinate. More...
 
y () const
 Cartesian y coordinate. More...
 
z () const
 Cartesian z coordinate. More...
 
z () const
 Cartesian z coordinate. More...
 

Public Attributes

mathSSE::Vec4< T > v
 

Private Attributes

theW
 
theX
 
theY
 
theZ
 

Detailed Description

template<typename T>
class Basic3DVector< T >

Definition at line 14 of file newBasic3DVector.h.

Member Typedef Documentation

template<typename T>
typedef Geom::Cylindrical2Cartesian<T> Basic3DVector< T >::Cylindrical

Definition at line 18 of file newBasic3DVector.h.

template<typename T>
typedef Geom::Cylindrical2Cartesian<T> Basic3DVector< T >::Cylindrical

Definition at line 22 of file oldBasic3DVector.h.

template<typename T>
typedef Spherical Basic3DVector< T >::Polar

Definition at line 20 of file newBasic3DVector.h.

template<typename T>
typedef Spherical Basic3DVector< T >::Polar

Definition at line 24 of file oldBasic3DVector.h.

template<typename T>
typedef T Basic3DVector< T >::ScalarType

Definition at line 17 of file newBasic3DVector.h.

template<typename T>
typedef T Basic3DVector< T >::ScalarType

Definition at line 21 of file oldBasic3DVector.h.

template<typename T>
typedef Geom::Spherical2Cartesian<T> Basic3DVector< T >::Spherical

Definition at line 19 of file newBasic3DVector.h.

template<typename T>
typedef Geom::Spherical2Cartesian<T> Basic3DVector< T >::Spherical

Definition at line 23 of file oldBasic3DVector.h.

Constructor & Destructor Documentation

template<typename T>
Basic3DVector< T >::Basic3DVector ( )
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 26 of file newBasic3DVector.h.

Referenced by Basic3DVector< align::Scalar >::cross(), and Basic3DVector< align::Scalar >::operator-().

26 {}
template<typename T>
Basic3DVector< T >::Basic3DVector ( const Basic3DVector< T > &  p)
inline

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

Definition at line 29 of file newBasic3DVector.h.

29  :
30  v(p.x(),p.y(),p.z()) {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
mathSSE::Vec4< T > v
template<typename T>
template<class U >
Basic3DVector< T >::Basic3DVector ( const Basic3DVector< U > &  p)
inline

Copy constructor and implicit conversion from Basic3DVector of different precision.

Definition at line 34 of file newBasic3DVector.h.

34  :
35  v(p.x(),p.y(),p.z()) {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
mathSSE::Vec4< T > v
template<typename T>
Basic3DVector< T >::Basic3DVector ( const Basic2DVector< T > &  p)
inline

constructor from 2D vector (X and Y from 2D vector, z set to zero)

Definition at line 39 of file newBasic3DVector.h.

39  :
40  v(p.x(),p.y(),0) {}
mathSSE::Vec4< T > v
T y() const
Cartesian y coordinate.
Definition: Basic2DVector.h:65
T x() const
Cartesian x coordinate.
Definition: Basic2DVector.h:62
template<typename T>
template<class OtherPoint >
Basic3DVector< T >::Basic3DVector ( const OtherPoint &  p)
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 newBasic3DVector.h.

52  :
53  v(p.x(),p.y(),p.z()) {}
mathSSE::Vec4< T > v
template<typename T>
Basic3DVector< T >::Basic3DVector ( mathSSE::Vec4< T > const &  iv)
inline

Definition at line 57 of file newBasic3DVector.h.

57 : v(iv){}
mathSSE::Vec4< T > v
template<typename T>
Basic3DVector< T >::Basic3DVector ( const T &  x,
const T &  y,
const T &  z 
)
inline

construct from cartesian coordinates

Definition at line 60 of file newBasic3DVector.h.

60  :
61  v(x,y,z){}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
mathSSE::Vec4< T > v
template<typename T>
template<typename U >
Basic3DVector< T >::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 68 of file newBasic3DVector.h.

69  {
70  Polar p( theta.value(), phi.value(), r);
71  v.o.theX = p.x(); v.o.theY = p.y(); v.o.theZ = p.z();
72  }
mathSSE::Vec4< T > v
T value() const
Explicit access to value in case implicit conversion not OK.
Definition: Theta.h:25
T value() const
Explicit access to value in case implicit conversion not OK.
Definition: Phi.h:38
template<typename T>
Basic3DVector< T >::Basic3DVector ( )
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 30 of file oldBasic3DVector.h.

template<typename T>
Basic3DVector< T >::Basic3DVector ( const Basic3DVector< T > &  p)
inline

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

Definition at line 33 of file oldBasic3DVector.h.

33  :
34  theX(p.x()), theY(p.y()), theZ(p.z()), theW(0) {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
template<class U >
Basic3DVector< T >::Basic3DVector ( const Basic3DVector< U > &  p)
inline

Copy constructor and implicit conversion from Basic3DVector of different precision.

Definition at line 38 of file oldBasic3DVector.h.

38  :
39  theX(p.x()), theY(p.y()), theZ(p.z()), theW(0) {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
Basic3DVector< T >::Basic3DVector ( const Basic2DVector< T > &  p)
inline

constructor from 2D vector (X and Y from 2D vector, z set to zero)

Definition at line 42 of file oldBasic3DVector.h.

42  :
43  theX(p.x()), theY(p.y()), theZ(0), theW(0) {}
T y() const
Cartesian y coordinate.
Definition: Basic2DVector.h:65
T x() const
Cartesian x coordinate.
Definition: Basic2DVector.h:62
template<typename T>
template<class OtherPoint >
Basic3DVector< T >::Basic3DVector ( const OtherPoint &  p)
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 54 of file oldBasic3DVector.h.

template<typename T>
template<typename U >
Basic3DVector< T >::Basic3DVector ( mathSSE::Vec4< U > const &  iv)
inline

Definition at line 61 of file oldBasic3DVector.h.

61  :
62  theX(iv.arr[0]), theY(iv.arr[1]), theZ(iv.arr[2]), theW(0) {}
template<typename T>
Basic3DVector< T >::Basic3DVector ( const T &  x,
const T &  y,
const T &  z 
)
inline

construct from cartesian coordinates

Definition at line 66 of file oldBasic3DVector.h.

66  :
67  theX(x), theY(y), theZ(z), theW(0) {}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
template<typename U >
Basic3DVector< T >::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 74 of file oldBasic3DVector.h.

75  {
76  Polar p( theta.value(), phi.value(), r);
77  theX = p.x(); theY = p.y(); theZ = p.z();
78  }
T value() const
Explicit access to value in case implicit conversion not OK.
Definition: Theta.h:25
T value() const
Explicit access to value in case implicit conversion not OK.
Definition: Phi.h:38

Member Function Documentation

template<typename T>
T Basic3DVector< 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 109 of file newBasic3DVector.h.

Referenced by PV3DBase< long double, PointTag, GlobalTag >::barePhi(), and Basic3DVector< align::Scalar >::phi().

109 {return std::atan2(y(),x());}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<typename T>
T Basic3DVector< 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 116 of file oldBasic3DVector.h.

116 {return std::atan2(y(),x());}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<typename T>
T Basic3DVector< T >::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 116 of file newBasic3DVector.h.

Referenced by PV3DBase< long double, PointTag, GlobalTag >::bareTheta().

116 {return std::atan2(perp(),z());}
T z() const
Cartesian z coordinate.
T perp() const
Magnitude of transverse component.
template<typename T>
T Basic3DVector< T >::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 123 of file oldBasic3DVector.h.

123 {return std::atan2(perp(),z());}
T z() const
Cartesian z coordinate.
T perp() const
Magnitude of transverse component.
template<typename T>
Basic3DVector Basic3DVector< T >::cross ( const Basic3DVector< T > &  v) const
inline

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

Definition at line 192 of file newBasic3DVector.h.

Referenced by Vector3DBase< Scalar, GlobalTag >::cross(), PFDisplacedVertexFinder::getTransvDiff(), and CartesianLorentzForce::operator()().

192  {
193  return Basic3DVector( y()*v.z() - v.y()*z(),
194  z()*v.x() - v.z()*x(),
195  x()*v.y() - v.x()*y());
196  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
Basic3DVector Basic3DVector< T >::cross ( const Basic3DVector< T > &  v) const
inline

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

Definition at line 199 of file oldBasic3DVector.h.

199  {
200  return Basic3DVector( y()*v.z() - v.y()*z(),
201  z()*v.x() - v.z()*x(),
202  x()*v.y() - v.x()*y());
203  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
template<class U >
Basic3DVector<typename PreciseFloatType<T,U>::Type> Basic3DVector< T >::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 205 of file newBasic3DVector.h.

205  {
206  return Basic3DVector<typename PreciseFloatType<T,U>::Type>( y()*v.z() - v.y()*z(),
207  z()*v.x() - v.z()*x(),
208  x()*v.y() - v.x()*y());
209  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
template<class U >
Basic3DVector<typename PreciseFloatType<T,U>::Type> Basic3DVector< T >::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 213 of file oldBasic3DVector.h.

213  {
214  return Basic3DVector<typename PreciseFloatType<T,U>::Type>( y()*v.z() - v.y()*z(),
215  z()*v.x() - v.z()*x(),
216  x()*v.y() - v.x()*y());
217  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
T Basic3DVector< T >::dot ( const Basic3DVector< T > &  v) const
inline
template<typename T>
T Basic3DVector< T >::dot ( const Basic3DVector< T > &  v) const
inline

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

Definition at line 184 of file oldBasic3DVector.h.

184  {
185  return x()*v.x() + y()*v.y() + z()*v.z();
186  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
template<class U >
PreciseFloatType<T,U>::Type Basic3DVector< T >::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 187 of file newBasic3DVector.h.

187  {
188  return x()*v.x() + y()*v.y() + z()*v.z();
189  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
template<class U >
PreciseFloatType<T,U>::Type Basic3DVector< T >::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 194 of file oldBasic3DVector.h.

194  {
195  return x()*v.x() + y()*v.y() + z()*v.z();
196  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
T Basic3DVector< T >::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 124 of file newBasic3DVector.h.

Referenced by DeDxDiscriminatorLearner::algoBeginJob(), SiStripGainFromData::algoBeginJob(), SiStripGainFromCalibTree::algoBeginJob(), DeDxDiscriminatorProducer::beginRun(), CosmicMuonTrajectoryBuilder::build(), and PV3DBase< long double, PointTag, GlobalTag >::eta().

124 { T x(z()/perp()); return std::log(x+std::sqrt(x*x+T(1)));} // faster
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
T sqrt(T t)
Definition: SSEVec.h:28
T perp() const
Magnitude of transverse component.
Log< T >::type log(const T &t)
Definition: Log.h:22
template<typename T>
T Basic3DVector< T >::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 131 of file oldBasic3DVector.h.

131 { T x(z()/perp()); return std::log(x+std::sqrt(x*x+T(1)));} // faster
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
T sqrt(T t)
Definition: SSEVec.h:28
T perp() const
Magnitude of transverse component.
Log< T >::type log(const T &t)
Definition: Log.h:22
template<typename T>
T Basic3DVector< T >::mag ( ) const
inline
template<typename T>
T Basic3DVector< T >::mag ( ) const
inline

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

Definition at line 101 of file oldBasic3DVector.h.

101 { return std::sqrt( mag2());}
T sqrt(T t)
Definition: SSEVec.h:28
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
template<typename T>
T Basic3DVector< T >::mag2 ( ) const
inline

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

Definition at line 91 of file newBasic3DVector.h.

Referenced by PFDisplacedVertexFinder::getLongDiff(), Basic3DVector< align::Scalar >::mag(), PV3DBase< long double, PointTag, GlobalTag >::mag2(), HelixExtrapolatorToLine2Order::pathLength(), TkRotation< align::Scalar >::rotateAxes(), and Basic3DVector< align::Scalar >::unit().

91 { return x()*x() + y()*y()+z()*z();}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
T Basic3DVector< T >::mag2 ( ) const
inline

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

Definition at line 98 of file oldBasic3DVector.h.

98 { return x()*x() + y()*y()+z()*z();}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
Basic3DVector& Basic3DVector< T >::operator*= ( t)
inline

Scaling by a scalar value (multiplication)

Definition at line 160 of file newBasic3DVector.h.

160  {
161  v.o.theX *= t;
162  v.o.theY *= t;
163  v.o.theZ *= t;
164  return *this;
165  }
mathSSE::Vec4< T > v
template<typename T>
Basic3DVector& Basic3DVector< T >::operator*= ( t)
inline

Scaling by a scalar value (multiplication)

Definition at line 167 of file oldBasic3DVector.h.

167  {
168  theX *= t;
169  theY *= t;
170  theZ *= t;
171  return *this;
172  }
template<typename T>
template<class U >
Basic3DVector& Basic3DVector< T >::operator+= ( const Basic3DVector< U > &  p)
inline

Operator += with a Basic3DVector of possibly different precision.

Definition at line 139 of file newBasic3DVector.h.

139  {
140  v.o.theX += p.x();
141  v.o.theY += p.y();
142  v.o.theZ += p.z();
143  return *this;
144  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
mathSSE::Vec4< T > v
template<typename T>
template<class U >
Basic3DVector& Basic3DVector< T >::operator+= ( const Basic3DVector< U > &  p)
inline

Operator += with a Basic3DVector of possibly different precision.

Definition at line 146 of file oldBasic3DVector.h.

146  {
147  theX += p.x();
148  theY += p.y();
149  theZ += p.z();
150  return *this;
151  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
Basic3DVector Basic3DVector< T >::operator- ( ) const
inline

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

Definition at line 157 of file newBasic3DVector.h.

157 { return Basic3DVector(-x(),-y(),-z());}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
Basic3DVector Basic3DVector< T >::operator- ( ) const
inline

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

Definition at line 164 of file oldBasic3DVector.h.

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

Operator -= with a Basic3DVector of possibly different precision.

Definition at line 149 of file newBasic3DVector.h.

149  {
150  v.o.theX -= p.x();
151  v.o.theY -= p.y();
152  v.o.theZ -= p.z();
153  return *this;
154  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
mathSSE::Vec4< T > v
template<typename T>
template<class U >
Basic3DVector& Basic3DVector< T >::operator-= ( const Basic3DVector< U > &  p)
inline

Operator -= with a Basic3DVector of possibly different precision.

Definition at line 156 of file oldBasic3DVector.h.

156  {
157  theX -= p.x();
158  theY -= p.y();
159  theZ -= p.z();
160  return *this;
161  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
Basic3DVector& Basic3DVector< T >::operator/= ( t)
inline

Scaling by a scalar value (division)

Definition at line 168 of file newBasic3DVector.h.

168  {
169  t = T(1)/t;
170  v.o.theX *= t;
171  v.o.theY *= t;
172  v.o.theZ *= t;
173  return *this;
174  }
mathSSE::Vec4< T > v
template<typename T>
Basic3DVector& Basic3DVector< T >::operator/= ( t)
inline

Scaling by a scalar value (division)

Definition at line 175 of file oldBasic3DVector.h.

175  {
176  t = T(1)/t;
177  theX *= t;
178  theY *= t;
179  theZ *= t;
180  return *this;
181  }
template<typename T>
bool Basic3DVector< T >::operator== ( const Basic3DVector< T > &  rh) const
inline

Definition at line 86 of file newBasic3DVector.h.

86  {
87  return x()==rh.x() && y()==rh.y() && z()==rh.z();
88  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
bool Basic3DVector< T >::operator== ( const Basic3DVector< T > &  rh) const
inline

Definition at line 93 of file oldBasic3DVector.h.

93  {
94  return x()==rh.x() && y()==rh.y() && z()==rh.z();
95  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<typename T>
T Basic3DVector< T >::perp ( ) const
inline
template<typename T>
T Basic3DVector< T >::perp ( ) const
inline

Magnitude of transverse component.

Definition at line 107 of file oldBasic3DVector.h.

107 { return std::sqrt( perp2());}
T perp2() const
Squared magnitude of transverse component.
T sqrt(T t)
Definition: SSEVec.h:28
template<typename T>
T Basic3DVector< T >::perp2 ( ) const
inline

Squared magnitude of transverse component.

Definition at line 97 of file newBasic3DVector.h.

Referenced by Basic3DVector< align::Scalar >::perp(), and PV3DBase< long double, PointTag, GlobalTag >::perp2().

97 { return x()*x() + y()*y();}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<typename T>
T Basic3DVector< T >::perp2 ( ) const
inline

Squared magnitude of transverse component.

Definition at line 104 of file oldBasic3DVector.h.

104 { return x()*x() + y()*y();}
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<typename T>
Geom::Phi<T> Basic3DVector< T >::phi ( ) const
inline
template<typename T>
Geom::Phi<T> Basic3DVector< T >::phi ( ) const
inline

Definition at line 117 of file oldBasic3DVector.h.

117 {return Geom::Phi<T>(barePhi());}
T barePhi() const
Definition: Phi.h:20
template<typename T>
Geom::Theta<T> Basic3DVector< T >::theta ( ) const
inline

Definition at line 117 of file newBasic3DVector.h.

Referenced by AlCaHOCalibProducer::produce(), PV3DBase< long double, PointTag, GlobalTag >::theta(), and TkRotation< align::Scalar >::TkRotation().

117 {return Geom::Theta<T>(std::atan2(perp(),z()));}
T z() const
Cartesian z coordinate.
T perp() const
Magnitude of transverse component.
template<typename T>
Geom::Theta<T> Basic3DVector< T >::theta ( ) const
inline

Definition at line 124 of file oldBasic3DVector.h.

124 {return Geom::Theta<T>(std::atan2(perp(),z()));}
T z() const
Cartesian z coordinate.
T perp() const
Magnitude of transverse component.
template<typename T>
T Basic3DVector< T >::transverse ( ) const
inline
template<typename T>
T Basic3DVector< T >::transverse ( ) const
inline

Another name for perp()

Definition at line 110 of file oldBasic3DVector.h.

110 { return perp();}
T perp() const
Magnitude of transverse component.
template<typename T>
Basic3DVector Basic3DVector< T >::unit ( ) const
inline

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

Definition at line 129 of file newBasic3DVector.h.

Referenced by CartesianLorentzForce::operator()(), PathToPlane2Order::operator()(), and HelixBarrelPlaneCrossingByCircle::position().

129  {
130  T my_mag = mag2();
131  if (my_mag==0) return *this;
132  my_mag = T(1)/std::sqrt(my_mag);
133  return *this * my_mag;
134  }
T sqrt(T t)
Definition: SSEVec.h:28
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
template<typename T>
Basic3DVector Basic3DVector< T >::unit ( ) const
inline

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

Definition at line 136 of file oldBasic3DVector.h.

136  {
137  T my_mag = mag2();
138  if (my_mag==0) return *this;
139  my_mag = T(1)/std::sqrt(my_mag);
140  return *this * my_mag;
141  }
T sqrt(T t)
Definition: SSEVec.h:28
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
template<typename T>
T Basic3DVector< T >::x ( ) const
inline

Cartesian x coordinate.

Definition at line 75 of file newBasic3DVector.h.

Referenced by svgfig.Curve.Sample::__repr__(), svgfig.Ellipse::__repr__(), SiStripGainFromCalibTree::algoBeginJob(), LinearEquation3< T >::Array3< U >::Array3(), python.Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Basic3DVector< align::Scalar >::barePhi(), python.Vispa.Gui.VispaWidget.VispaWidget::boundingRect(), HelixBarrelPlaneCrossingByCircle::chooseSolution(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), Basic3DVector< align::Scalar >::cross(), HelixBarrelPlaneCrossingByCircle::direction(), HelixArbitraryPlaneCrossing::direction(), HelixArbitraryPlaneCrossing2Order::direction(), HelixExtrapolatorToLine2Order::directionInDouble(), Basic3DVector< align::Scalar >::dot(), Basic3DVector< align::Scalar >::eta(), IterativeHelixExtrapolatorToLine::genericPathLength(), HelixArbitraryPlaneCrossing::HelixArbitraryPlaneCrossing(), HelixArbitraryPlaneCrossing2Order::HelixArbitraryPlaneCrossing2Order(), HelixExtrapolatorToLine2Order::HelixExtrapolatorToLine2Order(), HelixForwardPlaneCrossing::HelixForwardPlaneCrossing(), HelixBarrelPlaneCrossingByCircle::init(), IterativeHelixExtrapolatorToLine::IterativeHelixExtrapolatorToLine(), Basic3DVector< align::Scalar >::mag2(), ThirdHitPredictionFromInvLine::MappedPoint< T >::MappedPoint(), ConformalMappingFit::MappedPoint< T >::MappedPoint(), ThirdHitPredictionFromInvParabola::MappedPoint< double >::MappedPoint(), reco::PFDisplacedVertexSeed::mergeWith(), CurvilinearState::momentum(), TkRotation< align::Scalar >::multiplyInverse(), HelixArbitraryPlaneCrossing::notAtSurface(), PathToPlane2Order::operator()(), TkRotation< align::Scalar >::operator*(), operator*(), operator+(), Basic3DVector< align::Scalar >::operator+=(), Basic3DVector< align::Scalar >::operator-(), operator-(), Basic3DVector< align::Scalar >::operator-=(), LinearEquation3< T >::Array3< U >::operator=(), Basic3DVector< align::Scalar >::operator==(), TrackAssociatorByChi2::parametersAtClosestApproach(), HelixArbitraryPlaneCrossing::pathLength(), HelixBarrelPlaneCrossingByCircle::pathLength(), HelixExtrapolatorToLine2Order::pathLength(), Basic3DVector< align::Scalar >::perp2(), geometryXMLparser.Alignable::pos(), HelixBarrelPlaneCrossingByCircle::position(), HelixArbitraryPlaneCrossing::position(), HelixArbitraryPlaneCrossing2Order::position(), HelixExtrapolatorToLine2Order::positionInDouble(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), CartesianStateAdaptor::rkstate(), TkRotation< align::Scalar >::rotateAxes(), VertexDistanceXY::signedDistance(), VertexDistance3D::signedDistance(), ThirdHitPredictionFromInvLine::MappedPoint< T >::unmap(), ConformalMappingFit::MappedPoint< T >::unmap(), ThirdHitPredictionFromInvParabola::MappedPoint< double >::unmap(), reco::PFDisplacedVertexSeed::updateSeedPoint(), PV3DBase< long double, PointTag, GlobalTag >::x(), and x().

75 { return v.o.theX;}
mathSSE::Vec4< T > v
template<typename T>
T Basic3DVector< T >::x ( ) const
inline
template<typename T>
Basic2DVector<T> Basic3DVector< T >::xy ( ) const
inline

Definition at line 83 of file newBasic3DVector.h.

Referenced by geometryXMLparser.Alignable::covariance().

83 { return v.xy();}
mathSSE::Vec4< T > v
template<typename T>
Basic2DVector<T> Basic3DVector< T >::xy ( ) const
inline
template<typename T>
T Basic3DVector< T >::y ( ) const
inline

Cartesian y coordinate.

Definition at line 78 of file newBasic3DVector.h.

Referenced by svgfig.Ellipse::__repr__(), SiStripGainFromCalibTree::algoBeginJob(), LinearEquation3< T >::Array3< U >::Array3(), python.Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Basic3DVector< align::Scalar >::barePhi(), python.Vispa.Gui.VispaWidget.VispaWidget::boundingRect(), HelixBarrelPlaneCrossingByCircle::chooseSolution(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), Basic3DVector< align::Scalar >::cross(), HelixBarrelPlaneCrossingByCircle::direction(), HelixArbitraryPlaneCrossing::direction(), HelixArbitraryPlaneCrossing2Order::direction(), HelixExtrapolatorToLine2Order::directionInDouble(), Basic3DVector< align::Scalar >::dot(), IterativeHelixExtrapolatorToLine::genericPathLength(), HelixArbitraryPlaneCrossing::HelixArbitraryPlaneCrossing(), HelixArbitraryPlaneCrossing2Order::HelixArbitraryPlaneCrossing2Order(), HelixExtrapolatorToLine2Order::HelixExtrapolatorToLine2Order(), HelixForwardPlaneCrossing::HelixForwardPlaneCrossing(), HelixBarrelPlaneCrossingByCircle::init(), IterativeHelixExtrapolatorToLine::IterativeHelixExtrapolatorToLine(), Basic3DVector< align::Scalar >::mag2(), ThirdHitPredictionFromInvLine::MappedPoint< T >::MappedPoint(), ConformalMappingFit::MappedPoint< T >::MappedPoint(), ThirdHitPredictionFromInvParabola::MappedPoint< double >::MappedPoint(), reco::PFDisplacedVertexSeed::mergeWith(), CurvilinearState::momentum(), TkRotation< align::Scalar >::multiplyInverse(), HelixArbitraryPlaneCrossing::notAtSurface(), PathToPlane2Order::operator()(), TkRotation< align::Scalar >::operator*(), operator*(), operator+(), Basic3DVector< align::Scalar >::operator+=(), Basic3DVector< align::Scalar >::operator-(), operator-(), Basic3DVector< align::Scalar >::operator-=(), LinearEquation3< T >::Array3< U >::operator=(), Basic3DVector< align::Scalar >::operator==(), TrackAssociatorByChi2::parametersAtClosestApproach(), HelixArbitraryPlaneCrossing::pathLength(), HelixBarrelPlaneCrossingByCircle::pathLength(), HelixExtrapolatorToLine2Order::pathLength(), Basic3DVector< align::Scalar >::perp2(), geometryXMLparser.Alignable::pos(), HelixArbitraryPlaneCrossing::position(), HelixBarrelPlaneCrossingByCircle::position(), HelixArbitraryPlaneCrossing2Order::position(), HelixExtrapolatorToLine2Order::positionInDouble(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), CartesianStateAdaptor::rkstate(), TkRotation< align::Scalar >::rotateAxes(), VertexDistanceXY::signedDistance(), VertexDistance3D::signedDistance(), ThirdHitPredictionFromInvLine::MappedPoint< T >::unmap(), ConformalMappingFit::MappedPoint< T >::unmap(), ThirdHitPredictionFromInvParabola::MappedPoint< double >::unmap(), reco::PFDisplacedVertexSeed::updateSeedPoint(), x(), and PV3DBase< long double, PointTag, GlobalTag >::y().

78 { return v.o.theY;}
mathSSE::Vec4< T > v
template<typename T>
T Basic3DVector< T >::y ( ) const
inline
template<typename T>
T Basic3DVector< T >::z ( ) const
inline

Cartesian z coordinate.

Definition at line 81 of file newBasic3DVector.h.

Referenced by SiStripGainFromCalibTree::algoBeginJob(), LinearEquation3< T >::Array3< U >::Array3(), Basic3DVector< align::Scalar >::bareTheta(), CurvilinearState::charge(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), Basic3DVector< align::Scalar >::cross(), HelixBarrelPlaneCrossingByCircle::direction(), HelixArbitraryPlaneCrossing::direction(), HelixArbitraryPlaneCrossing2Order::direction(), HelixExtrapolatorToLine2Order::directionInDouble(), Basic3DVector< align::Scalar >::dot(), Basic3DVector< align::Scalar >::eta(), IterativeHelixExtrapolatorToLine::genericPathLength(), HelixArbitraryPlaneCrossing::HelixArbitraryPlaneCrossing(), HelixArbitraryPlaneCrossing2Order::HelixArbitraryPlaneCrossing2Order(), HelixExtrapolatorToLine2Order::HelixExtrapolatorToLine2Order(), HelixForwardPlaneCrossing::HelixForwardPlaneCrossing(), HelixBarrelPlaneCrossingByCircle::init(), IterativeHelixExtrapolatorToLine::IterativeHelixExtrapolatorToLine(), Basic3DVector< align::Scalar >::mag2(), reco::PFDisplacedVertexSeed::mergeWith(), CurvilinearState::momentum(), TkRotation< align::Scalar >::multiplyInverse(), HelixArbitraryPlaneCrossing::notAtSurface(), RK4PreciseStep::operator()(), PathToPlane2Order::operator()(), TkRotation< align::Scalar >::operator*(), operator*(), operator+(), Basic3DVector< align::Scalar >::operator+=(), Basic3DVector< align::Scalar >::operator-(), operator-(), Basic3DVector< align::Scalar >::operator-=(), LinearEquation3< T >::Array3< U >::operator=(), Basic3DVector< align::Scalar >::operator==(), TrackAssociatorByChi2::parametersAtClosestApproach(), HelixForwardPlaneCrossing::pathLength(), HelixArbitraryPlaneCrossing::pathLength(), geometryXMLparser.Alignable::pos(), HelixArbitraryPlaneCrossing::position(), HelixBarrelPlaneCrossingByCircle::position(), HelixArbitraryPlaneCrossing2Order::position(), HelixExtrapolatorToLine2Order::positionInDouble(), RKPropagatorInS::propagateParametersOnCylinder(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), CartesianStateAdaptor::rkstate(), TkRotation< align::Scalar >::rotateAxes(), VertexDistance3D::signedDistance(), Basic3DVector< align::Scalar >::theta(), reco::PFDisplacedVertexSeed::updateSeedPoint(), x(), and PV3DBase< long double, PointTag, GlobalTag >::z().

81 { return v.o.theZ;}
mathSSE::Vec4< T > v
template<typename T>
T Basic3DVector< T >::z ( ) const
inline

Cartesian z coordinate.

Definition at line 87 of file oldBasic3DVector.h.

Referenced by geometryXMLparser.Alignable::pos().

87 { return theZ;}

Member Data Documentation

template<typename T>
T Basic3DVector< T >::theW
private

Definition at line 223 of file oldBasic3DVector.h.

template<typename T>
T Basic3DVector< T >::theX
private
template<typename T>
T Basic3DVector< T >::theY
private
template<typename T>
T Basic3DVector< T >::theZ
private
template<typename T>
mathSSE::Vec4<T> Basic3DVector< T >::v