CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Namespaces | Typedefs | Functions
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 >
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 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 , 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)
 

Typedef Documentation

typedef Basic2DVector<double> Basic2DVectorD

Definition at line 242 of file oldBasic2DVector.h.

typedef Basic2DVector<float> Basic2DVectorF

Definition at line 241 of file oldBasic2DVector.h.

Function Documentation

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

Definition at line 204 of file oldBasic2DVector.h.

References Basic2DVector< T >::dot().

204  {
205  return v1.dot(v2);
206 }
T dot(const Basic2DVector &lh) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
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 210 of file oldBasic2DVector.h.

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

211  {
212  return v1.x()*v2.x() + v1.y()*v2.y();
213 }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
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 219 of file oldBasic2DVector.h.

References alignCSCRings::s, lumiQTWidget::t, Basic2DVector< T >::x(), and Basic2DVector< T >::y().

219  {
220  T t = static_cast<T>(s);
221  return Basic2DVector<T>(v.x()*t, v.y()*t);
222 }
T y() const
Cartesian y coordinate.
long double T
T x() const
Cartesian x coordinate.
template<class T , class Scalar >
Basic2DVector<T> operator* ( const Scalar &  s,
const Basic2DVector< T > &  v 
)
inline

Same as operator*( Vector, Scalar)

Definition at line 226 of file oldBasic2DVector.h.

References alignCSCRings::s, lumiQTWidget::t, Basic2DVector< T >::x(), and Basic2DVector< T >::y().

226  {
227  T t = static_cast<T>(s);
228  return Basic2DVector<T>(v.x()*t, v.y()*t);
229 }
T y() const
Cartesian y coordinate.
long double T
T x() const
Cartesian x coordinate.
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 187 of file oldBasic2DVector.h.

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

187  {
189  return RT(a.x()+b.x(), a.y()+b.y());
190 }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T , class U >
Basic2DVector<typename PreciseFloatType<T,U>::Type> operator- ( const Basic2DVector< T > &  a,
const Basic2DVector< U > &  b 
)
inline

Definition at line 194 of file oldBasic2DVector.h.

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

194  {
196  return RT(a.x()-b.x(), a.y()-b.y());
197 }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
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 235 of file oldBasic2DVector.h.

References alignCSCRings::s, lumiQTWidget::t, Basic2DVector< T >::x(), and Basic2DVector< T >::y().

235  {
236  T t = static_cast<T>(s);
237  return Basic2DVector<T>(v.x()/t, v.y()/t);
238 }
T y() const
Cartesian y coordinate.
long double T
T x() const
Cartesian x coordinate.
template<class T >
std::ostream& operator<< ( std::ostream &  s,
const Basic2DVector< T > &  v 
)
inline

simple text output to standard streams

Definition at line 179 of file oldBasic2DVector.h.

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

179  {
180  return geometryDetails::print2D(s, v.x(),v.y());
181 }
std::ostream & print2D(std::ostream &s, double x, double y)
Definition: print.cc:8
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.