CMS 3D CMS Logo

Classes | Functions
Vector3DBase.h File Reference
#include "DataFormats/GeometryVector/interface/VectorTag.h"
#include "DataFormats/GeometryVector/interface/PV3DBase.h"

Go to the source code of this file.

Classes

class  Vector3DBase< T, FrameTag >
 

Functions

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

Function Documentation

◆ operator*() [1/3]

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

Same as operator*( Vector, Scalar)

Definition at line 148 of file Vector3DBase.h.

148  {
149  return Vector3DBase<T, FrameTag>(v.basicVector() * s);
150 }

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

◆ operator*() [2/3]

template<class T , class FrameTag , class Scalar >
Vector3DBase<T, FrameTag> operator* ( const Vector3DBase< 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 142 of file Vector3DBase.h.

142  {
143  return Vector3DBase<T, FrameTag>(v.basicVector() * s);
144 }

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

◆ operator*() [3/3]

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

scalar product of vectors of possibly different precision

Definition at line 133 of file Vector3DBase.h.

134  {
135  return v1.basicVector() * v2.basicVector();
136 }

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

◆ operator+()

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

vector sum and subtraction of vectors of possibly different precision

Definition at line 118 of file Vector3DBase.h.

119  {
121  return RT(v1.basicVector() + v2.basicVector());
122 }

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

◆ operator-()

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

Definition at line 125 of file Vector3DBase.h.

126  {
128  return RT(v1.basicVector() - v2.basicVector());
129 }

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

◆ operator/()

template<class T , class FrameTag , class Scalar >
Vector3DBase<T, FrameTag> operator/ ( const Vector3DBase< 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 156 of file Vector3DBase.h.

156  {
157  return Vector3DBase<T, FrameTag>(v.basicVector() / s);
158 }

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

Vector3DBase
Definition: Vector3DBase.h:8
findQualityFiles.v
v
Definition: findQualityFiles.py:179
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PV3DBase< T, VectorTag, FrameTag >::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53