CMS 3D CMS Logo

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).
template<class T, class FrameTag, class Scalar>
Vector3DBase< T, FrameTag > operator * (const Vector3DBase< T, FrameTag > &v, const Scalar &s)
 Multiplication by scalar, does not change the precision of the vector.
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
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
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)
 Division by scalar, does not change the precision of the vector.


Function Documentation

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 154 of file Vector3DBase.h.

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

00154                                                                 {
00155   return Vector3DBase<T, FrameTag>( v.basicVector() * s);
00156 }

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 147 of file Vector3DBase.h.

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

00147                                                                 {
00148   return Vector3DBase<T, FrameTag>( v.basicVector() * s);
00149 }

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 138 of file Vector3DBase.h.

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

00138                                                                                      {
00139   return v1.basicVector() * v2.basicVector();
00140 }

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 123 of file Vector3DBase.h.

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

00123                                                                                      {
00124   typedef Vector3DBase<typename PreciseFloatType<T,U>::Type, FrameTag> RT;
00125   return RT(v1.basicVector() + v2.basicVector());
00126 }

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 130 of file Vector3DBase.h.

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

00130                                                                                      {
00131   typedef Vector3DBase<typename PreciseFloatType<T,U>::Type, FrameTag> RT;
00132   return RT(v1.basicVector() - v2.basicVector());
00133 }

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 163 of file Vector3DBase.h.

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

00163                                                                 {
00164   return Vector3DBase<T, FrameTag>( v.basicVector() / s);
00165 }


Generated on Tue Jun 9 17:52:06 2009 for CMSSW by  doxygen 1.5.4