CMS 3D CMS Logo

VectorDoublet< V1, V2 > Class Template Reference

#include <TrackPropagation/RungeKutta/interface/VectorDoublet.h>

List of all members.

Public Types

typedef V1::ScalarType Scalar1
typedef V2::ScalarType Scalar2

Public Member Functions

PreciseFloatType< Scalar1,
Scalar2 >::Type 
dot (const VectorDoublet &v) const
const V1 & first () const
template<class T>
VectorDoubletoperator *= (const T &t)
VectorDoubletoperator+= (const VectorDoublet &v)
VectorDoublet operator- () const
VectorDoubletoperator-= (const VectorDoublet &v)
template<class T>
VectorDoubletoperator/= (const T &t)
const V2 & second () const
 VectorDoublet (const V1 &a, const V2 &b)
 VectorDoublet ()

Private Attributes

V1 a_
V2 b_


Detailed Description

template<class V1, class V2>
class VectorDoublet< V1, V2 >

Definition at line 7 of file VectorDoublet.h.


Member Typedef Documentation

template<class V1, class V2>
typedef V1::ScalarType VectorDoublet< V1, V2 >::Scalar1

Definition at line 10 of file VectorDoublet.h.

template<class V1, class V2>
typedef V2::ScalarType VectorDoublet< V1, V2 >::Scalar2

Definition at line 11 of file VectorDoublet.h.


Constructor & Destructor Documentation

template<class V1, class V2>
VectorDoublet< V1, V2 >::VectorDoublet (  )  [inline]

Definition at line 13 of file VectorDoublet.h.

Referenced by VectorDoublet< V1, V2 >::operator-().

00013 {}

template<class V1, class V2>
VectorDoublet< V1, V2 >::VectorDoublet ( const V1 &  a,
const V2 &  b 
) [inline]

Definition at line 14 of file VectorDoublet.h.

00014 : a_(a), b_(b) {}


Member Function Documentation

template<class V1, class V2>
PreciseFloatType<Scalar1,Scalar2>::Type VectorDoublet< V1, V2 >::dot ( const VectorDoublet< V1, V2 > &  v  )  const [inline]

Definition at line 45 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::first(), and VectorDoublet< V1, V2 >::second().

00045                                                                                     { 
00046     return first()*v.first() + second()*v.second();
00047   }

template<class V1, class V2>
const V1& VectorDoublet< V1, V2 >::first ( void   )  const [inline]

Definition at line 16 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::a_.

Referenced by VectorDoublet< V1, V2 >::dot(), operator *(), operator+(), VectorDoublet< V1, V2 >::operator+=(), operator-(), VectorDoublet< V1, V2 >::operator-=(), operator/(), CartesianState::position(), and CurvilinearState::position().

00016 {return a_;}

template<class V1, class V2>
template<class T>
VectorDoublet& VectorDoublet< V1, V2 >::operator *= ( const T &  t  )  [inline]

Definition at line 33 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::a_, and VectorDoublet< V1, V2 >::b_.

00033                                           {
00034     a_ *= t;
00035     b_ *= t;
00036     return *this;
00037   } 

template<class V1, class V2>
VectorDoublet& VectorDoublet< V1, V2 >::operator+= ( const VectorDoublet< V1, V2 > &  v  )  [inline]

Definition at line 19 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::a_, VectorDoublet< V1, V2 >::b_, VectorDoublet< V1, V2 >::first(), and VectorDoublet< V1, V2 >::second().

00019                                                       {
00020     a_ += v.first();
00021     b_ += v.second();
00022     return *this;
00023   } 

template<class V1, class V2>
VectorDoublet VectorDoublet< V1, V2 >::operator- (  )  const [inline]

Definition at line 30 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::a_, VectorDoublet< V1, V2 >::b_, and VectorDoublet< V1, V2 >::VectorDoublet().

00030 { return VectorDoublet( -a_, -b_);}

template<class V1, class V2>
VectorDoublet& VectorDoublet< V1, V2 >::operator-= ( const VectorDoublet< V1, V2 > &  v  )  [inline]

Definition at line 24 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::a_, VectorDoublet< V1, V2 >::b_, VectorDoublet< V1, V2 >::first(), and VectorDoublet< V1, V2 >::second().

00024                                                       {
00025     a_ -= v.first();
00026     b_ -= v.second();
00027     return *this;
00028   } 

template<class V1, class V2>
template<class T>
VectorDoublet& VectorDoublet< V1, V2 >::operator/= ( const T &  t  )  [inline]

Definition at line 39 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::a_, and VectorDoublet< V1, V2 >::b_.

00039                                           {
00040     a_ /= t;
00041     b_ /= t;
00042     return *this;
00043   } 

template<class V1, class V2>
const V2& VectorDoublet< V1, V2 >::second ( void   )  const [inline]

Definition at line 17 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::b_.

Referenced by CurvilinearState::charge(), VectorDoublet< V1, V2 >::dot(), CurvilinearState::momentum(), CartesianState::momentum(), operator *(), operator+(), VectorDoublet< V1, V2 >::operator+=(), operator-(), VectorDoublet< V1, V2 >::operator-=(), and operator/().

00017 {return b_;}


Member Data Documentation

template<class V1, class V2>
V1 VectorDoublet< V1, V2 >::a_ [private]

Definition at line 51 of file VectorDoublet.h.

Referenced by VectorDoublet< V1, V2 >::first(), VectorDoublet< V1, V2 >::operator *=(), VectorDoublet< V1, V2 >::operator+=(), VectorDoublet< V1, V2 >::operator-(), VectorDoublet< V1, V2 >::operator-=(), and VectorDoublet< V1, V2 >::operator/=().

template<class V1, class V2>
V2 VectorDoublet< V1, V2 >::b_ [private]

Definition at line 52 of file VectorDoublet.h.

Referenced by VectorDoublet< V1, V2 >::operator *=(), VectorDoublet< V1, V2 >::operator+=(), VectorDoublet< V1, V2 >::operator-(), VectorDoublet< V1, V2 >::operator-=(), VectorDoublet< V1, V2 >::operator/=(), and VectorDoublet< V1, V2 >::second().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:34:58 2009 for CMSSW by  doxygen 1.5.4