CMS 3D CMS Logo

Classes | Functions
Vector2DBase.h File Reference
#include "DataFormats/GeometryVector/interface/VectorTag.h"
#include "DataFormats/GeometryVector/interface/PV2DBase.h"

Go to the source code of this file.

Classes

class  Vector2DBase< T, FrameTag >
 

Functions

template<class T , class U , class FrameTag >
PreciseFloatType< T, U >::Type operator* (const Vector2DBase< T, FrameTag > &v1, const Vector2DBase< U, FrameTag > &v2)
 scalar product of vectors of possibly different precision More...
 
template<class T , class FrameTag , class Scalar >
Vector2DBase< T, FrameTag > operator* (const Vector2DBase< T, FrameTag > &v, const Scalar &s)
 
template<class T , class FrameTag , class Scalar >
Vector2DBase< T, FrameTag > operator* (const Scalar &s, const Vector2DBase< T, FrameTag > &v)
 Same as operator*( Vector, Scalar) More...
 
template<class T , class U , class FrameTag >
Vector2DBase< typename PreciseFloatType< T, U >::Type, FrameTag > operator+ (const Vector2DBase< T, FrameTag > &v1, const Vector2DBase< U, FrameTag > &v2)
 vector sum and subtraction of vectors of possibly different precision More...
 
template<class T , class U , class FrameTag >
Vector2DBase< typename PreciseFloatType< T, U >::Type, FrameTag > operator- (const Vector2DBase< T, FrameTag > &v1, const Vector2DBase< U, FrameTag > &v2)
 
template<class T , class FrameTag , class Scalar >
Vector2DBase< T, FrameTag > operator/ (const Vector2DBase< T, FrameTag > &v, const Scalar &s)
 

Function Documentation

◆ operator*() [1/3]

template<class T , class U , class FrameTag >
PreciseFloatType<T, U>::Type operator* ( const Vector2DBase< T, FrameTag > &  v1,
const Vector2DBase< U, FrameTag > &  v2 
)
inline

scalar product of vectors of possibly different precision

Definition at line 106 of file Vector2DBase.h.

References PV2DBase< T, VectorTag, FrameTag >::basicVector().

107  {
108  return v1.basicVector() * v2.basicVector();
109 }
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:37

◆ operator*() [2/3]

template<class T , class FrameTag , class Scalar >
Vector2DBase<T, FrameTag> operator* ( const Vector2DBase< T, FrameTag > &  v,
const Scalar &  s 
)
inline

Multiplication by scalar, does not change the precision of the vector. The return type is the same as the type of the vector argument.

Definition at line 115 of file Vector2DBase.h.

References alignCSCRings::s, and findQualityFiles::v.

115  {
116  return Vector2DBase<T, FrameTag>(v.basicVector() * s);
117 }

◆ operator*() [3/3]

template<class T , class FrameTag , class Scalar >
Vector2DBase<T, FrameTag> operator* ( const Scalar &  s,
const Vector2DBase< T, FrameTag > &  v 
)
inline

Same as operator*( Vector, Scalar)

Definition at line 121 of file Vector2DBase.h.

References alignCSCRings::s, and findQualityFiles::v.

121  {
122  return Vector2DBase<T, FrameTag>(v.basicVector() * s);
123 }

◆ operator+()

template<class T , class U , class FrameTag >
Vector2DBase<typename PreciseFloatType<T, U>::Type, FrameTag> operator+ ( const Vector2DBase< T, FrameTag > &  v1,
const Vector2DBase< U, FrameTag > &  v2 
)
inline

vector sum and subtraction of vectors of possibly different precision

Definition at line 91 of file Vector2DBase.h.

References PV2DBase< T, VectorTag, FrameTag >::basicVector().

92  {
94  return RT(v1.basicVector() + v2.basicVector());
95 }
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:37

◆ operator-()

template<class T , class U , class FrameTag >
Vector2DBase<typename PreciseFloatType<T, U>::Type, FrameTag> operator- ( const Vector2DBase< T, FrameTag > &  v1,
const Vector2DBase< U, FrameTag > &  v2 
)
inline

Definition at line 98 of file Vector2DBase.h.

References PV2DBase< T, VectorTag, FrameTag >::basicVector().

99  {
101  return RT(v1.basicVector() - v2.basicVector());
102 }
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:37

◆ operator/()

template<class T , class FrameTag , class Scalar >
Vector2DBase<T, FrameTag> operator/ ( const Vector2DBase< T, FrameTag > &  v,
const Scalar &  s 
)
inline

Division by scalar, does not change the precision of the vector. The return type is the same as the type of the vector argument.

Definition at line 129 of file Vector2DBase.h.

References alignCSCRings::s, and findQualityFiles::v.

129  {
130  return Vector2DBase<T, FrameTag>(v.basicVector() / s);
131 }