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 >
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 >
Basic2DVector< Toperator* (const Basic2DVector< T > &v, T t)
 
template<class T >
Basic2DVector< Toperator* (T t, const Basic2DVector< T > &v)
 Same as operator*( Vector, Scalar) More...
 
template<class T , class Scalar >
Basic2DVector< Toperator* (const Basic2DVector< T > &v, const Scalar &s)
 
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+ (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 >
Basic2DVector< Toperator/ (const Basic2DVector< T > &v, T t)
 
template<class T , class Scalar >
Basic2DVector< Toperator/ (const Basic2DVector< T > &v, const Scalar &s)
 
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 244 of file sseBasic2DVector.h.

◆ Basic2DVectorF

typedef Basic2DVector<float> Basic2DVectorF

Definition at line 243 of file sseBasic2DVector.h.

Function Documentation

◆ operator*() [1/6]

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

Definition at line 191 of file sseBasic2DVector.h.

191  {
192  return v1.dot(v2);
193 }

◆ operator*() [2/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 197 of file sseBasic2DVector.h.

197  {
198  return v1.dot(v2);
199 }

◆ operator*() [3/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 205 of file sseBasic2DVector.h.

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

205  {
206  return v.v * t;
207 }

◆ operator*() [4/6]

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

Same as operator*( Vector, Scalar)

Definition at line 211 of file sseBasic2DVector.h.

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

211  {
212  return v.v * t;
213 }

◆ operator*() [5/6]

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

Definition at line 216 of file sseBasic2DVector.h.

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

216  {
217  T t = static_cast<T>(s);
218  return v * t;
219 }
long double T

◆ operator*() [6/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 223 of file sseBasic2DVector.h.

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

223  {
224  T t = static_cast<T>(s);
225  return v * t;
226 }
long double T

◆ 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 167 of file sseBasic2DVector.h.

References a, and b.

167  {
168  return a.v + b.v;
169 }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ 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 176 of file sseBasic2DVector.h.

References a, and b.

177  {
179  return RT(a) + RT(b);
180 }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator-() [1/2]

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

Definition at line 171 of file sseBasic2DVector.h.

References a, and b.

171  {
172  return a.v - b.v;
173 }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ 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 183 of file sseBasic2DVector.h.

References a, and b.

184  {
186  return RT(a) - RT(b);
187 }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator/() [1/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 232 of file sseBasic2DVector.h.

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

232  {
233  return v.v / t;
234 }

◆ operator/() [2/2]

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

Definition at line 237 of file sseBasic2DVector.h.

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

237  {
238  // T t = static_cast<T>(Scalar(1)/s); return v*t;
239  T t = static_cast<T>(s);
240  return v / t;
241 }
long double T

◆ operator<<()

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

simple text output to standard streams

Definition at line 161 of file sseBasic2DVector.h.

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

161  {
162  return geometryDetails::print2D(s, v.x(), v.y());
163 }
std::ostream & print2D(std::ostream &s, double x, double y)
Definition: print.cc:8

Variable Documentation

◆ __attribute__

class Basic2DVector __attribute__