CMS 3D CMS Logo

Classes | Namespaces | Typedefs | Functions | Variables
sseBasic2DVector.h File Reference
#include "DataFormats/GeometryVector/interface/Phi.h"
#include "DataFormats/GeometryVector/interface/PreciseFloatType.h"
#include "DataFormats/GeometryVector/interface/CoordinateSets.h"
#include "DataFormats/Math/interface/SSEVec.h"
#include <cmath>
#include <iosfwd>

Go to the source code of this file.

Classes

class  Basic2DVector< T >
 

Namespaces

 geometryDetails
 

Typedefs

typedef Basic2DVector< double > Basic2DVectorD
 
typedef Basic2DVector< float > Basic2DVectorF
 

Functions

template<class T , class Scalar >
Basic2DVector< Toperator* (const Basic2DVector< T > &v, const Scalar &s)
 
template<class T >
Basic2DVector< Toperator* (const Basic2DVector< T > &v, T t)
 
template<class T >
T operator* (const Basic2DVector< T > &v1, const Basic2DVector< T > &v2)
 
template<class T , class U >
PreciseFloatType< T, U >::Type operator* (const Basic2DVector< T > &v1, const Basic2DVector< U > &v2)
 scalar product of vectors of different precision More...
 
template<class T , class Scalar >
Basic2DVector< Toperator* (const Scalar &s, const Basic2DVector< T > &v)
 Same as operator*( Vector, Scalar) More...
 
template<class T >
Basic2DVector< Toperator* (T t, const Basic2DVector< T > &v)
 Same as operator*( Vector, Scalar) More...
 
template<class T >
Basic2DVector< Toperator+ (const Basic2DVector< T > &a, const Basic2DVector< T > &b)
 vector sum and subtraction of vectors of possibly different precision More...
 
template<class T , class U >
Basic2DVector< typename PreciseFloatType< T, U >::Type > operator+ (const Basic2DVector< T > &a, const Basic2DVector< U > &b)
 
template<class T >
Basic2DVector< Toperator- (const Basic2DVector< T > &a, const Basic2DVector< T > &b)
 
template<class T , class U >
Basic2DVector< typename PreciseFloatType< T, U >::Type > operator- (const Basic2DVector< T > &a, const Basic2DVector< U > &b)
 
template<class T , class Scalar >
Basic2DVector< Toperator/ (const Basic2DVector< T > &v, const Scalar &s)
 
template<class T >
Basic2DVector< Toperator/ (const Basic2DVector< T > &v, T t)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Basic2DVector< T > &v)
 simple text output to standard streams More...
 
std::ostream & geometryDetails::print2D (std::ostream &s, double x, double y)
 

Variables

class Basic2DVector __attribute__
 

Typedef Documentation

◆ Basic2DVectorD

typedef Basic2DVector<double> Basic2DVectorD

Definition at line 241 of file sseBasic2DVector.h.

◆ Basic2DVectorF

typedef Basic2DVector<float> Basic2DVectorF

Definition at line 240 of file sseBasic2DVector.h.

Function Documentation

◆ operator*() [1/6]

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

Definition at line 213 of file sseBasic2DVector.h.

213  {
214  T t = static_cast<T>(s);
215  return v * t;
216 }

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

◆ operator*() [2/6]

template<class T >
Basic2DVector<T> operator* ( const Basic2DVector< T > &  v,
T  t 
)
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 202 of file sseBasic2DVector.h.

202  {
203  return v.v * t;
204 }

References OrderedSet::t, and findQualityFiles::v.

◆ operator*() [3/6]

template<class T >
T operator* ( const Basic2DVector< T > &  v1,
const Basic2DVector< T > &  v2 
)
inline

Definition at line 188 of file sseBasic2DVector.h.

188  {
189  return v1.dot(v2);
190 }

References Basic2DVector< T >::dot().

◆ operator*() [4/6]

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

