CMS 3D CMS Logo

Classes | Functions
VectorDoublet.h File Reference
#include "FWCore/Utilities/interface/Visibility.h"
#include "DataFormats/GeometryVector/interface/PreciseFloatType.h"

Go to the source code of this file.

Classes

class  VectorDoublet< V1, V2 >
 

Functions

template<class V1 , class V2 , class Scalar >
VectorDoublet< V1, V2 > operator* (const Scalar &s, const VectorDoublet< V1, V2 > &v)
 
template<class V1 , class V2 , class Scalar >
VectorDoublet< V1, V2 > operator* (const VectorDoublet< V1, V2 > &v, const Scalar &s)
 
template<class V1 , class V2 >
VectorDoublet< V1, V2 > operator+ (const VectorDoublet< V1, V2 > &a, const VectorDoublet< V1, V2 > &b)
 vector sum and subtraction More...
 
template<class V1 , class V2 >
VectorDoublet< V1, V2 > operator- (const VectorDoublet< V1, V2 > &a, const VectorDoublet< V1, V2 > &b)
 
template<class V1 , class V2 , class Scalar >
VectorDoublet< V1, V2 > operator/ (const VectorDoublet< V1, V2 > &v, const Scalar &s)
 

Function Documentation

◆ operator*() [1/2]

template<class V1 , class V2 , class Scalar >
VectorDoublet<V1, V2> operator* ( const Scalar &  s,
const VectorDoublet< V1, V2 > &  v 
)
inline

Definition at line 73 of file VectorDoublet.h.

73  {
74  return VectorDoublet<V1, V2>(v.first() * s, v.second() * s);
75 }

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

◆ operator*() [2/2]

template<class V1 , class V2 , class Scalar >
VectorDoublet<V1, V2> operator* ( const VectorDoublet< V1, V2 > &  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 69 of file VectorDoublet.h.

69  {
70  return VectorDoublet<V1, V2>(v.first() * s, v.second() * s);
71 }

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

◆ operator+()

template<class V1 , class V2 >
VectorDoublet<V1, V2> operator+ ( const VectorDoublet< V1, V2 > &  a,
const VectorDoublet< V1, V2 > &  b 
)
inline

vector sum and subtraction

Definition at line 56 of file VectorDoublet.h.

56  {
57  return VectorDoublet<V1, V2>(a.first() + b.first(), a.second() + b.second());
58 }

References a, and b.

◆ operator-()

template<class V1 , class V2 >
VectorDoublet<V1, V2> operator- ( const VectorDoublet< V1, V2 > &  a,
const VectorDoublet< V1, V2 > &  b 
)
inline

Definition at line 61 of file VectorDoublet.h.

61  {
62  return VectorDoublet<V1, V2>(a.first() - b.first(), a.second() - b.second());
63 }

References a, and b.

◆ operator/()

template<class V1 , class V2 , class Scalar >
VectorDoublet<V1, V2> operator/ ( const VectorDoublet< V1, V2 > &  v,
const Scalar &  s 
)
inline

Definition at line 78 of file VectorDoublet.h.

78  {
79  return VectorDoublet<V1, V2>(v.first() / s, v.second() / s);
80 }

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

findQualityFiles.v
v
Definition: findQualityFiles.py:179
alignCSCRings.s
s
Definition: alignCSCRings.py:92
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
VectorDoublet
Definition: VectorDoublet.h:8