CMS 3D CMS Logo

Classes | Namespaces | Typedefs | Functions | Variables
oldBasic2DVector.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/SIMDVec.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 >
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 , class U >
Basic2DVector< typename PreciseFloatType< T, U >::Type > operator+ (const Basic2DVector< T > &a, const Basic2DVector< U > &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 , 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 239 of file oldBasic2DVector.h.

◆ Basic2DVectorF

typedef Basic2DVector<float> Basic2DVectorF

Definition at line 238 of file oldBasic2DVector.h.

Function Documentation

◆ operator*() [1/4]

template<class T , class Scalar >
Basic2DVector<T> operator* ( const Basic2DVector< T > &  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 216 of file oldBasic2DVector.h.

216  {
217  T t = static_cast<T>(s);
218  return Basic2DVector<T>(v.x()*t, v.y()*t);
219 }

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

◆ operator*() [2/4]

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

Definition at line 201 of file oldBasic2DVector.h.

201  {
202  return v1.dot(v2);
203 }

References Basic2DVector< T >::dot().

◆ operator*() [3/4]

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 207 of file oldBasic2DVector.h.

208  {
209  return v1.x()*v2.x() + v1.y()*v2.y();
210 }

References Basic2DVector< T >::x(), and Basic2DVector< T >::y().

◆ operator*() [4/4]

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 oldBasic2DVector.h.

223  {
224  T t = static_cast<T>(s);
225  return Basic2DVector<T>(v.x()*t, v.y()*t);
226 }

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

◆ operator+()

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

vector sum and subtraction of vectors of possibly different precision

Definition at line 184 of file oldBasic2DVector.h.

184  {
186  return RT(a.x()+b.x(), a.y()+b.y());
187 }

References a, and b.

◆ operator-()

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

Definition at line 191 of file oldBasic2DVector.h.

191  {
193  return RT(a.x()-b.x(), a.y()-b.y());
194 }

References a, and b.

◆ operator/()

template<class T , class Scalar >
Basic2DVector<T> operator/ ( const Basic2DVector< T > &  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 232 of file oldBasic2DVector.h.

232  {
233  T t = static_cast<T>(s);
234  return Basic2DVector<T>(v.x()/t, v.y()/t);
235 }

References alignCSCRings::s, submitPVValidationJobs::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 176 of file oldBasic2DVector.h.

176  {
177  return geometryDetails::print2D(s, v.x(),v.y());
178 }

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::y
T y() const
Cartesian y coordinate.
Definition: extBasic2DVector.h:67
Basic2DVector::dot
T dot(const Basic2DVector &lh) const
Scalar product, or "dot" product, with a vector of same type.
Definition: extBasic2DVector.h:126
Basic2DVector::x
T x() const
Cartesian x coordinate.
Definition: extBasic2DVector.h:64
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
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
geometryDetails::print2D
std::ostream & print2D(std::ostream &s, double x, double y)
Definition: print.cc:8