scalar product of vectors of different precision

Definition at line 194 of file sseBasic2DVector.h.

194  {
195  return v1.dot(v2);
196 }

References Basic2DVector< T >::dot().

◆ operator*() [5/6]

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

Same as operator*( Vector, Scalar)

Definition at line 220 of file sseBasic2DVector.h.

220  {
221  T t = static_cast<T>(s);
222  return v * t;
223 }

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

◆ operator*() [6/6]

template<class T >
Basic2DVector<T> operator* ( T  t,
const Basic2DVector< T > &  v 
)
inline

Same as operator*( Vector, Scalar)

Definition at line 208 of file sseBasic2DVector.h.

208  {
209  return v.v * t;
210 }

References OrderedSet::t, and findQualityFiles::v.

◆ operator+() [1/2]

template<class T >
Basic2DVector<T> operator+ ( const Basic2DVector< T > &  a,
const Basic2DVector< T > &  b 
)
inline

vector sum and subtraction of vectors of possibly different precision

Definition at line 164 of file sseBasic2DVector.h.

164  {
165  return a.v + b.v;
166 }

References a, and b.

◆ operator+() [2/2]

template<class T , class U >
Basic2DVector<typename PreciseFloatType<T, U>::Type> operator+ ( const Basic2DVector< T > &  a,
const Basic2DVector< U > &  b 
)
inline

Definition at line 173 of file sseBasic2DVector.h.

174  {
176  return RT(a) + RT(b);
177 }

References a, and b.

◆ operator-() [1/2]

template<class T >
Basic2DVector<T> operator- ( const Basic2DVector< T > &  a,
const Basic2DVector< T > &  b 
)
inline

Definition at line 168 of file sseBasic2DVector.h.

168  {
169  return a.v - b.v;
170 }

References a, and b.

◆ operator-() [2/2]

template<class T , class U >
Basic2DVector<typename PreciseFloatType<T, U>::Type> operator- ( const Basic2DVector< T > &  a,
const Basic2DVector< U > &  b 
)
inline

Definition at line 180 of file sseBasic2DVector.h.

181  {
183  return RT(a) - RT(b);
184 }

References a, and b.

◆ operator/() [1/2]

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

Definition at line 234 of file sseBasic2DVector.h.

234  {
235  // T t = static_cast<T>(Scalar(1)/s); return v*t;
236  T t = static_cast<T>(s);
237  return v / t;
238 }

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

◆ operator/() [2/2]

template<class T >
Basic2DVector<T> operator/ ( const Basic2DVector< T > &  v,
T  t 
)
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 229 of file sseBasic2DVector.h.

229  {
230  return v.v / t;
231 }

References OrderedSet::t, and findQualityFiles::v.

◆ operator<<()

template<class T >
std::ostream& operator<< ( std::ostream &  s,
const Basic2DVector< T > &  v 
)
inline

simple text output to standard streams

Definition at line 158 of file sseBasic2DVector.h.

158  {
159  return geometryDetails::print2D(s, v.x(), v.y());
160 }

References geometryDetails::print2D(), alignCSCRings::s, and findQualityFiles::v.

Variable Documentation

◆ __attribute__

class Basic2DVector __attribute__
findQualityFiles.v
v
Definition: findQualityFiles.py:179
alignCSCRings.s
s
Definition: alignCSCRings.py:92
Basic2DVector::dot
T dot(const Basic2DVector &lh) const
Scalar product, or "dot" product, with a vector of same type.
Definition: extBasic2DVector.h:126
OrderedSet.t
t
Definition: OrderedSet.py:90
b
double b
Definition: hdecay.h:118
Basic2DVector
Definition: extBasic2DVector.h:15
a
double a
Definition: hdecay.h:119
T
long double T
Definition: Basic3DVectorLD.h:48
geometryDetails::print2D
std::ostream & print2D(std::ostream &s, double x, double y)
Definition: print.cc:8